@heartlandone/vega 2.85.0 → 2.87.0-beta.1

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 (517) hide show
  1. package/dist/cjs/{accessibility-a5ef2038.js → accessibility-88f8af84.js} +16 -1
  2. package/dist/cjs/{app-globals-54327b0a.js → app-globals-885090b1.js} +11 -11
  3. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-5507f917.js → aria-dialog-focusable-trap-slimmer-c2ca46db.js} +3 -3
  4. package/dist/cjs/{child-nodes-event-prevent-slimmer-f3979a03.js → child-nodes-event-prevent-slimmer-b7498e5a.js} +2 -2
  5. package/dist/cjs/{child-nodes-notify-observer-slimmer-2631c381.js → child-nodes-notify-observer-slimmer-34a606b3.js} +1 -1
  6. package/dist/cjs/{code-block-6da521e6.js → code-block-15411c14.js} +19 -4
  7. package/dist/cjs/{component-usage-runtime-metrics-4572c5b7.js → component-usage-runtime-metrics-389d1548.js} +1 -1
  8. package/dist/cjs/{component-value-history-controller-slimmer.abstract-f3f35f94.js → component-value-history-controller-slimmer.abstract-5218e4b3.js} +6 -6
  9. package/dist/cjs/{content-state-89fafb3b.js → content-state-a69d99b4.js} +5 -5
  10. package/dist/cjs/{create-public-api-runtime-metrics-slimmer-9cb09fb2.js → create-public-api-runtime-metrics-slimmer-122350c3.js} +1 -1
  11. package/dist/cjs/{date-required-rule-0dd83683.js → date-required-rule-d65727c5.js} +1 -1
  12. package/dist/cjs/{design-token-4b3509dd.js → design-token-3bc36220.js} +3 -3
  13. package/dist/cjs/{dom-node-subject-observer-factory-9110cb94.js → dom-node-subject-observer-factory-ba6a95f3.js} +1 -1
  14. package/dist/cjs/{element-appender-slimmer-2b4e0a62.js → element-appender-slimmer-f86e6811.js} +6 -6
  15. package/dist/cjs/{event-emit-slimmer-80e1c8ca.js → event-emit-slimmer-73c42d7e.js} +2 -2
  16. package/dist/cjs/{feature-flag-controller-9129ef52.js → feature-flag-controller-5fa21654.js} +1 -1
  17. package/dist/cjs/{form-field-controller-slimmer-a07e3de0.js → form-field-controller-slimmer-44091874.js} +5 -5
  18. package/dist/cjs/{icon-manager-c12c6ea9.js → icon-manager-e855446d.js} +1 -1
  19. package/dist/cjs/{image-annotation-action-025389a7.js → image-annotation-action-aad07357.js} +5 -5
  20. package/dist/cjs/index.cjs.js +26 -25
  21. package/dist/cjs/{inject-keyboard-manager-ff8735b8.js → inject-keyboard-manager-d06b337e.js} +1 -1
  22. package/dist/cjs/{internal-icon-manager-c989189a.js → internal-icon-manager-66c48800.js} +1 -1
  23. package/dist/cjs/{internal-translation-controller-8360a89c.js → internal-translation-controller-f0da24b2.js} +5 -0
  24. package/dist/cjs/{internal-vega-event-manager-7e0d966d.js → internal-vega-event-manager-063c17cb.js} +5 -2
  25. package/dist/cjs/{keyboard-manager-cc446230.js → keyboard-manager-1e045791.js} +2 -2
  26. package/dist/cjs/{keyboard-manager-slimmer-a10b7d6f.js → keyboard-manager-slimmer-861d991f.js} +1 -1
  27. package/dist/cjs/loader.cjs.js +20 -20
  28. package/dist/cjs/{month-view-generator-41b6c6b6.js → month-view-generator-8ed9818e.js} +1 -1
  29. package/dist/cjs/{public-rules-fc52d624.js → public-rules-c7726702.js} +10 -10
  30. package/dist/cjs/{range-93cc8ab1.js → range-d6fb50a4.js} +2 -2
  31. package/dist/cjs/{responsive-format-facade-5f6cd211.js → responsive-format-facade-9647775d.js} +2 -2
  32. package/dist/cjs/{rich-text-editor-required-rule-fd3711fb.js → rich-text-editor-required-rule-a1a070ce.js} +1 -1
  33. package/dist/cjs/{split-cell-operation-532fb9f0.js → split-cell-operation-39b19943.js} +5 -5
  34. package/dist/cjs/{state-border-formatter-d1c80c1d.js → state-border-formatter-1a483a9b.js} +1 -1
  35. package/dist/cjs/{string-format-strategy.abstract-b39da0dd.js → string-format-strategy.abstract-2aec209d.js} +1 -1
  36. package/dist/cjs/{string-input-formatter-slimmer-127cf2b8.js → string-input-formatter-slimmer-e061bd10.js} +4 -4
  37. package/dist/cjs/{string-mask-strategy-524d0f69.js → string-mask-strategy-4bc07c00.js} +2 -2
  38. package/dist/cjs/{style-formatter-c201e7d0.js → style-formatter-263d5eb6.js} +2 -2
  39. package/dist/cjs/{sub-state-notify-slimmer-b33171b0.js → sub-state-notify-slimmer-757e3a76.js} +2 -2
  40. package/dist/cjs/{sub-state-observer-slimmer-b8f6f27b.js → sub-state-observer-slimmer-aa93ab4f.js} +3 -3
  41. package/dist/cjs/{time-required-rule-ecb45905.js → time-required-rule-f9a7e897.js} +1 -1
  42. package/dist/cjs/{token-extension-4f6ed976.js → token-extension-927062b9.js} +28 -15
  43. package/dist/cjs/{translation-slimmer-3cd7d3b2.js → translation-slimmer-a4a7f0eb.js} +1 -1
  44. package/dist/cjs/{type-guard-2e97fc56.js → type-guard-c1195e50.js} +1 -1
  45. package/dist/cjs/{ui-ae4ee13d.js → ui-3727d685.js} +13 -0
  46. package/dist/cjs/{valid-credit-card-number-rule-2d7d20ce.js → valid-credit-card-number-rule-22f3e6cf.js} +1 -1
  47. package/dist/cjs/vega-accordion.cjs.entry.js +35 -17
  48. package/dist/cjs/vega-app-footer.cjs.entry.js +1 -1
  49. package/dist/cjs/vega-app-header-button.cjs.entry.js +17 -17
  50. package/dist/cjs/vega-backdrop.cjs.entry.js +2 -2
  51. package/dist/cjs/vega-banner.cjs.entry.js +12 -12
  52. package/dist/cjs/vega-bar-chart.cjs.entry.js +1 -1
  53. package/dist/cjs/vega-box.cjs.entry.js +10 -10
  54. package/dist/cjs/vega-brand-logo.cjs.entry.js +4 -4
  55. package/dist/cjs/vega-breadcrumb.cjs.entry.js +9 -9
  56. package/dist/cjs/vega-button-circle.cjs.entry.js +15 -15
  57. package/dist/cjs/vega-button-group_2.cjs.entry.js +12 -12
  58. package/dist/cjs/vega-button-link.cjs.entry.js +9 -9
  59. package/dist/cjs/vega-button.cjs.entry.js +13 -13
  60. package/dist/cjs/vega-calendar_4.cjs.entry.js +669 -347
  61. package/dist/cjs/vega-card.cjs.entry.js +9 -9
  62. package/dist/cjs/vega-carousel.cjs.entry.js +12 -12
  63. package/dist/cjs/vega-checkbox_2.cjs.entry.js +28 -16
  64. package/dist/cjs/vega-chip.cjs.entry.js +15 -15
  65. package/dist/cjs/vega-code-block.cjs.entry.js +21 -21
  66. package/dist/cjs/vega-color-picker.cjs.entry.js +11 -11
  67. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +17 -17
  68. package/dist/cjs/vega-color-swatch.cjs.entry.js +9 -9
  69. package/dist/cjs/vega-combo-box.cjs.entry.js +17 -17
  70. package/dist/cjs/vega-counter-badge.cjs.entry.js +1 -1
  71. package/dist/cjs/vega-date-picker_2.cjs.entry.js +43 -31
  72. package/dist/cjs/{vega-dialog-controller-03ef4d9a.js → vega-dialog-controller-6df7825e.js} +1 -1
  73. package/dist/cjs/vega-dialog_2.cjs.entry.js +16 -16
  74. package/dist/cjs/vega-divider.cjs.entry.js +8 -8
  75. package/dist/cjs/vega-dropdown_5.cjs.entry.js +23 -23
  76. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  77. package/dist/cjs/{vega-event-id-d9994eb3.js → vega-event-id-f95480b7.js} +2 -0
  78. package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
  79. package/dist/cjs/vega-field-label.cjs.entry.js +7 -7
  80. package/dist/cjs/vega-file-uploader.cjs.entry.js +15 -15
  81. package/dist/cjs/vega-flag-icon.cjs.entry.js +11 -11
  82. package/dist/cjs/vega-flex.cjs.entry.js +10 -10
  83. package/dist/cjs/vega-font.cjs.entry.js +9 -9
  84. package/dist/cjs/vega-form.cjs.entry.js +16 -16
  85. package/dist/cjs/vega-grid.cjs.entry.js +9 -9
  86. package/dist/cjs/vega-hint.cjs.entry.js +1 -1
  87. package/dist/cjs/vega-icon.cjs.entry.js +11 -11
  88. package/dist/cjs/vega-image-uploader.cjs.entry.js +19 -19
  89. package/dist/cjs/vega-input-credit-card.cjs.entry.js +20 -20
  90. package/dist/cjs/vega-input-numeric.cjs.entry.js +17 -17
  91. package/dist/cjs/vega-input-passcode.cjs.entry.js +16 -16
  92. package/dist/cjs/vega-input-phone-number.cjs.entry.js +29 -19
  93. package/dist/cjs/vega-input-range.cjs.entry.js +15 -15
  94. package/dist/cjs/vega-input-select.cjs.entry.js +20 -20
  95. package/dist/cjs/vega-input.cjs.entry.js +19 -19
  96. package/dist/cjs/{vega-internal-event-id-87014e4f.js → vega-internal-event-id-e138d4d6.js} +2 -0
  97. package/dist/cjs/vega-item-toggle.cjs.entry.js +6 -6
  98. package/dist/cjs/vega-left-nav_5.cjs.entry.js +33 -31
  99. package/dist/cjs/vega-line-chart.cjs.entry.js +2 -2
  100. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +7 -7
  101. package/dist/cjs/vega-page-notification_2.cjs.entry.js +5 -5
  102. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +9 -9
  103. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +7 -7
  104. package/dist/cjs/vega-pagination.cjs.entry.js +14 -14
  105. package/dist/cjs/vega-pie-chart.cjs.entry.js +1 -1
  106. package/dist/cjs/vega-popover_2.cjs.entry.js +18 -18
  107. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +15 -15
  108. package/dist/cjs/vega-radio_2.cjs.entry.js +18 -18
  109. package/dist/cjs/vega-rich-text-content.cjs.entry.js +16 -16
  110. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +30 -37
  111. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +21 -21
  112. package/dist/cjs/vega-section-title.cjs.entry.js +1 -1
  113. package/dist/cjs/vega-segment-control.cjs.entry.js +6 -6
  114. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +17 -17
  115. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +172 -39
  116. package/dist/cjs/vega-sidenav_3.cjs.entry.js +18 -18
  117. package/dist/cjs/vega-signature-capture.cjs.entry.js +20 -20
  118. package/dist/cjs/vega-skeleton.cjs.entry.js +1 -1
  119. package/dist/cjs/vega-slot-container.cjs.entry.js +1 -1
  120. package/dist/cjs/vega-stepper.cjs.entry.js +13 -13
  121. package/dist/cjs/vega-tab-group_2.cjs.entry.js +156 -70
  122. package/dist/cjs/vega-table_11.cjs.entry.js +20 -20
  123. package/dist/cjs/vega-text.cjs.entry.js +2 -2
  124. package/dist/cjs/vega-textarea.cjs.entry.js +13 -13
  125. package/dist/cjs/vega-time-picker_2.cjs.entry.js +26 -32
  126. package/dist/cjs/vega-toggle-switch.cjs.entry.js +11 -11
  127. package/dist/cjs/vega-tooltip_2.cjs.entry.js +12 -12
  128. package/dist/cjs/vega.cjs.js +20 -20
  129. package/dist/cjs/{wait-for-component-did-render-16863a21.js → wait-for-component-did-render-a13f7eb9.js} +2 -2
  130. package/dist/collection/collection-manifest.json +1 -1
  131. package/dist/collection/components/vega-accordion/slimmers/vega-accordion-renderer.js +14 -1
  132. package/dist/collection/components/vega-accordion/vega-accordion.js +5 -0
  133. package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-preview-actions-controller.js +83 -0
  134. package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-keyboard-controller.js +154 -0
  135. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-item-renderer.js +4 -0
  136. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +2 -2
  137. package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-event-renderer.js +10 -1
  138. package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +24 -4
  139. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/assets/pen.js +3 -0
  140. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/controllers/vega-calendar-event-preview-state-controller.js +4 -0
  141. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +37 -4
  142. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/vega-calendar-event-preview.js +3 -1
  143. package/dist/collection/components/vega-calendar/vega-calendar.js +115 -1
  144. package/dist/collection/components/vega-checkbox/vega-checkbox.js +14 -2
  145. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +3 -0
  146. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +17 -1
  147. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +31 -1
  148. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +1 -1
  149. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +10 -0
  150. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +1 -1
  151. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.js +10 -8
  152. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-zindex-controller.js +2 -2
  153. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +8 -0
  154. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +6 -0
  155. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +8 -2
  156. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +1 -0
  157. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +1 -0
  158. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +1 -0
  159. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.js +5 -1
  160. package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -1
  161. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +3 -10
  162. package/dist/collection/components/vega-selection-tile/slimmers/renderers/vega-selection-tile-renderer.js +71 -10
  163. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.js +39 -11
  164. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.css +1 -3
  165. package/dist/collection/components/vega-selection-tile/vega-selection-tile.css +23 -18
  166. package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +45 -1
  167. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-panel-controller.js +14 -1
  168. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-voice-over-focus-controller.js +45 -0
  169. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-close-button-renderer.js +15 -1
  170. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-direction-button-renderer.js +1 -1
  171. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.js +16 -4
  172. package/dist/collection/components/vega-tab-group/vega-tab-group.js +5 -0
  173. package/dist/collection/components/vega-time-picker/vega-time-picker.js +6 -12
  174. package/dist/collection/constants/ui.js +1 -0
  175. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +5 -2
  176. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
  177. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  178. package/dist/collection/helpers/translation/locales/en.js +5 -0
  179. package/dist/collection/polyfill/d3/d3-time-format-polyfill.js +1 -1
  180. package/dist/collection/utils/accessibility.js +16 -1
  181. package/dist/collection/utils/ui.js +12 -0
  182. package/dist/esm/{accessibility-524cabd2.js → accessibility-6af5cf2e.js} +16 -1
  183. package/dist/esm/{app-globals-b1999c09.js → app-globals-be458779.js} +11 -11
  184. package/dist/esm/{aria-dialog-focusable-trap-slimmer-6eb79723.js → aria-dialog-focusable-trap-slimmer-7d9a9f5a.js} +3 -3
  185. package/dist/esm/{child-nodes-event-prevent-slimmer-75f93d85.js → child-nodes-event-prevent-slimmer-0a406a71.js} +2 -2
  186. package/dist/esm/{child-nodes-notify-observer-slimmer-a8cb19cf.js → child-nodes-notify-observer-slimmer-8822d0d0.js} +1 -1
  187. package/dist/esm/{code-block-e43c8120.js → code-block-ff52d912.js} +19 -5
  188. package/dist/esm/{component-usage-runtime-metrics-46020a03.js → component-usage-runtime-metrics-4b1afd04.js} +1 -1
  189. package/dist/esm/{component-value-history-controller-slimmer.abstract-60c1910e.js → component-value-history-controller-slimmer.abstract-ad5f29cd.js} +6 -6
  190. package/dist/esm/{content-state-d363f2ca.js → content-state-6fccd284.js} +5 -5
  191. package/dist/esm/{create-public-api-runtime-metrics-slimmer-aaadaa08.js → create-public-api-runtime-metrics-slimmer-da6615bf.js} +1 -1
  192. package/dist/esm/{date-required-rule-a84c21d4.js → date-required-rule-70324452.js} +1 -1
  193. package/dist/esm/{design-token-57de4f4f.js → design-token-0e6fb2c4.js} +3 -3
  194. package/dist/esm/{dom-node-subject-observer-factory-aca0116e.js → dom-node-subject-observer-factory-3897e95b.js} +1 -1
  195. package/dist/esm/{element-appender-slimmer-05f487d7.js → element-appender-slimmer-afe5a638.js} +6 -6
  196. package/dist/esm/{event-emit-slimmer-1c57093d.js → event-emit-slimmer-697ad0b7.js} +2 -2
  197. package/dist/esm/{feature-flag-controller-30f7b625.js → feature-flag-controller-5ebc0cec.js} +1 -1
  198. package/dist/esm/{form-field-controller-slimmer-ae8478b5.js → form-field-controller-slimmer-9e70a18d.js} +5 -5
  199. package/dist/esm/{icon-manager-539d7cf7.js → icon-manager-691c8682.js} +1 -1
  200. package/dist/esm/{image-annotation-action-008ca25b.js → image-annotation-action-245eaa54.js} +5 -5
  201. package/dist/esm/index.js +25 -25
  202. package/dist/esm/{inject-keyboard-manager-1ceb9ee0.js → inject-keyboard-manager-05d5db90.js} +1 -1
  203. package/dist/esm/{internal-icon-manager-bd80b3bb.js → internal-icon-manager-276f968f.js} +1 -1
  204. package/dist/esm/{internal-translation-controller-d7dee4a0.js → internal-translation-controller-d8217d93.js} +5 -0
  205. package/dist/esm/{internal-vega-event-manager-7cdf3c28.js → internal-vega-event-manager-1ac5ee9a.js} +5 -2
  206. package/dist/esm/{keyboard-manager-50a1d90e.js → keyboard-manager-26e2fc32.js} +2 -2
  207. package/dist/esm/{keyboard-manager-slimmer-3891ee20.js → keyboard-manager-slimmer-012a9a9b.js} +1 -1
  208. package/dist/esm/loader.js +20 -20
  209. package/dist/esm/{month-view-generator-70c597a6.js → month-view-generator-918f1f88.js} +1 -1
  210. package/dist/esm/polyfills/core-js.js +0 -0
  211. package/dist/esm/polyfills/dom.js +0 -0
  212. package/dist/esm/polyfills/es5-html-element.js +0 -0
  213. package/dist/esm/polyfills/index.js +0 -0
  214. package/dist/esm/polyfills/system.js +0 -0
  215. package/dist/esm/{public-rules-1561e357.js → public-rules-22320bdf.js} +10 -10
  216. package/dist/esm/{range-784d5ec8.js → range-76f8e7dd.js} +2 -2
  217. package/dist/esm/{responsive-format-facade-456a9f16.js → responsive-format-facade-2a1d6398.js} +2 -2
  218. package/dist/esm/{rich-text-editor-required-rule-8768bc8d.js → rich-text-editor-required-rule-6eb90840.js} +1 -1
  219. package/dist/esm/{split-cell-operation-35ce149b.js → split-cell-operation-7652e813.js} +5 -5
  220. package/dist/esm/{state-border-formatter-afac8d33.js → state-border-formatter-a243f3fc.js} +1 -1
  221. package/dist/esm/{string-format-strategy.abstract-f9907969.js → string-format-strategy.abstract-f6625ed7.js} +1 -1
  222. package/dist/esm/{string-input-formatter-slimmer-4059080b.js → string-input-formatter-slimmer-e801bd7e.js} +4 -4
  223. package/dist/esm/{string-mask-strategy-5f655300.js → string-mask-strategy-53cb9b33.js} +2 -2
  224. package/dist/esm/{style-formatter-ee52d8d0.js → style-formatter-a622a045.js} +2 -2
  225. package/dist/esm/{sub-state-notify-slimmer-63ecb465.js → sub-state-notify-slimmer-80ac7dee.js} +2 -2
  226. package/dist/esm/{sub-state-observer-slimmer-2adbbe00.js → sub-state-observer-slimmer-81538a8c.js} +3 -3
  227. package/dist/esm/{time-required-rule-db873c19.js → time-required-rule-2fd8df50.js} +1 -1
  228. package/dist/esm/{token-extension-23b5ab65.js → token-extension-5838c71b.js} +28 -15
  229. package/dist/esm/{translation-slimmer-5e2bff5f.js → translation-slimmer-32353a1c.js} +1 -1
  230. package/dist/esm/{type-guard-adc244fd.js → type-guard-ed1004cc.js} +1 -1
  231. package/dist/esm/{ui-b7600a48.js → ui-64815a12.js} +13 -1
  232. package/dist/esm/{valid-credit-card-number-rule-a826dd49.js → valid-credit-card-number-rule-7c9d6808.js} +1 -1
  233. package/dist/esm/vega-accordion.entry.js +35 -17
  234. package/dist/esm/vega-app-footer.entry.js +1 -1
  235. package/dist/esm/vega-app-header-button.entry.js +17 -17
  236. package/dist/esm/vega-backdrop.entry.js +2 -2
  237. package/dist/esm/vega-banner.entry.js +12 -12
  238. package/dist/esm/vega-bar-chart.entry.js +1 -1
  239. package/dist/esm/vega-box.entry.js +10 -10
  240. package/dist/esm/vega-brand-logo.entry.js +4 -4
  241. package/dist/esm/vega-breadcrumb.entry.js +9 -9
  242. package/dist/esm/vega-button-circle.entry.js +15 -15
  243. package/dist/esm/vega-button-group_2.entry.js +12 -12
  244. package/dist/esm/vega-button-link.entry.js +9 -9
  245. package/dist/esm/vega-button.entry.js +13 -13
  246. package/dist/esm/vega-calendar_4.entry.js +670 -348
  247. package/dist/esm/vega-card.entry.js +9 -9
  248. package/dist/esm/vega-carousel.entry.js +12 -12
  249. package/dist/esm/vega-checkbox_2.entry.js +28 -16
  250. package/dist/esm/vega-chip.entry.js +15 -15
  251. package/dist/esm/vega-code-block.entry.js +21 -21
  252. package/dist/esm/vega-color-picker.entry.js +11 -11
  253. package/dist/esm/vega-color-swatch-picker.entry.js +17 -17
  254. package/dist/esm/vega-color-swatch.entry.js +9 -9
  255. package/dist/esm/vega-combo-box.entry.js +17 -17
  256. package/dist/esm/vega-counter-badge.entry.js +1 -1
  257. package/dist/esm/vega-date-picker_2.entry.js +43 -31
  258. package/dist/esm/{vega-dialog-controller-bbb2fc52.js → vega-dialog-controller-389e7f7c.js} +1 -1
  259. package/dist/esm/vega-dialog_2.entry.js +16 -16
  260. package/dist/esm/vega-divider.entry.js +8 -8
  261. package/dist/esm/vega-dropdown_5.entry.js +23 -23
  262. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  263. package/dist/esm/{vega-event-id-a6ccca66.js → vega-event-id-578c6c6d.js} +2 -1
  264. package/dist/esm/vega-field-error.entry.js +1 -1
  265. package/dist/esm/vega-field-label.entry.js +7 -7
  266. package/dist/esm/vega-file-uploader.entry.js +15 -15
  267. package/dist/esm/vega-flag-icon.entry.js +11 -11
  268. package/dist/esm/vega-flex.entry.js +10 -10
  269. package/dist/esm/vega-font.entry.js +9 -9
  270. package/dist/esm/vega-form.entry.js +16 -16
  271. package/dist/esm/vega-grid.entry.js +9 -9
  272. package/dist/esm/vega-hint.entry.js +1 -1
  273. package/dist/esm/vega-icon.entry.js +11 -11
  274. package/dist/esm/vega-image-uploader.entry.js +19 -19
  275. package/dist/esm/vega-input-credit-card.entry.js +20 -20
  276. package/dist/esm/vega-input-numeric.entry.js +17 -17
  277. package/dist/esm/vega-input-passcode.entry.js +16 -16
  278. package/dist/esm/vega-input-phone-number.entry.js +29 -19
  279. package/dist/esm/vega-input-range.entry.js +15 -15
  280. package/dist/esm/vega-input-select.entry.js +20 -20
  281. package/dist/esm/vega-input.entry.js +19 -19
  282. package/dist/esm/{vega-internal-event-id-db974a0d.js → vega-internal-event-id-913e8be6.js} +2 -1
  283. package/dist/esm/vega-item-toggle.entry.js +6 -6
  284. package/dist/esm/vega-left-nav_5.entry.js +33 -31
  285. package/dist/esm/vega-line-chart.entry.js +2 -2
  286. package/dist/esm/vega-loader-wrapper_2.entry.js +7 -7
  287. package/dist/esm/vega-page-notification_2.entry.js +5 -5
  288. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +9 -9
  289. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +7 -7
  290. package/dist/esm/vega-pagination.entry.js +14 -14
  291. package/dist/esm/vega-pie-chart.entry.js +1 -1
  292. package/dist/esm/vega-popover_2.entry.js +18 -18
  293. package/dist/esm/vega-progress-tracker_2.entry.js +15 -15
  294. package/dist/esm/vega-radio_2.entry.js +18 -18
  295. package/dist/esm/vega-rich-text-content.entry.js +16 -16
  296. package/dist/esm/vega-rich-text-editor_4.entry.js +30 -37
  297. package/dist/esm/vega-rich-text-table-properties_3.entry.js +21 -21
  298. package/dist/esm/vega-section-title.entry.js +1 -1
  299. package/dist/esm/vega-segment-control.entry.js +6 -6
  300. package/dist/esm/vega-selection-chip_2.entry.js +17 -17
  301. package/dist/esm/vega-selection-tile_2.entry.js +172 -39
  302. package/dist/esm/vega-sidenav_3.entry.js +18 -18
  303. package/dist/esm/vega-signature-capture.entry.js +20 -20
  304. package/dist/esm/vega-skeleton.entry.js +1 -1
  305. package/dist/esm/vega-slot-container.entry.js +1 -1
  306. package/dist/esm/vega-stepper.entry.js +13 -13
  307. package/dist/esm/vega-tab-group_2.entry.js +156 -70
  308. package/dist/esm/vega-table_11.entry.js +20 -20
  309. package/dist/esm/vega-text.entry.js +2 -2
  310. package/dist/esm/vega-textarea.entry.js +13 -13
  311. package/dist/esm/vega-time-picker_2.entry.js +26 -32
  312. package/dist/esm/vega-toggle-switch.entry.js +11 -11
  313. package/dist/esm/vega-tooltip_2.entry.js +12 -12
  314. package/dist/esm/vega.js +20 -20
  315. package/dist/esm/{wait-for-component-did-render-9a83d343.js → wait-for-component-did-render-4069cbea.js} +2 -2
  316. package/dist/sri/vega-sri-manifest.json +429 -429
  317. package/dist/types/components/vega-accordion/slimmers/vega-accordion-renderer.d.ts +2 -0
  318. package/dist/types/components/vega-accordion/vega-accordion.d.ts +2 -0
  319. package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-preview-actions-controller.d.ts +36 -0
  320. package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-keyboard-controller.d.ts +35 -0
  321. package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-item-renderer.d.ts +1 -0
  322. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-event-renderer.d.ts +7 -0
  323. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +16 -0
  324. package/dist/types/components/vega-calendar/types.d.ts +32 -0
  325. package/dist/types/components/vega-calendar/vega-calendar-event-preview/assets/pen.d.ts +3 -0
  326. package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/controllers/vega-calendar-event-preview-state-controller.d.ts +1 -0
  327. package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +6 -0
  328. package/dist/types/components/vega-calendar/vega-calendar-event-preview/types.d.ts +6 -0
  329. package/dist/types/components/vega-calendar/vega-calendar-event-preview/vega-calendar-event-preview.d.ts +2 -0
  330. package/dist/types/components/vega-calendar/vega-calendar.d.ts +34 -1
  331. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +2 -0
  332. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +1 -0
  333. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +8 -0
  334. package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +2 -0
  335. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.d.ts +2 -1
  336. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +2 -1
  337. package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +2 -0
  338. package/dist/types/components/vega-rich-text-editor/interface.d.ts +5 -0
  339. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -1
  340. package/dist/types/components/vega-selection-tile/slimmers/renderers/vega-selection-tile-renderer.d.ts +12 -0
  341. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.d.ts +0 -1
  342. package/dist/types/components/vega-selection-tile/vega-selection-tile.d.ts +2 -0
  343. package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-voice-over-focus-controller.d.ts +23 -0
  344. package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-close-button-renderer.d.ts +1 -0
  345. package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.d.ts +2 -0
  346. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +2 -0
  347. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +5 -11
  348. package/dist/types/components.d.ts +46 -5
  349. package/dist/types/constants/ui.d.ts +1 -1
  350. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
  351. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  352. package/dist/types/helpers/translation/interface.d.ts +5 -0
  353. package/dist/types/types/components.type.d.ts +2 -0
  354. package/dist/types/types/public-api.d.ts +1 -0
  355. package/dist/types/utils/accessibility.d.ts +1 -0
  356. package/dist/types/utils/ui.d.ts +9 -0
  357. package/dist/vega/index.esm.js +1 -1
  358. package/dist/vega/{p-d8180e42.entry.js → p-018756ad.entry.js} +1 -1
  359. package/dist/vega/{p-7702a906.entry.js → p-01a54c29.entry.js} +1 -1
  360. package/dist/vega/p-042933f1.js +1 -0
  361. package/dist/vega/{p-6b5cb920.js → p-04a65b3f.js} +1 -1
  362. package/dist/vega/{p-423762ae.entry.js → p-07225567.entry.js} +1 -1
  363. package/dist/vega/{p-a07c5dae.js → p-09076646.js} +1 -1
  364. package/dist/vega/{p-3b791b5d.js → p-0a261b66.js} +1 -1
  365. package/dist/vega/p-0a322971.entry.js +1 -0
  366. package/dist/vega/{p-59c6dcf7.entry.js → p-0b41b49a.entry.js} +1 -1
  367. package/dist/vega/{p-1d30cab2.js → p-0d97dcb9.js} +1 -1
  368. package/dist/vega/{p-af5cb9bc.js → p-10fa27d2.js} +1 -1
  369. package/dist/vega/{p-f28a6074.js → p-11e2dcf5.js} +1 -1
  370. package/dist/vega/{p-2c1a85dd.entry.js → p-1250b1ab.entry.js} +1 -1
  371. package/dist/vega/{p-386895e9.js → p-154cc614.js} +1 -1
  372. package/dist/vega/p-15b4f1ce.entry.js +1 -0
  373. package/dist/vega/{p-e6adf829.js → p-1704ff25.js} +1 -1
  374. package/dist/vega/p-186df871.entry.js +1 -0
  375. package/dist/vega/{p-c95dbf11.js → p-189d36ec.js} +1 -1
  376. package/dist/vega/{p-c85e743d.js → p-19adf714.js} +1 -1
  377. package/dist/vega/{p-c2388937.entry.js → p-19df2831.entry.js} +1 -1
  378. package/dist/vega/{p-a46e977b.entry.js → p-1be90bab.entry.js} +1 -1
  379. package/dist/vega/{p-69c11b7b.entry.js → p-1da42a63.entry.js} +1 -1
  380. package/dist/vega/{p-096d186d.entry.js → p-255a7387.entry.js} +1 -1
  381. package/dist/vega/{p-1a869f0e.js → p-281fa1e0.js} +1 -1
  382. package/dist/vega/{p-9af0e2e7.js → p-2927b7a1.js} +1 -1
  383. package/dist/vega/p-294cff20.entry.js +1 -0
  384. package/dist/vega/{p-a87cb7ac.js → p-296c5e52.js} +1 -1
  385. package/dist/vega/{p-dba16739.js → p-2b2fefc6.js} +1 -1
  386. package/dist/vega/{p-c347e08a.js → p-2d694684.js} +1 -1
  387. package/dist/vega/{p-9eb00537.entry.js → p-2e0bdc53.entry.js} +1 -1
  388. package/dist/vega/{p-b7721666.js → p-31ebace1.js} +1 -1
  389. package/dist/vega/p-32a0f887.js +1 -0
  390. package/dist/vega/{p-c31a32f4.js → p-341d5e4e.js} +1 -1
  391. package/dist/vega/{p-e7a4b760.entry.js → p-3967fa98.entry.js} +1 -1
  392. package/dist/vega/{p-7f74cd41.entry.js → p-3a3720c7.entry.js} +1 -1
  393. package/dist/vega/p-3a620268.js +1 -0
  394. package/dist/vega/{p-6c43d54a.js → p-3a93730e.js} +1 -1
  395. package/dist/vega/{p-98a6cd8e.entry.js → p-3bf3c8bb.entry.js} +1 -1
  396. package/dist/vega/{p-6fadee27.entry.js → p-49341532.entry.js} +1 -1
  397. package/dist/vega/{p-77754d62.entry.js → p-4a6f241d.entry.js} +1 -1
  398. package/dist/vega/{p-3e64fa38.entry.js → p-4a954d9d.entry.js} +1 -1
  399. package/dist/vega/{p-9fc8bd1f.entry.js → p-4a9c8ec0.entry.js} +1 -1
  400. package/dist/vega/{p-8d48940d.js → p-4c91b13d.js} +1 -1
  401. package/dist/vega/p-4dd02704.js +1 -0
  402. package/dist/vega/p-50fb936f.entry.js +1 -0
  403. package/dist/vega/{p-da8bb883.entry.js → p-52645382.entry.js} +1 -1
  404. package/dist/vega/{p-73c6669e.entry.js → p-5b43a303.entry.js} +1 -1
  405. package/dist/vega/{p-cf2838c7.entry.js → p-5df7ab03.entry.js} +1 -1
  406. package/dist/vega/p-5f377954.js +1 -1
  407. package/dist/vega/p-612808ce.entry.js +1 -0
  408. package/dist/vega/{p-ecbb63a5.entry.js → p-636d890e.entry.js} +1 -1
  409. package/dist/vega/p-6399b5ed.js +1 -0
  410. package/dist/vega/{p-4afafeb3.entry.js → p-648be36d.entry.js} +1 -1
  411. package/dist/vega/p-686e0b6b.entry.js +1 -0
  412. package/dist/vega/p-6d4faebc.js +1 -0
  413. package/dist/vega/{p-2fb26f4f.entry.js → p-70ae9157.entry.js} +1 -1
  414. package/dist/vega/{p-e1fbfd20.js → p-724df1f5.js} +1 -1
  415. package/dist/vega/{p-fcce494e.js → p-72e2a587.js} +1 -1
  416. package/dist/vega/{p-1deedff2.entry.js → p-740f3325.entry.js} +1 -1
  417. package/dist/vega/{p-a050c24d.entry.js → p-74a1a82a.entry.js} +1 -1
  418. package/dist/vega/{p-264b3309.entry.js → p-76075a1c.entry.js} +1 -1
  419. package/dist/vega/{p-76063dcb.js → p-77fb5d5c.js} +1 -1
  420. package/dist/vega/{p-e4c4ea35.js → p-78ba7ca9.js} +1 -1
  421. package/dist/vega/{p-a49c25c2.entry.js → p-79bb216e.entry.js} +1 -1
  422. package/dist/vega/{p-d37636a5.entry.js → p-7e7e2f85.entry.js} +1 -1
  423. package/dist/vega/{p-c15a58b5.entry.js → p-7ffe8081.entry.js} +1 -1
  424. package/dist/vega/{p-4cefd7fe.js → p-8077b117.js} +1 -1
  425. package/dist/vega/{p-5bf3ab33.js → p-858ec529.js} +1 -1
  426. package/dist/vega/{p-0b5b0fd2.entry.js → p-879d3cc9.entry.js} +1 -1
  427. package/dist/vega/{p-ae1aa4df.js → p-891815d6.js} +1 -1
  428. package/dist/vega/p-8ce9e214.js +1 -0
  429. package/dist/vega/p-8d36afcc.entry.js +1 -0
  430. package/dist/vega/{p-a9e10a64.js → p-919de162.js} +1 -1
  431. package/dist/vega/{p-effb285f.entry.js → p-931dac8c.entry.js} +1 -1
  432. package/dist/vega/{p-c601b331.entry.js → p-979a5e91.entry.js} +1 -1
  433. package/dist/vega/{p-d402eb7b.entry.js → p-98dad153.entry.js} +1 -1
  434. package/dist/vega/p-9a6bd32c.js +1 -0
  435. package/dist/vega/p-9e0f8b46.entry.js +1 -0
  436. package/dist/vega/{p-487ecdb0.entry.js → p-a03341d8.entry.js} +1 -1
  437. package/dist/vega/{p-e1d2c60d.js → p-a0dd08b1.js} +1 -1
  438. package/dist/vega/p-a2b8d49d.js +1 -0
  439. package/dist/vega/p-a6565e02.js +1 -0
  440. package/dist/vega/{p-afd1b519.entry.js → p-a67d52ce.entry.js} +1 -1
  441. package/dist/vega/{p-411ea209.entry.js → p-aa4e9a4b.entry.js} +1 -1
  442. package/dist/vega/{p-fa91805b.entry.js → p-aa8f4713.entry.js} +1 -1
  443. package/dist/vega/{p-e27626f6.js → p-ab04eff6.js} +1 -1
  444. package/dist/vega/p-ab4c307b.js +1 -0
  445. package/dist/vega/{p-e47b2c4c.entry.js → p-ac26924d.entry.js} +1 -1
  446. package/dist/vega/{p-7f46cc1e.entry.js → p-adc64ff6.entry.js} +1 -1
  447. package/dist/vega/{p-031c0cf7.js → p-b02b985d.js} +1 -1
  448. package/dist/vega/{p-0bb0b521.entry.js → p-b69755c7.entry.js} +1 -1
  449. package/dist/vega/{p-c801c85d.js → p-b6be1f33.js} +1 -1
  450. package/dist/vega/{p-25572ea7.entry.js → p-bd47d8a7.entry.js} +1 -1
  451. package/dist/vega/{p-0b4880bd.entry.js → p-be783294.entry.js} +1 -1
  452. package/dist/vega/{p-79c12a64.entry.js → p-bee5dfb0.entry.js} +1 -1
  453. package/dist/vega/{p-45aaaef6.entry.js → p-c19132c9.entry.js} +1 -1
  454. package/dist/vega/p-c41b42eb.entry.js +1 -0
  455. package/dist/vega/{p-3d92d2af.entry.js → p-c45acdc3.entry.js} +1 -1
  456. package/dist/vega/{p-571a6d15.entry.js → p-ce034372.entry.js} +1 -1
  457. package/dist/vega/{p-bc74d7e7.entry.js → p-ce2d9efe.entry.js} +1 -1
  458. package/dist/vega/p-d05915af.entry.js +1 -0
  459. package/dist/vega/{p-c8fe46fd.entry.js → p-d1a6e126.entry.js} +1 -1
  460. package/dist/vega/{p-9297f4a9.entry.js → p-d286da1d.entry.js} +1 -1
  461. package/dist/vega/{p-3c456e91.entry.js → p-d4262f06.entry.js} +1 -1
  462. package/dist/vega/{p-23b38467.entry.js → p-d5aad9f0.entry.js} +1 -1
  463. package/dist/vega/{p-35d77c9c.entry.js → p-d97974be.entry.js} +1 -1
  464. package/dist/vega/{p-9e2b7718.entry.js → p-d9d4bdbf.entry.js} +1 -1
  465. package/dist/vega/{p-18e8d9b7.js → p-dcf162e9.js} +1 -1
  466. package/dist/vega/p-e46a23fc.entry.js +1 -0
  467. package/dist/vega/p-e5226de6.entry.js +1 -0
  468. package/dist/vega/{p-f604f2c9.entry.js → p-e7c930d9.entry.js} +1 -1
  469. package/dist/vega/p-e85497ec.entry.js +1 -0
  470. package/dist/vega/{p-34964a53.js → p-e8de9535.js} +1 -1
  471. package/dist/vega/{p-5904616e.js → p-e8ea3b16.js} +1 -1
  472. package/dist/vega/{p-2ae5acfc.entry.js → p-ea0e922f.entry.js} +1 -1
  473. package/dist/vega/p-ea48decc.js +1 -0
  474. package/dist/vega/{p-82039afd.entry.js → p-eb78a2f2.entry.js} +1 -1
  475. package/dist/vega/p-ec2333f7.entry.js +1 -0
  476. package/dist/vega/{p-6e70d3cc.js → p-ec2a1d4c.js} +1 -1
  477. package/dist/vega/{p-9f064488.entry.js → p-ec663f00.entry.js} +1 -1
  478. package/dist/vega/p-ed2b0e01.entry.js +1 -0
  479. package/dist/vega/p-ef13b346.js +1 -0
  480. package/dist/vega/{p-78099a83.entry.js → p-f5ae99b4.entry.js} +1 -1
  481. package/dist/vega/{p-d10ae46a.entry.js → p-fdb97cb7.entry.js} +1 -1
  482. package/dist/vega/{p-295326ca.entry.js → p-fe220f3a.entry.js} +1 -1
  483. package/dist/vega/{p-115d6053.entry.js → p-ff5208f5.entry.js} +1 -1
  484. package/dist/vega/vega.esm.js +1 -1
  485. package/package.json +6 -6
  486. package/dist/vega/p-13e7f906.entry.js +0 -1
  487. package/dist/vega/p-358b4a06.entry.js +0 -1
  488. package/dist/vega/p-4415ad28.js +0 -1
  489. package/dist/vega/p-4530f0e1.entry.js +0 -1
  490. package/dist/vega/p-51fcb07f.entry.js +0 -1
  491. package/dist/vega/p-5657f768.js +0 -1
  492. package/dist/vega/p-56c1a8ac.entry.js +0 -1
  493. package/dist/vega/p-57f220b5.js +0 -1
  494. package/dist/vega/p-593e0f80.js +0 -1
  495. package/dist/vega/p-5e50dbb9.js +0 -1
  496. package/dist/vega/p-606d7113.entry.js +0 -1
  497. package/dist/vega/p-64b566be.entry.js +0 -1
  498. package/dist/vega/p-6ac8e655.js +0 -1
  499. package/dist/vega/p-77300901.js +0 -1
  500. package/dist/vega/p-887b3e2d.entry.js +0 -1
  501. package/dist/vega/p-9763fbbe.entry.js +0 -1
  502. package/dist/vega/p-9f36abf9.entry.js +0 -1
  503. package/dist/vega/p-9f728e0b.js +0 -1
  504. package/dist/vega/p-a9528dbd.entry.js +0 -1
  505. package/dist/vega/p-bceee942.entry.js +0 -1
  506. package/dist/vega/p-c2e1f33d.entry.js +0 -1
  507. package/dist/vega/p-c51ebb14.entry.js +0 -1
  508. package/dist/vega/p-c74060a7.js +0 -1
  509. package/dist/vega/p-dffbbc3d.entry.js +0 -1
  510. package/dist/vega/p-ed26f4c8.entry.js +0 -1
  511. package/dist/vega/p-f1c672e4.js +0 -1
  512. package/dist/vega/p-f54fb4e5.js +0 -1
  513. package/dist/vega/p-fb05335d.js +0 -1
  514. package/dist/vega/p-fcb0d4d8.js +0 -1
  515. /package/dist/cjs/{index-f054eb5d.js → index-3ca118c4.js} +0 -0
  516. /package/dist/esm/{index-bfc6dfa2.js → index-9c9865c0.js} +0 -0
  517. /package/dist/vega/{p-5a25014f.js → p-982747ef.js} +0 -0
