@heartlandone/vega 2.83.0 → 2.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/dist/cjs/{accessibility-bfa227f6.js → accessibility-a5ef2038.js} +3 -2
  2. package/dist/cjs/{app-globals-40b1b1b2.js → app-globals-ea063074.js} +7 -7
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-9b7095a4.js → child-nodes-event-prevent-slimmer-58bbc5fc.js} +1 -1
  4. package/dist/cjs/{code-block-b1f8aded.js → code-block-6da521e6.js} +24 -40
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-99fbd1f2.js → component-value-history-controller-slimmer.abstract-f3f35f94.js} +3 -3
  6. package/dist/cjs/{content-state-648652b4.js → content-state-89fafb3b.js} +2 -2
  7. package/dist/cjs/{date-required-rule-6addf5dd.js → date-required-rule-0dd83683.js} +1 -1
  8. package/dist/cjs/{design-token-93070bb8.js → design-token-4b3509dd.js} +3 -3
  9. package/dist/cjs/{element-appender-slimmer-52c2b455.js → element-appender-slimmer-2b4e0a62.js} +2 -2
  10. package/dist/cjs/{event-emit-slimmer-bcb458b2.js → event-emit-slimmer-ecca412d.js} +1 -1
  11. package/dist/cjs/{form-field-controller-slimmer-0f3a028e.js → form-field-controller-slimmer-a07e3de0.js} +1 -1
  12. package/dist/cjs/{image-annotation-action-0339e983.js → image-annotation-action-a6e1e9ed.js} +2 -2
  13. package/dist/cjs/index-58ea899e.js +4 -0
  14. package/dist/cjs/index.cjs.js +15 -15
  15. package/dist/cjs/{inject-keyboard-manager-2d9c4f92.js → inject-keyboard-manager-ff8735b8.js} +1 -1
  16. package/dist/cjs/{internal-translation-controller-fb1532f4.js → internal-translation-controller-8360a89c.js} +2 -0
  17. package/dist/cjs/{internal-vega-event-manager-fef893bf.js → internal-vega-event-manager-6b74b3af.js} +2 -1
  18. package/dist/cjs/{keyboard-manager-5ed6c472.js → keyboard-manager-cc446230.js} +1 -1
  19. package/dist/cjs/{keyboard-manager-slimmer-879ff4f3.js → keyboard-manager-slimmer-a10b7d6f.js} +1 -1
  20. package/dist/cjs/loader.cjs.js +10 -10
  21. package/dist/cjs/{month-view-generator-d262e6ce.js → month-view-generator-41b6c6b6.js} +1 -1
  22. package/dist/cjs/{public-rules-bce88d4e.js → public-rules-fc52d624.js} +7 -7
  23. package/dist/cjs/{range-5bd6d72b.js → range-93cc8ab1.js} +1 -1
  24. package/dist/cjs/{responsive-format-facade-2cab7344.js → responsive-format-facade-5f6cd211.js} +1 -1
  25. package/dist/cjs/{rich-text-editor-required-rule-e8a922be.js → rich-text-editor-required-rule-fd3711fb.js} +1 -1
  26. package/dist/cjs/{split-cell-operation-bb388de6.js → split-cell-operation-532fb9f0.js} +3 -3
  27. package/dist/cjs/{state-border-formatter-4e5e4ed0.js → state-border-formatter-d1c80c1d.js} +1 -1
  28. package/dist/cjs/{string-format-strategy.abstract-9a35e3b4.js → string-format-strategy.abstract-b39da0dd.js} +1 -1
  29. package/dist/cjs/{string-input-formatter-slimmer-1018ddec.js → string-input-formatter-slimmer-127cf2b8.js} +1 -1
  30. package/dist/cjs/{string-mask-strategy-3aa17744.js → string-mask-strategy-524d0f69.js} +2 -2
  31. package/dist/cjs/{style-formatter-2226c869.js → style-formatter-c201e7d0.js} +2 -2
  32. package/dist/cjs/{time-required-rule-970dfdca.js → time-required-rule-ecb45905.js} +1 -1
  33. package/dist/cjs/{token-extension-361273fb.js → token-extension-39f2b886.js} +6 -6
  34. package/dist/cjs/{translation-slimmer-d0c77ad2.js → translation-slimmer-3cd7d3b2.js} +1 -1
  35. package/dist/cjs/{type-guard-3ec852d7.js → type-guard-2e97fc56.js} +14 -1
  36. package/dist/cjs/{valid-credit-card-number-rule-99d1bb34.js → valid-credit-card-number-rule-2d7d20ce.js} +1 -1
  37. package/dist/cjs/vega-accordion.cjs.entry.js +7 -7
  38. package/dist/cjs/vega-app-header-button.cjs.entry.js +28 -9
  39. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  41. package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
  42. package/dist/cjs/vega-button-circle.cjs.entry.js +8 -8
  43. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  44. package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
  45. package/dist/cjs/vega-button.cjs.entry.js +6 -6
  46. package/dist/cjs/vega-calendar_4.cjs.entry.js +8 -8
  47. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  48. package/dist/cjs/vega-carousel.cjs.entry.js +6 -6
  49. package/dist/cjs/vega-checkbox_2.cjs.entry.js +20 -6
  50. package/dist/cjs/vega-chip.cjs.entry.js +9 -9
  51. package/dist/cjs/vega-code-block.cjs.entry.js +11 -11
  52. package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
  53. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +627 -0
  54. package/dist/cjs/vega-color-swatch.cjs.entry.js +7 -7
  55. package/dist/cjs/vega-combo-box.cjs.entry.js +9 -9
  56. package/dist/cjs/vega-date-picker_2.cjs.entry.js +17 -17
  57. package/dist/cjs/vega-dialog_2.cjs.entry.js +190 -85
  58. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  59. package/dist/cjs/vega-dropdown_5.cjs.entry.js +11 -11
  60. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  61. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  62. package/dist/cjs/vega-file-uploader.cjs.entry.js +6 -6
  63. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  64. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  65. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  66. package/dist/cjs/vega-form.cjs.entry.js +6 -6
  67. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  68. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  69. package/dist/cjs/vega-image-uploader.cjs.entry.js +9 -9
  70. package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
  71. package/dist/cjs/vega-input-numeric.cjs.entry.js +8 -8
  72. package/dist/cjs/vega-input-passcode.cjs.entry.js +8 -8
  73. package/dist/cjs/vega-input-phone-number.cjs.entry.js +7 -7
  74. package/dist/cjs/vega-input-range.cjs.entry.js +7 -7
  75. package/dist/cjs/vega-input-select.cjs.entry.js +9 -9
  76. package/dist/cjs/vega-input.cjs.entry.js +9 -9
  77. package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
  78. package/dist/cjs/vega-left-nav_5.cjs.entry.js +9 -9
  79. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  80. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  81. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
  82. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  83. package/dist/cjs/vega-pagination.cjs.entry.js +7 -7
  84. package/dist/cjs/vega-popover_2.cjs.entry.js +10 -10
  85. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +6 -6
  86. package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
  87. package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
  88. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +31 -16
  89. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +11 -11
  90. package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
  91. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
  92. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +6 -6
  93. package/dist/cjs/vega-sidenav_3.cjs.entry.js +6 -6
  94. package/dist/cjs/vega-signature-capture.cjs.entry.js +9 -9
  95. package/dist/cjs/vega-stepper.cjs.entry.js +5 -5
  96. package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
  97. package/dist/cjs/vega-table_11.cjs.entry.js +8 -8
  98. package/dist/cjs/vega-text.cjs.entry.js +36 -1
  99. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  100. package/dist/cjs/vega-time-picker_2.cjs.entry.js +50 -19
  101. package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
  102. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  103. package/dist/cjs/vega.cjs.js +10 -10
  104. package/dist/collection/collection-manifest.json +6 -0
  105. package/dist/collection/components/vega-app-header-button/slimmers/renderers/vega-app-header-button-dropdown-renderer.js +14 -1
  106. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +46 -3
  107. package/dist/collection/components/vega-checkbox/vega-checkbox.js +16 -0
  108. package/dist/collection/components/vega-color-swatch/slimmers/renderers/vega-color-swatch-renderer.js +2 -2
  109. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/assets/hashtag.js +3 -0
  110. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-color-format-controller.js +64 -0
  111. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-value-controller.js +65 -0
  112. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-grid-renderer.js +59 -0
  113. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-input-renderer.js +83 -0
  114. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-picker-renderer.js +115 -0
  115. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.css +67 -0
  116. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.js +585 -0
  117. package/dist/collection/components/vega-dialog/vega-dialog.css +1 -0
  118. package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
  119. package/dist/collection/components/vega-grid/vega-grid.js +2 -2
  120. package/dist/collection/components/vega-input/vega-input.js +1 -1
  121. package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
  122. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-padding-state-controller.js +43 -0
  123. package/dist/collection/components/vega-modal/slimmers/models/vega-modal-section-padding-state.js +56 -0
  124. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +11 -11
  125. package/dist/collection/components/vega-modal/vega-modal.css +20 -21
  126. package/dist/collection/components/vega-modal/vega-modal.js +19 -3
  127. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +4 -39
  128. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.js +30 -0
  129. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +15 -0
  130. package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +36 -1
  131. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-clear-button-renderer.js +13 -5
  132. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.js +4 -1
  133. package/dist/collection/components/vega-time-picker/vega-time-picker.js +44 -0
  134. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +3 -2
  135. package/dist/collection/helpers/translation/locales/en.js +2 -0
  136. package/dist/collection/types/type-guard.js +12 -0
  137. package/dist/collection/utils/accessibility.js +3 -2
  138. package/dist/collection/value-model-adapters/angular-ng-model-accessor-adapter.js +1 -0
  139. package/dist/collection/value-model-adapters/vue-component-v-model-adaptor.js +1 -0
  140. package/dist/esm/{accessibility-e5fd0fab.js → accessibility-524cabd2.js} +3 -2
  141. package/dist/esm/{app-globals-f67d0eaf.js → app-globals-d06de2a5.js} +7 -7
  142. package/dist/esm/{child-nodes-event-prevent-slimmer-9c24d4fc.js → child-nodes-event-prevent-slimmer-f65e2452.js} +1 -1
  143. package/dist/esm/{code-block-b8be290a.js → code-block-65c8804b.js} +24 -40
  144. package/dist/esm/{component-value-history-controller-slimmer.abstract-10ccf8e6.js → component-value-history-controller-slimmer.abstract-26c154f6.js} +3 -3
  145. package/dist/esm/{content-state-72b513d1.js → content-state-e676bdf0.js} +2 -2
  146. package/dist/esm/{date-required-rule-891a6a57.js → date-required-rule-a84c21d4.js} +1 -1
  147. package/dist/esm/{design-token-59d07aa2.js → design-token-57de4f4f.js} +3 -3
  148. package/dist/esm/{element-appender-slimmer-29c94a18.js → element-appender-slimmer-d4a82dc3.js} +2 -2
  149. package/dist/esm/{event-emit-slimmer-32da9d90.js → event-emit-slimmer-18711776.js} +1 -1
  150. package/dist/esm/{form-field-controller-slimmer-899864a8.js → form-field-controller-slimmer-9a0f8c54.js} +1 -1
  151. package/dist/esm/{image-annotation-action-ebd6c421.js → image-annotation-action-2d87b66a.js} +3 -3
  152. package/dist/esm/index-090d31ca.js +4 -0
  153. package/dist/esm/index.js +16 -16
  154. package/dist/esm/{inject-keyboard-manager-dc1d7135.js → inject-keyboard-manager-1ceb9ee0.js} +1 -1
  155. package/dist/esm/{internal-translation-controller-4fb104b2.js → internal-translation-controller-d7dee4a0.js} +2 -0
  156. package/dist/esm/{internal-vega-event-manager-8a657bac.js → internal-vega-event-manager-bed71930.js} +3 -2
  157. package/dist/esm/{keyboard-manager-6ea9968b.js → keyboard-manager-50a1d90e.js} +1 -1
  158. package/dist/esm/{keyboard-manager-slimmer-7eed4734.js → keyboard-manager-slimmer-3891ee20.js} +1 -1
  159. package/dist/esm/loader.js +11 -11
  160. package/dist/esm/{month-view-generator-aaa27fce.js → month-view-generator-70c597a6.js} +1 -1
  161. package/dist/esm/{public-rules-f2005e11.js → public-rules-a61ff09f.js} +7 -7
  162. package/dist/esm/{range-ed532278.js → range-d9e55d00.js} +1 -1
  163. package/dist/esm/{responsive-format-facade-e9926018.js → responsive-format-facade-456a9f16.js} +1 -1
  164. package/dist/esm/{rich-text-editor-required-rule-b559cf1a.js → rich-text-editor-required-rule-6a4c853a.js} +1 -1
  165. package/dist/esm/{split-cell-operation-5587f594.js → split-cell-operation-2e700c5c.js} +3 -3
  166. package/dist/esm/{state-border-formatter-be51463d.js → state-border-formatter-afac8d33.js} +1 -1
  167. package/dist/esm/{string-format-strategy.abstract-0157b3c5.js → string-format-strategy.abstract-f9907969.js} +1 -1
  168. package/dist/esm/{string-input-formatter-slimmer-33ed3478.js → string-input-formatter-slimmer-ad234bec.js} +1 -1
  169. package/dist/esm/{string-mask-strategy-b58891b5.js → string-mask-strategy-5f655300.js} +2 -2
  170. package/dist/esm/{style-formatter-9662ae88.js → style-formatter-ee52d8d0.js} +2 -2
  171. package/dist/esm/{time-required-rule-a9dc8473.js → time-required-rule-db873c19.js} +1 -1
  172. package/dist/esm/{token-extension-0710dbc5.js → token-extension-d3a46c04.js} +7 -7
  173. package/dist/esm/{translation-slimmer-4faae5a3.js → translation-slimmer-5e2bff5f.js} +1 -1
  174. package/dist/esm/{type-guard-152070e9.js → type-guard-adc244fd.js} +14 -2
  175. package/dist/esm/{valid-credit-card-number-rule-a7907cb7.js → valid-credit-card-number-rule-a826dd49.js} +1 -1
  176. package/dist/esm/vega-accordion.entry.js +8 -8
  177. package/dist/esm/vega-app-header-button.entry.js +29 -10
  178. package/dist/esm/vega-banner.entry.js +4 -4
  179. package/dist/esm/vega-box.entry.js +6 -6
  180. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  181. package/dist/esm/vega-button-circle.entry.js +9 -9
  182. package/dist/esm/vega-button-group_2.entry.js +4 -4
  183. package/dist/esm/vega-button-link.entry.js +4 -4
  184. package/dist/esm/vega-button.entry.js +7 -7
  185. package/dist/esm/vega-calendar_4.entry.js +9 -9
  186. package/dist/esm/vega-card.entry.js +5 -5
  187. package/dist/esm/vega-carousel.entry.js +7 -7
  188. package/dist/esm/vega-checkbox_2.entry.js +21 -7
  189. package/dist/esm/vega-chip.entry.js +10 -10
  190. package/dist/esm/vega-code-block.entry.js +12 -12
  191. package/dist/esm/vega-color-picker.entry.js +6 -6
  192. package/dist/esm/vega-color-swatch-picker.entry.js +623 -0
  193. package/dist/esm/vega-color-swatch.entry.js +8 -8
  194. package/dist/esm/vega-combo-box.entry.js +10 -10
  195. package/dist/esm/vega-date-picker_2.entry.js +18 -18
  196. package/dist/esm/vega-dialog_2.entry.js +191 -86
  197. package/dist/esm/vega-divider.entry.js +5 -5
  198. package/dist/esm/vega-dropdown_5.entry.js +12 -12
  199. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  200. package/dist/esm/{vega-event-id-4ede557a.js → vega-event-id-5841d1d3.js} +1 -1
  201. package/dist/esm/vega-field-label.entry.js +4 -4
  202. package/dist/esm/vega-file-uploader.entry.js +7 -7
  203. package/dist/esm/vega-flag-icon.entry.js +5 -5
  204. package/dist/esm/vega-flex.entry.js +6 -6
  205. package/dist/esm/vega-font.entry.js +5 -5
  206. package/dist/esm/vega-form.entry.js +7 -7
  207. package/dist/esm/vega-grid.entry.js +5 -5
  208. package/dist/esm/vega-icon.entry.js +5 -5
  209. package/dist/esm/vega-image-uploader.entry.js +10 -10
  210. package/dist/esm/vega-input-credit-card.entry.js +10 -10
  211. package/dist/esm/vega-input-numeric.entry.js +9 -9
  212. package/dist/esm/vega-input-passcode.entry.js +9 -9
  213. package/dist/esm/vega-input-phone-number.entry.js +8 -8
  214. package/dist/esm/vega-input-range.entry.js +8 -8
  215. package/dist/esm/vega-input-select.entry.js +10 -10
  216. package/dist/esm/vega-input.entry.js +10 -10
  217. package/dist/esm/vega-item-toggle.entry.js +3 -3
  218. package/dist/esm/vega-left-nav_5.entry.js +10 -10
  219. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  220. package/dist/esm/vega-page-notification_2.entry.js +2 -2
  221. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  222. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  223. package/dist/esm/vega-pagination.entry.js +8 -8
  224. package/dist/esm/vega-popover_2.entry.js +11 -11
  225. package/dist/esm/vega-progress-tracker_2.entry.js +7 -7
  226. package/dist/esm/vega-radio_2.entry.js +10 -10
  227. package/dist/esm/vega-rich-text-content.entry.js +7 -7
  228. package/dist/esm/vega-rich-text-editor_4.entry.js +32 -17
  229. package/dist/esm/vega-rich-text-table-properties_3.entry.js +12 -12
  230. package/dist/esm/vega-segment-control.entry.js +3 -3
  231. package/dist/esm/vega-selection-chip_2.entry.js +9 -9
  232. package/dist/esm/vega-selection-tile_2.entry.js +7 -7
  233. package/dist/esm/vega-sidenav_3.entry.js +7 -7
  234. package/dist/esm/vega-signature-capture.entry.js +10 -10
  235. package/dist/esm/vega-stepper.entry.js +6 -6
  236. package/dist/esm/vega-tab-group_2.entry.js +5 -5
  237. package/dist/esm/vega-table_11.entry.js +9 -9
  238. package/dist/esm/vega-text.entry.js +36 -1
  239. package/dist/esm/vega-textarea.entry.js +6 -6
  240. package/dist/esm/vega-time-picker_2.entry.js +51 -20
  241. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  242. package/dist/esm/vega-tooltip_2.entry.js +6 -6
  243. package/dist/esm/vega.js +11 -11
  244. package/dist/sri/vega-sri-manifest.json +350 -346
  245. package/dist/types/components/vega-app-header-button/slimmers/renderers/vega-app-header-button-dropdown-renderer.d.ts +8 -0
  246. package/dist/types/components/vega-app-header-button/types.d.ts +2 -0
  247. package/dist/types/components/vega-app-header-button/vega-app-header-button.d.ts +16 -0
  248. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +1 -0
  249. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/assets/hashtag.d.ts +3 -0
  250. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-color-format-controller.d.ts +32 -0
  251. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/controllers/color-swatch-picker-value-controller.d.ts +31 -0
  252. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-grid-renderer.d.ts +26 -0
  253. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-input-renderer.d.ts +25 -0
  254. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/slimmers/renderers/color-swatch-picker-renderer.d.ts +43 -0
  255. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/types.d.ts +17 -0
  256. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.d.ts +149 -0
  257. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-padding-state-controller.d.ts +21 -0
  258. package/dist/types/components/vega-modal/slimmers/models/vega-modal-section-padding-state.d.ts +29 -0
  259. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +1 -1
  260. package/dist/types/components/vega-modal/types.d.ts +11 -0
  261. package/dist/types/components/vega-modal/vega-modal.d.ts +7 -2
  262. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +0 -7
  263. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.d.ts +3 -0
  264. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-clear-button-renderer.d.ts +6 -3
  265. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.d.ts +1 -0
  266. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +20 -0
  267. package/dist/types/components.d.ts +195 -3
  268. package/dist/types/helpers/translation/interface.d.ts +3 -1
  269. package/dist/types/types/components.type.d.ts +6 -1
  270. package/dist/types/types/type-guard.d.ts +8 -0
  271. package/dist/types/utils/accessibility.d.ts +6 -1
  272. package/dist/vega/index.esm.js +1 -1
  273. package/dist/vega/{p-fc7ab79d.js → p-031c0cf7.js} +1 -1
  274. package/dist/vega/{p-e71864ff.js → p-032183c1.js} +1 -1
  275. package/dist/vega/{p-608f234f.entry.js → p-03cf2df1.entry.js} +1 -1
  276. package/dist/vega/{p-7d85cc74.entry.js → p-096d186d.entry.js} +1 -1
  277. package/dist/vega/{p-ebdb489c.entry.js → p-0bb0b521.entry.js} +1 -1
  278. package/dist/vega/{p-19a30f98.entry.js → p-0e15fa94.entry.js} +1 -1
  279. package/dist/vega/p-0f31b00b.entry.js +1 -0
  280. package/dist/vega/{p-42141782.js → p-11a2f834.js} +1 -1
  281. package/dist/vega/{p-eb0ebf50.entry.js → p-19e10a87.entry.js} +1 -1
  282. package/dist/vega/{p-2b5cf2b3.js → p-1a869f0e.js} +1 -1
  283. package/dist/vega/{p-8b217c7e.entry.js → p-1df2c29b.entry.js} +1 -1
  284. package/dist/vega/{p-9c1a48b9.entry.js → p-20f0060f.entry.js} +1 -1
  285. package/dist/vega/{p-5be546c5.js → p-220f8ee7.js} +1 -1
  286. package/dist/vega/{p-c36afa21.entry.js → p-27b1dc0f.entry.js} +1 -1
  287. package/dist/vega/{p-103d20f5.js → p-34964a53.js} +1 -1
  288. package/dist/vega/p-39b71df9.entry.js +1 -0
  289. package/dist/vega/p-3ae5f50e.entry.js +1 -0
  290. package/dist/vega/{p-d5531d3c.js → p-3b791b5d.js} +1 -1
  291. package/dist/vega/p-4123559f.entry.js +1 -0
  292. package/dist/vega/p-43aaeb30.entry.js +1 -0
  293. package/dist/vega/{p-3fae8d3f.entry.js → p-45aaaef6.entry.js} +1 -1
  294. package/dist/vega/{p-085de8fc.js → p-4cefd7fe.js} +1 -1
  295. package/dist/vega/{p-8583dd34.entry.js → p-5215e1d8.entry.js} +1 -1
  296. package/dist/vega/{p-783531cf.entry.js → p-5409275a.entry.js} +1 -1
  297. package/dist/vega/{p-d7bd2470.entry.js → p-5490d499.entry.js} +1 -1
  298. package/dist/vega/{p-d456386a.entry.js → p-549bea2c.entry.js} +1 -1
  299. package/dist/vega/p-5657f768.js +1 -0
  300. package/dist/vega/{p-d4f1f007.js → p-56c28943.js} +1 -1
  301. package/dist/vega/{p-14de7ba0.entry.js → p-571a6d15.entry.js} +1 -1
  302. package/dist/vega/{p-6572e038.js → p-57f220b5.js} +1 -1
  303. package/dist/vega/{p-25ab7a33.entry.js → p-5ac4649a.entry.js} +1 -1
  304. package/dist/vega/{p-988401c3.entry.js → p-5bbb3e68.entry.js} +1 -1
  305. package/dist/vega/{p-ef59f6f0.js → p-5bf3ab33.js} +1 -1
  306. package/dist/vega/{p-bb46d8e6.entry.js → p-5f23c52d.entry.js} +1 -1
  307. package/dist/vega/p-5f377954.js +1 -1
  308. package/dist/vega/{p-90cb665e.entry.js → p-6236f592.entry.js} +1 -1
  309. package/dist/vega/p-68a96fbb.entry.js +1 -0
  310. package/dist/vega/p-6ac8e655.js +1 -0
  311. package/dist/vega/{p-4e95248c.entry.js → p-6ba71ec4.entry.js} +1 -1
  312. package/dist/vega/{p-02467b61.js → p-6cada843.js} +1 -1
  313. package/dist/vega/{p-f7a5746b.js → p-6f790577.js} +1 -1
  314. package/dist/vega/{p-597588d0.entry.js → p-74136508.entry.js} +1 -1
  315. package/dist/vega/{p-158c6a9f.entry.js → p-748268e6.entry.js} +1 -1
  316. package/dist/vega/{p-ea564928.entry.js → p-753a7832.entry.js} +1 -1
  317. package/dist/vega/{p-116e3963.js → p-7595ad55.js} +1 -1
  318. package/dist/vega/{p-475bd8bf.entry.js → p-7702a906.entry.js} +1 -1
  319. package/dist/vega/{p-cc18970f.entry.js → p-78099a83.entry.js} +1 -1
  320. package/dist/vega/{p-0915a8d3.entry.js → p-7cf1e1f7.entry.js} +1 -1
  321. package/dist/vega/p-7dbaed6c.entry.js +1 -0
  322. package/dist/vega/{p-a6dbc63d.entry.js → p-7dca19d3.entry.js} +1 -1
  323. package/dist/vega/p-80cb302f.entry.js +1 -0
  324. package/dist/vega/p-82039afd.entry.js +1 -0
  325. package/dist/vega/{p-e340d58c.entry.js → p-84030271.entry.js} +1 -1
  326. package/dist/vega/{p-a4738b70.entry.js → p-865fc90b.entry.js} +1 -1
  327. package/dist/vega/{p-58b6ac33.entry.js → p-88f57353.entry.js} +1 -1
  328. package/dist/vega/{p-30445cd9.entry.js → p-8d833b44.entry.js} +1 -1
  329. package/dist/vega/p-91739ed3.entry.js +1 -0
  330. package/dist/vega/{p-d320496e.entry.js → p-9297f4a9.entry.js} +1 -1
  331. package/dist/vega/{p-cab70b95.entry.js → p-9308f874.entry.js} +1 -1
  332. package/dist/vega/p-9375fbce.js +1 -0
  333. package/dist/vega/{p-7df43192.entry.js → p-99670c56.entry.js} +1 -1
  334. package/dist/vega/p-9de25451.js +1 -0
  335. package/dist/vega/{p-b9a95aca.entry.js → p-9f064488.entry.js} +1 -1
  336. package/dist/vega/p-9f728e0b.js +1 -0
  337. package/dist/vega/p-a2d6d695.entry.js +1 -0
  338. package/dist/vega/{p-c8435185.js → p-a5e6a3be.js} +1 -1
  339. package/dist/vega/{p-9751c801.js → p-a87cb7ac.js} +1 -1
  340. package/dist/vega/{p-5ffdea8e.js → p-aa040383.js} +1 -1
  341. package/dist/vega/{p-ed01657b.entry.js → p-aa4d419c.entry.js} +1 -1
  342. package/dist/vega/{p-b9728ca8.js → p-b48b3264.js} +1 -1
  343. package/dist/vega/{p-ab829745.js → p-b7721666.js} +1 -1
  344. package/dist/vega/{p-c5eb0fa6.js → p-b78eaec4.js} +1 -1
  345. package/dist/vega/{p-c8d41cdc.entry.js → p-b80217fa.entry.js} +1 -1
  346. package/dist/vega/{p-280f63fa.entry.js → p-b88eab9a.entry.js} +1 -1
  347. package/dist/vega/{p-8da66d41.entry.js → p-bc2786f9.entry.js} +1 -1
  348. package/dist/vega/{p-d32e83e7.js → p-bdddddb7.js} +1 -1
  349. package/dist/vega/{p-da742a7f.entry.js → p-c0323a55.entry.js} +1 -1
  350. package/dist/vega/{p-edda10f7.js → p-c47c37f2.js} +1 -1
  351. package/dist/vega/{p-54ba35e3.entry.js → p-c6837173.entry.js} +1 -1
  352. package/dist/vega/{p-b7624ce4.js → p-c85e743d.js} +1 -1
  353. package/dist/vega/{p-b9947846.js → p-c95dbf11.js} +1 -1
  354. package/dist/vega/{p-142f371b.entry.js → p-ce975c69.entry.js} +1 -1
  355. package/dist/vega/{p-eda7cd76.entry.js → p-d10ae46a.entry.js} +1 -1
  356. package/dist/vega/p-d3864b94.entry.js +1 -0
  357. package/dist/vega/{p-b5497af2.entry.js → p-d3ed7c27.entry.js} +1 -1
  358. package/dist/vega/{p-29f42c27.entry.js → p-d6c9ef6c.entry.js} +1 -1
  359. package/dist/vega/{p-8559e36f.entry.js → p-d76e3b3c.entry.js} +1 -1
  360. package/dist/vega/{p-a07c0f8c.js → p-dba16739.js} +1 -1
  361. package/dist/vega/{p-0bf8743f.js → p-dec5b448.js} +1 -1
  362. package/dist/vega/{p-b08a70e6.entry.js → p-e1b1f5f9.entry.js} +1 -1
  363. package/dist/vega/{p-956b170c.js → p-e1d2c60d.js} +1 -1
  364. package/dist/vega/{p-b9386dd0.js → p-e4c4ea35.js} +1 -1
  365. package/dist/vega/{p-efc8c09e.entry.js → p-e4c5b8d1.entry.js} +1 -1
  366. package/dist/vega/{p-f020738c.entry.js → p-e5546af5.entry.js} +1 -1
  367. package/dist/vega/{p-513f51ec.entry.js → p-e5cc839a.entry.js} +1 -1
  368. package/dist/vega/{p-44044ed7.js → p-effa6495.js} +1 -1
  369. package/dist/vega/{p-0dbd7723.entry.js → p-f0e855b2.entry.js} +1 -1
  370. package/dist/vega/{p-f89cf75a.entry.js → p-f6414a24.entry.js} +1 -1
  371. package/dist/vega/{p-cc00135a.entry.js → p-f8c700dd.entry.js} +1 -1
  372. package/dist/vega/{p-51d2e0ab.entry.js → p-f986f875.entry.js} +1 -1
  373. package/dist/vega/vega.esm.js +1 -1
  374. package/package.json +1 -1
  375. package/dist/vega/p-075bb809.entry.js +0 -1
  376. package/dist/vega/p-0bcb2945.entry.js +0 -1
  377. package/dist/vega/p-1b48e8a5.entry.js +0 -1
  378. package/dist/vega/p-1ca95601.entry.js +0 -1
  379. package/dist/vega/p-29d31c98.entry.js +0 -1
  380. package/dist/vega/p-318f0df5.js +0 -1
  381. package/dist/vega/p-337a5e76.js +0 -1
  382. package/dist/vega/p-380abceb.entry.js +0 -1
  383. package/dist/vega/p-47611a83.entry.js +0 -1
  384. package/dist/vega/p-596bc4f6.entry.js +0 -1
  385. package/dist/vega/p-6e9f832f.js +0 -1
  386. package/dist/vega/p-81a11dc6.entry.js +0 -1
  387. package/dist/vega/p-85abe824.entry.js +0 -1
  388. package/dist/vega/p-86194314.js +0 -1
  389. package/dist/vega/p-9d854d43.js +0 -1
  390. package/dist/vega/p-e00fb667.entry.js +0 -1