@@ -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-6e70d3cc.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-f1c672e4.js";import{V as f}from"./p-3b791b5d.js";import{R as b,E as g,h as w,U as y,V as v,B as m,a as C,I as x,b as T,c as E,P as S,A as k,d as A}from"./p-5904616e.js";import{s as R,A as O,a as I,R as L,b as B,M as j,c as N,d as _,e as M,f as D,g as V,I as P,h as H,i as F,j as K,k as $,l as z,B as G,m as W,n as U,C as Z,o as J,p as X}from"./p-fb05335d.js";import{i as q}from"./p-e4c4ea35.js";import{R as Q}from"./p-b6c3ce6d.js";import{V as Y}from"./p-a7b5f497.js";import{V as tt}from"./p-e1fbfd20.js";import{v as et}from"./p-4866e390.js";import{D as nt,d as st}from"./p-f28a6074.js";import{V as ot,a as it,b as rt,c as at}from"./p-9af0e2e7.js";import{R as lt,a as ct,S as ht,T as dt,b as ut,c as pt,d as ft,e as bt,C as gt,M as wt,f as yt,g as vt,h as mt,i as Ct,j as xt,k as Tt,l as Et,m as St,n as kt,o as At,p as Rt,q as Ot,s as It,r as Lt,t as Bt,I as jt,u as Nt,v as _t,w as Mt,x as Dt,y as Vt,z as Pt,A as Ht,B as Ft,D as Kt,E as $t,F as zt,G as Gt,H as Wt,J as Ut,K as Zt,L as Jt,N as Xt,O as qt,P as Qt,Q as Yt,U as te,W as ee,X as ne,Y as se}from"./p-1d30cab2.js";import{C as oe}from"./p-2d0d575f.js";import{V as ie,a as re,b as ae}from"./p-6c43d54a.js";import{r as le}from"./p-77e64f26.js";import{V as ce}from"./p-8aee6b74.js";import{t as he}from"./p-b75ee3ba.js";import{p as de}from"./p-0c667d6a.js";import{c as ue}from"./p-a841cf13.js";import{d as pe}from"./p-1bc5b3bc.js";const fe=[{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 be{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(be,["load","close"],fe)}load(t={}){let e=t.containerSelector||"body",n=document.querySelector(e);if(n&&be.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)}}be.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()],be.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const ge=new be,we=[{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 ye=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 ve{constructor(){this.resizeObserverSlimmer=d(ve,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(ve,["open","close","closeAll"],we)}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}}ye([a()],ve.prototype,"resizeObserverSlimmer",void 0),ye([l()],ve.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const me=new ve,Ce=[{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 xe{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(xe,["setSemantics","getSemantics","getEnabledEventIdsByComponent"],Ce)}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()],xe.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Te=new xe,Ee=[{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 Se{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Se,["overrideZIndexBasicValues"],Ee)}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()],Se.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const ke=new Se,Ae=[{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 Re{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Re,["handle"],Ae)}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()],Re.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Oe=new Re,Ie=async()=>Oe.handle(),Le=[{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 Be{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(Be,["load","unLoad","unLoadAll"],Le),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[Be.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}}Be.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()],Be.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const je=new Be,Ne=[{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 _e{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=c(_e,["init","changeLanguage"],Ne)}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()],_e.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const Me=new _e,De=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 Ve extends Y{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[Ve.REGISTER_REF_FLAG]=!0,function(e){e&&R.register(e,t)}}getDTORenderer(t){return Q.getRTERenderer(t)}getExtensionContext(t){return De.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(q))}renderChildren(t,e,n){const s=this.getDTORenderer(t.type);if(s)return s.render(t,e,n)}fallbackRegisterRef(t,e){e[Ve.REGISTER_REF_FLAG]||!t.o||t.o.ref||(t.o.ref=this.useRef(e))}}Ve.REGISTER_REF_FLAG="__registeredRef__";class Pe{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)}static registerFilterStylesStrategy(t,e){L.register(t,e)}prepareBeforeLoad(t){}initialExtensionAfterLoad(t){this.extensionContext=t,De.setExtensionContext(t)}destroyExtension(){}collectExtensionRendererStyles(){let t="";return this.hasCustomStylesRenderers.size>0&&this.hasCustomStylesRenderers.forEach((e=>{t+=`${e.injectRTEScopeStyles()}\n`})),t}registerNode(t,e){B.registerRTEDTOClass(t,e)}registerRenderer(t,e){Q.registerRTEDTORenderer(t,e),e instanceof Ve&&e.injectRTEScopeStyles()&&this.hasCustomStylesRenderers.add(e)}registerToolbarButtonRenderer(t,e,n){n?Q.registerRTEToolbarButtonRendererForHost(n,t,e):Q.registerRTEToolbarButtonRenderer(t,e)}registerBlockBasicStrategies(t){b.registerBlockBasicStrategies(t)}unRegisterStrategy(t,e){O.unregister(t,e)}unRegisterInterceptor(t,e,n){I.unregister(t,e,n)}registerElementToBlockDTOClassStrategy(t){g.registerElementToBlockStrategy(t)}registerElementToNodeDTOClassStrategy(t){g.registerElementToNodeStrategy(t)}getElementToNodeDTOClassStrategies(){return g.getElementToNodeStrategies()}registerAnnotationHandler(t){w.registerHandler(t)}}class He{isHidden(t){return t.sourceEditMode}getExtensionContext(t){return De.getExtensionContext(t)}renderDropdown(t,e,n,s){return t("vega-dropdown",Object.assign({trigger:"click",searchable:!1,maxWidth:"200",itemDisplayRule:"ellipsis",ref:t=>{nt.addUniqueObserverToNode(t,ot,(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:et.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=>{nt.addUniqueObserverToNode(t,it,(()=>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:tt.getIconKey("chevron-down")}):null].filter(q))}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 Fe extends j{constructor(t,e){super(),this.type="INSERT_TOKEN_NODE",this.rteRange=null,this.actionHandleResult=!1,this.rteRange=t,this.token=e}}class Ke extends He{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 Fe(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 N{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 $e extends Ve{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 ze extends He{constructor(t,e,n=""){super(),this.languageList=[],this.languageChangeCallback=null,this.selectedLanguage="",this.labelRef=null,this.handleDropdownClick=t=>{this.setSelectedLanguage(t),"function"==typeof this.languageChangeCallback&&this.languageChangeCallback(t)},this.languageList=t,this.languageChangeCallback=e,this.selectedLanguage=n}setSelectedLanguage(t){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){var e;const n=this.getListItemByKey(this.languageList,t);return null!==(e=null==n?void 0:n.label)&&void 0!==e?e:"Select Language"}}class Ge extends Pe{constructor(t,e){super(),this.languageToolbarButtonRenderer=null,this.languageState={selectedLanguage:"",contentMap:{}},this.languageChangeCallBack=t=>{const e=this.languageState.selectedLanguage;this.extensionContext&&e&&(this.languageState.contentMap[e]=this.getRTELatestValue(this.extensionContext.host)),this.languageState.selectedLanguage=t,this.applyLanguageContent(t,this.languageState.contentMap)},this.languageList=t,e&&(this.languageState=Object.assign(Object.assign({},this.languageState),e)),!this.languageState.selectedLanguage&&t.length>0&&(this.languageState.selectedLanguage=t[0].key)}prepareBeforeLoad(t){this.languageToolbarButtonRenderer=new ze(this.languageList,this.languageChangeCallBack,this.languageState.selectedLanguage),this.registerToolbarButtonRenderer("languages",this.languageToolbarButtonRenderer,t)}initialExtensionAfterLoad(t){super.initialExtensionAfterLoad(t);const{selectedLanguage:e,contentMap:n}=this.languageState;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),n&&n[e]&&this.applyLanguageContent(this.languageState.selectedLanguage,this.languageState.contentMap)}setState(t){const{selectedLanguage:e,contentMap:n}=t;this.languageToolbarButtonRenderer&&this.languageToolbarButtonRenderer.setSelectedLanguage(e),this.languageState.selectedLanguage=e,this.languageState.contentMap=Object.assign({},n),this.applyLanguageContent(e,n)}getState(){const{selectedLanguage:t,contentMap:e}=this.languageState;return this.extensionContext&&(e[t]=this.getRTELatestValue(this.extensionContext.host)),this.languageState}applyLanguageContent(t,e){if(this.extensionContext&&e){let n=e[t];const{host:s,flushValue:o}=this.extensionContext;n=n?n instanceof v?n:v.fromJSON(n,s.sourceEditConfig):v.createEmptyContent(),s.value!==n&&o(n,!0)}}getRTELatestValue(t){var e;let n=t.value;if(this.extensionContext&&this.extensionContext.isSourceEditMode()&&t.shadowRoot){const s=t.shadowRoot.querySelector(".source-view-container vega-code-block");if(s){let o;t.sourceEditConfig&&(o={autoMatchFormat:null===(e=t.sourceEditConfig.autoMatchFormat)||void 0===e||e,filterInlineStyles:t.sourceEditConfig.filterInlineStyles}),n=v.fromHtml(s.value.code,o)}}return n}}class We extends j{constructor(t){super(),this.type="INSERT_FUNCTION_BLOCK",this.functionType=t}}class RTEFunctionBlock extends _{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 M?`<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 D(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 Ue extends V{handleAction(t,e){const{functionType:n}=t,s=this.getFunctionBlock(n),o=this.createNewParagraph(""),i=this.getReferenceBlock(e);i?i.parent.apply(new P(i,s,o)):e.apply(new H([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 v)){const e=t.parent;return e instanceof RTEFunctionBlock?e:t}}}class RTELogicControlNode extends F{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 _{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 Ze extends He{render(t,e){return this.renderDropdown(t,e,{},[this.renderButton(t,e,{label:"Functions",showArrowIcon:!0}),this.renderDropdownListTemplate(t,Ze.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 We(t);o?o.parent&&o.parent.apply(i):e.value.apply(i),i.nextFocusNode&&e.value.apply(new y(i.nextFocusNode,1))}}}}Ze.FUNCTION_LIST=[{key:"IF",label:"Conditional"},{key:"FOREACH",label:"Foreach"}];class Je extends Ve{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 Xe extends m{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 qe extends Ve{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 Qe{}class Ye extends Qe{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 tn extends V{handleAction(t,e){const n=this.createNewParagraph("");n&&(e.parent.apply(new P(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 en extends j{constructor(t,e,n){super(),this.type="PASTE_PLAIN_TEXT",this.blocksToBeInserted=t,this.startNode=e,this.startOffset=n}}class nn extends Ye{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 en(s,i,r);n.apply(a)}}class sn extends V{handleAction(t,e){const{blocksToBeInserted:n,startNode:s,startOffset:o}=t;if(s instanceof N){const t=n.flatMap((t=>t instanceof M?(this.copyLinkGroupAnnotations(e.annotationMap,t.annotationMap),t.children):[]));t.length>0&&(e.apply(o>0?new P(s,...t):new K(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($.LINK_GROUP)){const n=e.get($.LINK_GROUP);t.has($.LINK_GROUP)?n.linkGroups.forEach(((e,n)=>{t.get($.LINK_GROUP).linkGroups.set(n,e)})):t.set($.LINK_GROUP,e.get($.LINK_GROUP))}}}const on=new Xe,rn=new class extends Xe{constructor(){super(...arguments),this.blockClassName="statementelement"}handle(e,n){const s=w.generate(M,e[0]),o=Array.from(e[0].childNodes);return M.from({id:t(),type:"paragraph",annotations:Object.assign({customClass:[this.blockClassName]},s),nodes:this.generateChildNodes(o,void 0,n)})}},an=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 ln extends Pe{constructor(){super(),this.toolbarButtonRenderer=new Ze,this.registerBlockBasicStrategies(RTELogicControlBlock.name),this.registerBlockBasicStrategies(RTEFunctionBlock.name),this.preventFunctionBlockDefaultInsertNewParagraph(),this.registerNode("logic-control-block",RTELogicControlBlock),this.registerRenderer("logic-control-block",new Je),this.registerNode("function-block",RTEFunctionBlock),this.registerRenderer("function-block",new qe),this.registerToolbarButtonRenderer("functions",this.toolbarButtonRenderer),this.registerElementToBlockDTOClassStrategy(on),this.registerElementToBlockDTOClassStrategy(rn),this.registerElementToBlockDTOClassStrategy(an)}preventFunctionBlockDefaultInsertNewParagraph(){this.unRegisterStrategy(z.INSERT_NEW_PARAGRAPH,RTELogicControlBlock.name),this.unRegisterStrategy(z.APPEND_CHILDREN,RTEFunctionBlock.name),this.unRegisterStrategy(z.INSERT_CHILDREN_AFTER,RTEFunctionBlock.name),this.unRegisterStrategy(z.INSERT_CHILDREN_BEFORE,RTEFunctionBlock.name),this.unRegisterStrategy(z.PASTE_CONTENT,RTELogicControlBlock.name),Pe.registerActionHandleStrategy(RTEFunctionBlock.name,z.INSERT_NEW_PARAGRAPH,new tn)}}(()=>{const t=new Ue;Pe.registerActionHandleStrategy(v.name,"INSERT_FUNCTION_BLOCK",t),Pe.registerActionHandleStrategy(M.name,"INSERT_FUNCTION_BLOCK",t),Pe.registerActionHandleStrategy(T.name,"INSERT_FUNCTION_BLOCK",t),Pe.registerActionHandleStrategy(RTELogicControlBlock.name,"INSERT_FUNCTION_BLOCK",t),Pe.registerActionHandleStrategy(M.name,"PASTE_PLAIN_TEXT",new sn),Pe.registerActionHandlerInterceptor(M.name,z.INSERT_NEW_PARAGRAPH,new Ye),Pe.registerActionHandlerInterceptor(M.name,z.PASTE_CONTENT,new nn)})();class cn extends j{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_BLOCK",this.tableBlock=t}}class hn extends G{constructor(){super(...arguments),this.type=lt.CAPTION}static getDefaultStyles(){return{padding:"8px",border:"1px solid #ddd",borderBottom:"none",position:"relative",textAlign:"center",minHeight:"22px"}}clone(){return new hn}renderClass(t){return(null==t?void 0:t.standalone)?null:"v-rte--extension-table-caption"}renderStyle(t){return(null==t?void 0:t.standalone)?Object.assign(Object.assign({},hn.getDefaultStyles()),{backgroundColor:this.getCaptionBackgroundColor()}):null}toJSON(){return{caption:!0}}getCaptionBackgroundColor(){return ce.isDarkMode()?ct.dark:ct.light}}class RTETableCaptionBlock extends _{constructor(t,e){super(t),this.type="table-caption";const{autoMatchFormat:n}=e||{autoMatchFormat:!0};n&&this.annotationMap.set(lt.CAPTION,new hn)}static from(t,e){const n=new RTETableCaptionBlock(t.id,e),s=t.annotations||{},{caption:o}=s,i=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}(s,["caption"]);return o&&n.annotationMap.set(lt.CAPTION,new hn),super.convertAnnotationsToMap(n.annotationMap,Object.assign({},i)),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(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<caption${super.generateAttributeString(t)}>${e}</caption>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}O.register(z.INSERT_CHILDREN_BEFORE,RTETableCaptionBlock.name,new E),O.register(z.PASTE_CONTENT,RTETableCaptionBlock.name,new S);class dn extends j{constructor(t){super(),this.type="TOGGLE_TABLE_CAPTION",this.isFlushable=!0,this.shouldEnable=t}}class un extends ht{canHandle(t){return t[0]===dt.CAPTION}execute(t,e,n){const s="rte-table-caption"===t[1],o=new dn(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 pn{static generateTablePropertiesForm(t){const e=t.annotationMap.get(lt.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?de(s):""},width:n?de(n):"",height:r?de(r):""})}toAnnotation(){return new ut(this.tableProperties)}}class bn extends pn{handle(t,e,n,s){e.apply(new fn(n)),this.updateCursorPosition(t,s)}}class gn 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 vn extends yn{constructor(t,e){super(t,e),this.isFlushable=!0}toAnnotation(){return this.updateOriginAnnotation(),this.originAnnotation}}var mn=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(lt.CELL);if(t[e.id]={},n){const s=n.toJSON().tableCell,{border:o}=s,i=mn(s,["border"]),r={};o&&(r.borderStyle=o.style,r.borderColor=o.color,r.borderWidth=o.width),t[e.id]=ue(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=mn(t,["borderStyle","borderWidth","borderColor"]),i=ue({style:e,width:n?de(n):"",color:s});return ue(Object.assign(Object.assign({},o),{backgroundColor:o.backgroundColor||"",padding:o.padding?de(o.padding):"",width:o.width?de(o.width):"",height:o.height?de(o.height):"",verticalAlign:o.verticalAlign||"",textAlign:o.textAlign||"",border:i}))}applyAnnotation(t,e,n){const s=t.getAnnotationByType(lt.CELL)||new pt({},!1),o=t instanceof ft?new vn(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{constructor(t){this.renderContext=t}getTableExtensionContext(){return this.renderContext?De.getExtensionContext(this.renderContext.host):null}}class kn extends Sn{constructor(t,e){super(e),this.popoverCloseType="none",this.tablePropertiesHandlerMap={save:new gn,cancel:new bn,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.show(!0)},this.handleCellPropertiesUpdate=t=>{const e=t.type.replace("vega","").toLowerCase();this.popoverCloseType=e,"change"!==e&&this.hide();const n=this.getTableExtensionContext();n&&this.cellPropertiesHandlerMap[e].handle(n,t.detail,this.currentFocusNode),"change"===e&&this.popoverRef.show(!0)},this.tableColorSchema=t}destroy(){this.selectionAnchorRef&&this.selectionAnchorRef.parentNode&&(nt.removeUniqueObserverFromNode(this.selectionAnchorRef,ie),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===dt.CELL&&s.length>1){const t=this.getOrCreateSelectionAnchor(s,e);t&&(e=t)}else t===dt.CELL&&1===s.length&&(e=R.getDOMByEntity(s[0]));this.updateContent(t),this.storeCurrentFocusNode(),le.call(st.getSubject(this.popoverRef,re),e),await this.popoverRef.show()}async hide(){await this.popoverRef.hide()}reTarget(t,e){this.getTableRef=e,this.currentTableBlock=t}render(){const t=he();if(t){const e=t.createElement("vega-popover");e.trigger="click",e.isScreenPosition=!0,e.className="rte-table-dynamic-popover",nt.addUniqueObserverToNode(e,rt,(()=>{const t=this.getTableExtensionContext();"change"===this.popoverCloseType&&t&&t.flushValue(t.host.value)}));const n=t.createElement("div");n.setAttribute("slot","popover"),n.className="rte-table-dynamic-popover-content";const s=t.createElement("vega-rich-text-table-properties");s.colors=this.tableColorSchema,s.type=dt.TABLE,s.setAttribute("type",dt.TABLE),s.addEventListener("vegaCancel",this.handleTablePropertiesUpdate),s.addEventListener("vegaChange",this.handleTablePropertiesUpdate),s.addEventListener("vegaSave",this.handleTablePropertiesUpdate);const o=t.createElement("vega-rich-text-table-properties");return o.colors=this.tableColorSchema,o.type=dt.CELL,o.setAttribute("type",dt.CELL),o.addEventListener("vegaCancel",this.handleCellPropertiesUpdate),o.addEventListener("vegaChange",this.handleCellPropertiesUpdate),o.addEventListener("vegaSave",this.handleCellPropertiesUpdate),n.appendChild(s),n.appendChild(o),e.appendChild(n),this.popoverRef=e,this.tablePropertiesFormRef=s,this.cellPropertiesFormRef=o,e}}updateContent(t){this.popoverCloseType="none";const e=this.getTableExtensionContext();"TABLE"===t?(this.tablePropertiesFormRef.classList.remove("vega-hidden"),this.cellPropertiesFormRef.classList.add("vega-hidden"),this.tablePropertiesFormRef.defaultValue=pn.generateTablePropertiesForm(this.currentTableBlock)):"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=he();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(q).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),nt.addUniqueObserverToNode(this.selectionAnchorRef,ie,(()=>{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 An extends Sn{constructor(t){super(t),this.settingHandlers=[new bt,new un,new gt,new wt,new yt],this.handleTableClick=(t,e,n)=>{const s=t.target.closest("table");s===n()&&(t.stopPropagation(),this.reTarget(e,n),this.tableDynamicPopover.hide(),le.call(st.getSubject(this.popoverRef,re),s),this.popoverRef.show(!0))},this.syncSelectedCells=()=>{this.tableSettingRef&&(this.tableSettingRef.selectedCells=this.getTableSelectedCells())},this.handleSettingMenuClick=t=>{const e=this.settingHandlers.find((e=>e.canHandle(t.detail)));if(e){const n=this.getTableExtensionContext();n&&e.execute(t.detail,n,this.tableBlock),t.detail[0]===dt.CAPTION&&this.updateTableSettingCaption()}t.detail[0]!==dt.TABLE&&t.detail[0]!==dt.CELL||(this.popoverRef.hide(),this.tableDynamicPopover.show(t.detail[0]))},this.handleTableSettingPopoverShow=()=>{this.syncSelectedCells()},this.tableDynamicPopover=new kn(vt.getTableColors(),t)}destroy(){this.tableDynamicPopover.destroy(),this.popoverContainer&&this.popoverContainer.remove()}render(){const t=he();if(t&&this.renderContext){this.popoverContainer=t.createElement("div"),this.renderContext.host.appendChild(this.popoverContainer);const e=this.tableDynamicPopover.render(),n=t.createElement("vega-popover");n.trigger="click",n.isScreenPosition=!0,n.className="rte-table-setting-popover",nt.addUniqueObserverToNode(n,at,this.handleTableSettingPopoverShow);const s=t.createElement("div");s.setAttribute("slot","popover");const o=t.createElement("vega-rich-text-table-setting");o.addEventListener("vegaClick",this.handleSettingMenuClick),s.appendChild(o),n.appendChild(s),this.popoverContainer.appendChild(n),this.popoverContainer.appendChild(e),this.popoverRef=n,this.tableSettingRef=o}}updateTableSettingCaption(){const t=this.tableBlock.hasCaption();this.tableSettingRef&&this.tableSettingRef.hasCaption!==t&&(this.tableSettingRef.hasCaption=t)}reTarget(t,e){this.tableSettingRef&&(this.tableBlock=t,this.tableSettingRef.target=e(),this.tableSettingRef.selectedCells=this.getTableSelectedCells(),this.tableDynamicPopover.reTarget(t,e))}getTableSelectedCells(){let t=[];const e=this.getTableExtensionContext();if(e&&e.tableSelection){const{tableSelection:n}=e;t=n.getSelectedCells()}return t}}class Rn extends Ve{doRender(t,e,n){let s;const o=this.renderTable(t,e,(t=>s=t));this.renderTableToolbar(n);const i=e.getAnnotationByType(lt.TABLE),r=n.editable?[t("vega-rich-text-table-selection-widget",{onVegaRemove:t=>{t.stopPropagation(),this.handleTableRemove(e,s)},onClick:t=>{this.tableToolbar&&this.tableToolbar.handleTableClick(t,e,(()=>s))},onMouseLeave:()=>{this.tableToolbar&&this.tableToolbar.syncSelectedCells()}},[t("div",{contentEditable:!0,ref:this.useRef(e)},[o])])]:[o],a={};if(i){const t=i.renderStyle();a.width=t.width,a.margin=t.margin}const l=t("div",{class:"v-rte--extension-table-container",style:Object.assign({},a)},r);return l.childrenContainerGetter=()=>o,l}destroy(){this.destroyTableToolbar()}injectRTEScopeStyles(){return".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 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 cn(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&&oe.notify(st.getSubject(t,ie),{host:t})}}renderTableToolbar(t){t.editable?this.tableToolbar||(this.tableToolbar=new An(t),this.tableToolbar.render()):this.destroyTableToolbar()}destroyTableToolbar(){var t;null===(t=this.tableToolbar)||void 0===t||t.destroy(),this.tableToolbar=null}}class On extends Ve{doRender(t,e){return t("thead",{key:e.id,ref:this.useRef(e)})}}class In extends Ve{doRender(t,e){return t("tr",{key:e.id,ref:this.useRef(e)})}}class Ln extends Ve{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 Bn extends Ve{doRender(t,e){return t("tbody",{key:e.id,ref:this.useRef(e)})}}class jn extends Ln{doRender(t,e,n){return super.renderByCellType(t,e,n,"th")}}class Nn extends j{constructor(t,e){super(),this.type="INSERT_TABLE_BLOCK",this.rowCount=t,this.columnCount=e}}class _n extends Sn{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,nt.addUniqueObserverToNode(t,at,(()=>{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 Nn(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 Mn extends He{render(t,e){return new _n(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(z.INSERT_CHILDREN_AFTER,o.parent.parent)),e=t.disabled||!i}return e}handleButtonClick(){}handleDropdownClick(){}}tt.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 Dn extends V{handleAction(t,e){const n=this.createTableBlock(t.rowCount,t.columnCount),s=super.createNewParagraph(""),o=this.getReferenceBlock(e);o?o.parent.apply(new P(o,n,s)):e.apply(new H([n,s])),t.nextFocusNode=n.getFirstNode()}createTableBlock(e,n){const s=Math.max(e,1),o=Math.max(n,1);return mt.from({id:t(),type:"table-block",children:[Ct(s,o)]})}getReferenceBlock(t){if(!(t instanceof v))return t}}class Vn extends Qe{canIntercept(t,e){const n=e.parent;return n instanceof xt&&1===n.children.length&&0===t.startOffset}intercept(){}}class Pn extends V{handleAction(t){const e=t.tableBlock,n=e.parent,s=super.getRootContent(e),o=super.createNewParagraph("");n.apply(new P(e,o)),n.apply(new U(e)),s&&s.apply(new y(o.getLastNode()))}}class Hn extends Qe{canIntercept(t,e){return t.entityToBeRemoved&&1===e.children.length}intercept(e,n,s){if(!(n.entityToBeRemoved instanceof M)){const e=M.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:""}]});return s.children=[],void s.apply(new H([e]))}n.entityToBeRemoved.apply(new H([new N(t(),"",n.entityToBeRemoved)]))}}class Fn extends Ve{doRender(t,e){return t("caption",{key:e.id,ref:this.useRef(e),style:e.getStyles(),class:[e.getClasses(),e.isNotEmpty()?null:"showPlaceholder"].filter(q).join(" "),"data-placeholder":"Enter table caption"})}}class Kn extends V{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,Kn.DEFAULT_CELLSPAN);if(e.rowSpan>Kn.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<=Kn.DEFAULT_CELLSPAN){if(s){const n=s.render();delete n[e],t.annotationMap.set(Z.CUSTOM_ATTRIBUTE,new J(n))}}else{const o=s?s.render():{};o[e]=n.toString(),t.annotationMap.set(Z.CUSTOM_ATTRIBUTE,new J(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 H([n])),void(e[0]=s);const i=e.findIndex((t=>t>=s));-1===i?(o.apply(new P(o.children[o.children.length-1],n)),e.push(s)):0===i?(o.apply(new K(o.children[0],n)),e.unshift(s)):(o.apply(new K(o.children[i],n)),e.splice(i,0,s))}))}}))}splitRowsBySection(t){const e=[],n=[];return t.forEach((t=>{t.parent instanceof Tt?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 ft))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=ue({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))}}Kn.DEFAULT_CELLSPAN=1;class $n extends Kn{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 U(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 U(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<=Kn.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 Tt||t instanceof Et)).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 zn{constructor(){this.dragging=!1,this.anchorCell=null,this.selectedCells=new Set,this.syncRTESelectionWithDebounce=pe(this.syncRTESelection,100,this),this.handleSelectionChangeWithDebounce=pe(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=St(t.parent,xt);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=he();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}=zn.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),b=Math.max(l,d),g=Math.min(c,u),w=Math.max(h,p),y=new Set;for(let t=f;t<=b;t++){const e=o[t];for(let t=g;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(Z.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}=zn.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=zn.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=St(t,mt);if(n){const t=R.getDOMByEntity(n);t&&oe.notify(st.getSubject(t,ae),{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=he();t&&t.addEventListener("selectionchange",this.handleSelectionChangeWithDebounce)}removeSelectionChangeListener(){const t=he();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 F)return t})))))).filter(q);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=he();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 Gn extends Kn{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 Tt));const o=e[0].parent;s||(s=Tt.from({id:t(),type:"table-head",children:[]}),n.apply(new K(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 U(s))}e.apply(new H(n))}revertToBodyRows(e,n){let s=n.children.find((t=>t instanceof Et));const o=e[0].parent;s||(s=Et.from({id:t(),type:"table-body",children:[]}),n.apply(new P(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 U(r));const a=s?this.getHeadCellLength(s):0;r.children=this.convertThToTd(r,o[i],a),s&&e.apply(new K(s,r))}s||e.apply(new H(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<=Kn.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 ft)return t;const e=ft.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:xt.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 H([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=kt.getDefaultBackgroundColor();!n||n!==s&&(null===(e=i(n))||void 0===e?void 0:e.toUpperCase())!==s||delete t.annotations.customStyle.backgroundColor}return t}}class Wn extends At{handleAction(t,e){const{insertDirection:n,tableCellInsertRange:s}=t,o=new Set(s.map((t=>t.id))),i=Rt(e),r=Ot(i),[a,l]=this.getBoundaryCellColumnRange(s,i,r),c=n===jt.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(It(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 K(l.anchorCell,e):new P(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===jt.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=Lt(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 ft?ft.from(Bt(t.type)):xt.from(Bt(t.type))}}class Un extends At{handleAction(t,e){const n=Rt(e),s=Ot(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=Mt(h);d&&u&&d.apply(new y(u))}getDeleteCellsInfo(t,e,n,s){const o=[],i=new Set,r=[],a=Nt(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}=Dt(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=Lt(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 U(t))}));const s=new Set;e.forEach((({cell:t,nextColSpan:e,rowSpan:o})=>{s.add(t.id),It(t,e,o,n)})),this.normalizeRemainingCellSpans(n,s)}normalizeRemainingCellSpans(t,e){Rt(t).forEach((n=>{n.children.forEach((n=>{const{colSpan:s,rowSpan:o}=Dt(n);if(e.has(n.id)){const e=_t(t);if(!(o>1&&s===e))return}It(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 Zn extends j{constructor(t){super(),this.isFlushable=!0,this.type="CREATE_SEGMENT_TABLE_CELL",this.payload=t}}class Jn extends V{handleAction(t,e){const{table:n,sourceCell:s,colSpan:o,cellType:i,keepSourceContent:r}=t.payload,a=r?this.convertCellType(s,i):Vt(i);It(a,o,s.rowSpan,n),e.apply(new K(s,a))}convertCellType(t,e){return"table-head-cell"===e?ft.from(t.toJSON()):xt.from(t.toJSON())}}class Xn extends V{handleAction(t,e){const{cell:n,targetCellType:s}=t.payload,o="table-head-cell"===s?ft.from(n.toJSON()):xt.from(n.toJSON());e.apply(new K(n,o)),e.apply(new U(n))}}class qn extends V{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 Zn({table:n,sourceCell:s,colSpan:c,cellType:s.type,keepSourceContent:!0})),e.apply(new Zn({table:n,sourceCell:s,colSpan:d,cellType:a,keepSourceContent:0===c})),u>0&&e.apply(new Zn({table:n,sourceCell:s,colSpan:u,cellType:s.type,keepSourceContent:0===c&&d===s.colSpan})),e.apply(new U(s))}}class Qn extends At{handleAction(t,e){const n=Rt(e),s=Ot(n),o=Nt(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 Yn extends Qe{canIntercept(t){return t.childrenToBeInserted.some((t=>!(t instanceof xt)))}intercept(){}}class ts extends V{handleAction(t,e){const{targetCell:n,mergeCells:s,colSpan:o,rowSpan:i,direction:r}=t;this.mergeContentToTargetCell(n,s),It(n,o,i,e),this.deleteOtherSelectedCells(s,n),r!==Pt.MERGE_CELL_LEFT&&r!==Pt.MERGE_CELL_RIGHT&&i>1&&this.clearRowSpanIfUniformAcrossRow(n,e,i);const a=this.getRootContent(e),l=Mt(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 U(t))}))}clearRowSpanIfUniformAcrossRow(t,e,n){const s=t.parent.parent.children,o=Ot(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}=Dt(t);It(t,s,n-l+1,e)}}))}))}}}class es extends C{canHandle(t,e){const n=t[e];return n&&"TABLE"===n.tagName?1:0}handle(e,n){return mt.from({id:t(),type:"table-block",annotations:w.generate(mt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ns extends m{canHandle(t,e){const n=t[e];return n&&"THEAD"===n.tagName?1:0}handle(e,n){return Tt.from({id:t(),type:"table-head",annotations:w.generate(Tt,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class ss extends m{canHandle(t,e){const n=t[e];return n&&"TBODY"===n.tagName?1:0}handle(e,n){return Et.from({id:t(),type:"table-body",annotations:w.generate(Et,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class os extends m{canHandle(t,e){const n=t[e];return n&&"TR"===n.tagName?1:0}handle(e,n){return Ht.from({id:t(),type:"table-row",annotations:w.generate(Ht,e[0],n),children:[]},n)}appendChildBlocks(t,e){t.children=e.map((e=>(e.parent=t,e)))}shouldProceedToElementChildren(){return!0}}class is extends m{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?ft.from({id:t(),type:"table-head-cell",annotations:this.getTableHeadCellAnnotations(s,n),children:o},n):xt.from({id:t(),type:"table-cell",annotations:w.generate(xt,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(ft,t,e);return n&&n.tableCell&&vt.getColorKey(n.tableCell.backgroundColor,!0)===ct.key&&(delete n.tableCell.backgroundColor,n.customStyle&&delete n.customStyle.backgroundColor),n}}class rs 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){const s=this.getTableCaptionAnnotations(e[0],n);return RTETableCaptionBlock.from({id:t(),type:"table-caption",annotations:Object.assign(Object.assign({},s),{caption:!0}),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&&vt.getColorKey(n.customStyle.backgroundColor,!0)===ct.key&&delete n.customStyle.backgroundColor,n}}class as extends k{getBackgroundColor(t){return t.style.backgroundColor?vt.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:vt.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 ls extends as{canHandle(t){return"RTETableBlock"===t.name}handle(t){const e=ue({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 cs extends as{canHandle(t){return"RTETableCellBlock"===t.name}handle(t){const e=ue({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 hs extends cs{canHandle(t){return"RTETableHeadCellBlock"===t.name}}class ds extends V{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 us extends V{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 ps extends V{handleAction(t,e){const n=e.parent,s=n.parent,o=St(n,mt),i=Rt(o),r=i.indexOf(n),{colSpan:a,rowSpan:l}=Dt(e),c=Ft(e,i),h=Math.ceil(l/2),d=Math.max(1,l-h),u=1===l;It(e,a,h,o);const p=r+h,f=Vt(e.type);if(It(f,a,d,o),u){const t=this.createNewRowWithCell(s,f),r=s.children.indexOf(n);s.apply(new P(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}=Dt(r);t+a>s&&Ft(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}=Dt(s);i+=o}return t.children.length}createNewRowWithCell(e,n){const s={id:t(),type:"table-row",children:[]},o=Ht.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}=Dt(t);o+r>=e&&It(t,i,r+1,s)}}}}class fs extends V{handleAction(t,e){const n=e.parent,s=St(n,mt),o=Rt(s),i=o.indexOf(n),{colSpan:r,rowSpan:a}=Dt(e),l=Ft(e,o),c=l+r-1,h=Math.ceil(r/2),d=Math.floor(r/2);It(e,h,a,s);const u=Vt(e.type);It(u,d,a,s),n.apply(new P(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=Ft(e,t),{colSpan:a,rowSpan:l}=Dt(e);if(o+a-1>=n&&o<=s){It(e,a+i,l,r);break}}}}}class bs extends Kn{handleAction(e,n){const{selectedRows:s}=e,o=s[s.length-1];let i=n.children.find((t=>t instanceof Et));const r={id:t(),type:"table-row",children:[]};let a=0,l=null;i?(l=i.children[0],a=this.getHeadCellLength(l)):(i=Et.from({id:t(),type:"table-body",children:[]}),n.apply(new H([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 K(l,Ht.from(r)):new H([Ht.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 gs extends Kn{handleAction(e){const{insertDirection:n,selectedRows:s}=e,o=n===Kt.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===Kt.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=Ht.from(i),u=n===Kt.ABOVE?new K(o,d):new P(o,d);o.parent.apply(u)}}class ws extends Qe{canIntercept(t,e){return Boolean(e.parent)}intercept(t,e,n){const s=this.createNewParagraph("");s&&(n.parent.apply(0===e.startOffset?new K(n,s):new P(n,s)),e.newBlock=s)}createNewParagraph(e){const n=B.getRTEBlockClass("paragraph");if(n)return n.from({id:t(),type:"paragraph",nodes:[{id:t(),type:"text",text:e}]})}}class ys extends X{constructor(){super(...arguments),this.stylesToBeFiltered=ut.getDefaultStyles(),this.elementTagName="table"}canFilter(t){return this.isTableBlock(t.constructor.name)}canRefill(t,e){return this.isTableBlock(t)&&e.tagName.toLowerCase()===this.elementTagName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableBlock(t){return"RTETableBlock"===t}}class vs extends X{constructor(){super(...arguments),this.stylesToBeFiltered=hn.getDefaultStyles(),this.elementTagName="table caption"}canFilter(t){return this.isTableCaption(t.constructor.name)}canRefill(t,e){return this.isTableCaption(t)&&"CAPTION"===e.nodeName}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCaption(t){return"RTETableCaptionBlock"===t}}class ms extends X{constructor(t="td"){super(),this.stylesToBeFiltered=pt.getDefaultStyles(),this.elementTagName="",this.stylesWithRGBColor=pt.getDefaultStyles(!1),this.cellBlockClassName="",this.elementTagName=t,this.cellBlockClassName="td"===t?"RTETableCellBlock":"RTETableHeadCellBlock"}canFilter(t){return this.isTableCell(t.constructor.name)}filterAndDeleteStyles(t,e){return this.convertDefaultBorderColorFromRGBToHex(t),super.filterAndDeleteStyles(t,e)}canRefill(t,e){return this.isTableCell(t)&&e.nodeName===this.elementTagName.toUpperCase()}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}isTableCell(t){return t===this.cellBlockClassName}convertDefaultBorderColorFromRGBToHex(t){t&&t.border&&t.border===this.stylesWithRGBColor.border&&(t.border=this.stylesToBeFiltered.border)}}class Cs extends Pe{constructor(t=$t){super(),this.toolbarButtonRenderer=new Mn,this.tableBlockRenderer=new Rn,this.tableRowBlockRenderer=new In,this.tableCellRenderer=new Ln,this.tableHeadCellRenderer=new jn,this.tableSelection=new zn,vt.setTableColors(t),this.registerToolbarButtonRenderer("table",this.toolbarButtonRenderer),this.registerBlockBasicStrategies(mt.name),this.registerBlockBasicStrategies(Tt.name),this.registerBlockBasicStrategies(ft.name),this.registerBlockBasicStrategies(Ht.name),this.registerBlockBasicStrategies(xt.name),this.registerBlockBasicStrategies(Et.name),this.registerRenderer("table-block",this.tableBlockRenderer),this.registerRenderer("table-head",new On),this.registerRenderer("table-head-cell",this.tableHeadCellRenderer),this.registerRenderer("table-row",this.tableRowBlockRenderer),this.registerRenderer("table-cell",this.tableCellRenderer),this.registerRenderer("table-body",new Bn),this.registerRenderer("table-caption",new Fn),this.registerNode("table-block",mt),this.registerNode("table-head",Tt),this.registerNode("table-head-cell",ft),this.registerNode("table-row",Ht),this.registerNode("table-cell",xt),this.registerNode("table-body",Et),this.registerNode("table-caption",RTETableCaptionBlock),this.registerElementToBlockDTOClassStrategy(new es),this.registerElementToBlockDTOClassStrategy(new ns),this.registerElementToBlockDTOClassStrategy(new ss),this.registerElementToBlockDTOClassStrategy(new os),this.registerElementToBlockDTOClassStrategy(new is),this.registerElementToBlockDTOClassStrategy(new rs),this.registerAnnotationHandler(new ls),this.registerAnnotationHandler(new cs),this.registerAnnotationHandler(new hs)}initialExtensionAfterLoad(t){this.tableSelection.init(t);const e=Object.assign(Object.assign({},t),{tableSelection:this.tableSelection});super.initialExtensionAfterLoad(e)}destroyExtension(){this.tableBlockRenderer.destroy(),this.tableSelection.destroy()}}(()=>{const t=new Dn,e=new Pn;Pe.registerActionHandleStrategy(v.name,"INSERT_TABLE_BLOCK",t),Pe.registerActionHandleStrategy(v.name,"DELETE_TABLE_BLOCK",e),Pe.registerActionHandleStrategy(xt.name,"DELETE_TABLE_BLOCK",e),Pe.registerActionHandleStrategy(ft.name,"DELETE_TABLE_BLOCK",e),Pe.registerActionHandleStrategy(M.name,"INSERT_TABLE_BLOCK",t),Pe.registerActionHandleStrategy(T.name,"INSERT_TABLE_BLOCK",t),Pe.registerActionHandleStrategy(mt.name,zt,new bs),Pe.registerActionHandleStrategy(mt.name,Gt,new gs),Pe.registerActionHandleStrategy(mt.name,Wt,new $n),Pe.registerActionHandleStrategy(mt.name,Ut,new Gn),Pe.registerActionHandleStrategy(mt.name,Zt,new Wn),Pe.registerActionHandleStrategy(mt.name,Jt,new Un),Pe.registerActionHandleStrategy(mt.name,Xt,new qt),Pe.registerActionHandleStrategy(Ht.name,Qt,new qn),Pe.registerActionHandleStrategy(Ht.name,"CREATE_SEGMENT_TABLE_CELL",new Jn),Pe.registerActionHandleStrategy(Ht.name,Yt,new Xn),Pe.registerActionHandleStrategy(xt.name,te,new ps),Pe.registerActionHandleStrategy(xt.name,ee,new fs),Pe.registerActionHandleStrategy(ft.name,te,new ps),Pe.registerActionHandleStrategy(ft.name,ee,new fs),Pe.registerActionHandleStrategy(mt.name,ne,new Qn),Pe.registerActionHandleStrategy(mt.name,se,new ts),Pe.registerActionHandleStrategy(mt.name,fn.name,new ds),Pe.registerActionHandleStrategy(xt.name,yn.name,new us),Pe.registerActionHandleStrategy(ft.name,vn.name,new us),Pe.registerActionHandlerInterceptor(M.name,z.DELETE_BLOCK_CONTENT,new Vn),Pe.registerActionHandlerInterceptor(Ht.name,z.INSERT_CHILDREN_BEFORE,new Yn),Pe.registerActionHandlerInterceptor(xt.name,z.DELETE_CHILDREN,new Hn),Pe.registerActionHandlerInterceptor(ft.name,z.DELETE_CHILDREN,new Hn),Pe.registerActionHandlerInterceptor(mt.name,z.INSERT_NEW_PARAGRAPH,new ws),Pe.registerFilterStylesStrategy(mt.name,new ys),Pe.registerFilterStylesStrategy(RTETableCaptionBlock.name,new vs),Pe.registerFilterStylesStrategy(xt.name,new ms),Pe.registerFilterStylesStrategy(ft.name,new ms("th"))})();class xs extends j{constructor(t,e){super(),this.type=z.INSERT_NODE_TO_NEAREST_ROOT,this.rteRange=t,this.nodeToBeInserted=e}}class Ts extends V{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 J(a)),n.apply(new xs(s,l)),e.actionHandleResult=!0}}}const Es=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(N,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 ue(e)}};class Ss extends Pe{constructor(t=[]){super(),this.tokenRenderer=new $e,this.registerNode("token",RTETokenNode),this.registerRenderer("token",this.tokenRenderer),this.tokenToolbarButtonRenderer=new Ke(t),this.registerToolbarButtonRenderer("token",this.tokenToolbarButtonRenderer),this.registerElementToNodeDTOClassStrategy(Es)}}(()=>{const t=new Ts;Pe.registerActionHandleStrategy(M.name,"INSERT_TOKEN_NODE",t),Pe.registerActionHandleStrategy(A.name,"INSERT_TOKEN_NODE",t)})();export{Qe as A,xs as I,Ke as R,ge as V,me as a,Te as b,ke as c,je as d,Me as e,Ss as f,Ge as g,ln as h,Cs as i,Pe as j,Ve as k,He as l,RTETokenNode as m,$e as n,ze as o,Ie as w}
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,H as a,g as n}from"./p-6b2342e0.js";import{c as r}from"./p-6ac8e655.js";import{s as o}from"./p-519a7d55.js";import{C as s}from"./p-590fd123.js";import{C as c}from"./p-2d0d575f.js";import{C as h,F as l,g as d}from"./p-a528714c.js";import{O as p}from"./p-331a62d5.js";import{f as g,a as x}from"./p-6e70d3cc.js";import{c as b,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-4415ad28.js";import{F as w}from"./p-c347e08a.js";import{c as y}from"./p-6b5cb920.js";import{i as j}from"./p-9af0e2e7.js";import{h as z}from"./p-6c43d54a.js";import{d as C}from"./p-f28a6074.js";import{C as I}from"./p-e27626f6.js";import{R}from"./p-280cbcdb.js";import{C as V}from"./p-75b58efe.js";import{C as D}from"./p-76063dcb.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-3b791b5d.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-af5cb9bc.js";import"./p-f1c672e4.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";var O=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};class E extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new p(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),c.register(C.getSubject(this.checkboxGroup||this.host,z),this.fieldErrorObserver)}disconnectedCallback(){c.unregister(C.getSubject(this.checkboxGroup||this.host,z),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}O([b({writable:!0})],E.prototype,"showError",void 0),O([b()],E.prototype,"host",void 0),O([v("connectedCallback")],E.prototype,"connectedCallback",null),O([v("disconnectedCallback")],E.prototype,"disconnectedCallback",null);var F=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const G=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new E,this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(G,j),this.dropdownEventPrevent=new I([j],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.indeterminate&&(this.indeterminate=!1),this.checked=e.currentTarget.checked},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchValueChange(e){this.checked=""!==this.identifier?e===this.identifier:!0===e}watchCheckedChange(){this.initValue(),this.changeEventEmitter.emit(this.value),c.notify(h,{host:this.host,detail:this.value}),c.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){!this.checked&&(""!==this.identifier?this.value===this.identifier:!0===this.value||"true"===this.value)&&(this.checked=!0),this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden"),this.syncNativeIndeterminate()}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){var e;const i="VEGA-CHECKBOX-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return o(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i,checked:this.checked,indeterminate:this.indeterminate,disabled:this.isDisabled()}},t("label",{class:x(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined","aria-checked":this.indeterminate?"mixed":void 0,disabled:this.isDisabled(),tabIndex:0,onKeyDown:r()}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.indeterminate?t("vega-icon",{icon:"minus-sign",size:"small"===this.size?"size-12":"size-16"}):this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}syncNativeIndeterminate(){this.inputRef&&(this.inputRef.indeterminate=this.indeterminate)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new p(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),c.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&c.unregister(d,this.groupDisabledObserver)}get host(){return n(this)}static get watchers(){return{value:["watchValueChange"],checked:["watchCheckedChange"]}}};F([k()],G.prototype,"globalSlimmers",void 0),F([m()],G.prototype,"vegaCheckboxShowErrorController",void 0),F([m()],G.prototype,"formFieldController",void 0),F([m()],G.prototype,"changeEventEmitter",void 0),F([m()],G.prototype,"dropdownEventPrevent",void 0),F([m()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));display:inline-flex;align-items:center;justify-content:center}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var P=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const q=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new R:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new D(h,(e=>this.childCheckboxValueChange(e))),this.checkboxEventPrevent=new I([j],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(q,j),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(){this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),c.notify(l,{host:this.host,detail:this.value})}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}render(){return o(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){c.notify(d,{host:this.host})}get host(){return n(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};P([k()],q.prototype,"globalSlimmers",void 0),P([m()],q.prototype,"formFieldController",void 0),P([m()],q.prototype,"checkboxValueChangeObserver",void 0),P([m()],q.prototype,"checkboxEventPrevent",void 0),P([m()],q.prototype,"changeEventEmitter",void 0),P([m()],q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P([V()],q.prototype,"watchVegaFlexProp",null),q.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{G as vega_checkbox,q as vega_checkbox_group}
@@ -1 +0,0 @@
1
- import{h as t,f as e,r as i,c as o,H as s,g as r}from"./p-6b2342e0.js";import{V as a,I as l}from"./p-4415ad28.js";import{R as n}from"./p-280cbcdb.js";import{c,V as h,M as p,I as d}from"./p-6e1ab235.js";import{s as f}from"./p-519a7d55.js";import{F as u}from"./p-c347e08a.js";import{D as v}from"./p-f28a6074.js";import{c as m,b as g,a as w,i as b,H as j}from"./p-9af0e2e7.js";import{c as x}from"./p-6b5cb920.js";import{V as C}from"./p-e1fbfd20.js";import{F as R}from"./p-a528714c.js";import{C as y}from"./p-2d0d575f.js";import{T as F}from"./p-57f220b5.js";import{C as S}from"./p-e27626f6.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-6c43d54a.js";import"./p-3b791b5d.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-af5cb9bc.js";import"./p-f1c672e4.js";import"./p-e6adf829.js";import"./p-593e0f80.js";import"./p-5f377954.js";import"./p-18e8d9b7.js";import"./p-5a25014f.js";var k=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class I extends h{constructor(){super(...arguments),this.handlePopoverShow=()=>{v.addUniqueObserverToNode(this.popoverRef,m,(()=>{this.isPopoverOpen=!0,this.internalColor!==this.value&&this.colorSwatchPickerValueController.updateInternalColor(this.value)}))},this.handlePopoverHide=()=>{v.addUniqueObserverToNode(this.popoverRef,g,(()=>{this.isPopoverOpen=!1}))},this.registerButtonClickHandler=t=>{v.addUniqueObserverToNode(t,w,(()=>{this.popoverRef&&this.popoverRef.hide(),this.colorSwatchPickerValueController.updateValue("clear"===t.dataset.actionType?"":this.internalColor)}))}}hidePopover(){this.popoverRef&&this.popoverRef.hide()}getContainerRef(){return this.containerRef}getLeftContainerRef(){return this.leftContainerRef}render(){const e=this.leftSlotProjection.hasSlot();return t("div",{ref:t=>this.containerRef=t,class:"swatch-picker-container"},t("vega-popover",{ref:t=>{this.popoverRef=t,this.handlePopoverShow(),this.handlePopoverHide()},class:"swatch-popover",alignment:"center",isScreenPosition:!0,trigger:"click"},t("div",{slot:"popover-content"},t("vega-color-swatch",{class:"swatch-picker-trigger","aria-expanded":this.isPopoverOpen?"true":"false","aria-haspopup":"dialog",disabled:this.disabled,color:this.value,size:"small"})),t("vega-box",{slot:"popover",class:"swatch-popover-content",width:"min-content"},t("vega-flex",{gap:"size-16"},e&&t("div",{ref:t=>this.leftContainerRef=t}),e&&t("div",null,t("vega-divider",{direction:"vertical"})),t("div",null,this.colorSwatchInputRenderer.render(),this.colorSwatchGridRenderer.render(),this.renderButtonGroup())))),t("vega-field-label",{label:this.label,disabled:this.disabled,isFieldRequired:this.required}))}renderButtonGroup(){return t("vega-flex",{gap:"size-8",justifyContent:"end",margin:{top:"size-16"}},this.showClearButton&&t("vega-button-link",{ref:this.registerButtonClickHandler,"data-action-type":"clear",label:this.translationSlimmer.t("Clear"),size:"small"}),t("vega-button-link",{ref:this.registerButtonClickHandler,"data-action-type":"apply",label:this.translationSlimmer.t("Apply"),size:"small"}))}}k([c()],I.prototype,"host",void 0),k([c()],I.prototype,"value",void 0),k([c()],I.prototype,"internalColor",void 0),k([c()],I.prototype,"label",void 0),k([c()],I.prototype,"required",void 0),k([c({writable:!0})],I.prototype,"isPopoverOpen",void 0),k([c()],I.prototype,"disabled",void 0),k([c()],I.prototype,"showClearButton",void 0),k([c()],I.prototype,"colorSwatchGridRenderer",void 0),k([c()],I.prototype,"colorSwatchInputRenderer",void 0),k([c()],I.prototype,"colorSwatchPickerValueController",void 0),k([c()],I.prototype,"translationSlimmer",void 0),k([c()],I.prototype,"leftSlotProjection",void 0);var z=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class V extends h{constructor(){super(...arguments),this.handleColorSwatchClick=t=>{v.addUniqueObserverToNode(t,w,(()=>{this.colorSwatchPickerValueController.updateInternalColor(t.color)}))}}render(){return t("vega-grid",{column:this.swatchGridColumns,justifyItems:"start",gap:"size-8",style:{width:"max-content"}},this.colors.map((e=>t("vega-color-swatch",{ref:this.handleColorSwatchClick,selected:this.isColorMatched(this.internalColor,e),color:e,size:"extra-small"}))))}isColorMatched(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}}z([c()],V.prototype,"colors",void 0),z([c()],V.prototype,"internalColor",void 0),z([c()],V.prototype,"swatchGridColumns",void 0),z([c()],V.prototype,"colorSwatchPickerValueController",void 0);var O=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class P extends h{constructor(){super(...arguments),this.handleInputEvent=t=>{v.addUniqueObserverToNode(t,b,(()=>{const e=this.colorSwatchPickerColorFormatController.formatColor("output",t.value);e&&!this.isValidColor(e)||this.colorSwatchPickerValueController.updateInternalColor(e)})),v.addUniqueObserverToNode(t,j,(()=>{t.value&&!this.isValidColor(t.value)&&(t.value=this.colorSwatchPickerColorFormatController.formatColor("input",this.internalColor))}))}}render(){return this.showInput?t("vega-flex",{gap:"size-8",alignItems:"center",margin:{bottom:"size-16"}},t("vega-color-swatch",{color:this.internalColor,size:"extra-small"}),t("vega-input",{ref:this.handleInputEvent,size:"small",value:this.colorSwatchPickerColorFormatController.formatColor("input",this.internalColor),placeholder:this.inputPlaceholder||this.translationSlimmer.t("Enter color"),prefixIcon:this.inputPrefixIcon===P.DEFAULT_INPUT_ICON?C.getIconKey("hashtag"):this.inputPrefixIcon})):null}isValidColor(t){let e=!0;return globalThis.CSS&&"function"==typeof globalThis.CSS.supports&&(e=globalThis.CSS.supports("color",t)),e}}C.register({hashtag:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M188.7 32.5c13 2.6 21.4 15.2 18.8 28.2L192.5 136h111l16.9-84.7c2.6-13 15.2-21.4 28.2-18.8s21.4 15.2 18.8 28.2L352.5 136H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H342.9L314.1 328H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H304.5l-16.9 84.7c-2.6 13-15.2 21.4-28.2 18.8s-21.4-15.2-18.8-28.2L255.5 376h-111l-16.9 84.7c-2.6 13-15.2 21.4-28.2 18.8s-21.4-15.2-18.8-28.2L95.5 376H24c-13.3 0-24-10.7-24-24s10.7-24 24-24h81.1l28.8-144H56c-13.3 0-24-10.7-24-24s10.7-24 24-24h87.5l16.9-84.7c2.6-13 15.2-21.4 28.2-18.8zM182.9 184L154.1 328h111l28.8-144h-111z"/></svg>'}}),P.DEFAULT_INPUT_ICON="hexColorIcon",O([c()],P.prototype,"internalColor",void 0),O([c()],P.prototype,"showInput",void 0),O([c()],P.prototype,"inputPlaceholder",void 0),O([c()],P.prototype,"inputPrefixIcon",void 0),O([c()],P.prototype,"colorSwatchPickerValueController",void 0),O([c()],P.prototype,"colorSwatchPickerColorFormatController",void 0),O([c()],P.prototype,"translationSlimmer",void 0);var L=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class H extends h{updateValue(t){this.value=t}updateInternalColor(t){this.internalColor=t}initializeInternalColor(){this.internalColor=this.value}listenToValueChange(){this.internalColor=this.value,this.changeEventEmitter.emit(this.value),y.notify(R,{host:this.host,detail:this.value})}}L([c()],H.prototype,"host",void 0),L([c({writable:!0})],H.prototype,"value",void 0),L([c({writable:!0})],H.prototype,"internalColor",void 0),L([c()],H.prototype,"changeEventEmitter",void 0),L([p("componentWillLoad")],H.prototype,"initializeInternalColor",null),L([p("watchValue")],H.prototype,"listenToValueChange",null);var T=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class D extends h{updateTheColor(){this.internalColor&&this.colorSwatchPickerValueController.updateInternalColor(this.formatColor("input",this.internalColor))}formatColor(t,e){return this.inputFormatter===D.DEFAULT_INPUT_FORMATTER?this.handleHexFormat(t,e):"function"==typeof this.inputFormatter?this.inputFormatter(t,e):e}handleHexFormat(t,e){return"input"===t?e.startsWith("#")?e.slice(1):e:e.startsWith("#")?e:e?`#${e}`:e}}D.DEFAULT_INPUT_FORMATTER="hexColorFormatter",T([c()],D.prototype,"inputFormatter",void 0),T([c()],D.prototype,"internalColor",void 0),T([c()],D.prototype,"colorSwatchPickerValueController",void 0),T([p("watchInputFormatter")],D.prototype,"updateTheColor",null);var E=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class G extends h{constructor(t,i){super(),this.slotElement=null,this.syncSlotElementFromHost=()=>{var t;const i=this.host.querySelector(this.slotSelector());i&&(this.slotElement=i,null===(t=this.getContainerRef())||void 0===t||t.replaceChildren(i),e(this.host))},this.syncRemovedSlotElement=()=>{this.slotElement&&!this.slotElement.isConnected&&(this.slotElement=null,e(this.host))},this.slotName=t,this.getContainerRef=i}hasSlot(){return!!this.slotElement}detectSlot(){this.slotElement=this.host.querySelector(this.slotSelector()),this.hostMutationObserver=new MutationObserver(this.syncSlotElementFromHost),this.hostMutationObserver.observe(this.host,{childList:!0}),this.containerMutationObserver=new MutationObserver(this.syncRemovedSlotElement)}appendSlotContent(){const t=this.getContainerRef();t&&this.containerMutationObserver.observe(t,{childList:!0}),this.slotElement&&t&&this.slotElement.parentElement!==t&&t.appendChild(this.slotElement)}cleanup(){this.hostMutationObserver&&this.hostMutationObserver.disconnect(),this.containerMutationObserver&&this.containerMutationObserver.disconnect()}slotSelector(){return`[slot="${this.slotName}"]`}}E([c()],G.prototype,"host",void 0),E([p("componentWillLoad")],G.prototype,"detectSlot",null),E([p("componentDidRender")],G.prototype,"appendSlotContent",null),E([p("disconnectedCallback")],G.prototype,"cleanup",null);var M=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const B=class{constructor(t){i(this,t),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new a,this.formFieldController=new u({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new n:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.colorSwatchPickerRenderer.getContainerRef(),touchableAreaGetter:()=>[]}),this.translationSlimmer=new F,this.leftSlotProjection=new G("swatch-picker-left",(()=>this.colorSwatchPickerRenderer.getLeftContainerRef())),this.colorSwatchPickerRenderer=new I,this.colorSwatchGridRenderer=new V,this.colorSwatchInputRenderer=new P,this.colorSwatchPickerValueController=new H,this.colorSwatchPickerColorFormatController=new D,this.childNodeEventPreventSlimmer=new S([b],(()=>this.colorSwatchPickerRenderer.getContainerRef())),this.changeEventEmitter=x(B,b),this.internalColor="",this.isPopoverOpen=!1,this.value="",this.label="",this.disabled=!1,this.required=!1,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.colors=["#73E6DC","#806BFF","#FFDC83","#FF9571","#00BBFF","#FF82C9","#259F9F","#563D82"],this.swatchGridColumns=8,this.showInput=!0,this.inputPlaceholder="",this.inputPrefixIcon=P.DEFAULT_INPUT_ICON,this.showClearButton=!1,this.inputFormatter=D.DEFAULT_INPUT_FORMATTER}watchValue(){}watchDisabled(){this.disabled&&this.colorSwatchPickerRenderer.hidePopover()}watchValidationRules(){}watchInputFormatter(){}render(){return f(t(s,{class:{disabled:this.disabled}},this.colorSwatchPickerRenderer.render(),t("div",{class:"vega-error vega-hidden",part:"field-error-message"})),this.host)}get host(){return r(this)}static get watchers(){return{value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"],inputFormatter:["watchInputFormatter"]}}};M([l()],B.prototype,"globalSlimmers",void 0),M([d()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M([d()],B.prototype,"formFieldController",void 0),M([d()],B.prototype,"translationSlimmer",void 0),M([d()],B.prototype,"leftSlotProjection",void 0),M([d()],B.prototype,"colorSwatchPickerRenderer",void 0),M([d()],B.prototype,"colorSwatchGridRenderer",void 0),M([d()],B.prototype,"colorSwatchInputRenderer",void 0),M([d()],B.prototype,"colorSwatchPickerValueController",void 0),M([d()],B.prototype,"colorSwatchPickerColorFormatController",void 0),M([d()],B.prototype,"childNodeEventPreventSlimmer",void 0),M([d()],B.prototype,"changeEventEmitter",void 0),B.style=':host{display:inline-block}.swatch-picker-container{display:flex;flex-direction:row;align-items:center;gap:8px}.swatch-picker-container.error vega-color-swatch.swatch-picker-trigger::part(swatch){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.swatch-picker-container.error vega-color-swatch.swatch-picker-trigger::part(swatch-container):focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}';export{B as vega_color_swatch_picker}
@@ -1 +0,0 @@
1
- import{d as e,a as t,V as a,e as s,f as n,g as r,h as c,i as o,j as i,k as g,l as v,m as u,n as l,o as h,p,q as d,r as b,s as m,t as w,u as x,v as k,w as f,x as E,y,z as S,A as T,B as j,C as A,D as M,E as I,F as O,G as B,H as C,I as D,J as N,K as R,L as $,M as F,N as G,O as H,P as L,Q as q,R as z,S as J,T as K,U as P,c as Q,b as U,W as V,X as W,Y as X,Z as Y,_ as Z,$ as _,a0 as ee,a1 as te,a2 as ae,a3 as se}from"./p-9af0e2e7.js";import{L as ne}from"./p-6e1ab235.js";const re=new Map([["vega-accordion",[e]],["vega-app-header-button",[t,a,s,n]],["vega-banner",[r,c]],["vega-breadcrumb",[t]],["vega-button",[t]],["vega-button-circle",[t]],["vega-button-group",[t]],["vega-button-link",[t]],["vega-calendar",[o,i,g,v,u]],["vega-carousel",[l]],["vega-checkbox",[o]],["vega-checkbox-group",[o]],["vega-chip",[r,t]],["vega-code-block",[o,h]],["vega-color-picker",[o]],["vega-color-swatch",[t]],["vega-color-swatch-picker",[o]],["vega-combo-box",[o,p,d]],["vega-date-picker",[o,b]],["vega-date-picker-calendar",[m,b,w]],["vega-dropdown",[x,k,a,s,p,n,f]],["vega-dropdown-item",[t]],["vega-field-label",[t,E]],["vega-file-uploader",[o,y,h,S,T]],["vega-form",[j,A,M]],["vega-image-uploader",[o,h,I]],["vega-input",[o,O,B,C,E,D,N]],["vega-input-credit-card",[o,C,B]],["vega-input-numeric",[o]],["vega-input-passcode",[o,R]],["vega-input-phone-number",[o,$]],["vega-input-range",[o]],["vega-input-select",[o,d,f,F,G,E]],["vega-item-toggle",[H]],["vega-modal",[L,r]],["vega-left-nav",[q]],["vega-left-nav-group",[z]],["vega-left-nav-link",[J]],["vega-left-nav-section",[K]],["vega-pagination",[o,P]],["vega-popover",[Q,U]],["vega-progress-tracker",[V]],["vega-radio",[o,B,C]],["vega-radio-group",[o]],["vega-rich-text-editor",[o,W,X]],["vega-rich-text-editor-toolbar-button",[t]],["vega-rich-text-image-editor",[o]],["vega-rich-text-link-editor",[o]],["vega-segment-control",[o]],["vega-selection-chip",[o]],["vega-selection-chip-group",[o]],["vega-selection-tile",[o]],["vega-selection-tile-group",[o]],["vega-sidenav",[q]],["vega-sidenav-link",[t]],["vega-signature-capture",[o]],["vega-stepper",[o]],["vega-tab-group",[t]],["vega-table",[o,Y,Z,_,ee,te,ae,se]],["vega-table-head-cell",[t]],["vega-table-row",[t,e]],["vega-textarea",[o,C,E]],["vega-time-picker",[o]],["vega-toggle-switch",[o]]]);class ce{getHostName(){return this.vegaComponentName}getEventName(){return this.eventName}handle(e,t){const a=this.createEventTarget(e);a.style.display="none",e.appendChild(a);const s=this.createEvent(this.eventName);return t&&Object.defineProperty(s,"detail",{configurable:!0,value:t}),a.dispatchEvent(s),a.remove(),s}copyAttributesToTarget(e,t){e&&t&&Array.from(e.attributes).filter((e=>!e.name.startsWith("on"))).forEach((a=>{try{t.setAttribute(a.name,a.value)}catch(t){ne.error(`Delegated strategy copy ${e.tagName} attribute '${a.name}' error.`)}}))}createEvent(e){let t=new Event(e,{bubbles:!0,cancelable:!0});return"click"===e&&(t=new MouseEvent(e,{bubbles:!0,cancelable:!0})),t}}class oe extends ce{constructor(){super(...arguments),this.eventName="click",this.vegaComponentName="vega-button"}createEventTarget(e){const t=document.createElement("button");return this.copyAttributesToTarget(e,t),t.type=e.type,t}}class ie extends ce{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-checkbox"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="checkbox",t.checked=e.checked,t}}class ge extends ce{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-input-select"}createEventTarget(e){const t=document.createElement("select");return this.copyAttributesToTarget(e,t),e.value&&(t.value=e.value.toString()),t}}class ve extends ce{constructor(e){super(),this.vegaComponentName="vega-input",this.eventName=e}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type=e.type,t.value=e.value,t}}class ue extends ce{constructor(){super(...arguments),this.eventName="change",this.vegaComponentName="vega-radio"}createEventTarget(e){const t=document.createElement("input");return this.copyAttributesToTarget(e,t),t.type="radio",t.checked=e.checked,t}}class le extends ce{constructor(){super(...arguments),this.vegaComponentName="vega-textarea",this.eventName="change"}createEventTarget(e){const t=document.createElement("textarea");return this.copyAttributesToTarget(e,t),t.value=e.value,t}}const he=new class{constructor(){this.strategyRegistry=new Map,this.updateStrategyRegistry([new oe,new ve("change"),new ve("focus"),new ve("blur"),new ge,new le,new ie,new ue])}isSupportDelegated(e,t){let a=!1;const s=e.tagName.toLowerCase();return this.strategyRegistry.get(s)&&this.strategyRegistry.get(s).get(t.getNativeName())&&(a=!0),a}updateRegistryFromEventSemantics(e){let t=[];const{global:a,components:s}=e;if(a&&Array.isArray(a.jqueryDelegatedEvent)&&(t=t.concat(a.jqueryDelegatedEvent)),s)for(const e in s)Array.isArray(s[e].jqueryDelegatedEvent)&&(t=t.concat(s[e].jqueryDelegatedEvent));t.length&&this.updateStrategyRegistry(t)}getStrategy(e,t){const a=e.tagName.toLowerCase();if(this.strategyRegistry&&this.strategyRegistry.get(a))return this.strategyRegistry.get(a).get(t.getNativeName())}updateStrategyRegistry(e){e.forEach((e=>{const t=e.getHostName(),a=e.getEventName();if(this.strategyRegistry.get(t))this.strategyRegistry.get(t).set(a,e);else{const s=new Map;s.set(a,e),this.strategyRegistry.set(t,s)}}))}},pe=new class{constructor(){this.config={},this.defaultEventSemantics={namespace:"vega"}}setSemantics(e){this.config=e,he.updateRegistryFromEventSemantics(e)}getSemantics(e){return Object.assign({},this.defaultEventSemantics,this.getSemanticsInGlobal(),this.getSemanticsInComponents(e))}getEnabledEventIdsByComponent(e){return re.get(e)}getSemanticsInGlobal(){return this.config.global}getSemanticsInComponents(e){const t=e.tagName.toLocaleLowerCase();return this.config.components&&Object.prototype.hasOwnProperty.call(this.config.components,t)?this.config.components[t]:null}};export{ce as B,pe as i,he as j}
@@ -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 i,d as c,e,f as n,g as r,h as b,i as f}from"./p-c74060a7.js";import{V as h}from"./p-1d30cab2.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-3b791b5d.js";import{V as E}from"./p-5bf3ab33.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-5904616e.js";import{v as L,s as y}from"./p-4866e390.js";import{V as D}from"./p-fb05335d.js";var M=function(s,o,t,l){var a,i=arguments.length,c=i<3?o:null===l?l=Object.getOwnPropertyDescriptor(o,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(s,o,t,l);else for(var e=s.length-1;e>=0;e--)(a=s[e])&&(c=(i<3?a(c):i>3?a(o,t,c):a(o,t))||c);return i>3&&c&&Object.defineProperty(o,t,c),c};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,i=arguments.length,c=i<3?o:null===l?l=Object.getOwnPropertyDescriptor(o,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(s,o,t,l);else for(var e=s.length-1;e>=0;e--)(a=s[e])&&(c=(i<3?a(c):i>3?a(o,t,c):a(o,t))||c);return i>3&&c&&Object.defineProperty(o,t,c),c};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,i=arguments.length,c=i<3?o:null===l?l=Object.getOwnPropertyDescriptor(o,t):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(s,o,t,l);else for(var e=s.length-1;e>=0;e--)(a=s[e])&&(c=(i<3?a(c):i>3?a(o,t,c):a(o,t))||c);i>3&&c&&Object.defineProperty(o,t,c)}([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=i,globalThis.VegaSkeletonLoader=c,globalThis.VegaTranslation=e,globalThis.VegaTranslationResourceEN=O,globalThis.VegaRTEContent=A,globalThis.VegaRTETokenExtension=n,globalThis.VegaRTELanguageExtension=r,globalThis.VegaRTEPresetToolbarItems=D,globalThis.VegaRTEFunctionExtension=b,globalThis.VegaRTETableExtension=f,import("./p-fcb0d4d8.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}
@@ -1 +0,0 @@
1
- import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-f28a6074.js";import{d as s,e as n}from"./p-6c43d54a.js";import{d as r,c as i}from"./p-02841589.js";import{L as o}from"./p-6e1ab235.js";import{i as c}from"./p-e4c4ea35.js";import{T as a}from"./p-d884c644.js";import{g as l}from"./p-8b5d3a52.js";import{V as h}from"./p-8aee6b74.js";import{c as u}from"./p-a841cf13.js";import{f as d}from"./p-6e70d3cc.js";var p,f;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(p||(p={}));class T{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(f||(f={}));class E extends T{}const x=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 g,w,A,O;!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"}(g||(g={}));class m{constructor(){this.isFlushable=!1}}function N(t){const e=t.getAttribute("style");return e?e.split(";").filter(Boolean).filter((t=>" "!==t)).map((t=>{const e=t.replace(/(['"])(.*?)\1/g,"$2").split(":");return{[r(e[0].trim())]:e[1].trim().replace(";","")}})).reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{}):{}}class y{constructor(){this.classNameToBeAdded=""}filterAnnotations(t){const e=t.customStyle;return e?(this.extractAndDeleteMatchedStyles(e),0===Object.keys(e).length&&delete t.customStyle,t):t}filterAndDeleteStyles(t,e){const s=new Set(e);return this.extractAndDeleteMatchedStyles(t)&&this.classNameToBeAdded&&s.add(this.classNameToBeAdded),{styles:t,classNames:Array.from(s)}}refillStyles(t){this.classNameToBeAdded&&t.classList.remove(this.classNameToBeAdded);const e=N(t),s=Object.assign(Object.assign({},this.stylesToBeFiltered),e),n=Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("");t.setAttribute("style",n)}canFilter(t){return!1}canRefill(t,e){return!1}toCssText(){return""}get alwaysFilter(){return!1}extractAndDeleteMatchedStyles(t){let e=!1;const s=this.stylesToBeFiltered;if(t&&s){const n=Object.keys(s);for(const r of n)t[r]===s[r]&&(delete t[r],e=!0)}return e}buildCssTextForStyles(t,e){return`${`.${y.RTE_CONTENT_CONTAINER_CLASS_NAME}`+(e?` .${e}`:` ${t}`)} { ${Object.entries(this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")} }`}convertStylesMapToCssText(t){return Object.entries(t||this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}isBlockOrNodeStylesMatchFilterStyles(t,e){const s=t.getStyles({standalone:!0});return this.isMatchFilterStyles(s,e)}isMatchFilterStyles(t,e){return(e&&e.length>0?e:Object.keys(this.stylesToBeFiltered)).every((e=>t[e]===this.stylesToBeFiltered[e]))}}y.RTE_CONTENT_CONTAINER_CLASS_NAME="vega-rte-content",function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(w||(w={}));class R extends T{}class S{static isTextBlock(t){return t===this.RTE_TEXT_BLOCK_CLASS_NAME}static isCodeBlock(t){return"RTECodeBlock"===t}static isListBlock(t){return"RTEListBlock"===t}static isListItemBlock(t){return"RTEListItemBlock"===t}static isTextNode(t){return t===this.RTE_TEXT_NODE_CLASS_NAME}static isLinkNode(t){return this.isTextNode(t.constructor.name)&&!!t.getAnnotationByType(w.LINK)}static isCodeNode(t){if(this.isTextNode(t.constructor.name)){const e=t.getAnnotationByType(w.CODE);return!!e&&e.code}return!1}static isImageNode(t){return"RTEImageNode"===t.constructor.name}static isCodeBlockNode(t){return"RTECodeBlockNode"===t.constructor.name}}S.RTE_TEXT_NODE_CLASS_NAME="RTETextNode",S.RTE_TEXT_BLOCK_CLASS_NAME="RTETextBlock";class C extends y{constructor(){super(...arguments),this.stylesToBeFiltered=b.getDefaultStyles(),this.elementTagName="a"}filterAnnotations(t){const e=t.link;return(null==e?void 0:e.customStyle)?(this.extractAndDeleteMatchedStyles(e.customStyle),0===Object.keys(e.customStyle).length&&delete e.customStyle,t):t}canFilter(t){return S.isLinkNode(t)}canRefill(t,e){return"RTETextNode"===t&&e.matches(this.elementTagName)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}filterLinkGroupInlineStyles(t){const e=t.style,s=t.class?t.class.split(" "):[],n=this.filterAndDeleteStyles(e,s);return n.styles&&Object.keys(n.styles).length>0&&(t.style=n.styles),n.classNames&&n.classNames.length>0&&(t.class=n.classNames.join(" ")),t.style&&0===Object.keys(t.style).length&&delete t.style,t}}class b extends T{constructor(t){super(),this.type=p.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}static getDefaultStyles(){return{color:"rgba(var(--v-text-link, 19, 98, 226, 1))"}}clone(){const t=new b("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){let s=this.toJsx(t,e);return(null==e?void 0:e.filterInlineStyles)&&(s=b.linkGroupFilterStylesStrategy.filterLinkGroupInlineStyles(s)),Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${i(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&Object.assign(s,b.getDefaultStyles()),s}getAttribute(t){const{href:e,customAttribute:s={}}=t.link,n=t.useInternalStyle,r=s.target||(n?"_blank":"");return Object.assign(Object.assign(Object.assign({},s),e||n?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}}b.linkGroupFilterStylesStrategy=new C;class k extends E{constructor(t){super(),this.type=f.ALIGNMENT,this.textAlign=t}static from(t){return[f.ALIGNMENT,new k(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 k(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?k.getDefaultStyles(this.textAlign):null}}class v extends E{constructor(t){super(),this.type=f.INDENT,this.indent=Math.max(0,t)}static from(t){return[f.INDENT,new v(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new v(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class B{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 m?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)))}}}B.registry=new Map;class j{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=B.get(t,e),n=()=>{const s=t instanceof m?t.type:t.constructor.name,n=j.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);o.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!j.get(t,e.constructor.name)}}j.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(A||(A={}));class _ extends T{}class $ extends _{constructor(t){super(),this.type=A.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[A.CUSTOM_ATTRIBUTE,new $(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new $(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(c)}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 L extends _{constructor(t){super(),this.type=A.CUSTOM_CLASS,this.customClass=t}static from(t){return[A.CUSTOM_CLASS,new L(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new L(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class D extends _{constructor(t){super(),this.type=A.CUSTOM_STYLE,this.customStyle=t}static from(t){return[A.CUSTOM_STYLE,new D(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new D(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" ")}"`}}class I extends E{constructor(t){super(),this.type=f.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[f.INTERNAL_WRAPPER,new I(t)]}clone(){return new I(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class M{constructor(t){this.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])=>`${i(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof D)).map((e=>e.renderStyle(t))).filter(c);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 E:t instanceof R}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}class F{static register(t,e){var s;const n=null!==(s=this.registry.get(t))&&void 0!==s?s:new Set;n.add(e),this.registry.set(t,n)}static getStrategies(t){var e;return Array.from(null!==(e=this.registry.get(t))&&void 0!==e?e:[])}static executeTheStrategyFilterAction(t,e,s){return this.getStrategies(t.constructor.name).filter((e=>e.canFilter(t))).reduce(((t,e)=>e.filterAndDeleteStyles(t.styles,t.classNames)),{styles:e,classNames:s})}static executeTheStrategyRefillAction(t,e){this.getStrategies(t).filter((s=>s.canRefill(t,e))).forEach((t=>{t.refillStyles(e)}))}static generateAllStylesContent(t=!1){const e=[];return t&&(e.push("/* Font-face imports begin */\n"),e.push(Object.keys(a).map((t=>`@import url('${a[t].url}');\n`)).join(" ")),e.push("/* Font-face imports end */\n")),this.registry.forEach((t=>{t.forEach((t=>{const s=t.toCssText();s&&!e.includes(s)&&e.push(s)}))})),e.join(" ")}}F.registry=new Map,function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(O||(O={}));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 $.from(e);case"customClass":return L.from(e);case"customStyle":return D.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){return new M(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof L)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(A.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return x.getDOMByEntity(this)}generateAttributeString(t,...e){var s;const n=new M(this),r=n.toJSON({standalone:!0},["textDecoration"]),i=this.annotationMap.get(A.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=F.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${n.toCssText({standalone:!0},void 0,o)}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof m?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=x.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 H=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=H.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(c)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return k.from(e);case"indent":return v.from(e);case"customAttribute":return $.from(e);case"customClass":return L.from(e);case"customStyle":return D.from(e);case"internalWrapper":return I.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);c(n)&&t.set(...n)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(f.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof b||t instanceof I))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof E||t instanceof _)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(n){if(this.doApply(n),n.isFlushable){const n=x.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 M(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof E||t instanceof L)).map((e=>e.renderClass(t))).filter(c).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(A.CUSTOM_ATTRIBUTE)}generateAttributeString(t,...e){var s;const n=new M(this),r=n.toJSON({standalone:!0}),i=this.annotationMap.get(A.CUSTOM_CLASS);let o=r,a=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=F.executeTheStrategyFilterAction(this,r,a);o=t.styles,a=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],a&&a.length>0?`class="${a.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${n.toCssText({standalone:!0},void 0,o)}"`:null,...e].filter(c);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof m?j.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof b||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=j.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 P{}class J extends P{constructor(){super(...arguments),this.doSplit=!0}}class K extends T{constructor(t){super(),this.type=p.SELECTION_RANGE,this.range=t}clone(){return new K(this.range)}}const U="700",W="bold",G="italic",z="underline",V="line-through";class X extends R{constructor(t){super(),this.type=w.STRIKETHROUGH,this.strikethrough=t}static from(t){return[w.STRIKETHROUGH,new X(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new X(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class q extends R{constructor(t){super(),this.type=w.UNDERLINE,this.underline=t}static from(t){return[w.UNDERLINE,new q(t)]}toJSON(){return{underline:this.underline}}clone(){return new q(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class Y extends R{constructor(t){super(),this.type=w.ITALIC,this.italic=t}static from(t){return[w.ITALIC,new Y(t)]}toJSON(){return{italic:this.italic}}clone(){return new Y(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 Q extends R{constructor(t){super(),this.type=w.BOLD,this.bold=t}static from(t){return[w.BOLD,new Q(t)]}toJSON(){return{bold:this.bold}}clone(){return new Q(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 Z extends R{constructor(t,e=!0){super(),this.type=w.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[w.CODE,new Z(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}toJSON(){return{code:this.code}}clone(){return new Z(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?Z.getDefaultStyles():null}}const tt={key:"black",light:"#111128",dark:"#E3E3E8"},et=[tt,{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"}],st="​",nt=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]],rt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);class it extends R{constructor(t){super(),this.type=w.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[w.TEXT_COLOR,new it(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new it(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:h.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return et.find((e=>e.key===t))||et[0]}}class ot extends R{constructor(t,e=!0){super(),this.type=w.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[w.LINK,new ot(t,e)]}toJSON(){return{link:this.link}}clone(){return new ot(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class ct extends P{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new b(this.groupKey)}}class at extends P{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class lt{execute(t,e){return o.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const s=t.annotationMap.get(A.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new D(s.removeStyles(e)))}createNewParagraph(t){const e=H.getRTEBlockClass("paragraph");if(e)return e.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.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 x.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 ht extends m{constructor(t){super(),this.type=g.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class ut extends lt{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(p.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 ht(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&&x.getEntityByDOM(i),l=o&&x.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 dt extends J{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new Q(this.bold)}}class pt extends T{constructor(){super(...arguments),this.type=p.CLEAR_FORMATTING,this.items=[w.BOLD,w.ITALIC,w.UNDERLINE,w.STRIKETHROUGH,w.TEXT_COLOR,w.CODE,A.CUSTOM_STYLE]}}class ft extends J{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new pt}}class Tt extends J{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new Z(this.code)}}class Et extends P{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class xt extends J{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new Y(this.italic)}}class gt 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,c(n)&&(this.doSplit=n)}toAnnotation(){return new ot(this.link)}}class wt extends J{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new X(this.strikethrough)}}class At extends J{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new q(this.underline)}}class Ot extends lt{handleAction(t,e){const s=t.toAnnotation();if(t instanceof Et)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof pt))return s instanceof R||s instanceof K?(t instanceof gt&&(c(t.newText)&&(e.text=t.newText),e.parent.apply(new ct(t.link.groupKey,[e],t.type))),t instanceof Tt&&this.handleAction(new ft,e),t instanceof dt&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof xt&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof At||t instanceof wt)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class mt extends m{constructor(){super(...arguments),this.type=g.DELETE_LINK_GROUP}}class Nt extends lt{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new mt)}}class yt extends m{constructor(t){super(),this.type=g.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Rt extends lt{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&&x.getEntityByDOM(e),h=a&&x.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 yt(c))}}}class St extends T{constructor(t){super(),this.type=w.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new St(e);return o.groupId=t.groupId,o.child=s?St.from(s)[1]:void 0,o.customAttribute=i?$.from(i)[1]:void 0,o.customClass=r?L.from(r)[1]:void 0,o.customStyle=n?D.from(n)[1]:void 0,[w.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new St(this.htmlTag);return r.groupId=this.groupId,r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}renderProps(){var t,e,s;return Object.assign(Object.assign({},null===(t=this.customAttribute)||void 0===t?void 0:t.render()),{style:null===(e=this.customStyle)||void 0===e?void 0:e.renderStyle(),class:null===(s=this.customClass)||void 0===s?void 0:s.renderClass().join(" ")})}toJSON(){var t,e,s,n;return{inlineHtml:u({htmlTag:this.htmlTag,groupId:this.groupId,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class Ct extends lt{handleAction(t,e){const s=e.parent.getAnnotationByType(p.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class bt extends lt{handleAction(t,e){const s=e.parent.getAnnotationByType(p.LINK_GROUP);if(s){const t=e.annotationMap.get(w.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(p.LINK_GROUP)}}e.annotationMap.delete(w.LINK)}}class kt extends R{constructor(t){super(),this.type=w.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[w.PLAIN_TEXT,new kt(t)]}clone(){return new kt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class vt extends J{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new it(this.textColor)}}class RTETextNode extends RTENode{constructor(t,e,s,n){super(t,n),this.type=O.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 ct(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(c))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return Q.from(e);case"italic":return Y.from(e);case"underline":return q.from(e);case"strikethrough":return X.from(e);case"code":return Z.from(e,n);case"textColor":return it.from(e);case"link":return ot.from(e,n);case"inlineHtml":return St.from(e);case"plainText":return kt.from(e)}return RTENode.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof R||t instanceof _||t instanceof St)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(t){const e=this.getAnnotationByType(w.INLINE_HTML);return e?this.renderWithWrapperStr(e,t):this.renderTextStr(t)}cloneWithText(t){return new RTETextNode(l(),t,this.parent,super.cloneAnnotations())}clone(t){return new RTETextNode(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!(this.getAnnotationByType(w.INLINE_HTML)||this.text&&"​"!==this.text&&"\n"!==this.text)}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}getInlineHtmlTagAtDepth(t){const e=this.getInlineHtmlAnnotationAtDepth(t);return e?rt.has(e.htmlTag)?null:{htmlTag:e.htmlTag,attrStr:this.annotationAttrStr(e),groupId:e.groupId,annotation:e}:null}renderHtmlFromDepth(t,e){const s=this.getInlineHtmlAnnotationAtDepth(t);return s?this.renderWithWrapperStr(s,e):this.renderTextStr(e)}getInlineHtmlAnnotationAtDepth(t){let e=this.getAnnotationByType(w.INLINE_HTML);for(let s=0;s<t&&e;s++)e=e.child;return e}registerModifyStrategy(){const t=this.constructor.name;RTETextNode.registerActionStrategyStatus[t]||(this.isContentEditable()&&(j.register(g.UPDATE_TEXT,t,new Nt),j.register(g.REPLACE_SELECTED_TEXT,t,new Rt),j.register(g.LINK_GROUP_NODE_SPLIT,t,new Ct),j.register(gt.name,t,new Ot)),j.register(J.name,t,new ut),j.register(g.DELETE_LINK_GROUP,t,new bt),j.register(dt.name,t,new Ot),j.register(ft.name,t,new Ot),j.register(xt.name,t,new Ot),j.register(At.name,t,new Ot),j.register(vt.name,t,new Ot),j.register(wt.name,t,new Ot),j.register(Tt.name,t,new Ot),j.register(P.name,t,new Ot),RTETextNode.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(p.SELECTION_RANGE);if(t instanceof J&&t.doSplit&&e){const e=j.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){j.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof at)return void this.syncUpSelectedNodes(t);s instanceof K||this.syncUpSelectedNodes(t);const n=j.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=j.get(P.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,e){const{htmlTag:s,child:n}=t,r=this.annotationAttrStr(t);return n?`<${s}${r}>${this.renderWithWrapperStr(n,e)}</${s}>`:rt.has(s)?`<${s}${r}>`:this.text?`<${s}${r}>${this.renderTextStr(e)}</${s}>`:`<${s}${r}></${s}>`}annotationAttrStr(t){const{customAttribute:e,customClass:s,customStyle:n}=t,r=[...(null==e?void 0:e.toString())||[],null==s?void 0:s.toString(),null==n?void 0:n.toString()].filter(c);return r.length>0?` ${r.join(" ")}`:""}renderTextStr(t){var e;const s=(null===(e=this.getAnnotationByType(w.CODE))||void 0===e?void 0:e.code)?"code":"span",n=super.generateAttributeString(t);return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${s}${n}>${this.text}</${s}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(w.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof R&&!(t instanceof ot)&&!(t instanceof kt)||t instanceof _)).length}}RTETextNode.registerActionStrategyStatus={},RTETextNode.htmlTag="span";class Bt extends m{constructor(t){super(),this.type=g.APPEND_CHILDREN,this.entityToBeAppended=t}}const jt={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},_t=Object.assign(Object.assign({},jt),{marginTop:"0px",marginBottom:"0px"}),$t={paragraph:_t,title:Object.assign(Object.assign({},jt),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"}),subtitle:Object.assign(Object.assign({},jt),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"}),"heading-1":Object.assign(Object.assign({},_t),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"}),"heading-2":Object.assign(Object.assign({},_t),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"}),"heading-3":Object.assign(Object.assign({},_t),{fontSize:"18px"}),"heading-4":Object.assign({},_t),"heading-5":Object.assign(Object.assign({},_t),{fontSize:"14px"}),"heading-6":Object.assign(Object.assign({},_t),{fontSize:"12px"})};class Lt extends E{constructor(t){super(),this.type=f.TEXT_STYLE,this.textStyle=t}static from(t){return[f.TEXT_STYLE,new Lt(t)]}static getDefaultStyles(t){return t?$t[t]:null}toJSON(){return{textStyle:this.textStyle}}clone(){return new Lt(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?Lt.getDefaultStyles(this.textStyle):null}}class Dt extends P{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Lt(this.textStyle)}}class It extends lt{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new dt(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new Et(w.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Mt extends m{constructor(t,...e){super(),this.type=g.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Ft extends m{constructor(t){super(),this.type=g.REPLACE_CHILD_NODES,this.newChildNodes=t}}class Ht extends lt{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 Ft(e));const c=s.cloneWithNodes(o);return s.parent.apply(new Mt(s,c)),c}}}}class Pt extends lt{handleAction(t,e){e.children=[],e.apply(new Bt(t.newChildNodes))}}class Jt extends m{constructor(t){super(),this.type=g.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Kt extends lt{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new Bt(t)),s.parent.apply(new Jt(s))}}}class Ut extends lt{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new RTETextNode(l(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const e=s.children.slice(0,o),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(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Ft([...t,e,...s]))}}class Wt extends lt{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new RTETextNode(l(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Jt(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new RTETextNode(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Ft([...t,e,...s]))}}class Gt extends m{constructor(t,...e){super(),this.type=g.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class zt extends m{constructor(t,e){super(),this.type=g.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Vt extends P{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new k(this.textAlign)}}class Xt extends lt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class qt extends P{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new v(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([Lt.from(e)]):new Map([Lt.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=H.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(c),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?Lt.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 gt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(w.LINK),r=s.getAnnotationByType(w.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),s=super.generateAttributeString(t),n=this.getChildrenHtml(t);return super.shouldRenderAsInternalWrapper()?n:[`<${e}${s}>`,n,`</${e}>`].join("")}cloneWithNodes(t){const e=new RTETextBlock(l(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Bt(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(t){const e=this.getAnnotationByType(p.LINK_GROUP);let s=this.renderGroupedNodesAtDepth(this.children,0,t);return e&&this.children.length>0&&(s=this.generateLinkHtml(e,s,t)),s}doAnnotationActionApply(t){const e=j.get(t.constructor.name,RTETextBlock.name);e&&e.execute(t,this)}renderGroupedNodesAtDepth(t,e,s){var n;let r="",i=0;for(;i<t.length;){const o=t[i].getInlineHtmlTagAtDepth(e);if(!(null==o?void 0:o.groupId)){r+=t[i].renderHtmlFromDepth(e,s),i++;continue}let c=i+1;for(;c<t.length&&(null===(n=t[c].getInlineHtmlTagAtDepth(e))||void 0===n?void 0:n.groupId)===o.groupId;)c++;if(c===i+1)r+=t[i].renderHtmlFromDepth(e,s);else{const n=this.renderGroupedNodesAtDepth(t.slice(i,c),e+1,s);r+=`<${o.htmlTag}${o.attrStr}>${n}</${o.htmlTag}>`}i=c}return r}generateLinkHtml(t,e,s){e="";let n=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(w.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(w.LINK):null;if(i){if(n.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,filterInlineStyles:null==s?void 0:s.filterInlineStyles});e+=[`<a${r?` ${r}`:""}>`,this.renderGroupedNodesAtDepth(n,0,s),"</a>"].join(""),n=[]}}else e+=this.children[r].toHtml(s)}return e}}j.register(Dt.name,RTETextBlock.name,new It),j.register(Vt.name,RTETextBlock.name,new Xt),j.register(qt.name,RTETextBlock.name,new class extends lt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),j.register(ct.name,RTETextBlock.name,new class extends lt{handleAction(t,e){let s=e.getAnnotationByType(p.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(p.LINK_GROUP,s)}}}),j.register(g.UNLINK_LINK_GROUP,RTETextBlock.name,new class extends lt{handleAction(t,e){const s=e.getAnnotationByType(p.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(p.LINK_GROUP))}}),j.register(g.SPLIT_BLOCK_WITH_NODE,RTETextBlock.name,new Ht),j.register(g.REPLACE_CHILD_NODES,RTETextBlock.name,new Pt),j.register(g.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new Kt),j.register(g.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Ut),j.register(g.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Wt),j.register(g.INSERT_IMAGE_TO_BLOCK,RTETextBlock.name,new class extends lt{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Mt(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new Gt(e,r));else{const t=new zt(s,n);e.apply(t),e.parent.apply(new Mt(e,r))}}}),j.register(g.TRANSFORM_LIST_BLOCK,RTETextBlock.name,new class extends lt{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>s.toListItem(t)));n.apply(new Bt(i)),s.apply(new Mt(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new Jt(t))}))}});class Yt extends lt{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 Qt extends m{constructor(t,e){super(),this.isFlushable=!0,this.type=g.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class Zt extends P{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new K(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 d(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 te extends y{constructor(){super(...arguments),this.stylesToBeFiltered=te.STYLES,this.elementTagName="pre code"}canFilter(t){return S.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}te.STYLES={boxSizing:"border-box",color:"rgba(var(--v-text-primary, 32, 54, 69, 1))",textAlign:"left",fontFamily:'"Roboto Mono"',fontWeight:"400",lineHeight:"22px",fontSize:"16px",whiteSpace:"pre-wrap",minHeight:"22px",tabSize:"2px"};class RTECodeBlockNode extends RTEDecoratorNode{constructor(t,e,s,n){super(t),this.type=O.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s,this.annotationMap.set(A.CUSTOM_STYLE,new D(te.STYLES))}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(t){return`<code${this.generateAttributeString(t)}>${this.text}</code>`}clone(t){return new RTECodeBlockNode(this.id,this.text,this.language,t)}doAnnotationActionApply(t){j.executeTheStrategy(t,this)}doModifyActionApply(t){j.executeTheStrategy(t,this)}}j.register(g.UPDATE_CODE_BLOCK,RTECodeBlockNode.name,new class extends lt{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),j.register(Zt.name,RTECodeBlockNode.name,new class extends lt{handleAction(t,e){e.annotationMap.set(p.SELECTION_RANGE,t.toAnnotation())}});var ee;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(ee||(ee={}));class se extends lt{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 Jt(e)))}}class ne extends y{constructor(){super(...arguments),this.stylesToBeFiltered=ne.STYLES,this.elementTagName="pre"}canFilter(t){return S.isCodeBlock(t.constructor.name)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}ne.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class RTECodeBlock extends RTEBlock{constructor(t,e,s){super(t),this.type="code-block",this.annotationMap=new Map([D.from(ne.STYLES)]),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(t){const{language:e=ee["Plain Text"]}=this.children[0];return`<pre data-language="${e}"${super.generateAttributeString(t)}>${this.children.map((e=>e.toHtml(t)))}</pre>`}clone(t){const e=RTECodeBlock.from(this.toJSON());return e.parent=t,e}apply(n){if(n instanceof m&&j.executeTheStrategy(n,this),n.isFlushable){const n=x.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(p.SELECTION_RANGE)}}j.register(g.DELETE_CODE_BLOCK,RTECodeBlock.name,new class extends Yt{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 Jt(e));const i=t?x.getDOMByEntity(t):null;if(0===n.children.length){const s=RTETextBlock.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:""}]});e.parent.apply(new Bt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const c=x.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}}),j.register(g.DELETE_CHILDREN,RTECodeBlock.name,new se),j.register(g.SWITCH_OUT_FROM_CODE_BLOCK,RTECodeBlock.name,new class extends lt{handleAction(s,r){const{content:i,language:o}=s,c=i.split("\n"),a=new Qt(c.slice(0,c.length-2).join("\n"),o);a.isFlushable=!1,r.children[0].apply(a);const h=RTETextBlock.from({id:l(),type:"paragraph",nodes:[{id:l(),text:"",type:"text"}]});r.parent.apply(new Mt(r,h));const u=x.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),j.register(g.INSERT_IMAGE_TO_BLOCK,RTECodeBlock.name,new class extends lt{handleAction(t,e){e.parent.apply(new Mt(e,t.imageBlockToBeInserted))}}),RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element";export{tt as $,j as A,E as B,A as C,L as D,RTECodeBlock as E,w as F,RTEDecoratorNode as G,Vt as H,Mt as I,O as J,_ as K,Ft as L,m as M,R as N,zt as O,rt as P,Yt as Q,F as R,at as S,Dt as T,yt as U,nt as V,se as W,W as X,U as Y,N as Z,et as _,B as a,G as a0,V as a1,z as a2,Lt as a3,S as a4,k as a5,Z as a6,C as a7,ne as a8,RTECodeBlockNode as a9,te as aa,ee as ab,st as ac,gt as ad,Qt as ae,Zt as af,vt as ag,dt as ah,xt as ai,At as aj,Q as ak,ft as al,Tt as am,wt as an,qt as ao,H as b,RTETextNode as c,RTEBlock as d,RTETextBlock as e,M as f,lt as g,Bt as h,RTENode as i,Gt as j,p as k,g as l,P as m,Jt as n,$ as o,y as p,It as q,Xt as r,x as s,Ut as t,Wt as u,Ht as v,Pt as w,Kt as x,f as y,D as z}
@@ -1 +0,0 @@
1
- export{C as CheckBoxRequiredRule}from"./p-590fd123.js";export{D as DateRequiredRule}from"./p-c95dbf11.js";export{I as InputPhoneNumberRequiredRule}from"./p-07c2725a.js";export{I as InputRangeRequiredRule}from"./p-f396c69a.js";export{R as RequiredFieldRule}from"./p-280cbcdb.js";export{R as RichTextEditorRequiredRule}from"./p-77300901.js";export{T as TimeRangeRequiredRule,a as TimeRequiredRule}from"./p-e1d2c60d.js";export{T as ToggleSwitchRequiredRule}from"./p-7c0b4c36.js";export{F as FileUploaderRequiredRule}from"./p-0bb860cc.js";import"./p-abd7aeaa.js";import"./p-e4c4ea35.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-d884c644.js";import"./p-3b791b5d.js";import"./p-6e1ab235.js";import"./p-2d0d575f.js";import"./p-a528714c.js";import"./p-5904616e.js";import"./p-fb05335d.js";import"./p-f28a6074.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6c43d54a.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-8aee6b74.js";import"./p-fb5ea4b2.js";import"./p-4866e390.js";import"./p-b75ee3ba.js";import"./p-f0e828d8.js";import"./p-a841cf13.js";
File without changes