@@ -1 +1 @@
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-aa985d73.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-b9386dd0.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}}class jt extends E{constructor(t){super(),this.type=f.TEXT_STYLE,this.textStyle=t}static from(t){return[f.TEXT_STYLE,new jt(t)]}static getDefaultStyles(t){const e={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},s=Object.assign(Object.assign({},e),{marginTop:"0px",marginBottom:"0px"});switch(t){case"paragraph":return s;case"title":return Object.assign(Object.assign({},e),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"});case"subtitle":return Object.assign(Object.assign({},e),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"});case"heading-1":return Object.assign(Object.assign({},s),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"});case"heading-2":return Object.assign(Object.assign({},s),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"});case"heading-3":return Object.assign(Object.assign({},s),{fontSize:"18px"});case"heading-4":return Object.assign({},s);case"heading-5":return Object.assign(Object.assign({},s),{fontSize:"14px"});case"heading-6":return Object.assign(Object.assign({},s),{fontSize:"12px"});default:return null}}toJSON(){return{textStyle:this.textStyle}}clone(){return new jt(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?jt.getDefaultStyles(this.textStyle):null}}class _t extends P{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new jt(this.textStyle)}}class $t 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 Lt extends m{constructor(t,...e){super(),this.type=g.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Dt extends m{constructor(t){super(),this.type=g.REPLACE_CHILD_NODES,this.newChildNodes=t}}class It 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 Dt(e));const c=s.cloneWithNodes(o);return s.parent.apply(new Lt(s,c)),c}}}}class Mt extends lt{handleAction(t,e){e.children=[],e.apply(new Bt(t.newChildNodes))}}class Ft extends m{constructor(t){super(),this.type=g.DELETE_CHILDREN,this.entityToBeRemoved=t}}class Ht 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 Ft(s))}}}class Pt 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 Dt([...t,e,...s]))}}class Jt 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 Ft(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 Dt([...t,e,...s]))}}class Kt extends m{constructor(t,...e){super(),this.type=g.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class Ut extends m{constructor(t,e){super(),this.type=g.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class Wt extends P{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new k(this.textAlign)}}class Gt extends lt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class zt 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([jt.from(e)]):new Map([jt.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?jt.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(_t.name,RTETextBlock.name,new $t),j.register(Wt.name,RTETextBlock.name,new Gt),j.register(zt.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 It),j.register(g.REPLACE_CHILD_NODES,RTETextBlock.name,new Mt),j.register(g.MERGE_TWO_BLOCKS_NODES,RTETextBlock.name,new Ht),j.register(g.LINE_BREAK_SINGLE_BLOCK,RTETextBlock.name,new Pt),j.register(g.LINE_BREAK_MULTIPLE_BLOCKS,RTETextBlock.name,new Jt),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 Lt(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new Kt(e,r));else{const t=new Ut(s,n);e.apply(t),e.parent.apply(new Lt(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 Lt(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new Ft(t))}))}});class Vt 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 Xt extends m{constructor(t,e){super(),this.isFlushable=!0,this.type=g.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class qt 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 Yt extends y{constructor(){super(...arguments),this.stylesToBeFiltered=Yt.STYLES,this.elementTagName="pre code"}canFilter(t){return S.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}Yt.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(Yt.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(qt.name,RTECodeBlockNode.name,new class extends lt{handleAction(t,e){e.annotationMap.set(p.SELECTION_RANGE,t.toAnnotation())}});var Qt;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(Qt||(Qt={}));class Zt 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 Ft(e)))}}class te extends y{constructor(){super(...arguments),this.stylesToBeFiltered=te.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)}}te.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(te.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=Qt["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 Vt{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 Ft(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 Zt),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 Xt(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 Lt(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 Lt(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,Wt as H,Lt as I,O as J,_ as K,Dt as L,m as M,R as N,Ut as O,rt as P,Vt as Q,F as R,at as S,_t as T,yt as U,nt as V,Zt 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,jt as a3,S as a4,k as a5,Z as a6,C as a7,te as a8,RTECodeBlockNode as a9,Yt as aa,Qt as ab,st as ac,gt as ad,Xt as ae,qt 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,zt 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,Kt as j,p as k,g as l,P as m,Ft as n,$ as o,y as p,$t as q,Gt as r,x as s,Pt as t,Jt as u,It as v,Mt as w,Ht as x,f as y,D as z}
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-aa985d73.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 +1 @@
1
- import{r as t,c as e,h as s,H as i,g as a}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{I as g}from"./p-d4ea8e22.js";import{D as r}from"./p-f28a6074.js";import{O as n,a as l}from"./p-c5eb0fa6.js";import{c as d}from"./p-44044ed7.js";import{I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-4415ad28.js";import{c as u}from"./p-2a9960c9.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6a334573.js";import"./p-6e9f832f.js";import"./p-b75ee3ba.js";import"./p-a841cf13.js";const v=[{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"===t.itemToggleStatusMap.unToggledIcon&&"delete-bin"===t.itemToggleStatusMap.toggledIcon&&"Add"===t.itemToggleStatusMap.unToggledLabel&&"Added"===t.itemToggleStatusMap.togglingLabel&&"Remove"===t.itemToggleStatusMap.toggledLabel&&"Removed"===t.itemToggleStatusMap.unTogglingLabel},{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_NOT_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"!==t.itemToggleStatusMap.unToggledIcon||"delete-bin"!==t.itemToggleStatusMap.toggledIcon||"Add"!==t.itemToggleStatusMap.unToggledLabel||"Added"!==t.itemToggleStatusMap.togglingLabel||"Remove"!==t.itemToggleStatusMap.toggledLabel||"Removed"!==t.itemToggleStatusMap.unTogglingLabel}];var m=function(t,e,s,i){var a,o=arguments.length,g=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(g=(o<3?a(g):o>3?a(e,s,g):a(e,s))||g);return o>3&&g&&Object.defineProperty(e,s,g),g};const b=class{constructor(s){t(this,s),this.vegaToggleStatus=e(this,"vegaToggleStatus",7),this.toggleStatus=e(this,"toggleStatus",7),this.globalSlimmers={},this.toggleStatusEventEmitter=d(b,n),this.deprecatedPropertySlimmer=u(b,"statusMap","itemToggleStatusMap",b.defaultStatusMap),this.vegaComponentUsageRuntimeMetricsSlimmer=new p(v),this.toggleItemStatus="unToggled",this.itemToggleStatusMap=b.defaultStatusMap,this.statusMap=b.defaultStatusMap,this.isToggled=!1,this.handleToggle=()=>{this.isTogglingOrUnToggling()||this.updateToggleStatus()}}onToggledPropsChange(){this.updateTransitionStatus()}componentWillLoad(){this.updateTransitionStatus()}render(){return o(s(i,{class:{"vega-toggled-status":this.isTogglingOrUnToggling()}},this.renderLabelDom(),s("vega-button-circle",{size:"small",variant:"secondary",icon:"unToggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().unToggledIcon||"plus-sign":"toggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().toggledIcon||"delete-bin":"checkmark",ref:t=>{r.addUniqueObserverToNode(t,l,this.handleToggle)}})),this.host)}renderLabelDom(){let t;switch(this.toggleItemStatus){case"unToggled":t=this.deprecatedPropertySlimmer.getValue().unToggledLabel;break;case"toggling":t=this.deprecatedPropertySlimmer.getValue().togglingLabel;break;case"toggled":t=this.deprecatedPropertySlimmer.getValue().toggledLabel;break;case"unToggling":t=this.deprecatedPropertySlimmer.getValue().unTogglingLabel}return s("div",null,t||"No label defined")}isTogglingOrUnToggling(){return"toggling"===this.toggleItemStatus||"unToggling"===this.toggleItemStatus}updateToggleStatus(){switch(this.toggleItemStatus){case"unToggled":this.toggleItemStatus="toggling",setTimeout((()=>{this.isToggled=!0}),g);break;case"toggled":this.toggleItemStatus="unToggling",setTimeout((()=>{this.isToggled=!1}),g)}}updateTransitionStatus(){this.toggleItemStatus=this.isToggled?"toggled":"unToggled",this.toggleStatusEventEmitter.emit(this.isToggled)}get host(){return a(this)}static get watchers(){return{isToggled:["onToggledPropsChange"]}}};b.defaultStatusMap={unToggledIcon:"plus-sign",toggledIcon:"delete-bin",unToggledLabel:"Add",togglingLabel:"Added",toggledLabel:"Remove",unTogglingLabel:"Removed"},m([h()],b.prototype,"globalSlimmers",void 0),m([c()],b.prototype,"toggleStatusEventEmitter",void 0),m([c()],b.prototype,"deprecatedPropertySlimmer",void 0),m([c()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=':host{display:inline-block;text-align:left;line-height:normal}div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));padding-right:8px;display:inline-block}@media screen and (min-width: 768px) and (max-width: 1023px){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}div:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}vega-button-circle::part(button):hover{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}vega-button-circle::part(button):active{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}:host(.vega-toggled-status)>div,:host(.vega-toggled-status) vega-button-circle{animation:fadein 1.4s ease}:host(.vega-toggled-status)>div{cursor:default;color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status)>div:hover{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(button){border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1));cursor:default;box-shadow:0 0 0 0}:host(.vega-toggled-status) vega-button-circle::part(button):hover{border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(icon){color:rgba(var(--v-text-success, 1, 128, 31, 1))}@keyframes fadein{0%{opacity:0}10%{opacity:0.1}50%{opacity:0.5}80%{opacity:0.8}100%{opacity:1}}';export{b as vega_item_toggle}
1
+ import{r as t,c as e,h as s,H as i,g as a}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{I as g}from"./p-d4ea8e22.js";import{D as r}from"./p-f28a6074.js";import{O as n,a as l}from"./p-b78eaec4.js";import{c as d}from"./p-effa6495.js";import{I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-4415ad28.js";import{c as u}from"./p-2a9960c9.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6a334573.js";import"./p-9de25451.js";import"./p-b75ee3ba.js";import"./p-a841cf13.js";const v=[{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"===t.itemToggleStatusMap.unToggledIcon&&"delete-bin"===t.itemToggleStatusMap.toggledIcon&&"Add"===t.itemToggleStatusMap.unToggledLabel&&"Added"===t.itemToggleStatusMap.togglingLabel&&"Remove"===t.itemToggleStatusMap.toggledLabel&&"Removed"===t.itemToggleStatusMap.unTogglingLabel},{payloadKey:"ITEM_TOGGLE_STATUS_MAP_IS_NOT_DEFAULT_VALUE",payloadDescription:"@deprecated Defines the labels and icons associated with the toggle states.",payloadValue:t=>"plus-sign"!==t.itemToggleStatusMap.unToggledIcon||"delete-bin"!==t.itemToggleStatusMap.toggledIcon||"Add"!==t.itemToggleStatusMap.unToggledLabel||"Added"!==t.itemToggleStatusMap.togglingLabel||"Remove"!==t.itemToggleStatusMap.toggledLabel||"Removed"!==t.itemToggleStatusMap.unTogglingLabel}];var m=function(t,e,s,i){var a,o=arguments.length,g=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(g=(o<3?a(g):o>3?a(e,s,g):a(e,s))||g);return o>3&&g&&Object.defineProperty(e,s,g),g};const b=class{constructor(s){t(this,s),this.vegaToggleStatus=e(this,"vegaToggleStatus",7),this.toggleStatus=e(this,"toggleStatus",7),this.globalSlimmers={},this.toggleStatusEventEmitter=d(b,n),this.deprecatedPropertySlimmer=u(b,"statusMap","itemToggleStatusMap",b.defaultStatusMap),this.vegaComponentUsageRuntimeMetricsSlimmer=new p(v),this.toggleItemStatus="unToggled",this.itemToggleStatusMap=b.defaultStatusMap,this.statusMap=b.defaultStatusMap,this.isToggled=!1,this.handleToggle=()=>{this.isTogglingOrUnToggling()||this.updateToggleStatus()}}onToggledPropsChange(){this.updateTransitionStatus()}componentWillLoad(){this.updateTransitionStatus()}render(){return o(s(i,{class:{"vega-toggled-status":this.isTogglingOrUnToggling()}},this.renderLabelDom(),s("vega-button-circle",{size:"small",variant:"secondary",icon:"unToggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().unToggledIcon||"plus-sign":"toggled"===this.toggleItemStatus?this.deprecatedPropertySlimmer.getValue().toggledIcon||"delete-bin":"checkmark",ref:t=>{r.addUniqueObserverToNode(t,l,this.handleToggle)}})),this.host)}renderLabelDom(){let t;switch(this.toggleItemStatus){case"unToggled":t=this.deprecatedPropertySlimmer.getValue().unToggledLabel;break;case"toggling":t=this.deprecatedPropertySlimmer.getValue().togglingLabel;break;case"toggled":t=this.deprecatedPropertySlimmer.getValue().toggledLabel;break;case"unToggling":t=this.deprecatedPropertySlimmer.getValue().unTogglingLabel}return s("div",null,t||"No label defined")}isTogglingOrUnToggling(){return"toggling"===this.toggleItemStatus||"unToggling"===this.toggleItemStatus}updateToggleStatus(){switch(this.toggleItemStatus){case"unToggled":this.toggleItemStatus="toggling",setTimeout((()=>{this.isToggled=!0}),g);break;case"toggled":this.toggleItemStatus="unToggling",setTimeout((()=>{this.isToggled=!1}),g)}}updateTransitionStatus(){this.toggleItemStatus=this.isToggled?"toggled":"unToggled",this.toggleStatusEventEmitter.emit(this.isToggled)}get host(){return a(this)}static get watchers(){return{isToggled:["onToggledPropsChange"]}}};b.defaultStatusMap={unToggledIcon:"plus-sign",toggledIcon:"delete-bin",unToggledLabel:"Add",togglingLabel:"Added",toggledLabel:"Remove",unTogglingLabel:"Removed"},m([h()],b.prototype,"globalSlimmers",void 0),m([c()],b.prototype,"toggleStatusEventEmitter",void 0),m([c()],b.prototype,"deprecatedPropertySlimmer",void 0),m([c()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=':host{display:inline-block;text-align:left;line-height:normal}div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));padding-right:8px;display:inline-block}@media screen and (min-width: 768px) and (max-width: 1023px){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){div{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}div:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}vega-button-circle::part(button):hover{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}vega-button-circle::part(button):active{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}:host(.vega-toggled-status)>div,:host(.vega-toggled-status) vega-button-circle{animation:fadein 1.4s ease}:host(.vega-toggled-status)>div{cursor:default;color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status)>div:hover{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(button){border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1));cursor:default;box-shadow:0 0 0 0}:host(.vega-toggled-status) vega-button-circle::part(button):hover{border:2px solid rgba(var(--v-border-success, 1, 128, 31, 1))}:host(.vega-toggled-status) vega-button-circle::part(icon){color:rgba(var(--v-text-success, 1, 128, 31, 1))}@keyframes fadein{0%{opacity:0}10%{opacity:0.1}50%{opacity:0.5}80%{opacity:0.8}100%{opacity:1}}';export{b as vega_item_toggle}
@@ -1 +1 @@
1
- import{c as t,I as e,V as i,L as s,M as n}from"./p-6e1ab235.js";import{f as o,d as r,b as h}from"./p-6e70d3cc.js";import{I as a}from"./p-781fd6e0.js";import{c as l}from"./p-6a334573.js";import{P as c}from"./p-81dd00d0.js";import{A as u,P as d}from"./p-d4ea8e22.js";import{G as p,i as f,a7 as v}from"./p-b9386dd0.js";import{R as m}from"./p-fc7ab79d.js";import{t as g}from"./p-b75ee3ba.js";import{F as w}from"./p-18e8d9b7.js";import{C as b}from"./p-2d0d575f.js";import{S as R}from"./p-a528714c.js";import{O as j}from"./p-331a62d5.js";import{d as E,D as y}from"./p-f28a6074.js";import{B as A}from"./p-aa985d73.js";class O{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],O.prototype,"showConfig",void 0);class x{canRetrieve(){return!this.showConfig.isScreenPosition}}class S extends x{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],S.prototype,"showConfig",void 0);class C extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=o(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t({writable:!0})],C.prototype,"showConfig",void 0);class P extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,".vega-popover")}retrieve(){const t=o(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],P.prototype,"showConfig",void 0);class k extends x{canRetrieve(){return this.focusTrapRoot=this.findFocusTrapRoot(this.showConfig.target),!!this.focusTrapRoot}retrieve(){const t=this.focusTrapRoot;return this.focusTrapRoot=null,this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}findFocusTrapRoot(t){var e;const i=o(t,'dialog, [aria-modal="true"]');return!i||this.isVegaOwned(i)?null:null!==(e=i.closest('[tabindex="-1"]'))&&void 0!==e?e:i}isVegaOwned(t){return t.tagName.startsWith("VEGA-")}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],k.prototype,"showConfig",void 0);var T=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class V extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new S,this.vegaPopoverWrapper=new P,this.vegaModalWrapper=new C,this.thirdPartyDialogWrapper=new k,this.defaultWrapper=new O}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.thirdPartyDialogWrapper,this.defaultWrapper]}}T([t({writable:!0})],V.prototype,"container",void 0),T([t({writable:!0})],V.prototype,"showConfig",void 0),T([e()],V.prototype,"positionRelativeToWrapper",void 0),T([e()],V.prototype,"vegaPopoverWrapper",void 0),T([e()],V.prototype,"vegaModalWrapper",void 0),T([e()],V.prototype,"thirdPartyDialogWrapper",void 0),T([e()],V.prototype,"defaultWrapper",void 0);class M extends i{shouldAdjustPosition(){return!0}getPositionBox(t,e){const i=t&&t.length>0?t:this.getPlacements(),s=e&&e.length>0?e:this.getAlignments(),n=this.getTargetBoundBox(),o=this.getElementBoundBox(),r=this.getElementScrollDimension(),h=this.getSuitablePlacement(r,o,n,i),a=h||i[0],l=this.getSuitableAlignment(r,o,n,a,s),c=this.calculatePosition(o,n,a,l||s[0]),u=this.getTranslocationBox(a);return c.placement=h,c.alignment=l,c.left+=u.X,c.top+=u.Y,!this.showConfig.positionRelativeTo&&this.showConfig.isScreenPosition&&this.adjustPositionForViewport(c,o,n,a),c}hasEnoughAlignmentSpace(t,e,i,s,n){if(["top","bottom"].includes(s))switch(n){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(n){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}getSuitablePlacement(t,e,i,n){const o=n[0];return n.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${o}\n `),null)}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}keepVerticallyInView(t,e){return Math.max(0,Math.min(t,window.innerHeight-e))}keepHorizontallyInView(t,e){return Math.max(0,Math.min(t,window.innerWidth-e))}isTargetInView(t){const e=window.innerHeight,i=window.innerWidth;return t.top<=e&&t.top+t.height>=0&&t.left<=i&&t.left+t.width>=0}adjustPositionForViewport(t,e,i,s){this.isTargetInView(i)&&("top"===s||"bottom"===s?t.top=this.adjustForVerticalOverflow(t.top,e.height,i.height):"left"!==s&&"right"!==s||(t.left=this.adjustForHorizontalOverflow(t.left,e.width,i.width)),t.top=this.keepVerticallyInView(t.top,e.height),t.left=this.keepHorizontallyInView(t.left,e.width))}adjustForVerticalOverflow(t,e,i){const s=t+e-window.innerHeight,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}adjustForHorizontalOverflow(t,e,i){const s=t+e-window.innerWidth,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(p(i)){let n=i.X,o=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(n=i.Y,o=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-o:o,s.X=n),["left","right"].includes(t)&&(s.X="left"===t?-n:n,s.Y=o)}return s}getSuitableAlignment(t,e,i,n,o){const r=o[0];return o.find((s=>this.hasEnoughAlignmentSpace(t,i,e,n,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${r}\n `),null)}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&m.format(t,"translocation")}}var D=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class F extends M{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}D([t()],F.prototype,"container",void 0),D([t()],F.prototype,"showConfig",void 0);class L{constructor(){this.viewportWidth=window.innerWidth,this.viewportHeight=window.innerHeight}shouldUpdatePosition(t){const{previousTargetRect:e,currentTargetRect:i,appendableRect:s,viewportWidth:n,viewportHeight:o}=t;this.viewportWidth=n,this.viewportHeight=o;const r=!e||i.left!==e.left||i.top!==e.top,h=!this.isRectOutsideViewport(i),a=!this.isRectEntirelyWithinViewport(s);return{shouldUpdate:r&&h&&a}}isRectEntirelyWithinViewport(t){return t.left>=0&&t.top>=0&&t.right<=this.viewportWidth&&t.bottom<=this.viewportHeight}isRectOutsideViewport(t){return t.right<=0||t.bottom<=0||t.left>=this.viewportWidth||t.top>=this.viewportHeight}}class W extends M{constructor(){super(...arguments),this.scrollFrameRequestId=null,this.usePreviousPlacement=!1,this.scrollPositionUpdateStrategy=new L}shouldAdjustPosition(){return null===this.scrollFrameRequestId&&(w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")?this.previousTargetRect?(this.scrollFrameRequestId=requestAnimationFrame((()=>{var t;this.scrollFrameRequestId=null;let e=window.innerWidth,i=window.innerHeight;if(this.showConfig.positionRelativeTo){const s=null===(t=g())||void 0===t?void 0:t.querySelector(this.showConfig.positionRelativeTo);s&&(e=s.getBoundingClientRect().width,i=s.getBoundingClientRect().height)}const s=this.showConfig.target.getBoundingClientRect(),n=this.showConfig.appendableElement.getBoundingClientRect(),{shouldUpdate:o}=this.scrollPositionUpdateStrategy.shouldUpdatePosition({currentTargetRect:s,previousTargetRect:this.previousTargetRect,appendableRect:n,viewportWidth:e,viewportHeight:i});this.usePreviousPlacement=!o,this.previousTargetRect=s})),!0):(this.previousTargetRect=this.showConfig.target.getBoundingClientRect(),this.usePreviousPlacement=!1,!0):(this.usePreviousPlacement=!0,!0))}clearScrollFrame(){null!==this.scrollFrameRequestId&&(cancelAnimationFrame(this.scrollFrameRequestId),this.scrollFrameRequestId=null)}getPosition(t){let e;return t&&this.usePreviousPlacement?(e=this.getPositionBox([this.previousPositionBox.placement].filter(f),[this.previousPositionBox.alignment].filter(f)),w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")||(e.placement=this.previousPositionBox.placement,e.alignment=this.previousPositionBox.alignment)):e=this.getPositionBox(),this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}hasEnoughAlignmentSpace(t,e,i,s,n){const o=this.calculateLeft(i,e,s,n),r=this.calculateTop(i,e,s,n);return o>=0&&r>=0&&o+i.width<=t.width&&r+i.height<=t.height}getSuitablePlacement(t,e,i,s){const n=this.getAlignments();return s.find((s=>n.some((n=>this.hasEnoughAlignmentSpace(t,i,e,s,n)))))||super.getSuitablePlacement(t,e,i,s)}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],W.prototype,"showConfig",void 0);var $=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class z extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new F,this.screenPositionStrategy=new W}clearScreenPositionScrollFrame(){this.screenPositionStrategy.clearScrollFrame()}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.positionStrategy.shouldAdjustPosition()&&(this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t)))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition?e.style.position="fixed":e.classList.contains("date-picker-content-box")&&(e.style.position="absolute"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom","vega-no-suitable-placement"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end","vega-no-suitable-alignment"),e.classList.add(t.placement?`vega-placement-${t.placement}`:"vega-no-suitable-placement"),e.classList.add(t.alignment?`vega-alignment-${t.alignment}`:"vega-no-suitable-alignment")}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=m.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],z.prototype,"container",void 0),$([t()],z.prototype,"showConfig",void 0),$([e()],z.prototype,"bodyPositionStrategy",void 0),$([e()],z.prototype,"screenPositionStrategy",void 0);var B=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class N{constructor(t,e){var i;this.resizeObserverSlimmer=l(N,c,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{r(this.showConfig.target)&&r(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new V,this.positionCalculationController=new z,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const s=this.getShowConfig();this.hideElementAppender(s.appendableElement),null===(i=s.appendableElement)||void 0===i||i.classList.add("vega-element-appender-appendable")}show(){this.positionCalculationController.clearScreenPositionScrollFrame(),this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.toggleShow(!1),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){this.showConfig.isScreenPosition&&this.adjustPosition(!0)}destroy(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showElementAppender(this.showConfig.appendableElement),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.hideElementAppender(this.showConfig.appendableElement),this.removeVisibleAppendElement(this.showConfig.appendableElement))}showElementAppender(t){t.classList.contains("date-picker-content-box")?t.style.display="block":t.classList.remove("vega-force-hidden")}hideElementAppender(t){t&&(t.classList.contains("date-picker-content-box")?t.style.display="none":t.classList.add("vega-force-hidden"))}saveVisibleAppendElement(t){const e=N.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=N.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=N.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,N.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;N.containerMap.has(this.container)||N.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){a.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}N.containerMap=new Map,B([e()],N.prototype,"resizeObserverSlimmer",void 0),B([e()],N.prototype,"elementAppenderContainerController",void 0),B([e()],N.prototype,"positionCalculationController",void 0);var H,U=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.SHOW="show",t.HIDE="hide"}(H||(H={}));class I extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(H.SHOW)}onHide(){this.notify(H.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=o(this.showConfig.target,".vega-element-appender-appendable");e&&b.notify(E.getSubject(e,A),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&y.addUniqueObserverToNode(this.showConfig.appendableElement,A,(t=>{t.type===H.SHOW?this.childrenEA.push(t.child):t.type===H.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}U([t()],I.prototype,"showConfig",void 0),U([n("componentDidLoad")],I.prototype,"componentDidLoad",null),U([n("show")],I.prototype,"onShow",null),U([n("hide")],I.prototype,"onHide",null);class _{canEvaluate(t){return"target-click"===t||"click-outside"===t}evaluate(t){return"target-click"===t.eventType?{nextAction:t.currentState.isVisible?"hide":"show"}:"click-outside"===t.eventType&&t.currentState.isVisible?{nextAction:"hide"}:{}}}class G{canEvaluate(t){return["target-mouseenter","target-mouseleave","element-mouseenter","element-mouseleave"].includes(t)}evaluate(t){return["target-mouseenter","element-mouseenter"].includes(t.eventType)?t.currentState.isVisible?{}:{nextAction:"show"}:["target-mouseleave","element-mouseleave"].includes(t.eventType)?{nextAction:"hide"}:{}}}class q{canEvaluate(){return!1}evaluate(){return{}}}var X=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class Y extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new I(this),this.registerElementAppenderListener=()=>{var t,e,i,s,n,o;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-click")&&this.executeTriggerStrategy(e,t,"target-click")},this.targetMouseEnterHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-mouseenter")&&(this.executeTriggerStrategy(e,t,"target-mouseenter"),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=t=>{this.getTriggerStrategy().canEvaluate("target-mouseleave")&&this.createDelayHideTimer(t,"target-mouseleave")},this.targetFocusoutHandler=t=>{var e;h(t.relatedTarget,null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)||this.targetMouseLeaveHandler(t)},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.getTriggerStrategy().canEvaluate("element-mouseenter")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=t=>{var e;null===(e=this.hierarchyTreeManager.getParent())||void 0===e||e.elementMouseLeaveHandler(t),this.getTriggerStrategy().canEvaluate("element-mouseleave")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer(t,"element-mouseleave")},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0],i=this.hierarchyTreeManager.getChildren().some((t=>t.isShowing())),s=this.getTriggerStrategy();i||!s.canEvaluate("click-outside")||!this.showConfig||h(e,this.showConfig.appendableElement)||h(e,this.showConfig.target)||!this.showConfig.isScreenPosition&&o(e,"vega-modal")!==o(this.showConfig.target,"vega-modal")||this.executeTriggerStrategy(s,t,"click-outside")},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=(t,e)=>{const i=this.getTriggerStrategy();this.delayHideTimer=setTimeout((()=>{this.executeTriggerStrategy(i,t,e),clearTimeout(this.delayHideTimer)}),Y.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.executeTriggerStrategy=(t,e,i)=>{if(this.showConfig){const s=t.evaluate({target:this.showConfig.target,appendableElement:this.showConfig.appendableElement,htmlEvent:e,eventType:i,currentState:{isVisible:this.isShowing()}});s&&("hide"===s.nextAction&&this.hide(),"show"===s.nextAction&&this.show())}},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0,this.setAriaOwns()}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.removeAriaOwns(),this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new N(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,n,o;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new j(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),b.register(R,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&h(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){b.unregister(R,this.shadowRootElementScrollingObserver)}getTriggerStrategy(){const t=this.getTrigger();return"click"===t?new _:"hover"===t?new G:v(t)?t:new q}setAriaOwns(){if(this.showConfig){const t=this.showConfig.target,e=this.showConfig.appendableElement;t&&e&&(t.ariaOwnsElements=[e])}}removeAriaOwns(){var t;(null===(t=this.showConfig)||void 0===t?void 0:t.target)&&(this.showConfig.target.ariaOwnsElements=[])}}Y.DELAY_HIDE_TIME=100,X([e()],Y.prototype,"hierarchyTreeManager",void 0),X([n("connectedCallback")],Y.prototype,"connectedCallback",null),X([n("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),X([n("componentDidLoad")],Y.prototype,"componentDidLoad",null);export{Y as E}
1
+ import{c as t,I as e,V as i,L as s,M as n}from"./p-6e1ab235.js";import{f as o,d as r,b as h}from"./p-6e70d3cc.js";import{I as a}from"./p-781fd6e0.js";import{c as l}from"./p-6a334573.js";import{P as c}from"./p-81dd00d0.js";import{A as u,P as d}from"./p-d4ea8e22.js";import{G as p,i as f,a7 as v}from"./p-e4c4ea35.js";import{R as m}from"./p-031c0cf7.js";import{t as g}from"./p-b75ee3ba.js";import{F as w}from"./p-18e8d9b7.js";import{C as b}from"./p-2d0d575f.js";import{S as R}from"./p-a528714c.js";import{O as j}from"./p-331a62d5.js";import{d as E,D as y}from"./p-f28a6074.js";import{B as A}from"./p-aa985d73.js";class O{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],O.prototype,"showConfig",void 0);class x{canRetrieve(){return!this.showConfig.isScreenPosition}}class S extends x{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],S.prototype,"showConfig",void 0);class C extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=o(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t({writable:!0})],C.prototype,"showConfig",void 0);class P extends x{canRetrieve(){return super.canRetrieve()&&!!o(this.showConfig.target,".vega-popover")}retrieve(){const t=o(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],P.prototype,"showConfig",void 0);class k extends x{canRetrieve(){return this.focusTrapRoot=this.findFocusTrapRoot(this.showConfig.target),!!this.focusTrapRoot}retrieve(){const t=this.focusTrapRoot;return this.focusTrapRoot=null,this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}findFocusTrapRoot(t){var e;const i=o(t,'dialog, [aria-modal="true"]');return!i||this.isVegaOwned(i)?null:null!==(e=i.closest('[tabindex="-1"]'))&&void 0!==e?e:i}isVegaOwned(t){return t.tagName.startsWith("VEGA-")}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],k.prototype,"showConfig",void 0);var T=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class V extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new S,this.vegaPopoverWrapper=new P,this.vegaModalWrapper=new C,this.thirdPartyDialogWrapper=new k,this.defaultWrapper=new O}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.thirdPartyDialogWrapper,this.defaultWrapper]}}T([t({writable:!0})],V.prototype,"container",void 0),T([t({writable:!0})],V.prototype,"showConfig",void 0),T([e()],V.prototype,"positionRelativeToWrapper",void 0),T([e()],V.prototype,"vegaPopoverWrapper",void 0),T([e()],V.prototype,"vegaModalWrapper",void 0),T([e()],V.prototype,"thirdPartyDialogWrapper",void 0),T([e()],V.prototype,"defaultWrapper",void 0);class M extends i{shouldAdjustPosition(){return!0}getPositionBox(t,e){const i=t&&t.length>0?t:this.getPlacements(),s=e&&e.length>0?e:this.getAlignments(),n=this.getTargetBoundBox(),o=this.getElementBoundBox(),r=this.getElementScrollDimension(),h=this.getSuitablePlacement(r,o,n,i),a=h||i[0],l=this.getSuitableAlignment(r,o,n,a,s),c=this.calculatePosition(o,n,a,l||s[0]),u=this.getTranslocationBox(a);return c.placement=h,c.alignment=l,c.left+=u.X,c.top+=u.Y,!this.showConfig.positionRelativeTo&&this.showConfig.isScreenPosition&&this.adjustPositionForViewport(c,o,n,a),c}hasEnoughAlignmentSpace(t,e,i,s,n){if(["top","bottom"].includes(s))switch(n){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(n){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}getSuitablePlacement(t,e,i,n){const o=n[0];return n.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${o}\n `),null)}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}keepVerticallyInView(t,e){return Math.max(0,Math.min(t,window.innerHeight-e))}keepHorizontallyInView(t,e){return Math.max(0,Math.min(t,window.innerWidth-e))}isTargetInView(t){const e=window.innerHeight,i=window.innerWidth;return t.top<=e&&t.top+t.height>=0&&t.left<=i&&t.left+t.width>=0}adjustPositionForViewport(t,e,i,s){this.isTargetInView(i)&&("top"===s||"bottom"===s?t.top=this.adjustForVerticalOverflow(t.top,e.height,i.height):"left"!==s&&"right"!==s||(t.left=this.adjustForHorizontalOverflow(t.left,e.width,i.width)),t.top=this.keepVerticallyInView(t.top,e.height),t.left=this.keepHorizontallyInView(t.left,e.width))}adjustForVerticalOverflow(t,e,i){const s=t+e-window.innerHeight,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}adjustForHorizontalOverflow(t,e,i){const s=t+e-window.innerWidth,n=-t;return s>0&&s<i?t-s:n>0&&n<i?t+n:t}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(p(i)){let n=i.X,o=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(n=i.Y,o=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-o:o,s.X=n),["left","right"].includes(t)&&(s.X="left"===t?-n:n,s.Y=o)}return s}getSuitableAlignment(t,e,i,n,o){const r=o[0];return o.find((s=>this.hasEnoughAlignmentSpace(t,i,e,n,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${r}\n `),null)}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&m.format(t,"translocation")}}var D=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class F extends M{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}D([t()],F.prototype,"container",void 0),D([t()],F.prototype,"showConfig",void 0);class L{constructor(){this.viewportWidth=window.innerWidth,this.viewportHeight=window.innerHeight}shouldUpdatePosition(t){const{previousTargetRect:e,currentTargetRect:i,appendableRect:s,viewportWidth:n,viewportHeight:o}=t;this.viewportWidth=n,this.viewportHeight=o;const r=!e||i.left!==e.left||i.top!==e.top,h=!this.isRectOutsideViewport(i),a=!this.isRectEntirelyWithinViewport(s);return{shouldUpdate:r&&h&&a}}isRectEntirelyWithinViewport(t){return t.left>=0&&t.top>=0&&t.right<=this.viewportWidth&&t.bottom<=this.viewportHeight}isRectOutsideViewport(t){return t.right<=0||t.bottom<=0||t.left>=this.viewportWidth||t.top>=this.viewportHeight}}class W extends M{constructor(){super(...arguments),this.scrollFrameRequestId=null,this.usePreviousPlacement=!1,this.scrollPositionUpdateStrategy=new L}shouldAdjustPosition(){return null===this.scrollFrameRequestId&&(w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")?this.previousTargetRect?(this.scrollFrameRequestId=requestAnimationFrame((()=>{var t;this.scrollFrameRequestId=null;let e=window.innerWidth,i=window.innerHeight;if(this.showConfig.positionRelativeTo){const s=null===(t=g())||void 0===t?void 0:t.querySelector(this.showConfig.positionRelativeTo);s&&(e=s.getBoundingClientRect().width,i=s.getBoundingClientRect().height)}const s=this.showConfig.target.getBoundingClientRect(),n=this.showConfig.appendableElement.getBoundingClientRect(),{shouldUpdate:o}=this.scrollPositionUpdateStrategy.shouldUpdatePosition({currentTargetRect:s,previousTargetRect:this.previousTargetRect,appendableRect:n,viewportWidth:e,viewportHeight:i});this.usePreviousPlacement=!o,this.previousTargetRect=s})),!0):(this.previousTargetRect=this.showConfig.target.getBoundingClientRect(),this.usePreviousPlacement=!1,!0):(this.usePreviousPlacement=!0,!0))}clearScrollFrame(){null!==this.scrollFrameRequestId&&(cancelAnimationFrame(this.scrollFrameRequestId),this.scrollFrameRequestId=null)}getPosition(t){let e;return t&&this.usePreviousPlacement?(e=this.getPositionBox([this.previousPositionBox.placement].filter(f),[this.previousPositionBox.alignment].filter(f)),w.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")||(e.placement=this.previousPositionBox.placement,e.alignment=this.previousPositionBox.alignment)):e=this.getPositionBox(),this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}hasEnoughAlignmentSpace(t,e,i,s,n){const o=this.calculateLeft(i,e,s,n),r=this.calculateTop(i,e,s,n);return o>=0&&r>=0&&o+i.width<=t.width&&r+i.height<=t.height}getSuitablePlacement(t,e,i,s){const n=this.getAlignments();return s.find((s=>n.some((n=>this.hasEnoughAlignmentSpace(t,i,e,s,n)))))||super.getSuitablePlacement(t,e,i,s)}}!function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);o>3&&r&&Object.defineProperty(e,i,r)}([t()],W.prototype,"showConfig",void 0);var $=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class z extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new F,this.screenPositionStrategy=new W}clearScreenPositionScrollFrame(){this.screenPositionStrategy.clearScrollFrame()}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.positionStrategy.shouldAdjustPosition()&&(this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t)))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition?e.style.position="fixed":e.classList.contains("date-picker-content-box")&&(e.style.position="absolute"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom","vega-no-suitable-placement"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end","vega-no-suitable-alignment"),e.classList.add(t.placement?`vega-placement-${t.placement}`:"vega-no-suitable-placement"),e.classList.add(t.alignment?`vega-alignment-${t.alignment}`:"vega-no-suitable-alignment")}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=m.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}$([t()],z.prototype,"container",void 0),$([t()],z.prototype,"showConfig",void 0),$([e()],z.prototype,"bodyPositionStrategy",void 0),$([e()],z.prototype,"screenPositionStrategy",void 0);var B=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class N{constructor(t,e){var i;this.resizeObserverSlimmer=l(N,c,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{r(this.showConfig.target)&&r(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new V,this.positionCalculationController=new z,this.showConfigCallback=t,this.showConfigCallbackTarget=e;const s=this.getShowConfig();this.hideElementAppender(s.appendableElement),null===(i=s.appendableElement)||void 0===i||i.classList.add("vega-element-appender-appendable")}show(){this.positionCalculationController.clearScreenPositionScrollFrame(),this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.toggleShow(!1),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){this.showConfig.isScreenPosition&&this.adjustPosition(!0)}destroy(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),a.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showElementAppender(this.showConfig.appendableElement),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.hideElementAppender(this.showConfig.appendableElement),this.removeVisibleAppendElement(this.showConfig.appendableElement))}showElementAppender(t){t.classList.contains("date-picker-content-box")?t.style.display="block":t.classList.remove("vega-force-hidden")}hideElementAppender(t){t&&(t.classList.contains("date-picker-content-box")?t.style.display="none":t.classList.add("vega-force-hidden"))}saveVisibleAppendElement(t){const e=N.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=N.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=N.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,N.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;N.containerMap.has(this.container)||N.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){a.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}N.containerMap=new Map,B([e()],N.prototype,"resizeObserverSlimmer",void 0),B([e()],N.prototype,"elementAppenderContainerController",void 0),B([e()],N.prototype,"positionCalculationController",void 0);var H,U=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.SHOW="show",t.HIDE="hide"}(H||(H={}));class I extends i{constructor(t){super(),this.childrenEA=[],this.currentEA=t}componentDidLoad(){this.register()}onShow(){this.notify(H.SHOW)}onHide(){this.notify(H.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(t){const e=o(this.showConfig.target,".vega-element-appender-appendable");e&&b.notify(E.getSubject(e,A),{type:t,child:this.currentEA,callback:t=>{this.parentEA=t}})}register(){this.showConfig&&y.addUniqueObserverToNode(this.showConfig.appendableElement,A,(t=>{t.type===H.SHOW?this.childrenEA.push(t.child):t.type===H.HIDE&&(this.childrenEA=this.childrenEA.filter((e=>e!==t.child))),t.callback(this.currentEA)}))}}U([t()],I.prototype,"showConfig",void 0),U([n("componentDidLoad")],I.prototype,"componentDidLoad",null),U([n("show")],I.prototype,"onShow",null),U([n("hide")],I.prototype,"onHide",null);class _{canEvaluate(t){return"target-click"===t||"click-outside"===t}evaluate(t){return"target-click"===t.eventType?{nextAction:t.currentState.isVisible?"hide":"show"}:"click-outside"===t.eventType&&t.currentState.isVisible?{nextAction:"hide"}:{}}}class G{canEvaluate(t){return["target-mouseenter","target-mouseleave","element-mouseenter","element-mouseleave"].includes(t)}evaluate(t){return["target-mouseenter","element-mouseenter"].includes(t.eventType)?t.currentState.isVisible?{}:{nextAction:"show"}:["target-mouseleave","element-mouseleave"].includes(t.eventType)?{nextAction:"hide"}:{}}}class q{canEvaluate(){return!1}evaluate(){return{}}}var X=function(t,e,i,s){var n,o=arguments.length,r=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(r=(o<3?n(r):o>3?n(e,i,r):n(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};class Y extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new I(this),this.registerElementAppenderListener=()=>{var t,e,i,s,n,o;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-click")&&this.executeTriggerStrategy(e,t,"target-click")},this.targetMouseEnterHandler=t=>{const e=this.getTriggerStrategy();e.canEvaluate("target-mouseenter")&&(this.executeTriggerStrategy(e,t,"target-mouseenter"),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=t=>{this.getTriggerStrategy().canEvaluate("target-mouseleave")&&this.createDelayHideTimer(t,"target-mouseleave")},this.targetFocusoutHandler=t=>{var e;h(t.relatedTarget,null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)||this.targetMouseLeaveHandler(t)},this.elementMouseEnterHandler=()=>{var t;null===(t=this.hierarchyTreeManager.getParent())||void 0===t||t.elementMouseEnterHandler(),this.getTriggerStrategy().canEvaluate("element-mouseenter")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=t=>{var e;null===(e=this.hierarchyTreeManager.getParent())||void 0===e||e.elementMouseLeaveHandler(t),this.getTriggerStrategy().canEvaluate("element-mouseleave")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer(t,"element-mouseleave")},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0],i=this.hierarchyTreeManager.getChildren().some((t=>t.isShowing())),s=this.getTriggerStrategy();i||!s.canEvaluate("click-outside")||!this.showConfig||h(e,this.showConfig.appendableElement)||h(e,this.showConfig.target)||!this.showConfig.isScreenPosition&&o(e,"vega-modal")!==o(this.showConfig.target,"vega-modal")||this.executeTriggerStrategy(s,t,"click-outside")},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=(t,e)=>{const i=this.getTriggerStrategy();this.delayHideTimer=setTimeout((()=>{this.executeTriggerStrategy(i,t,e),clearTimeout(this.delayHideTimer)}),Y.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.executeTriggerStrategy=(t,e,i)=>{if(this.showConfig){const s=t.evaluate({target:this.showConfig.target,appendableElement:this.showConfig.appendableElement,htmlEvent:e,eventType:i,currentState:{isVisible:this.isShowing()}});s&&("hide"===s.nextAction&&this.hide(),"show"===s.nextAction&&this.show())}},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0,this.setAriaOwns()}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map((t=>{t.hide()}))}destroy(){this.removeAriaOwns(),this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new N(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,n,o;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new j(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),b.register(R,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(t){return Boolean(this.showConfig&&h(this.showConfig.target,t.host))}removeShadowRootElementScrolling(){b.unregister(R,this.shadowRootElementScrollingObserver)}getTriggerStrategy(){const t=this.getTrigger();return"click"===t?new _:"hover"===t?new G:v(t)?t:new q}setAriaOwns(){if(this.showConfig){const t=this.showConfig.target,e=this.showConfig.appendableElement;t&&e&&(t.ariaOwnsElements=[e])}}removeAriaOwns(){var t;(null===(t=this.showConfig)||void 0===t?void 0:t.target)&&(this.showConfig.target.ariaOwnsElements=[])}}Y.DELAY_HIDE_TIME=100,X([e()],Y.prototype,"hierarchyTreeManager",void 0),X([n("connectedCallback")],Y.prototype,"connectedCallback",null),X([n("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),X([n("componentDidLoad")],Y.prototype,"componentDidLoad",null);export{Y as E}
@@ -1 +1 @@
1
- import{i as t}from"./p-b9386dd0.js";class n{constructor(){this.overrideValue=!1}canFormat(n,r,i){if("init"===n||"change"===n){if("component"===r&&t(null==i?void 0:i.isBlurred))return!1;if(this.shouldTriggerAtInit())return!0}if("input"===n&&"native-input"===r)return!0;if("change"===n&&("component"===r||"native-input"===r))return!0;if("blur"===n&&(null==i?void 0:i.isBlurred)){if("component"===r&&this.shouldOverrideComponentValueAfterBlur())return!0;if("native-input"===r)return!0}return!1}shouldOverrideComponentValueAfterBlur(){return this.overrideValue}shouldTriggerAtInit(){return!1}}export{n as S}
1
+ import{i as t}from"./p-e4c4ea35.js";class n{constructor(){this.overrideValue=!1}canFormat(n,r,i){if("init"===n||"change"===n){if("component"===r&&t(null==i?void 0:i.isBlurred))return!1;if(this.shouldTriggerAtInit())return!0}if("input"===n&&"native-input"===r)return!0;if("change"===n&&("component"===r||"native-input"===r))return!0;if("blur"===n&&(null==i?void 0:i.isBlurred)){if("component"===r&&this.shouldOverrideComponentValueAfterBlur())return!0;if("native-input"===r)return!0}return!1}shouldOverrideComponentValueAfterBlur(){return this.overrideValue}shouldTriggerAtInit(){return!1}}export{n as S}
@@ -1 +1 @@
1
- class e{constructor(e,a){this.vegaName=e,this.nativeName=a}getName(){return this.getVegaName()}getCurrentName(e){return"native"!==e.namespace?this.getVegaName():this.getNativeName()}getVegaName(){return this.vegaName}getNativeName(){return this.nativeName}isBrowserRawEvent(){return _.includes(this)}}const a=new e("vegaChange","change"),n=new e("vegaClick","click"),t=new e("vegaFocus","focus"),g=new e("vegaBlur","blur"),s=new e("vegaClose","close"),w=new e("vegaOpen","modalOpen"),o=new e("vegaValidate","validate"),r=new e("vegaFormSubmit","formSubmit"),v=new e("vegaFormReset","formReset"),c=new e("vegaRowClick","rowClick"),l=new e("vegaRowExpand","rowExpand"),i=new e("vegaSelectChange","selectChange"),C=new e("vegaRowSelect","rowSelect"),h=new e("vegaRowSelectAll","rowSelectAll"),d=new e("vegaSelectAllChange","selectAllChange"),p=new e("vegaPageSizeChange","pageSizeChange"),u=new e("vegaDropdownClick","dropdownClick"),S=new e("vegaCreate","create"),k=new e("vegaSearch","search"),m=new e("vegaSearchTrigger","searchTrigger"),R=new e("vegaHide","hide"),A=new e("vegaShow","show"),b=new e("vegaPopoverShow","popoverShow"),I=new e("vegaPopoverHide","popoverHide"),B=new e("vegaCancel","cancel"),N=new e("vegaRemove","remove"),P=new e("vegaPageUpdate","pageUpdate"),U=new e("vegaCurrentStepUpdate","currentStepUpdate"),x=new e("vegaToggleStatus","toggleStatus"),D=new e("vegaStateUpdate","stateUpdate"),E=new e("vegaGroupClick","groupClick"),F=new e("vegaMenuClick","menuClick"),H=new e("vegaExpand","expand"),y=new e("vegaShow","dropdownShow"),f=new e("vegaHide","dropdownHide"),M=new e("vegaSearch","dropdownSearch"),T=new e("vegaActionClick","actionClick"),z=new e("vegaEventClick","eventClick"),O=new e("vegaDateDblClick","dateDblClick"),V=new e("vegaDateClick","dateClick"),Y=new e("vegaCountryChange","countryChange"),G=new e("vegaActionButtonClick","actionButtonClick"),L=new e("vegaMoreActionClick","moreActionClick"),j=new e("vegaSelectedFileChange","selectedFileChange"),q=new e("vegaImageInserted","imageInserted"),J=new e("vegaRetry","retry"),K=new e("vegaPreview","preview"),Q=new e("vegaLabelButtonClick","labelButtonClick"),W=new e("vegaReset","reset"),X=new e("vegaClear","clear"),Z=new e("vegaComplete","complete"),$=new e("vegaPaste","paste"),_=[a,n,t,g,$],ee=new e("vegaMonthYearChange","monthYearChange"),ae=new e("vegaSelectionChange","selectionChange"),ne=new e("vegaSuggestionItemClick","suggestionItemClick"),te=new e("vegaNativeInputChange","nativeInputChange"),ge=new e("vegaSourceCodeChange","sourceCodeChange");export{c as $,K as A,r as B,v as C,o as D,B as E,te as F,t as G,g as H,ne as I,$ as J,Z as K,Y as L,A as M,R as N,x as O,w as P,D as Q,E as R,F as S,T,p as U,u as V,U as W,q as X,ge as Y,i as Z,d as _,n as a,l as a0,C as a1,h as a2,b,I as c,H as d,W as e,s as f,G as g,a as h,z as i,O as j,L as k,V as l,P as m,N as n,S as o,k as p,ee as q,X as r,ae as s,y as t,f as u,M as v,m as w,Q as x,j as y,J as z}
1
+ class e{constructor(e,a){this.vegaName=e,this.nativeName=a}getName(){return this.getVegaName()}getCurrentName(e){return"native"!==e.namespace?this.getVegaName():this.getNativeName()}getVegaName(){return this.vegaName}getNativeName(){return this.nativeName}isBrowserRawEvent(){return _.includes(this)}}const a=new e("vegaChange","change"),n=new e("vegaClick","click"),t=new e("vegaFocus","focus"),g=new e("vegaBlur","blur"),s=new e("vegaClose","close"),w=new e("vegaOpen","modalOpen"),o=new e("vegaValidate","validate"),r=new e("vegaFormSubmit","formSubmit"),v=new e("vegaFormReset","formReset"),c=new e("vegaRowClick","rowClick"),l=new e("vegaRowExpand","rowExpand"),i=new e("vegaSelectChange","selectChange"),C=new e("vegaRowSelect","rowSelect"),h=new e("vegaRowSelectAll","rowSelectAll"),d=new e("vegaSelectAllChange","selectAllChange"),p=new e("vegaPageSizeChange","pageSizeChange"),u=new e("vegaDropdownClick","dropdownClick"),S=new e("vegaCreate","create"),k=new e("vegaSearch","search"),m=new e("vegaSearchTrigger","searchTrigger"),R=new e("vegaHide","hide"),A=new e("vegaShow","show"),b=new e("vegaPopoverShow","popoverShow"),I=new e("vegaPopoverHide","popoverHide"),B=new e("vegaCancel","cancel"),N=new e("vegaRemove","remove"),P=new e("vegaPageUpdate","pageUpdate"),U=new e("vegaCurrentStepUpdate","currentStepUpdate"),x=new e("vegaToggleStatus","toggleStatus"),D=new e("vegaStateUpdate","stateUpdate"),E=new e("vegaGroupClick","groupClick"),F=new e("vegaMenuClick","menuClick"),H=new e("vegaExpand","expand"),y=new e("vegaShow","dropdownShow"),f=new e("vegaHide","dropdownHide"),M=new e("vegaSearch","dropdownSearch"),T=new e("vegaActionClick","actionClick"),z=new e("vegaEventClick","eventClick"),O=new e("vegaDateDblClick","dateDblClick"),V=new e("vegaDateClick","dateClick"),Y=new e("vegaCountryChange","countryChange"),G=new e("vegaActionButtonClick","actionButtonClick"),L=new e("vegaMoreActionClick","moreActionClick"),j=new e("vegaSelectedFileChange","selectedFileChange"),q=new e("vegaImageInserted","imageInserted"),J=new e("vegaRetry","retry"),K=new e("vegaPreview","preview"),Q=new e("vegaLabelButtonClick","labelButtonClick"),W=new e("vegaReset","reset"),X=new e("vegaClear","clear"),Z=new e("vegaComplete","complete"),$=new e("vegaPaste","paste"),_=[a,n,t,g,$],ee=new e("vegaMonthYearChange","monthYearChange"),ae=new e("vegaSelectionChange","selectionChange"),ne=new e("vegaSuggestionItemClick","suggestionItemClick"),te=new e("vegaNativeInputChange","nativeInputChange"),ge=new e("vegaSourceCodeChange","sourceCodeChange");export{c as $,K as A,r as B,v as C,o as D,B as E,te as F,t as G,g as H,ne as I,$ as J,Z as K,Y as L,A as M,R as N,x as O,w as P,D as Q,E as R,F as S,T,p as U,u as V,U as W,q as X,ge as Y,i as Z,d as _,n as a,l as a0,C as a1,h as a2,b,I as c,H as d,W as e,M as f,s as g,G as h,a as i,z as j,O as k,L as l,V as m,P as n,N as o,S as p,k as q,ee as r,X as s,ae as t,y as u,f as v,m as w,Q as x,j as y,J as z}
@@ -1 +1 @@
1
- import{h as t,r as e,c as i,H as s,g as n}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as o,V as r,I as l}from"./p-6e1ab235.js";import{V as f,I as p}from"./p-4415ad28.js";import{c as h}from"./p-44044ed7.js";import{a as d,x as c}from"./p-c5eb0fa6.js";import{c as m}from"./p-86194314.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-f28a6074.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6e9f832f.js";import"./p-b75ee3ba.js";var x=function(t,e,i,s){var n,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(a<3?n(o):a>3?n(e,i,o):n(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class b extends r{constructor(){super(...arguments),this.handleSuffixButtonClick=t=>{t.stopPropagation(),this.suffixButtonClickEventEmitter.emit()}}render(){if(this.suffixButtonConfig||this.suffixButtonProps){const{icon:e,text:i,size:s,minWidth:n,maxWidth:a,placement:o="right",alignment:r="start",trigger:l="hover"}=this.suffixButtonConfig||this.suffixButtonProps&&{icon:this.suffixButtonProps.icon,text:this.suffixButtonProps.tooltipText,trigger:this.suffixButtonProps.trigger};return t("div",{class:"label-suffix-button",role:"button",tabIndex:0,onClick:this.handleSuffixButtonClick,onKeyDown:m()},i?t("vega-tooltip",{trigger:l,text:i,size:s,minWidth:n,maxWidth:a,alignment:r,placement:o},this.renderSuffixButton(e)):this.renderSuffixButton(e))}}renderSuffixButton(e){return t("vega-button-circle",{size:"extra-small",variant:"icon-only",iconColor:"text-link",showTooltip:!1,icon:e})}}x([o()],b.prototype,"suffixButtonProps",void 0),x([o()],b.prototype,"suffixButtonConfig",void 0),x([o()],b.prototype,"suffixButtonClickEventEmitter",void 0);var g=function(t,e,i,s){var n,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(a<3?n(o):a>3?n(e,i,o):n(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};const u=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",1),this.labelButtonClick=i(this,"labelButtonClick",1),this.globalSlimmers={},this.clickEventEmitter=h(u,d),this.suffixButtonClickEventEmitter=h(u,c),this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.suffixElementRenderer=new b,this.suffixButtonProps=null,this.suffixButtonConfig=null,this.label="",this.isFieldRequired=!1,this.disabled=!1,this.handleClick=t=>{this.clickEventEmitter.emit(void 0,t)}}componentWillLoad(){""===this.label&&(this.label=this.host.textContent,this.host.textContent="")}render(){return a(t(s,{class:{hidden:""===this.label,disabled:this.disabled},onClick:this.handleClick},t("label",null,t("span",{class:"vega-field-label"},this.label),t("span",{class:{"vega-field-label-required":!0,hidden:!this.isFieldRequired}},"*")),this.suffixElementRenderer.render()),this.host)}get host(){return n(this)}};g([p()],u.prototype,"globalSlimmers",void 0),g([l()],u.prototype,"clickEventEmitter",void 0),g([l()],u.prototype,"suffixButtonClickEventEmitter",void 0),g([l()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g([l()],u.prototype,"suffixElementRenderer",void 0),u.style=':host{display:inline-block}:host(.disabled){pointer-events:none}:host(.hidden){display:none}label:first-of-type{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;word-break:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.disabled)>label>span.vega-field-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-field-label-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-field-label-required.hidden{display:none}.label-suffix-button{display:inline-block;margin-left:4px;vertical-align:top}';export{u as vega_field_label}
1
+ import{h as t,r as e,c as i,H as s,g as n}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as o,V as r,I as l}from"./p-6e1ab235.js";import{V as f,I as p}from"./p-4415ad28.js";import{c as h}from"./p-effa6495.js";import{a as d,x as c}from"./p-b78eaec4.js";import{c as m}from"./p-6ac8e655.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-f28a6074.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-9de25451.js";import"./p-b75ee3ba.js";var x=function(t,e,i,s){var n,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(a<3?n(o):a>3?n(e,i,o):n(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};class b extends r{constructor(){super(...arguments),this.handleSuffixButtonClick=t=>{t.stopPropagation(),this.suffixButtonClickEventEmitter.emit()}}render(){if(this.suffixButtonConfig||this.suffixButtonProps){const{icon:e,text:i,size:s,minWidth:n,maxWidth:a,placement:o="right",alignment:r="start",trigger:l="hover"}=this.suffixButtonConfig||this.suffixButtonProps&&{icon:this.suffixButtonProps.icon,text:this.suffixButtonProps.tooltipText,trigger:this.suffixButtonProps.trigger};return t("div",{class:"label-suffix-button",role:"button",tabIndex:0,onClick:this.handleSuffixButtonClick,onKeyDown:m()},i?t("vega-tooltip",{trigger:l,text:i,size:s,minWidth:n,maxWidth:a,alignment:r,placement:o},this.renderSuffixButton(e)):this.renderSuffixButton(e))}}renderSuffixButton(e){return t("vega-button-circle",{size:"extra-small",variant:"icon-only",iconColor:"text-link",showTooltip:!1,icon:e})}}x([o()],b.prototype,"suffixButtonProps",void 0),x([o()],b.prototype,"suffixButtonConfig",void 0),x([o()],b.prototype,"suffixButtonClickEventEmitter",void 0);var g=function(t,e,i,s){var n,a=arguments.length,o=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(a<3?n(o):a>3?n(e,i,o):n(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};const u=class{constructor(t){e(this,t),this.vegaClick=i(this,"vegaClick",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",1),this.labelButtonClick=i(this,"labelButtonClick",1),this.globalSlimmers={},this.clickEventEmitter=h(u,d),this.suffixButtonClickEventEmitter=h(u,c),this.vegaComponentUsageRuntimeMetricsSlimmer=new f,this.suffixElementRenderer=new b,this.suffixButtonProps=null,this.suffixButtonConfig=null,this.label="",this.isFieldRequired=!1,this.disabled=!1,this.handleClick=t=>{this.clickEventEmitter.emit(void 0,t)}}componentWillLoad(){""===this.label&&(this.label=this.host.textContent,this.host.textContent="")}render(){return a(t(s,{class:{hidden:""===this.label,disabled:this.disabled},onClick:this.handleClick},t("label",null,t("span",{class:"vega-field-label"},this.label),t("span",{class:{"vega-field-label-required":!0,hidden:!this.isFieldRequired}},"*")),this.suffixElementRenderer.render()),this.host)}get host(){return n(this)}};g([p()],u.prototype,"globalSlimmers",void 0),g([l()],u.prototype,"clickEventEmitter",void 0),g([l()],u.prototype,"suffixButtonClickEventEmitter",void 0),g([l()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),g([l()],u.prototype,"suffixElementRenderer",void 0),u.style=':host{display:inline-block}:host(.disabled){pointer-events:none}:host(.hidden){display:none}label:first-of-type{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;word-break:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){label:first-of-type{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host(.disabled)>label>span.vega-field-label{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-field-label-required{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-field-label-required.hidden{display:none}.label-suffix-button{display:inline-block;margin-left:4px;vertical-align:top}';export{u as vega_field_label}
@@ -1 +1 @@
1
- import{r as i,c as e,h as t,H as a,g as r}from"./p-6b2342e0.js";import{h as s}from"./p-c5eb0fa6.js";import{c as n}from"./p-44044ed7.js";import{c as o}from"./p-86194314.js";import{s as p}from"./p-519a7d55.js";import{I as d}from"./p-6e1ab235.js";import{V as h,I as l}from"./p-4415ad28.js";import{F as c}from"./p-42141782.js";import{T as g}from"./p-7c0b4c36.js";import{F as v}from"./p-a528714c.js";import{C as m}from"./p-2d0d575f.js";import"./p-6a334573.js";import"./p-f28a6074.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-6e9f832f.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-aa985d73.js";import"./p-d5531d3c.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-a0c3968b.js";var b=function(i,e,t,a){var r,s=arguments.length,n=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(i,e,t,a);else for(var o=i.length-1;o>=0;o--)(r=i[o])&&(n=(s<3?r(n):s>3?r(e,t,n):r(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n};const f=class{constructor(t){i(this,t),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.formFieldController=new c({propertyRules:[{propertyName:"required",ruleFactory:i=>i?new g:null}],validationRulesName:"validationRules",defaultValue:!1,attributeGetter:i=>this[i],inputContainerGetter:()=>this.toggleSwitchContainer,touchableAreaGetter:()=>[this.toggleSwitchContainer]}),this.changeEventEmitter=n(f,s),this.checked=!1,this.value=!1,this.size="default",this.required=!1,this.disabled=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null,this.toggleSwitch=()=>{this.disabled||(this.checked=!this.checked)},this.updateValue=i=>{this.checked=i.currentTarget.checked,i.stopPropagation()}}watchCheckedChange(){this.value=this.checked,this.changeEventEmitter.emit(this.checked),m.notify(v,{host:this.host,detail:this.value})}watchValue(i){this.checked=!0===i}watchValidationRules(){}componentWillLoad(){this.checked||!0!==this.value?this.value=this.checked:this.checked=!0}render(){let i=this.checked?"vega-container vega-container-checked":"vega-container";return i+=this.disabled?" vega-container-disabled":"",i+="small"===this.size?" vega-container-small-size":"",p(t(a,null,t("vega-flex",{gap:"size-8",ref:i=>this.toggleSwitchContainer=i},t("div",{class:`${i} vega-flex-shrink-0 v-min-w-min`},t("input",{type:"checkbox",name:"switch",disabled:this.disabled,checked:this.checked,onChange:this.updateValue,"aria-label":this.label||"No label defined",role:"button",tabIndex:0,onKeyDown:o()}),t("span",{class:this.disabled?"v-bg-tertiary":"v-bg-primary"})),this.renderLabelDom())),this.host)}renderLabelDom(){return this.label?t("div",{class:"vega-flex-basis-0 vega-flex-grow"},t("vega-field-label",{onClick:this.toggleSwitch,disabled:this.disabled,label:this.label,isFieldRequired:this.required})):null}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"],value:["watchValue"],validationRules:["watchValidationRules"]}}};b([l()],f.prototype,"globalSlimmers",void 0),b([d()],f.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b([d()],f.prototype,"formFieldController",void 0),b([d()],f.prototype,"changeEventEmitter",void 0),f.style=':host{display:inline-block}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}div.vega-container{display:flex;justify-content:flex-start;align-items:center;border-radius:9999px;position:relative;box-sizing:content-box;height:24px;width:48px;padding:4px;background-color:rgba(var(--v-bg-toggle-switch, 107, 116, 125, 0.7))}div.vega-container:hover{background-color:rgba(var(--v-bg-toggle-switch-hover, 107, 116, 125, 1))}div.vega-container.vega-container-checked{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}div.vega-container.vega-container-checked:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}div.vega-container.vega-container-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}div.vega-container.vega-container-checked.vega-container-disabled{background-color:rgba(var(--v-bg-toggle-switch-selected-disabled, 153, 192, 255, 1))}div.vega-container-small-size{box-sizing:border-box;height:20px;width:32px;padding:2px}div.vega-container>span{margin-left:0px;transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}div.vega-container-checked>span{margin-left:24px}div.vega-container-checked.vega-container-small-size>span{margin-left:12px}div.vega-container>input{position:absolute;cursor:pointer;opacity:0;left:0px;top:0px;width:100%;height:100%;margin:0px;-webkit-tap-highlight-color:transparent}div.vega-container input:disabled{cursor:default}div.vega-container>span{display:inline-block;border-radius:9999px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));width:24px;height:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container-small-size{height:20px}div.vega-container-small-size>span{width:16px;height:16px}div{align-self:center}';export{f as vega_toggle_switch}
1
+ import{r as i,c as e,h as t,H as a,g as r}from"./p-6b2342e0.js";import{i as s}from"./p-b78eaec4.js";import{c as n}from"./p-effa6495.js";import{c as o}from"./p-6ac8e655.js";import{s as p}from"./p-519a7d55.js";import{I as d}from"./p-6e1ab235.js";import{V as l,I as h}from"./p-4415ad28.js";import{F as c}from"./p-11a2f834.js";import{T as g}from"./p-7c0b4c36.js";import{F as v}from"./p-a528714c.js";import{C as m}from"./p-2d0d575f.js";import"./p-6a334573.js";import"./p-f28a6074.js";import"./p-331a62d5.js";import"./p-6e70d3cc.js";import"./p-9de25451.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-aa985d73.js";import"./p-3b791b5d.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-a0c3968b.js";var b=function(i,e,t,a){var r,s=arguments.length,n=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(i,e,t,a);else for(var o=i.length-1;o>=0;o--)(r=i[o])&&(n=(s<3?r(n):s>3?r(e,t,n):r(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n};const f=class{constructor(t){i(this,t),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new l,this.formFieldController=new c({propertyRules:[{propertyName:"required",ruleFactory:i=>i?new g:null}],validationRulesName:"validationRules",defaultValue:!1,attributeGetter:i=>this[i],inputContainerGetter:()=>this.toggleSwitchContainer,touchableAreaGetter:()=>[this.toggleSwitchContainer]}),this.changeEventEmitter=n(f,s),this.checked=!1,this.value=!1,this.size="default",this.required=!1,this.disabled=!1,this.validationRules=[],this.autoValidation=!0,this.isValid=null,this.toggleSwitch=()=>{this.disabled||(this.checked=!this.checked)},this.updateValue=i=>{this.checked=i.currentTarget.checked,i.stopPropagation()}}watchCheckedChange(){this.value=this.checked,this.changeEventEmitter.emit(this.checked),m.notify(v,{host:this.host,detail:this.value})}watchValue(i){this.checked=!0===i}watchValidationRules(){}componentWillLoad(){this.checked||!0!==this.value?this.value=this.checked:this.checked=!0}render(){let i=this.checked?"vega-container vega-container-checked":"vega-container";return i+=this.disabled?" vega-container-disabled":"",i+="small"===this.size?" vega-container-small-size":"",p(t(a,null,t("vega-flex",{gap:"size-8",ref:i=>this.toggleSwitchContainer=i},t("div",{class:`${i} vega-flex-shrink-0 v-min-w-min`},t("input",{type:"checkbox",name:"switch",disabled:this.disabled,checked:this.checked,onChange:this.updateValue,"aria-label":this.label||"No label defined",role:"button",tabIndex:0,onKeyDown:o()}),t("span",{class:this.disabled?"v-bg-tertiary":"v-bg-primary"})),this.renderLabelDom())),this.host)}renderLabelDom(){return this.label?t("div",{class:"vega-flex-basis-0 vega-flex-grow"},t("vega-field-label",{onClick:this.toggleSwitch,disabled:this.disabled,label:this.label,isFieldRequired:this.required})):null}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"],value:["watchValue"],validationRules:["watchValidationRules"]}}};b([h()],f.prototype,"globalSlimmers",void 0),b([d()],f.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b([d()],f.prototype,"formFieldController",void 0),b([d()],f.prototype,"changeEventEmitter",void 0),f.style=':host{display:inline-block}:host .vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}div.vega-container{display:flex;justify-content:flex-start;align-items:center;border-radius:9999px;position:relative;box-sizing:content-box;height:24px;width:48px;padding:4px;background-color:rgba(var(--v-bg-toggle-switch, 107, 116, 125, 0.7))}div.vega-container:hover{background-color:rgba(var(--v-bg-toggle-switch-hover, 107, 116, 125, 1))}div.vega-container.vega-container-checked{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}div.vega-container.vega-container-checked:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}div.vega-container.vega-container-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}div.vega-container.vega-container-checked.vega-container-disabled{background-color:rgba(var(--v-bg-toggle-switch-selected-disabled, 153, 192, 255, 1))}div.vega-container-small-size{box-sizing:border-box;height:20px;width:32px;padding:2px}div.vega-container>span{margin-left:0px;transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}div.vega-container-checked>span{margin-left:24px}div.vega-container-checked.vega-container-small-size>span{margin-left:12px}div.vega-container>input{position:absolute;cursor:pointer;opacity:0;left:0px;top:0px;width:100%;height:100%;margin:0px;-webkit-tap-highlight-color:transparent}div.vega-container input:disabled{cursor:default}div.vega-container>span{display:inline-block;border-radius:9999px;box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));width:24px;height:24px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));box-shadow:var(--v-shadow-form-field, 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.1));transition-property:margin;transition-duration:0.1s;transition-timing-function:linear}div.vega-container-small-size{height:20px}div.vega-container-small-size>span{width:16px;height:16px}div{align-self:center}';export{f as vega_toggle_switch}