@globalpayments/vega 2.96.0 → 2.98.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 (570) hide show
  1. package/dist/cjs/{app-globals-38afea36.js → app-globals-b3f05631.js} +10 -10
  2. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-73b4c0cb.js → aria-dialog-focusable-trap-slimmer-62147489.js} +1 -1
  3. package/dist/cjs/{code-block-4126dc3b.js → code-block-d78c2b2c.js} +22 -9
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-38ba956e.js → component-value-history-controller-slimmer.abstract-beb00fea.js} +4 -4
  5. package/dist/cjs/constants-907d7d89.js +16 -0
  6. package/dist/cjs/{content-state-50e8a03c.js → content-state-78a620a9.js} +3 -3
  7. package/dist/cjs/{date-required-rule-4ab06a82.js → date-required-rule-5250f26d.js} +1 -1
  8. package/dist/cjs/{design-token-d3d12fa0.js → design-token-74674ee7.js} +3 -3
  9. package/dist/cjs/{element-appender-slimmer-7773fdab.js → element-appender-slimmer-597e9e48.js} +3 -3
  10. package/dist/cjs/{form-field-controller-slimmer-d638ba12.js → form-field-controller-slimmer-a743be34.js} +7 -16
  11. package/dist/cjs/form-field-key-8d5edf75.js +25 -0
  12. package/dist/cjs/{image-annotation-action-89363de8.js → image-annotation-action-85c4bd83.js} +2 -2
  13. package/dist/cjs/{image-extension-c881c454.js → image-extension-260fa69c.js} +2 -2
  14. package/dist/cjs/index.cjs.js +18 -18
  15. package/dist/cjs/{inject-keyboard-manager-5a105612.js → inject-keyboard-manager-6a6f5c9f.js} +1 -1
  16. package/dist/cjs/{internal-calendar-period-factory-b76006f7.js → internal-calendar-period-factory-dfcdd3f6.js} +1 -1
  17. package/dist/cjs/{internal-translation-controller-eb02c3b1.js → internal-translation-controller-1dac2df8.js} +7 -0
  18. package/dist/cjs/{keyboard-manager-ca76d4dc.js → keyboard-manager-c56033b1.js} +1 -1
  19. package/dist/cjs/{keyboard-manager-slimmer-a1223714.js → keyboard-manager-slimmer-7043a106.js} +1 -1
  20. package/dist/cjs/{link-extension-b7f99a52.js → link-extension-220ff6a9.js} +3 -3
  21. package/dist/cjs/loader.cjs.js +13 -13
  22. package/dist/cjs/{month-view-generator-876c50d4.js → month-view-generator-7b704a80.js} +1 -1
  23. package/dist/cjs/{public-rules-72894208.js → public-rules-5657bce4.js} +8 -8
  24. package/dist/cjs/{range-95d41dea.js → range-c5afd53a.js} +1 -1
  25. package/dist/cjs/{responsive-format-facade-25e9f30d.js → responsive-format-facade-493d1763.js} +1 -1
  26. package/dist/cjs/{rich-text-editor-required-rule-4d6d2493.js → rich-text-editor-required-rule-385c1b61.js} +1 -1
  27. package/dist/cjs/{split-cell-operation-70be116d.js → split-cell-operation-873d5db7.js} +3 -3
  28. package/dist/cjs/{state-border-formatter-f1ce0f3b.js → state-border-formatter-711c7aaa.js} +1 -1
  29. package/dist/cjs/{string-format-strategy.abstract-b22f7754.js → string-format-strategy.abstract-b61bdcbd.js} +1 -1
  30. package/dist/cjs/{string-input-formatter-slimmer-d2c248f7.js → string-input-formatter-slimmer-ef65cca7.js} +3 -3
  31. package/dist/cjs/{string-mask-strategy-fc01a500.js → string-mask-strategy-ad3fa0ac.js} +2 -2
  32. package/dist/cjs/{style-formatter-73205450.js → style-formatter-8f711cb0.js} +2 -2
  33. package/dist/cjs/{sub-state-notify-slimmer-18891389.js → sub-state-notify-slimmer-e264a120.js} +1 -1
  34. package/dist/cjs/{sub-state-observer-slimmer-eee2f0ae.js → sub-state-observer-slimmer-6033b824.js} +1 -1
  35. package/dist/cjs/{time-required-rule-12d2f394.js → time-required-rule-87417359.js} +1 -1
  36. package/dist/cjs/{token-extension-eb828948.js → token-extension-78b5a026.js} +9 -9
  37. package/dist/cjs/{translation-slimmer-9099f56c.js → translation-slimmer-77c7f37d.js} +1 -1
  38. package/dist/cjs/{type-guard-f354af8b.js → type-guard-a57ef3ac.js} +1 -1
  39. package/dist/cjs/{valid-credit-card-number-rule-8d370163.js → valid-credit-card-number-rule-4c0a3040.js} +1 -1
  40. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  41. package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
  42. package/dist/cjs/vega-backdrop.cjs.entry.js +63 -8
  43. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-button-circle.cjs.entry.js +6 -6
  45. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  46. package/dist/cjs/vega-button.cjs.entry.js +4 -4
  47. package/dist/cjs/vega-calendar_5.cjs.entry.js +10 -10
  48. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  49. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  50. package/dist/cjs/vega-checkbox_2.cjs.entry.js +22 -5
  51. package/dist/cjs/vega-chip.cjs.entry.js +5 -5
  52. package/dist/cjs/vega-code-block.cjs.entry.js +13 -26
  53. package/dist/cjs/vega-color-picker.cjs.entry.js +13 -4
  54. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +14 -5
  55. package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
  56. package/dist/cjs/vega-combo-box.cjs.entry.js +19 -10
  57. package/dist/cjs/vega-date-picker_2.cjs.entry.js +26 -17
  58. package/dist/cjs/vega-dialog_2.cjs.entry.js +5 -5
  59. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  60. package/dist/cjs/vega-dropdown_5.cjs.entry.js +30 -24
  61. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  62. package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
  63. package/dist/cjs/vega-file-uploader.cjs.entry.js +49 -7
  64. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  65. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  66. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  67. package/dist/cjs/vega-form.cjs.entry.js +31 -28
  68. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  69. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  70. package/dist/cjs/vega-image-uploader.cjs.entry.js +16 -7
  71. package/dist/cjs/vega-input-credit-card.cjs.entry.js +18 -9
  72. package/dist/cjs/vega-input-numeric.cjs.entry.js +17 -8
  73. package/dist/cjs/vega-input-passcode.cjs.entry.js +16 -7
  74. package/dist/cjs/vega-input-phone-number.cjs.entry.js +15 -6
  75. package/dist/cjs/vega-input-range.cjs.entry.js +14 -5
  76. package/dist/cjs/vega-input-select.cjs.entry.js +16 -7
  77. package/dist/cjs/vega-input.cjs.entry.js +19 -12
  78. package/dist/cjs/{vega-internal-event-id-ecc5b87a.js → vega-internal-event-id-f4d33037.js} +2 -0
  79. package/dist/cjs/vega-left-nav_5.cjs.entry.js +74 -14
  80. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  81. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +1 -1
  82. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  83. package/dist/cjs/vega-pagination.cjs.entry.js +5 -5
  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 +19 -7
  87. package/dist/cjs/vega-rich-text-content.cjs.entry.js +35 -12
  88. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +1585 -432
  89. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
  90. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  91. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +9 -9
  92. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +16 -7
  93. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +14 -5
  94. package/dist/cjs/vega-sidenav_3.cjs.entry.js +6 -6
  95. package/dist/cjs/vega-signature-capture.cjs.entry.js +18 -9
  96. package/dist/cjs/vega-stepper.cjs.entry.js +14 -5
  97. package/dist/cjs/vega-table_11.cjs.entry.js +1144 -450
  98. package/dist/cjs/vega-textarea.cjs.entry.js +14 -5
  99. package/dist/cjs/vega-time-picker_2.cjs.entry.js +20 -11
  100. package/dist/cjs/vega-toggle-switch.cjs.entry.js +14 -5
  101. package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
  102. package/dist/cjs/vega.cjs.js +13 -13
  103. package/dist/cjs/{wait-for-component-did-render-02ca4bee.js → wait-for-component-did-render-44d006ee.js} +1 -1
  104. package/dist/collection/components/vega-accordion/vega-accordion.js +2 -0
  105. package/dist/collection/components/vega-app-footer/vega-app-footer.js +2 -0
  106. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +2 -0
  107. package/dist/collection/components/vega-backdrop/slimmers/controller/vega-backdrop-visible-controller.js +63 -8
  108. package/dist/collection/components/vega-banner/vega-banner.js +2 -0
  109. package/dist/collection/components/vega-box/vega-box.js +2 -0
  110. package/dist/collection/components/vega-brand-logo/vega-brand-logo.js +2 -0
  111. package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +2 -0
  112. package/dist/collection/components/vega-button/vega-button.js +2 -0
  113. package/dist/collection/components/vega-button-circle/vega-button-circle.js +2 -0
  114. package/dist/collection/components/vega-button-group/vega-button-group.js +2 -0
  115. package/dist/collection/components/vega-button-link/vega-button-link.js +2 -0
  116. package/dist/collection/components/vega-calendar/vega-calendar.js +2 -0
  117. package/dist/collection/components/vega-card/vega-card.js +2 -0
  118. package/dist/collection/components/vega-carousel/vega-carousel.js +2 -0
  119. package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +33 -1
  120. package/dist/collection/components/vega-checkbox/vega-checkbox.js +36 -2
  121. package/dist/collection/components/vega-chip/vega-chip.js +2 -0
  122. package/dist/collection/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.js +4 -17
  123. package/dist/collection/components/vega-color-picker/vega-color-picker.js +35 -1
  124. package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.js +33 -1
  125. package/dist/collection/components/vega-combo-box/vega-combo-box.js +35 -1
  126. package/dist/collection/components/vega-counter-badge/vega-counter-badge.js +2 -0
  127. package/dist/collection/components/vega-date-picker/vega-date-picker.js +35 -1
  128. package/dist/collection/components/vega-divider/vega-divider.js +2 -0
  129. package/dist/collection/components/vega-dropdown/constants.js +10 -0
  130. package/dist/collection/components/vega-dropdown/vega-dropdown.js +45 -14
  131. package/dist/collection/components/vega-field-error/vega-field-error.js +2 -0
  132. package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-list-renderer.js +22 -2
  133. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +96 -7
  134. package/dist/collection/components/vega-flag-icon/vega-flag-icon.js +2 -0
  135. package/dist/collection/components/vega-flex/vega-flex.js +2 -0
  136. package/dist/collection/components/vega-font/vega-font.js +2 -0
  137. package/dist/collection/components/vega-form/slimmers/controllers/vega-form-field-controller.js +9 -9
  138. package/dist/collection/components/vega-form/slimmers/controllers/vega-form-field-validation-state-controller.js +5 -5
  139. package/dist/collection/components/vega-form/slimmers/renderers/native-form-renderer.js +4 -1
  140. package/dist/collection/components/vega-form/vega-form.js +34 -0
  141. package/dist/collection/components/vega-grid/vega-grid.js +2 -0
  142. package/dist/collection/components/vega-icon/vega-icon.js +2 -0
  143. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +35 -1
  144. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.js +7 -2
  145. package/dist/collection/components/vega-input/vega-input.js +7 -4
  146. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +36 -2
  147. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +35 -1
  148. package/dist/collection/components/vega-input-passcode/vega-input-passcode.js +35 -1
  149. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +35 -1
  150. package/dist/collection/components/vega-input-range/vega-input-range.js +35 -1
  151. package/dist/collection/components/vega-input-select/vega-input-select.js +35 -1
  152. package/dist/collection/components/vega-item-toggle/vega-item-toggle.js +2 -0
  153. package/dist/collection/components/vega-loading-indicator/vega-loading-indicator.js +2 -0
  154. package/dist/collection/components/vega-modal/vega-modal.js +2 -0
  155. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.js +17 -1
  156. package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +48 -5
  157. package/dist/collection/components/vega-page-notification/vega-page-notification.js +2 -0
  158. package/dist/collection/components/vega-pagination/vega-pagination.js +2 -0
  159. package/dist/collection/components/vega-popover/vega-popover.js +2 -0
  160. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +2 -0
  161. package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +18 -3
  162. package/dist/collection/components/vega-radio/vega-radio.js +2 -0
  163. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +3 -0
  164. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +3 -0
  165. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +2 -1
  166. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.js +26 -3
  167. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +10 -6
  168. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +1 -1
  169. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/keyboard-link-handler.js +297 -0
  170. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +13 -0
  171. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.js +8 -2
  172. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +35 -1
  173. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-controller.js +398 -0
  174. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-state-manager.js +111 -0
  175. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-type-config-controller.js +173 -0
  176. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/link-type-handler.js +49 -0
  177. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +114 -106
  178. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/utils/link-url-normalizer.js +80 -0
  179. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.js +44 -1
  180. package/dist/collection/components/vega-section-title/vega-section-title.js +2 -0
  181. package/dist/collection/components/vega-segment-control/vega-segment-control.js +2 -0
  182. package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +33 -1
  183. package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +2 -0
  184. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +33 -1
  185. package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +2 -0
  186. package/dist/collection/components/vega-sidenav/vega-sidenav.js +2 -0
  187. package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +35 -1
  188. package/dist/collection/components/vega-skeleton/vega-skeleton.js +2 -0
  189. package/dist/collection/components/vega-stepper/vega-stepper.js +36 -2
  190. package/dist/collection/components/vega-tab-group/vega-tab-group.js +2 -0
  191. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.js +17 -7
  192. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-head-template-structure-controller.js +440 -0
  193. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +11 -3
  194. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +207 -17
  195. package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.css +1 -0
  196. package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.js +4 -1
  197. package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.css +15 -0
  198. package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +1 -1
  199. package/dist/collection/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-template-structure-controller.js +28 -0
  200. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.css +1 -0
  201. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +68 -4
  202. package/dist/collection/components/vega-table/vega-table.js +15 -0
  203. package/dist/collection/components/vega-textarea/vega-textarea.js +36 -2
  204. package/dist/collection/components/vega-time-picker/vega-time-picker.js +35 -1
  205. package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +36 -2
  206. package/dist/collection/components/vega-tooltip/vega-tooltip.js +2 -0
  207. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  208. package/dist/collection/helpers/slimmers/{field-error-controller-silmmer.js → form/field-error-controller-silmmer.js} +3 -3
  209. package/dist/collection/helpers/slimmers/{field-error-ui-controller-slimmer.js → form/field-error-ui-controller-slimmer.js} +9 -9
  210. package/dist/collection/helpers/slimmers/{form-field-controller-slimmer.js → form/form-field-controller-slimmer.js} +9 -18
  211. package/dist/collection/helpers/slimmers/{form-field-message-translator.js → form/form-field-message-translator.js} +1 -1
  212. package/dist/collection/helpers/slimmers/{form-field-state-controller-slimmer.js → form/form-field-state-controller-slimmer.js} +1 -1
  213. package/dist/collection/helpers/slimmers/{form-field-valid-invoke-slimmer.js → form/form-field-valid-invoke-slimmer.js} +2 -2
  214. package/dist/collection/helpers/slimmers/form/utils/form-field-key.js +20 -0
  215. package/dist/collection/helpers/translation/locales/en.js +7 -0
  216. package/dist/collection/helpers/validator/form-field-controller.js +5 -4
  217. package/dist/esm/{app-globals-d7b651c1.js → app-globals-95c7110a.js} +10 -10
  218. package/dist/esm/{aria-dialog-focusable-trap-slimmer-9eae86c6.js → aria-dialog-focusable-trap-slimmer-f069f54d.js} +1 -1
  219. package/dist/esm/{code-block-0a88b481.js → code-block-9c513169.js} +20 -10
  220. package/dist/esm/{component-value-history-controller-slimmer.abstract-6846edfa.js → component-value-history-controller-slimmer.abstract-9cef2a2a.js} +4 -4
  221. package/dist/esm/constants-4725f97f.js +13 -0
  222. package/dist/esm/{content-state-79ca99e5.js → content-state-25c81c08.js} +3 -3
  223. package/dist/esm/{date-required-rule-b88e1650.js → date-required-rule-85334d0c.js} +1 -1
  224. package/dist/esm/{design-token-76bd217c.js → design-token-10ff79b5.js} +3 -3
  225. package/dist/esm/{element-appender-slimmer-73ad10ae.js → element-appender-slimmer-8a06ecdd.js} +3 -3
  226. package/dist/esm/{form-field-controller-slimmer-395c23e3.js → form-field-controller-slimmer-68fc5380.js} +7 -16
  227. package/dist/esm/form-field-key-44ab39d0.js +22 -0
  228. package/dist/esm/{image-annotation-action-bb299ef1.js → image-annotation-action-d7f2aecc.js} +2 -2
  229. package/dist/esm/{image-extension-48a96f98.js → image-extension-fbd1ed6e.js} +2 -2
  230. package/dist/esm/index.js +18 -18
  231. package/dist/esm/{inject-keyboard-manager-86126b5b.js → inject-keyboard-manager-ea1aad5b.js} +1 -1
  232. package/dist/esm/{internal-calendar-period-factory-3a07dba0.js → internal-calendar-period-factory-7b294fb6.js} +1 -1
  233. package/dist/esm/{internal-translation-controller-16709132.js → internal-translation-controller-fac22598.js} +7 -0
  234. package/dist/esm/{keyboard-manager-a0c3e1cf.js → keyboard-manager-50da85d7.js} +1 -1
  235. package/dist/esm/{keyboard-manager-slimmer-f3f66c15.js → keyboard-manager-slimmer-1f7c8bfb.js} +1 -1
  236. package/dist/esm/{link-extension-09534514.js → link-extension-e8ee103e.js} +3 -3
  237. package/dist/esm/loader.js +13 -13
  238. package/dist/esm/{month-view-generator-fd0e1856.js → month-view-generator-a1a9a4ec.js} +1 -1
  239. package/dist/esm/{public-rules-5eb03ef0.js → public-rules-49de79c7.js} +8 -8
  240. package/dist/esm/{range-d4deb7df.js → range-b678c693.js} +1 -1
  241. package/dist/esm/{responsive-format-facade-ced96b0b.js → responsive-format-facade-f19b601c.js} +1 -1
  242. package/dist/esm/{rich-text-editor-required-rule-5bbbce23.js → rich-text-editor-required-rule-578e0958.js} +1 -1
  243. package/dist/esm/{split-cell-operation-7f3058ad.js → split-cell-operation-1c8e7585.js} +3 -3
  244. package/dist/esm/{state-border-formatter-b680e922.js → state-border-formatter-bfda33aa.js} +1 -1
  245. package/dist/esm/{string-format-strategy.abstract-23faab71.js → string-format-strategy.abstract-1f4ff1b3.js} +1 -1
  246. package/dist/esm/{string-input-formatter-slimmer-4b4866a6.js → string-input-formatter-slimmer-0006a107.js} +3 -3
  247. package/dist/esm/{string-mask-strategy-66586cd8.js → string-mask-strategy-bbbcdbef.js} +2 -2
  248. package/dist/esm/{style-formatter-f4e16af5.js → style-formatter-e9adc8f4.js} +2 -2
  249. package/dist/esm/{sub-state-notify-slimmer-0f72ce74.js → sub-state-notify-slimmer-23b7d0e8.js} +1 -1
  250. package/dist/esm/{sub-state-observer-slimmer-64532d94.js → sub-state-observer-slimmer-722f6b92.js} +1 -1
  251. package/dist/esm/{time-required-rule-6e80a9ab.js → time-required-rule-1ce2d0a0.js} +1 -1
  252. package/dist/esm/{token-extension-40c32bcc.js → token-extension-f2d009e3.js} +9 -9
  253. package/dist/esm/{translation-slimmer-21748a0e.js → translation-slimmer-ee0f0e76.js} +1 -1
  254. package/dist/esm/{type-guard-ec5e8628.js → type-guard-f2624334.js} +1 -1
  255. package/dist/esm/{valid-credit-card-number-rule-ca5a47d6.js → valid-credit-card-number-rule-60212b1d.js} +1 -1
  256. package/dist/esm/vega-accordion.entry.js +6 -6
  257. package/dist/esm/vega-app-header-button.entry.js +5 -5
  258. package/dist/esm/vega-backdrop.entry.js +63 -8
  259. package/dist/esm/vega-box.entry.js +6 -6
  260. package/dist/esm/vega-button-circle.entry.js +6 -6
  261. package/dist/esm/vega-button-group_2.entry.js +3 -3
  262. package/dist/esm/vega-button.entry.js +4 -4
  263. package/dist/esm/vega-calendar_5.entry.js +10 -10
  264. package/dist/esm/vega-card.entry.js +5 -5
  265. package/dist/esm/vega-carousel.entry.js +3 -3
  266. package/dist/esm/vega-checkbox_2.entry.js +22 -5
  267. package/dist/esm/vega-chip.entry.js +5 -5
  268. package/dist/esm/vega-code-block.entry.js +13 -26
  269. package/dist/esm/vega-color-picker.entry.js +13 -4
  270. package/dist/esm/vega-color-swatch-picker.entry.js +14 -5
  271. package/dist/esm/vega-color-swatch.entry.js +2 -2
  272. package/dist/esm/vega-combo-box.entry.js +19 -10
  273. package/dist/esm/vega-date-picker_2.entry.js +26 -17
  274. package/dist/esm/vega-dialog_2.entry.js +5 -5
  275. package/dist/esm/vega-divider.entry.js +5 -5
  276. package/dist/esm/vega-dropdown_5.entry.js +26 -20
  277. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  278. package/dist/esm/vega-field-label.entry.js +2 -2
  279. package/dist/esm/vega-file-uploader.entry.js +49 -7
  280. package/dist/esm/vega-flag-icon.entry.js +5 -5
  281. package/dist/esm/vega-flex.entry.js +6 -6
  282. package/dist/esm/vega-font.entry.js +5 -5
  283. package/dist/esm/vega-form.entry.js +31 -28
  284. package/dist/esm/vega-grid.entry.js +5 -5
  285. package/dist/esm/vega-icon.entry.js +5 -5
  286. package/dist/esm/vega-image-uploader.entry.js +16 -7
  287. package/dist/esm/vega-input-credit-card.entry.js +18 -9
  288. package/dist/esm/vega-input-numeric.entry.js +17 -8
  289. package/dist/esm/vega-input-passcode.entry.js +16 -7
  290. package/dist/esm/vega-input-phone-number.entry.js +15 -6
  291. package/dist/esm/vega-input-range.entry.js +14 -5
  292. package/dist/esm/vega-input-select.entry.js +16 -7
  293. package/dist/esm/vega-input.entry.js +19 -12
  294. package/dist/esm/{vega-internal-event-id-827eb1ce.js → vega-internal-event-id-86fce049.js} +2 -1
  295. package/dist/esm/vega-left-nav_5.entry.js +74 -14
  296. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  297. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +1 -1
  298. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  299. package/dist/esm/vega-pagination.entry.js +5 -5
  300. package/dist/esm/vega-popover_2.entry.js +10 -10
  301. package/dist/esm/vega-progress-tracker_2.entry.js +6 -6
  302. package/dist/esm/vega-radio_2.entry.js +19 -7
  303. package/dist/esm/vega-rich-text-content.entry.js +35 -12
  304. package/dist/esm/vega-rich-text-editor_4.entry.js +1585 -432
  305. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
  306. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
  307. package/dist/esm/vega-rich-text-table-properties_3.entry.js +9 -9
  308. package/dist/esm/vega-selection-chip_2.entry.js +16 -7
  309. package/dist/esm/vega-selection-tile_2.entry.js +14 -5
  310. package/dist/esm/vega-sidenav_3.entry.js +6 -6
  311. package/dist/esm/vega-signature-capture.entry.js +18 -9
  312. package/dist/esm/vega-stepper.entry.js +14 -5
  313. package/dist/esm/vega-table_11.entry.js +1145 -451
  314. package/dist/esm/vega-textarea.entry.js +14 -5
  315. package/dist/esm/vega-time-picker_2.entry.js +20 -11
  316. package/dist/esm/vega-toggle-switch.entry.js +14 -5
  317. package/dist/esm/vega-tooltip_2.entry.js +7 -7
  318. package/dist/esm/vega.js +13 -13
  319. package/dist/esm/{wait-for-component-did-render-0c237cb8.js → wait-for-component-did-render-ff7062aa.js} +1 -1
  320. package/dist/sri/vega-sri-manifest.json +346 -338
  321. package/dist/types/components/vega-accordion/vega-accordion.d.ts +2 -0
  322. package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +2 -0
  323. package/dist/types/components/vega-app-header-button/vega-app-header-button.d.ts +2 -0
  324. package/dist/types/components/vega-backdrop/slimmers/controller/vega-backdrop-visible-controller.d.ts +21 -0
  325. package/dist/types/components/vega-banner/vega-banner.d.ts +2 -0
  326. package/dist/types/components/vega-box/vega-box.d.ts +2 -0
  327. package/dist/types/components/vega-brand-logo/vega-brand-logo.d.ts +2 -0
  328. package/dist/types/components/vega-breadcrumb/vega-breadcrumb.d.ts +2 -0
  329. package/dist/types/components/vega-button/vega-button.d.ts +2 -0
  330. package/dist/types/components/vega-button-circle/vega-button-circle.d.ts +2 -0
  331. package/dist/types/components/vega-button-group/vega-button-group.d.ts +2 -0
  332. package/dist/types/components/vega-button-link/vega-button-link.d.ts +2 -0
  333. package/dist/types/components/vega-calendar/vega-calendar.d.ts +2 -0
  334. package/dist/types/components/vega-card/vega-card.d.ts +2 -0
  335. package/dist/types/components/vega-carousel/vega-carousel.d.ts +2 -0
  336. package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +9 -1
  337. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +11 -1
  338. package/dist/types/components/vega-chip/vega-chip.d.ts +2 -0
  339. package/dist/types/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.d.ts +2 -1
  340. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +11 -1
  341. package/dist/types/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.d.ts +9 -1
  342. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +11 -1
  343. package/dist/types/components/vega-counter-badge/vega-counter-badge.d.ts +2 -0
  344. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +11 -1
  345. package/dist/types/components/vega-divider/vega-divider.d.ts +2 -0
  346. package/dist/types/components/vega-dropdown/constants.d.ts +12 -0
  347. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +9 -0
  348. package/dist/types/components/vega-field-error/vega-field-error.d.ts +2 -0
  349. package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-list-renderer.d.ts +10 -0
  350. package/dist/types/components/vega-file-uploader/types.d.ts +4 -0
  351. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +24 -1
  352. package/dist/types/components/vega-flag-icon/vega-flag-icon.d.ts +2 -0
  353. package/dist/types/components/vega-flex/vega-flex.d.ts +2 -0
  354. package/dist/types/components/vega-font/vega-font.d.ts +2 -0
  355. package/dist/types/components/vega-form/slimmers/controllers/vega-form-field-controller.d.ts +3 -2
  356. package/dist/types/components/vega-form/slimmers/renderers/native-form-renderer.d.ts +1 -0
  357. package/dist/types/components/vega-form/vega-form.d.ts +10 -0
  358. package/dist/types/components/vega-grid/vega-grid.d.ts +2 -0
  359. package/dist/types/components/vega-icon/vega-icon.d.ts +2 -0
  360. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +11 -1
  361. package/dist/types/components/vega-input/types.d.ts +11 -1
  362. package/dist/types/components/vega-input/vega-input.d.ts +5 -2
  363. package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +11 -1
  364. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +11 -1
  365. package/dist/types/components/vega-input-passcode/vega-input-passcode.d.ts +11 -1
  366. package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +11 -1
  367. package/dist/types/components/vega-input-range/vega-input-range.d.ts +11 -1
  368. package/dist/types/components/vega-input-select/vega-input-select.d.ts +11 -1
  369. package/dist/types/components/vega-item-toggle/vega-item-toggle.d.ts +2 -0
  370. package/dist/types/components/vega-loading-indicator/vega-loading-indicator.d.ts +2 -0
  371. package/dist/types/components/vega-modal/vega-modal.d.ts +2 -0
  372. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.d.ts +7 -0
  373. package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.d.ts +17 -0
  374. package/dist/types/components/vega-page-notification/vega-page-notification.d.ts +2 -0
  375. package/dist/types/components/vega-pagination/vega-pagination.d.ts +2 -0
  376. package/dist/types/components/vega-popover/vega-popover.d.ts +2 -0
  377. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +2 -0
  378. package/dist/types/components/vega-radio/vega-radio-group/vega-radio-group.d.ts +5 -1
  379. package/dist/types/components/vega-radio/vega-radio.d.ts +2 -0
  380. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +3 -0
  381. package/dist/types/components/vega-rich-text-editor/extensions/link/type.d.ts +34 -0
  382. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +7 -0
  383. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +4 -4
  384. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/keyboard-link-handler.d.ts +111 -0
  385. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +7 -0
  386. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +11 -1
  387. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-controller.d.ts +149 -0
  388. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-state-manager.d.ts +84 -0
  389. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-type-config-controller.d.ts +82 -0
  390. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/link-type-handler.d.ts +33 -0
  391. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +24 -17
  392. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/utils/link-url-normalizer.d.ts +37 -0
  393. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/types.d.ts +4 -0
  394. package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.d.ts +12 -0
  395. package/dist/types/components/vega-section-title/vega-section-title.d.ts +2 -0
  396. package/dist/types/components/vega-segment-control/vega-segment-control.d.ts +2 -0
  397. package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +9 -1
  398. package/dist/types/components/vega-selection-chip/vega-selection-chip.d.ts +2 -0
  399. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +9 -1
  400. package/dist/types/components/vega-selection-tile/vega-selection-tile.d.ts +2 -0
  401. package/dist/types/components/vega-sidenav/vega-sidenav.d.ts +2 -0
  402. package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +11 -1
  403. package/dist/types/components/vega-skeleton/vega-skeleton.d.ts +2 -0
  404. package/dist/types/components/vega-stepper/vega-stepper.d.ts +11 -1
  405. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +2 -0
  406. package/dist/types/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.d.ts +8 -4
  407. package/dist/types/components/vega-table/slimmers/controllers/vega-table-head-template-structure-controller.d.ts +168 -0
  408. package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +8 -1
  409. package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +76 -0
  410. package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +1 -0
  411. package/dist/types/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-template-structure-controller.d.ts +12 -0
  412. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +19 -0
  413. package/dist/types/components/vega-table/vega-table.d.ts +6 -0
  414. package/dist/types/components/vega-textarea/vega-textarea.d.ts +11 -1
  415. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +11 -1
  416. package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +11 -1
  417. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +2 -0
  418. package/dist/types/components.d.ts +341 -4
  419. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  420. package/dist/types/helpers/slimmers/{field-error-controller-silmmer.d.ts → form/field-error-controller-silmmer.d.ts} +1 -1
  421. package/dist/types/helpers/slimmers/{field-error-ui-controller-slimmer.d.ts → form/field-error-ui-controller-slimmer.d.ts} +2 -2
  422. package/dist/types/helpers/slimmers/{form-field-controller-slimmer.d.ts → form/form-field-controller-slimmer.d.ts} +6 -14
  423. package/dist/types/helpers/slimmers/{form-field-message-translator.d.ts → form/form-field-message-translator.d.ts} +2 -2
  424. package/dist/types/helpers/slimmers/{form-field-state-controller-slimmer.d.ts → form/form-field-state-controller-slimmer.d.ts} +2 -2
  425. package/dist/types/helpers/slimmers/{form-field-valid-invoke-slimmer.d.ts → form/form-field-valid-invoke-slimmer.d.ts} +3 -3
  426. package/dist/types/helpers/slimmers/form/utils/form-field-key.d.ts +17 -0
  427. package/dist/types/helpers/translation/interface.d.ts +7 -0
  428. package/dist/types/helpers/validator/form-field-controller.d.ts +3 -3
  429. package/dist/vega/index.esm.js +1 -1
  430. package/dist/vega/{p-b3a2ce06.entry.js → p-02d3ce79.entry.js} +1 -1
  431. package/dist/vega/p-035e2f05.entry.js +1 -0
  432. package/dist/vega/p-03eeadc1.entry.js +1 -0
  433. package/dist/vega/{p-5924adae.entry.js → p-085d1647.entry.js} +1 -1
  434. package/dist/vega/p-0cbf09f7.entry.js +1 -0
  435. package/dist/vega/{p-74f86ff9.entry.js → p-0cf3b5c1.entry.js} +1 -1
  436. package/dist/vega/{p-55e0014a.js → p-0eb29065.js} +1 -1
  437. package/dist/vega/{p-6a51d720.js → p-10d30c03.js} +1 -1
  438. package/dist/vega/{p-ba662fe5.js → p-12e8a1b2.js} +1 -1
  439. package/dist/vega/p-17c69503.entry.js +1 -0
  440. package/dist/vega/p-1abd3c17.js +1 -0
  441. package/dist/vega/p-1aedbfd2.entry.js +1 -0
  442. package/dist/vega/p-1cff027b.entry.js +1 -0
  443. package/dist/vega/{p-3dee1e55.js → p-1e0a8fd3.js} +1 -1
  444. package/dist/vega/{p-919cddc3.js → p-1ea9ad9a.js} +1 -1
  445. package/dist/vega/{p-22cc174e.entry.js → p-2a245138.entry.js} +1 -1
  446. package/dist/vega/{p-892edf88.entry.js → p-2acf9b42.entry.js} +1 -1
  447. package/dist/vega/{p-b1eb9ff0.js → p-2c2e8615.js} +1 -1
  448. package/dist/vega/p-2d158cbd.js +1 -0
  449. package/dist/vega/{p-8354cff0.entry.js → p-2f07d719.entry.js} +1 -1
  450. package/dist/vega/p-36d9e782.entry.js +1 -0
  451. package/dist/vega/{p-9d3f69cb.js → p-373541fa.js} +1 -1
  452. package/dist/vega/p-3737b9e2.entry.js +1 -0
  453. package/dist/vega/{p-14baa886.js → p-39c5054b.js} +1 -1
  454. package/dist/vega/{p-312d8205.js → p-3d0b4074.js} +1 -1
  455. package/dist/vega/{p-8db904dc.js → p-456f678b.js} +1 -1
  456. package/dist/vega/{p-6c9c2f8c.entry.js → p-461100b8.entry.js} +1 -1
  457. package/dist/vega/p-4a2fe3a4.js +1 -0
  458. package/dist/vega/p-4bfe3258.entry.js +1 -0
  459. package/dist/vega/p-4cbfc01e.entry.js +1 -0
  460. package/dist/vega/p-4e065ef7.entry.js +1 -0
  461. package/dist/vega/{p-ec5dee32.js → p-4fd0cf01.js} +1 -1
  462. package/dist/vega/p-52c69f9e.entry.js +1 -0
  463. package/dist/vega/p-544ce391.entry.js +1 -0
  464. package/dist/vega/{p-6fcec7c7.entry.js → p-56417ec5.entry.js} +1 -1
  465. package/dist/vega/{p-c4564904.js → p-56493601.js} +1 -1
  466. package/dist/vega/p-56598858.entry.js +1 -0
  467. package/dist/vega/p-56db3323.js +1 -0
  468. package/dist/vega/p-571ec00b.js +1 -0
  469. package/dist/vega/{p-2df5d59b.entry.js → p-585e4f1c.entry.js} +1 -1
  470. package/dist/vega/p-5b1f5e4a.entry.js +1 -0
  471. package/dist/vega/p-5f377954.js +1 -1
  472. package/dist/vega/{p-a0a58295.entry.js → p-5f96e741.entry.js} +1 -1
  473. package/dist/vega/p-6234852e.entry.js +1 -0
  474. package/dist/vega/p-67eaf77e.js +1 -0
  475. package/dist/vega/{p-75e33859.js → p-6c95a6a3.js} +1 -1
  476. package/dist/vega/p-6d4518d7.entry.js +1 -0
  477. package/dist/vega/p-6db1b9ac.js +1 -0
  478. package/dist/vega/p-6f537797.entry.js +1 -0
  479. package/dist/vega/p-6fd4f2c6.js +1 -0
  480. package/dist/vega/p-71909102.js +1 -0
  481. package/dist/vega/{p-e1b57e8f.entry.js → p-72ab5cd5.entry.js} +1 -1
  482. package/dist/vega/p-72fd17a1.entry.js +1 -0
  483. package/dist/vega/{p-8720816e.js → p-781b7a54.js} +1 -1
  484. package/dist/vega/p-7dcd2850.entry.js +1 -0
  485. package/dist/vega/{p-9f11b579.js → p-7e8fdac4.js} +1 -1
  486. package/dist/vega/{p-84b7a775.js → p-810c9c29.js} +1 -1
  487. package/dist/vega/{p-a2bd621e.js → p-83ad8988.js} +1 -1
  488. package/dist/vega/{p-0d18368b.js → p-874e5624.js} +1 -1
  489. package/dist/vega/{p-9f201152.entry.js → p-8c56d74d.entry.js} +1 -1
  490. package/dist/vega/{p-3c23ec90.js → p-8d2501b2.js} +1 -1
  491. package/dist/vega/{p-9bdc6e11.entry.js → p-92528dc9.entry.js} +1 -1
  492. package/dist/vega/{p-3d6f761a.entry.js → p-94975537.entry.js} +1 -1
  493. package/dist/vega/p-95c18f79.entry.js +1 -0
  494. package/dist/vega/p-9834d5d4.entry.js +1 -0
  495. package/dist/vega/{p-3345d903.js → p-a090b2be.js} +1 -1
  496. package/dist/vega/{p-e48a870f.entry.js → p-a484e32d.entry.js} +1 -1
  497. package/dist/vega/{p-b9e72de2.entry.js → p-a8174ad8.entry.js} +1 -1
  498. package/dist/vega/{p-3c309a38.js → p-a81ad3bd.js} +1 -1
  499. package/dist/vega/{p-49e1cf4d.entry.js → p-a91927eb.entry.js} +1 -1
  500. package/dist/vega/{p-e4266b45.entry.js → p-ac94ba1b.entry.js} +1 -1
  501. package/dist/vega/{p-b775e51f.js → p-ae2abdfa.js} +1 -1
  502. package/dist/vega/{p-a890d60b.entry.js → p-b00ec194.entry.js} +1 -1
  503. package/dist/vega/{p-f78944d7.entry.js → p-b3733762.entry.js} +1 -1
  504. package/dist/vega/{p-b4e7c967.js → p-b622c455.js} +1 -1
  505. package/dist/vega/{p-1232b553.entry.js → p-b98ead05.entry.js} +1 -1
  506. package/dist/vega/{p-e5ff77f7.entry.js → p-c2277448.entry.js} +1 -1
  507. package/dist/vega/{p-29e3eb12.js → p-c41a2d4a.js} +1 -1
  508. package/dist/vega/p-c5fb8a69.entry.js +1 -0
  509. package/dist/vega/{p-96da7d30.entry.js → p-c6d775b8.entry.js} +1 -1
  510. package/dist/vega/p-c70748f7.entry.js +1 -0
  511. package/dist/vega/p-c98c2f5f.entry.js +1 -0
  512. package/dist/vega/{p-bb60e381.entry.js → p-ca3c1317.entry.js} +1 -1
  513. package/dist/vega/p-cb81126a.entry.js +1 -0
  514. package/dist/vega/{p-b4c26035.entry.js → p-ccbe3f1b.entry.js} +1 -1
  515. package/dist/vega/{p-6cde45fc.js → p-cd69aeae.js} +1 -1
  516. package/dist/vega/{p-775ecfad.entry.js → p-cf4b3d40.entry.js} +1 -1
  517. package/dist/vega/{p-e1737c8e.entry.js → p-cfe268a8.entry.js} +1 -1
  518. package/dist/vega/p-d470fce2.entry.js +1 -0
  519. package/dist/vega/{p-f1974321.js → p-d609c3fd.js} +1 -1
  520. package/dist/vega/{p-1dfbc542.entry.js → p-da867019.entry.js} +1 -1
  521. package/dist/vega/{p-3f183b52.js → p-daba4af1.js} +1 -1
  522. package/dist/vega/{p-61ce8029.js → p-dbb4b1d1.js} +1 -1
  523. package/dist/vega/p-dcd3e3a7.js +1 -0
  524. package/dist/vega/p-de8f0d98.js +1 -0
  525. package/dist/vega/p-e18c0656.entry.js +1 -0
  526. package/dist/vega/{p-595998d9.entry.js → p-f29ea345.entry.js} +1 -1
  527. package/dist/vega/p-f62c5a20.entry.js +1 -0
  528. package/dist/vega/p-f6c0e9e7.entry.js +1 -0
  529. package/dist/vega/{p-56d19601.entry.js → p-fb9475ab.entry.js} +1 -1
  530. package/dist/vega/vega.esm.js +1 -1
  531. package/package.json +1 -1
  532. package/dist/vega/p-0512308f.entry.js +0 -1
  533. package/dist/vega/p-1d8312d3.entry.js +0 -1
  534. package/dist/vega/p-2d77ae73.entry.js +0 -1
  535. package/dist/vega/p-2d8d4d5b.entry.js +0 -1
  536. package/dist/vega/p-320091b7.js +0 -1
  537. package/dist/vega/p-36949349.js +0 -1
  538. package/dist/vega/p-3a68b729.js +0 -1
  539. package/dist/vega/p-4151f53a.entry.js +0 -1
  540. package/dist/vega/p-4ff48b84.js +0 -1
  541. package/dist/vega/p-5e4517eb.entry.js +0 -1
  542. package/dist/vega/p-6680ba17.entry.js +0 -1
  543. package/dist/vega/p-6c7b6d45.js +0 -1
  544. package/dist/vega/p-7950f3e2.entry.js +0 -1
  545. package/dist/vega/p-80b7945a.entry.js +0 -1
  546. package/dist/vega/p-841b3281.entry.js +0 -1
  547. package/dist/vega/p-87e5cb56.entry.js +0 -1
  548. package/dist/vega/p-88a6c89a.js +0 -1
  549. package/dist/vega/p-91303402.entry.js +0 -1
  550. package/dist/vega/p-97215133.js +0 -1
  551. package/dist/vega/p-9d96d83f.entry.js +0 -1
  552. package/dist/vega/p-a05a2f1e.entry.js +0 -1
  553. package/dist/vega/p-a775825e.entry.js +0 -1
  554. package/dist/vega/p-acaff62d.entry.js +0 -1
  555. package/dist/vega/p-ae146458.entry.js +0 -1
  556. package/dist/vega/p-b63319e9.entry.js +0 -1
  557. package/dist/vega/p-b660f38c.entry.js +0 -1
  558. package/dist/vega/p-b8c13ac9.entry.js +0 -1
  559. package/dist/vega/p-b8ffa42f.entry.js +0 -1
  560. package/dist/vega/p-bbad318e.entry.js +0 -1
  561. package/dist/vega/p-c0e42c03.entry.js +0 -1
  562. package/dist/vega/p-c41f5684.entry.js +0 -1
  563. package/dist/vega/p-c54b5a8f.entry.js +0 -1
  564. package/dist/vega/p-cd1e976c.entry.js +0 -1
  565. package/dist/vega/p-d9158512.js +0 -1
  566. package/dist/vega/p-e62d41ee.js +0 -1
  567. package/dist/vega/p-ebe32b25.entry.js +0 -1
  568. package/dist/vega/p-ec162599.entry.js +0 -1
  569. package/dist/vega/p-f29d9707.entry.js +0 -1
  570. package/dist/vega/p-fc7e4c8a.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as s,g as o}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as p,M as n,I as l}from"./p-6e1ab235.js";import{V as h,I as m}from"./p-8ce9e214.js";import{D as c}from"./p-526e3634.js";import{d as f,M as u}from"./p-5447a8e8.js";import{n as d,c as v,b as j}from"./p-262ec334.js";import{C as b}from"./p-2c737fc8.js";import{c as w}from"./p-66647244.js";import{F as x}from"./p-cb378636.js";import{C as y}from"./p-2d0d575f.js";import{K as R}from"./p-d609c3fd.js";import{F as C}from"./p-56db3323.js";import{R as g}from"./p-8bc15ed0.js";import{c as I}from"./p-daba4af1.js";import{M as V,a as N}from"./p-f0ff4463.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-6c95a6a3.js";import"./p-456f678b.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-874e5624.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-4a2fe3a4.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-abd7aeaa.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-c41a2d4a.js";var T=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class S extends p{constructor(){super(...arguments),this.onInputChange=t=>{this.valueController.updateValue(t.detail)},this.onInputBlur=t=>{const e=t.host.value.replace(/,/g,"");if(""!==e&&!isNaN(e)){let t=d(Number(e),this.min,this.max);this.integerOnly&&(t===this.min?t=Math.ceil(this.min):t===this.max&&(t=Math.floor(this.max))),t!==Number(e)&&this.valueController.updateValue(t.toString())}}}getInputRef(){return this.vegaInputRef.shadowRoot.querySelector("input")}getContainerRef(){return this.vegaInputRef.shadowRoot.querySelector(".vega-input-container")}render(){const e={thousandComma:this.thousandComma};return this.integerOnly&&(e.precision=0),t("vega-input",{value:this.value||"",showClearIcon:this.showClearIcon,disabled:this.disabled,label:this.label,hint:this.hint,required:this.required,optional:this.optional,type:"number",placeholder:this.placeholder,size:"small"===this.size?"small":"default",prefixIcon:this.prefixIcon,ref:t=>{this.vegaInputRef=t,c.addUniqueObserverToNode(t,f,(t=>this.onInputChange(t))),c.addUniqueObserverToNode(t,u,(t=>this.onInputBlur(t)))},maskConfig:{type:"number",options:e}})}}T([a()],S.prototype,"prefixIcon",void 0),T([a()],S.prototype,"showClearIcon",void 0),T([a()],S.prototype,"value",void 0),T([a()],S.prototype,"size",void 0),T([a()],S.prototype,"disabled",void 0),T([a()],S.prototype,"placeholder",void 0),T([a()],S.prototype,"label",void 0),T([a()],S.prototype,"optional",void 0),T([a()],S.prototype,"hint",void 0),T([a()],S.prototype,"required",void 0),T([a()],S.prototype,"thousandComma",void 0),T([a()],S.prototype,"integerOnly",void 0),T([a()],S.prototype,"min",void 0),T([a()],S.prototype,"max",void 0),T([a()],S.prototype,"valueController",void 0);var O=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class k extends p{watchValue(){this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}updateValue(t){this.value=t}}O([a()],k.prototype,"host",void 0),O([a({writable:!0})],k.prototype,"value",void 0),O([a()],k.prototype,"changeEventEmitter",void 0),O([n("watchValue")],k.prototype,"watchValue",null);var E=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class M extends R{constructor(){super((t=>[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[t.host],callback:t.onArrowUpOrDown},{keyCode:["ArrowUp"],eventName:"keydown",activeElementInScope:[t.host],callback:t=>{t.preventDefault()}}])),this.onArrowUpOrDown=t=>{const e=t.shiftKey?this.majorIncrement:this.minorIncrement,i=v(this.value.replace(/,/g,""))||0,s=Math.max(j(i),j(e));"ArrowUp"===t.code?this.valueController.updateValue(`${(i+e).toFixed(s)}`):"ArrowDown"===t.code&&this.valueController.updateValue(`${(i-e).toFixed(s)}`)}}}E([a()],M.prototype,"host",void 0),E([a()],M.prototype,"value",void 0),E([a()],M.prototype,"minorIncrement",void 0),E([a()],M.prototype,"majorIncrement",void 0),E([a()],M.prototype,"valueController",void 0);var A=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const F=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.valueController=new k,this.keyboardController=new M,this.renderer=new S,this.changeEventEmitter=w(F,f),this.inputEventPrevent=new b([f],(()=>this.host),{useCapture:!0}),this.formFieldController=new C({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new g:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new V({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new N({maxValue:t}):null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getContainerRef(),touchableAreaGetter:()=>[this.renderer.getInputRef()],defaultValue:"",attributeGetter:t=>this[t]}),this.prefixTextNotifySlimmer=I(F,"prefixText","watchPrefixText"),this.suffixTextNotifySlimmer=I(F,"suffixText","watchSuffixText"),this.isCompactInputWidthNotifySlimmer=I(F,"isCompactInputWidth"),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.isCompactInputWidth=!0,this.prefixText="",this.value="",this.size="medium",this.thousandComma=!1,this.integerOnly=!1,this.disabled=!1,this.minorIncrement=1,this.majorIncrement=10,this.label="",this.optional=!1,this.name="",this.validationRules=[],this.isValid=null,this.autoValidation=!0,this.showClearIcon=!0,this.min=null,this.max=null}watchPrefixText(){}watchSuffixText(){}watchValue(){}watchValidationRules(){}render(){return r(t(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{prefixText:["watchPrefixText"],suffixText:["watchSuffixText"],value:["watchValue"],validationRules:["watchValidationRules"]}}};A([m()],F.prototype,"globalSlimmers",void 0),A([l()],F.prototype,"valueController",void 0),A([l()],F.prototype,"keyboardController",void 0),A([l()],F.prototype,"renderer",void 0),A([l()],F.prototype,"changeEventEmitter",void 0),A([l()],F.prototype,"inputEventPrevent",void 0),A([l()],F.prototype,"formFieldController",void 0),A([l()],F.prototype,"prefixTextNotifySlimmer",void 0),A([l()],F.prototype,"suffixTextNotifySlimmer",void 0),A([l()],F.prototype,"isCompactInputWidthNotifySlimmer",void 0),A([l()],F.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),F.style=":host{display:inline-block;width:100%}";export{F as vega_input_numeric}
@@ -0,0 +1 @@
1
+ import{h as e,H as t,r as i,c as o,g as a}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,M as l,V as n,I as d,L as c}from"./p-6e1ab235.js";import{V as h,I as p}from"./p-8ce9e214.js";import{R as v}from"./p-1e0a8fd3.js";import{c as g}from"./p-3a620268.js";import{S as b}from"./p-c41a2d4a.js";import{O as f}from"./p-331a62d5.js";import{d as m}from"./p-526e3634.js";import{i as u}from"./p-4a2fe3a4.js";import{f as x}from"./p-528748fa.js";import{C as w}from"./p-2d0d575f.js";import{P as j}from"./p-81dd00d0.js";import{g as y}from"./p-49a2e141.js";import{d as k}from"./p-5447a8e8.js";import{c as C}from"./p-66647244.js";import{F as R}from"./p-cb378636.js";import{M as z}from"./p-78a57a17.js";import{a as S}from"./p-52b8f2d2.js";import{i as O}from"./p-d27ae9ff.js";import{c as E}from"./p-daba4af1.js";import{C as T}from"./p-2c737fc8.js";import{F as I}from"./p-56db3323.js";import{R as V}from"./p-8bc15ed0.js";import"./p-456f678b.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-874e5624.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-b75ee3ba.js";import"./p-6a334573.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-f0e828d8.js";import"./p-abd7aeaa.js";import"./p-71909102.js";var N=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class L extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:g(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:L.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:L.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}L.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},L.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},N([s()],L.prototype,"host",void 0),N([s()],L.prototype,"label",void 0),N([s()],L.prototype,"block",void 0),N([s()],L.prototype,"size",void 0),N([s()],L.prototype,"variant",void 0),N([s()],L.prototype,"swatchColor",void 0),N([s()],L.prototype,"disabledTooltip",void 0),N([s()],L.prototype,"disabled",void 0),N([s()],L.prototype,"selectType",void 0),N([s()],L.prototype,"checked",void 0),N([s()],L.prototype,"checkedController",void 0),N([s()],L.prototype,"showError",void 0),N([l("componentWillRender")],L.prototype,"componentWillRender",null);var A=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class F extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}A([s()],F.prototype,"host",void 0),A([s({writable:!0})],F.prototype,"checked",void 0),A([s()],F.prototype,"changeEventEmitter",void 0),A([s()],F.prototype,"value",void 0);var D=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class G extends b{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}D([s()],G.prototype,"host",void 0),D([s({writable:!0})],G.prototype,"disabled",void 0),D([s({writable:!0})],G.prototype,"selectType",void 0),D([s()],G.prototype,"value",void 0),D([s()],G.prototype,"checkedController",void 0);var W=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class M extends n{connectedCallback(){this.selectionChipGroup=x(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new f(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),w.register(m.getSubject(this.selectionChipGroup,u),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&w.unregister(m.getSubject(this.selectionChipGroup,u),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}W([s({writable:!0})],M.prototype,"showError",void 0),W([s()],M.prototype,"host",void 0),W([l("connectedCallback")],M.prototype,"connectedCallback",null),W([l("disconnectedCallback")],M.prototype,"disconnectedCallback",null);var _=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const H=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.checkedController=new F,this.stateController=new G,this.showErrorController=new M,this.pageResizeObserverSlimmer=new j,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(H,k),this.showError=!1,this.currentBreakpoint=y(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return r(this.renderer.render(),this.host)}get host(){return a(this)}static get watchers(){return{size:["watchSize"]}}};_([p()],H.prototype,"globalSlimmers",void 0),_([d()],H.prototype,"renderer",void 0),_([d()],H.prototype,"checkedController",void 0),_([d()],H.prototype,"stateController",void 0),_([d()],H.prototype,"showErrorController",void 0),_([d()],H.prototype,"pageResizeObserverSlimmer",void 0),_([d()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([d()],H.prototype,"changeEventEmitter",void 0),H.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var P=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class $ extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([s()],$.prototype,"host",void 0),P([s()],$.prototype,"label",void 0),P([s()],$.prototype,"required",void 0),P([s()],$.prototype,"optional",void 0),P([s()],$.prototype,"hint",void 0),P([s()],$.prototype,"disabled",void 0);var q=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class U extends n{watchValue(){this.changeEventEmitter.emit(this.value),w.notify(R,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}q([s()],U.prototype,"host",void 0),q([s({writable:!0})],U.prototype,"value",void 0),q([s()],U.prototype,"changeEventEmitter",void 0),q([s()],U.prototype,"selectType",void 0),q([l("watchValue")],U.prototype,"watchValue",null);var K=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class B extends n{constructor(){super(...arguments),this.mutationObserver=new z({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:S("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){const e=this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value));O(this.value,e,!0)||this.valueController.setValue(e)}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}K([s()],B.prototype,"host",void 0),K([s()],B.prototype,"selectType",void 0),K([s()],B.prototype,"valueController",void 0),K([s()],B.prototype,"value",void 0),K([d()],B.prototype,"mutationObserver",void 0),K([l("disconnectedCallback")],B.prototype,"disconnectedCallback",null),K([l("componentWillLoad")],B.prototype,"componentWillLoad",null),K([l("componentDidLoad")],B.prototype,"componentDidLoad",null),K([l("watchSelectType")],B.prototype,"watchSelectType",null);var J=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Q=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new $,this.itemsController=new B,this.valueController=new U,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(Q,k),this.valueNotifySlimmer=E(Q,"value","watchValue"),this.disabledNotifySlimmer=E(Q,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=E(Q,"selectType","watchSelectType"),this.changeEventPrevent=new T([k],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.optional=!1,this.name="",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return r(e(t,null,this.renderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};J([p()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"renderer",void 0),J([d()],Q.prototype,"itemsController",void 0),J([d()],Q.prototype,"valueController",void 0),J([d()],Q.prototype,"formFieldController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J([d()],Q.prototype,"changeEventEmitter",void 0),J([d()],Q.prototype,"valueNotifySlimmer",void 0),J([d()],Q.prototype,"disabledNotifySlimmer",void 0),J([d()],Q.prototype,"selectTypeNotifySlimmer",void 0),J([d()],Q.prototype,"changeEventPrevent",void 0),Q.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){: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}';export{H as vega_selection_chip,Q as vega_selection_chip_group}
@@ -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-528748fa.js";import{I as l}from"./p-781fd6e0.js";import{c as a}from"./p-6a334573.js";import{P as c}from"./p-81dd00d0.js";import{A as u,P as d}from"./p-d4ea8e22.js";import{J as p,i as f,a9 as v}from"./p-8db904dc.js";import{R as m}from"./p-3dee1e55.js";import{t as g}from"./p-b75ee3ba.js";import{F as w}from"./p-87a4d75f.js";import{C as b}from"./p-2d0d575f.js";import{S as R}from"./p-cb378636.js";import{O as j}from"./p-331a62d5.js";import{d as E,D as y}from"./p-526e3634.js";import{C as A}from"./p-3a68b729.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 C{canRetrieve(){return!this.showConfig.isScreenPosition}}class S extends C{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 x extends C{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})],x.prototype,"showConfig",void 0);class P extends C{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 C{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 x,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),l=h||i[0],a=this.getSuitableAlignment(r,o,n,l,s),c=this.calculatePosition(o,n,l,a||s[0]),u=this.getTranslocationBox(l);return c.placement=h,c.alignment=a,c.left+=u.X,c.top+=u.Y,!this.showConfig.positionRelativeTo&&this.showConfig.isScreenPosition&&this.adjustPositionForViewport(c,o,n,l),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),l=!this.isRectEntirelyWithinViewport(s);return{shouldUpdate:r&&h&&l}}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 N=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 B{constructor(t,e){var i;this.resizeObserverSlimmer=a(B,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(),l.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(t=!1){(this.showConfig.isScreenPosition||t)&&this.adjustPosition(!0)}setClipHidden(t){this.showConfig&&(t?this.hideElementAppender(this.showConfig.appendableElement):this.showElementAppender(this.showConfig.appendableElement))}destroy(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),l.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=B.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=B.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=B.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,B.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;B.containerMap.has(this.container)||B.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){l.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}B.containerMap=new Map,N([e()],B.prototype,"resizeObserverSlimmer",void 0),N([e()],B.prototype,"elementAppenderContainerController",void 0),N([e()],B.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{}}}function J(t){var e;const i=null!==(e=t.assignedSlot)&&void 0!==e?e:null;if(i)return i;const s=t.parentElement;if(s)return s;const n=t.getRootNode();return n.host?n.host:null}class X{isEnabled(){return!0}evaluate(t){return{nextAction:function(t){const e=t.getBoundingClientRect(),i=window.innerWidth,s=window.innerHeight;if(e.bottom<=0||e.top>=s||e.right<=0||e.left>=i)return!0;let n=J(t);for(;n;){const t=getComputedStyle(n);if(/(auto|scroll)/.test(t.overflowX+" "+t.overflowY)){const t=n.getBoundingClientRect();if(e.bottom<=t.top||e.top>=t.bottom||e.right<=t.left||e.left>=t.right)return!0}n=J(n)}return!1}(t.target)?"clip-hide":"clip-show"}}}var Y=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(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new I(this),this.visibilityModifiers=[new X],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=t=>{var e;if(this.showConfig&&this.isShowing()){const i=!(t instanceof Event)||t.target!==g();null===(e=this.elementAppender)||void 0===e||e.onScroll(i),this.executeVisibilityModifiers({kind:"scroll",event:t})}},this.executeVisibilityModifiers=t=>{if(this.showConfig&&this.elementAppender)for(const e of this.visibilityModifiers){if(!e.isEnabled(this.showConfig))continue;const i=e.evaluate({target:this.showConfig.target,appendableElement:this.showConfig.appendableElement,showConfig:this.showConfig,currentState:{isVisible:this.isShowing()},event:t});"clip-hide"===i.nextAction?this.elementAppender.setClipHidden(!0):"clip-show"===i.nextAction&&this.elementAppender.setClipHidden(!1)}},this.createDelayHideTimer=(t,e)=>{const i=this.getTriggerStrategy();this.delayHideTimer=setTimeout((()=>{this.executeTriggerStrategy(i,t,e),clearTimeout(this.delayHideTimer)}),Z.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 B(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=[])}}Z.DELAY_HIDE_TIME=100,Y([e()],Z.prototype,"hierarchyTreeManager",void 0),Y([n("connectedCallback")],Z.prototype,"connectedCallback",null),Y([n("disconnectedCallback")],Z.prototype,"disconnectedCallback",null),Y([n("componentDidLoad")],Z.prototype,"componentDidLoad",null);export{Z 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-528748fa.js";import{I as l}from"./p-781fd6e0.js";import{c as a}from"./p-6a334573.js";import{P as c}from"./p-81dd00d0.js";import{A as u,P as d}from"./p-d4ea8e22.js";import{J as p,i as f,a9 as v}from"./p-456f678b.js";import{R as m}from"./p-1e0a8fd3.js";import{t as g}from"./p-b75ee3ba.js";import{F as w}from"./p-87a4d75f.js";import{C as b}from"./p-2d0d575f.js";import{S as R}from"./p-cb378636.js";import{O as j}from"./p-331a62d5.js";import{d as E,D as y}from"./p-526e3634.js";import{C as A}from"./p-4a2fe3a4.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 C{canRetrieve(){return!this.showConfig.isScreenPosition}}class S extends C{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 x extends C{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})],x.prototype,"showConfig",void 0);class P extends C{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 C{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 x,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),l=h||i[0],a=this.getSuitableAlignment(r,o,n,l,s),c=this.calculatePosition(o,n,l,a||s[0]),u=this.getTranslocationBox(l);return c.placement=h,c.alignment=a,c.left+=u.X,c.top+=u.Y,!this.showConfig.positionRelativeTo&&this.showConfig.isScreenPosition&&this.adjustPositionForViewport(c,o,n,l),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),l=!this.isRectEntirelyWithinViewport(s);return{shouldUpdate:r&&h&&l}}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 N=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 B{constructor(t,e){var i;this.resizeObserverSlimmer=a(B,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(),l.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(t=!1){(this.showConfig.isScreenPosition||t)&&this.adjustPosition(!0)}setClipHidden(t){this.showConfig&&(t?this.hideElementAppender(this.showConfig.appendableElement):this.showElementAppender(this.showConfig.appendableElement))}destroy(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),l.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=B.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=B.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=B.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,B.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;B.containerMap.has(this.container)||B.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative")}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){l.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}B.containerMap=new Map,N([e()],B.prototype,"resizeObserverSlimmer",void 0),N([e()],B.prototype,"elementAppenderContainerController",void 0),N([e()],B.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{}}}function J(t){var e;const i=null!==(e=t.assignedSlot)&&void 0!==e?e:null;if(i)return i;const s=t.parentElement;if(s)return s;const n=t.getRootNode();return n.host?n.host:null}class X{isEnabled(){return!0}evaluate(t){return{nextAction:function(t){const e=t.getBoundingClientRect(),i=window.innerWidth,s=window.innerHeight;if(e.bottom<=0||e.top>=s||e.right<=0||e.left>=i)return!0;let n=J(t);for(;n;){const t=getComputedStyle(n);if(/(auto|scroll)/.test(t.overflowX+" "+t.overflowY)){const t=n.getBoundingClientRect();if(e.bottom<=t.top||e.top>=t.bottom||e.right<=t.left||e.left>=t.right)return!0}n=J(n)}return!1}(t.target)?"clip-hide":"clip-show"}}}var Y=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(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.hierarchyTreeManager=new I(this),this.visibilityModifiers=[new X],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=t=>{var e;if(this.showConfig&&this.isShowing()){const i=!(t instanceof Event)||t.target!==g();null===(e=this.elementAppender)||void 0===e||e.onScroll(i),this.executeVisibilityModifiers({kind:"scroll",event:t})}},this.executeVisibilityModifiers=t=>{if(this.showConfig&&this.elementAppender)for(const e of this.visibilityModifiers){if(!e.isEnabled(this.showConfig))continue;const i=e.evaluate({target:this.showConfig.target,appendableElement:this.showConfig.appendableElement,showConfig:this.showConfig,currentState:{isVisible:this.isShowing()},event:t});"clip-hide"===i.nextAction?this.elementAppender.setClipHidden(!0):"clip-show"===i.nextAction&&this.elementAppender.setClipHidden(!1)}},this.createDelayHideTimer=(t,e)=>{const i=this.getTriggerStrategy();this.delayHideTimer=setTimeout((()=>{this.executeTriggerStrategy(i,t,e),clearTimeout(this.delayHideTimer)}),Z.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 B(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=[])}}Z.DELAY_HIDE_TIME=100,Y([e()],Z.prototype,"hierarchyTreeManager",void 0),Y([n("connectedCallback")],Z.prototype,"connectedCallback",null),Y([n("disconnectedCallback")],Z.prototype,"disconnectedCallback",null),Y([n("componentDidLoad")],Z.prototype,"componentDidLoad",null);export{Z as E}
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as t,H as a,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{C as o}from"./p-590fd123.js";import{C as s}from"./p-2d0d575f.js";import{C as h,g as c,F as l,h as d}from"./p-cb378636.js";import{O as p}from"./p-331a62d5.js";import{f as g,a as x}from"./p-528748fa.js";import{c as b,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-8ce9e214.js";import{F as w}from"./p-56db3323.js";import{c as y}from"./p-66647244.js";import{d as j,q as z}from"./p-5447a8e8.js";import{i as C}from"./p-4a2fe3a4.js";import{d as I}from"./p-526e3634.js";import{C as R}from"./p-2c737fc8.js";import{A as V}from"./p-bdb5180c.js";import{R as O}from"./p-8bc15ed0.js";import{C as E}from"./p-75b58efe.js";import{C as D}from"./p-014cd411.js";import{i as F}from"./p-d27ae9ff.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-874e5624.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-c41a2d4a.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-262ec334.js";var A=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};class G extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new p(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}A([b({writable:!0})],G.prototype,"showError",void 0),A([b()],G.prototype,"host",void 0),A([v("connectedCallback")],G.prototype,"connectedCallback",null),A([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var P=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const U=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new G,this.ariaAttributesValueMapper=new V((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","identifier"],defaultValue:"No label defined"}}),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(U,j),this.userChangeEventEmitter=y(U,z),this.dropdownEventPrevent=new R([j,z],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.labelClickPending=!1,this.isUserInteraction=!1,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="default",this.required=!1,this.name="",this.isValid=null,this.onCheckBoxChange=e=>{this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=e.currentTarget.checked,this.isUserInteraction=!1},this.onInputKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.isDisabled()||(this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=!this.checked,this.isUserInteraction=!1))},this.onLabelClick=e=>{e.target!==this.inputRef?(this.labelClickPending=!0,setTimeout((()=>{this.labelClickPending=!1}),0)):this.labelClickPending&&(e.stopPropagation(),this.labelClickPending=!1)},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchValueChange(e){this.checked=""!==this.identifier?e===this.identifier:!0===e}watchCheckedChange(){const e=this.isUserInteraction;this.isUserInteraction=!1,this.initValue(),this.changeEventEmitter.emit(this.value),e&&(this.userChangeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})),s.notify(c,{host:this.host,detail:this.value}),s.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){!this.checked&&(""!==this.identifier?this.value===this.identifier:!0===this.value||"true"===this.value)&&(this.checked=!0),this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentShouldUpdate(e,i,t){return"checked"!==t||e!==i}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden"),this.syncNativeIndeterminate()}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){var e;const i="VEGA-CHECKBOX-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return r(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i,checked:this.checked,indeterminate:this.indeterminate,disabled:this.isDisabled()}},t("label",{class:x(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e,onClick:this.onLabelClick},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,name:this.name,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined","aria-checked":this.indeterminate?"mixed":void 0,disabled:this.isDisabled(),tabIndex:0,onKeyDown:this.onInputKeyDown}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1,"aria-hidden":"true"},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.indeterminate?t("vega-icon",{icon:"minus-sign",size:"small"===this.size?"size-12":"size-16"}):this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}syncNativeIndeterminate(){this.inputRef&&(this.inputRef.indeterminate=this.indeterminate)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new p(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return n(this)}static get watchers(){return{value:["watchValueChange"],checked:["watchCheckedChange"]}}};P([k()],U.prototype,"globalSlimmers",void 0),P([m()],U.prototype,"vegaCheckboxShowErrorController",void 0),P([m()],U.prototype,"ariaAttributesValueMapper",void 0),P([m()],U.prototype,"formFieldController",void 0),P([m()],U.prototype,"changeEventEmitter",void 0),P([m()],U.prototype,"userChangeEventEmitter",void 0),P([m()],U.prototype,"dropdownEventPrevent",void 0),P([m()],U.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),U.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));display:inline-flex;align-items:center;justify-content:center}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var q=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const S=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new D(c,(e=>this.childCheckboxValueChange(e))),this.checkboxUserInteractionObserver=new D(h,(()=>{this.userInteractionPending=!0})),this.checkboxEventPrevent=new R([j,z],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(S,j),this.userChangeEventEmitter=y(S,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.userInteractionPending=!1,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.optional=!1,this.name="",this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(e,i){const t=this.userInteractionPending;this.userInteractionPending=!1,F(e,i,!0)||(this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),t&&this.userChangeEventEmitter.emit(this.value),s.notify(l,{host:this.host,detail:this.value}))}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}componentShouldUpdate(e,i,t){return!("value"===t&&Array.isArray(e)&&Array.isArray(i)&&F(e,i,!0))}render(){return r(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("vega-field-label",{label:this.label,isFieldRequired:this.required,optional:this.optional,disabled:this.disabled})}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return n(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};q([k()],S.prototype,"globalSlimmers",void 0),q([m()],S.prototype,"formFieldController",void 0),q([m()],S.prototype,"checkboxValueChangeObserver",void 0),q([m()],S.prototype,"checkboxUserInteractionObserver",void 0),q([m()],S.prototype,"checkboxEventPrevent",void 0),q([m()],S.prototype,"changeEventEmitter",void 0),q([m()],S.prototype,"userChangeEventEmitter",void 0),q([m()],S.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([E()],S.prototype,"watchVegaFlexProp",null),S.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}vega-field-label{margin-bottom:16px;display:block}vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}vega-field-label::part(label){word-break:normal}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{U as vega_checkbox,S as vega_checkbox_group}
@@ -0,0 +1 @@
1
+ import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-6b2342e0.js";import{R as s}from"./p-8bc15ed0.js";import{g as n,s as d}from"./p-519a7d55.js";import{a1 as p,a2 as l}from"./p-456f678b.js";import{c,M as h,V as f,I as m}from"./p-6e1ab235.js";import{V as b,I as v}from"./p-8ce9e214.js";import{F as g}from"./p-56db3323.js";import{C as x}from"./p-2c737fc8.js";import{c as u}from"./p-66647244.js";import{s as w,A as y,V as j,u as R,i as C,d as I,t as k}from"./p-5447a8e8.js";import{F as A}from"./p-cb378636.js";import{C as D}from"./p-2d0d575f.js";import{c as E}from"./p-3a620268.js";import{D as S}from"./p-526e3634.js";import{m as O}from"./p-4a2fe3a4.js";import{h as z,l as V}from"./p-f0e828d8.js";import{f as L}from"./p-781b7a54.js";import{K as H}from"./p-d609c3fd.js";import{f as P}from"./p-528748fa.js";import{M as T}from"./p-78a57a17.js";import{T as F}from"./p-52b8f2d2.js";import{P as M}from"./p-81dd00d0.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-874e5624.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-71909102.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-c41a2d4a.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-b75ee3ba.js";import"./p-1e0a8fd3.js";import"./p-49a2e141.js";import"./p-0c667d6a.js";import"./p-dcd3e3a7.js";import"./p-6c95a6a3.js";const _=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var K=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class N extends f{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,R,(async e=>{await this.onItemClick(),this.selectAllClickEventEmit.emit(e.detail)})),S.addUniqueObserverToNode(e,O,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){const i=L(this.containerMaxHeight,"widthAndHeight");return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},i?e("div",{class:"vega-combo-box-container-content",style:i?{maxHeight:i}:void 0},this.renderSelectedContainer(),this.renderInputContainer()):e(t,null,this.renderSelectedContainer(),this.renderInputContainer()))}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:z.sanitize(t.label,V),variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,C,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:E(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}K([c()],N.prototype,"host",void 0),K([c()],N.prototype,"value",void 0),K([c()],N.prototype,"source",void 0),K([c()],N.prototype,"disabled",void 0),K([c()],N.prototype,"size",void 0),K([c()],N.prototype,"containerMaxHeight",void 0),K([c()],N.prototype,"vegaDropdownProps",void 0),K([c()],N.prototype,"label",void 0),K([c()],N.prototype,"placeholder",void 0),K([c()],N.prototype,"useDefaultFilter",void 0),K([c()],N.prototype,"createEventEmit",void 0),K([c()],N.prototype,"searchEventEmit",void 0),K([c()],N.prototype,"selectAllClickEventEmit",void 0),K([c()],N.prototype,"valueController",void 0),K([c()],N.prototype,"sourceController",void 0),K([h("connectedCallback")],N.prototype,"connectedCallback",null);class G extends f{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([c({writable:!0})],G.prototype,"value",void 0);var U=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class q extends f{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}U([c()],q.prototype,"required",void 0),U([c()],q.prototype,"optional",void 0),U([c()],q.prototype,"hint",void 0),U([c()],q.prototype,"disabled",void 0),U([c()],q.prototype,"dropdownRenderer",void 0),U([c()],q.prototype,"label",void 0);var B=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class W extends H{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=n();if(t&&t.classList.contains("vega-chip-close-icon")){const i=P(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}B([c()],W.prototype,"host",void 0),B([c()],W.prototype,"value",void 0),B([c()],W.prototype,"dropdownRenderer",void 0),B([c()],W.prototype,"valueController",void 0);var $=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class J extends f{constructor(){super(...arguments),this.mutationObserver=new T({mutationFilter:F("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}$([m()],J.prototype,"mutationObserver",void 0),$([c()],J.prototype,"host",void 0),$([c()],J.prototype,"dropdownRenderer",void 0),$([h("componentDidLoad")],J.prototype,"componentDidLoad",null);class Q extends f{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([c({writable:!0})],Q.prototype,"source",void 0);var X=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Y=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.vegaDropdownSelectAllClick=a(this,"vegaDropdownSelectAllClick",7),this.dropdownSelectAllClick=a(this,"dropdownSelectAllClick",7),this.globalSlimmers={},this.itemsSlotController=new J,this.keyboardController=new W,this.valueController=new G,this.sourceController=new Q,this.renderer=new q,this.dropdownRenderer=new N,this.pageResizeSlimmer=new M,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(Y,I),this.createEventEmit=u(Y,w),this.searchEventEmit=u(Y,k),this.selectAllClickEventEmit=u(Y,R),this.dropdownEventPrevent=new x([w,k],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.dropdownEventPreventSelectAllClick=new x([R],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(_),this.label="",this.required=!1,this.optional=!1,this.name="",this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,l)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),D.notify(A,{host:this.host,detail:this.value})}watchValidationRules(){}watchContainerMaxHeight(){}watchVegaDropdownProps(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],containerMaxHeight:["watchContainerMaxHeight"],vegaDropdownProps:["watchVegaDropdownProps"]}}};X([v()],Y.prototype,"globalSlimmers",void 0),X([m()],Y.prototype,"itemsSlotController",void 0),X([m()],Y.prototype,"keyboardController",void 0),X([m()],Y.prototype,"valueController",void 0),X([m()],Y.prototype,"sourceController",void 0),X([m()],Y.prototype,"renderer",void 0),X([m()],Y.prototype,"dropdownRenderer",void 0),X([m()],Y.prototype,"pageResizeSlimmer",void 0),X([m()],Y.prototype,"formFieldController",void 0),X([m()],Y.prototype,"changeEventEmit",void 0),X([m()],Y.prototype,"createEventEmit",void 0),X([m()],Y.prototype,"searchEventEmit",void 0),X([m()],Y.prototype,"selectAllClickEventEmit",void 0),X([m()],Y.prototype,"dropdownEventPrevent",void 0),X([m()],Y.prototype,"dropdownEventPreventSelectAllClick",void 0),X([m()],Y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Y.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container-content{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;min-height:26px}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-combo-box-hint{padding-left:8px;padding-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{Y as vega_combo_box}
@@ -1 +1 @@
1
- import{h as e,r as t,c as r,H as i,g as s}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as a,M as n,V as l,I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-8ce9e214.js";import{c as d}from"./p-66647244.js";import{d as u,a as f}from"./p-5447a8e8.js";import{D as v}from"./p-526e3634.js";import{K as m}from"./p-f1974321.js";import{T as b}from"./p-6cde45fc.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-75e33859.js";import"./p-8db904dc.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0d18368b.js";import"./p-cb378636.js";var g=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class _ extends l{constructor(){super(...arguments),this.gridRef=null,this.selectRef=null,this.preventLostFocus=e=>{e.preventDefault()},this.handleCellMouseEnter=e=>{var t;const r=Number(e.currentTarget.dataset.index);this.hoveredItem=null!==(t=this.getActiveCharacters()[r])&&void 0!==t?t:null},this.handleCellMouseLeave=()=>{this.hoveredItem=null},this.handleCellFocus=e=>{const t=Number(e.currentTarget.dataset.index);Number.isFinite(t)&&(this.focusedCellIndex=t)},this.handleCellClick=e=>{const t=Number(e.currentTarget.dataset.index),r=this.getActiveCharacters()[t];r&&(this.focusedCellIndex=t,this.clickEventEmitter.emit(r.character))}}resetPanel(){this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.focusSelect()}getGridRef(){return this.gridRef}getCellCount(){return this.getActiveCharacters().length}getActiveCellIndex(){var e;return null!==(e=this.focusedCellIndex)&&void 0!==e?e:0}focusCellByIndex(e){if(this.focusedCellIndex=e,this.gridRef){const t=this.gridRef.querySelector(`[data-index="${e}"]`);t&&t.focus()}}render(){return e("div",{class:"panel",role:"presentation",onMouseDown:this.preventLostFocus},this.renderHeader(),e("vega-divider",{direction:"horizontal"}),e("div",{class:"panel__body"},this.renderCategorySelect(),this.renderCharacterGrid()),e("vega-divider",{direction:"horizontal"}),this.renderFooter())}focusSelect(){if(this.selectRef&&this.selectRef.shadowRoot){const e=this.selectRef.shadowRoot.querySelector('[tabindex="0"], button');e&&e.focus()}}renderHeader(){return e("div",{class:"panel__header"},e("vega-font",null,this.translationSlimmer.t("Special Characters")))}renderCategorySelect(){const t={id:"__all__",displayName:this.translationSlimmer.t("All")};return e("vega-input-select",{class:"panel__select",size:"small",source:[t,...this.categories.map((e=>({id:e.key,displayName:this.translationSlimmer.t(e.label)})))],value:this.activeCategoryKey,ref:e=>{e&&(this.selectRef=e,v.addUniqueObserverToNode(e,u,(e=>{this.activeCategoryKey=e.detail,this.hoveredItem=null,this.focusedCellIndex=null})))}})}renderCharacterGrid(){var t;const r=this.getActiveCharacters(),i=null!==(t=this.focusedCellIndex)&&void 0!==t?t:0;return e("div",{class:"panel__grid",role:"grid","aria-label":this.translationSlimmer.t("Special Characters"),style:{"--vega-special-characters-grid-columns":String(10)},ref:e=>{this.gridRef=e}},r.map(((t,r)=>{const s=r===i,o=this.translationSlimmer.t(t.title);return e("button",{key:t.character,class:"panel__cell",role:"gridcell","aria-label":o,title:o,"data-index":r,tabindex:s?0:-1,onMouseEnter:this.handleCellMouseEnter,onMouseLeave:this.handleCellMouseLeave,onFocus:this.handleCellFocus,onClick:this.handleCellClick},t.character)})))}renderFooter(){var t;const r=null!==this.focusedCellIndex?this.getActiveCharacters()[this.focusedCellIndex]:null,i=null!==(t=this.hoveredItem)&&void 0!==t?t:r,s=i?this.getCodePoint(i.character):"",o=i?this.translationSlimmer.t(i.title):"";return e("div",{class:"panel__footer"},e("vega-font",{class:"panel__footer-name",variant:"font-footnote1-long",color:"text-secondary"},o),e("vega-font",{class:"panel__footer-code",variant:"font-footnote1-long",color:"text-secondary"},s))}getCodePoint(e){const t=e.codePointAt(0);return void 0===t?"":`U+${t.toString(16).toUpperCase().padStart(4,"0")}`}getActiveCharacters(){if("__all__"===this.activeCategoryKey)return this.categories.flatMap((e=>e.characters));const e=this.categories.find((e=>e.key===this.activeCategoryKey));return e?e.characters:[]}}g([a()],_.prototype,"categories",void 0),g([a()],_.prototype,"clickEventEmitter",void 0),g([a()],_.prototype,"translationSlimmer",void 0),g([a({writable:!0})],_.prototype,"activeCategoryKey",void 0),g([a({writable:!0})],_.prototype,"hoveredItem",void 0),g([a({writable:!0})],_.prototype,"focusedCellIndex",void 0),g([n("resetPanel")],_.prototype,"resetPanel",null);class x extends m{constructor(){super((()=>[{keyCode:["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eventName:"keydown",activeElementInScope:()=>[this.renderer.getGridRef()],preventDefault:!0,callback:e=>{this.handleNavigation(e)}}]))}handleNavigation(e){const t=this.renderer,r=t.getCellCount();if(0===r)return;const i=Math.min(Math.max(t.getActiveCellIndex(),0),r-1),s=Math.floor(i/10),o=i%10,a=Math.floor((r-1)/10),n=e=>e===a?(r-1)%10:9;let l=i;switch(e.code){case"ArrowLeft":o>0&&(l=i-1);break;case"ArrowRight":o<n(s)&&(l=i+1);break;case"ArrowUp":s>0&&(l=i-10);break;case"ArrowDown":if(s<a){const e=i+10;l=e<r?e:10*a+n(a)}}l!==i&&t.focusCellByIndex(l)}}!function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);o>3&&a&&Object.defineProperty(t,r,a)}([a()],x.prototype,"renderer",void 0);var j=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};const y=class{constructor(e){t(this,e),this.vegaClick=r(this,"vegaClick",7),this.click=r(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.translationSlimmer=new b,this.clickEventEmitter=d(y,f),this.renderer=new _,this.keyboardController=new x,this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.categories=[]}async resetPanel(){}render(){return o(e(i,null,this.renderer.render()),this.host)}get host(){return s(this)}};j([h()],y.prototype,"globalSlimmers",void 0),j([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j([c()],y.prototype,"translationSlimmer",void 0),j([c()],y.prototype,"clickEventEmitter",void 0),j([c()],y.prototype,"renderer",void 0),j([c()],y.prototype,"keyboardController",void 0),y.style=':host .panel{box-sizing:border-box;width:320px}:host .panel__header{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px}:host .panel__body{padding-top:12px;padding-bottom:12px}:host .panel__select{margin-bottom:8px}:host .panel__grid{display:grid;gap:2px;overflow-y:auto;grid-template-columns:repeat(var(--vega-special-characters-grid-columns), 1fr);max-height:240px}:host .panel__cell{display:flex;align-items:center;justify-content:center;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:4px;cursor:pointer;border:none;width:28px;height:28px;background:transparent;font-family:"Inter";font-size:16px;line-height:1}:host .panel__cell:hover{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .panel__cell:active{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host .panel__cell:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:-2px}:host .panel__footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;min-height:20px}:host .panel__footer-name{text-transform:uppercase}';export{y as vega_rich_text_special_characters_panel}
1
+ import{h as e,r as t,c as r,H as i,g as s}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as a,M as n,V as l,I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-8ce9e214.js";import{c as d}from"./p-66647244.js";import{d as u,a as f}from"./p-5447a8e8.js";import{D as v}from"./p-526e3634.js";import{K as m}from"./p-d609c3fd.js";import{T as b}from"./p-cd69aeae.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-6c95a6a3.js";import"./p-456f678b.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-874e5624.js";import"./p-cb378636.js";var g=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class _ extends l{constructor(){super(...arguments),this.gridRef=null,this.selectRef=null,this.preventLostFocus=e=>{e.preventDefault()},this.handleCellMouseEnter=e=>{var t;const r=Number(e.currentTarget.dataset.index);this.hoveredItem=null!==(t=this.getActiveCharacters()[r])&&void 0!==t?t:null},this.handleCellMouseLeave=()=>{this.hoveredItem=null},this.handleCellFocus=e=>{const t=Number(e.currentTarget.dataset.index);Number.isFinite(t)&&(this.focusedCellIndex=t)},this.handleCellClick=e=>{const t=Number(e.currentTarget.dataset.index),r=this.getActiveCharacters()[t];r&&(this.focusedCellIndex=t,this.clickEventEmitter.emit(r.character))}}resetPanel(){this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.focusSelect()}getGridRef(){return this.gridRef}getCellCount(){return this.getActiveCharacters().length}getActiveCellIndex(){var e;return null!==(e=this.focusedCellIndex)&&void 0!==e?e:0}focusCellByIndex(e){if(this.focusedCellIndex=e,this.gridRef){const t=this.gridRef.querySelector(`[data-index="${e}"]`);t&&t.focus()}}render(){return e("div",{class:"panel",role:"presentation",onMouseDown:this.preventLostFocus},this.renderHeader(),e("vega-divider",{direction:"horizontal"}),e("div",{class:"panel__body"},this.renderCategorySelect(),this.renderCharacterGrid()),e("vega-divider",{direction:"horizontal"}),this.renderFooter())}focusSelect(){if(this.selectRef&&this.selectRef.shadowRoot){const e=this.selectRef.shadowRoot.querySelector('[tabindex="0"], button');e&&e.focus()}}renderHeader(){return e("div",{class:"panel__header"},e("vega-font",null,this.translationSlimmer.t("Special Characters")))}renderCategorySelect(){const t={id:"__all__",displayName:this.translationSlimmer.t("All")};return e("vega-input-select",{class:"panel__select",size:"small",source:[t,...this.categories.map((e=>({id:e.key,displayName:this.translationSlimmer.t(e.label)})))],value:this.activeCategoryKey,ref:e=>{e&&(this.selectRef=e,v.addUniqueObserverToNode(e,u,(e=>{this.activeCategoryKey=e.detail,this.hoveredItem=null,this.focusedCellIndex=null})))}})}renderCharacterGrid(){var t;const r=this.getActiveCharacters(),i=null!==(t=this.focusedCellIndex)&&void 0!==t?t:0;return e("div",{class:"panel__grid",role:"grid","aria-label":this.translationSlimmer.t("Special Characters"),style:{"--vega-special-characters-grid-columns":String(10)},ref:e=>{this.gridRef=e}},r.map(((t,r)=>{const s=r===i,o=this.translationSlimmer.t(t.title);return e("button",{key:t.character,class:"panel__cell",role:"gridcell","aria-label":o,title:o,"data-index":r,tabindex:s?0:-1,onMouseEnter:this.handleCellMouseEnter,onMouseLeave:this.handleCellMouseLeave,onFocus:this.handleCellFocus,onClick:this.handleCellClick},t.character)})))}renderFooter(){var t;const r=null!==this.focusedCellIndex?this.getActiveCharacters()[this.focusedCellIndex]:null,i=null!==(t=this.hoveredItem)&&void 0!==t?t:r,s=i?this.getCodePoint(i.character):"",o=i?this.translationSlimmer.t(i.title):"";return e("div",{class:"panel__footer"},e("vega-font",{class:"panel__footer-name",variant:"font-footnote1-long",color:"text-secondary"},o),e("vega-font",{class:"panel__footer-code",variant:"font-footnote1-long",color:"text-secondary"},s))}getCodePoint(e){const t=e.codePointAt(0);return void 0===t?"":`U+${t.toString(16).toUpperCase().padStart(4,"0")}`}getActiveCharacters(){if("__all__"===this.activeCategoryKey)return this.categories.flatMap((e=>e.characters));const e=this.categories.find((e=>e.key===this.activeCategoryKey));return e?e.characters:[]}}g([a()],_.prototype,"categories",void 0),g([a()],_.prototype,"clickEventEmitter",void 0),g([a()],_.prototype,"translationSlimmer",void 0),g([a({writable:!0})],_.prototype,"activeCategoryKey",void 0),g([a({writable:!0})],_.prototype,"hoveredItem",void 0),g([a({writable:!0})],_.prototype,"focusedCellIndex",void 0),g([n("resetPanel")],_.prototype,"resetPanel",null);class x extends m{constructor(){super((()=>[{keyCode:["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eventName:"keydown",activeElementInScope:()=>[this.renderer.getGridRef()],preventDefault:!0,callback:e=>{this.handleNavigation(e)}}]))}handleNavigation(e){const t=this.renderer,r=t.getCellCount();if(0===r)return;const i=Math.min(Math.max(t.getActiveCellIndex(),0),r-1),s=Math.floor(i/10),o=i%10,a=Math.floor((r-1)/10),n=e=>e===a?(r-1)%10:9;let l=i;switch(e.code){case"ArrowLeft":o>0&&(l=i-1);break;case"ArrowRight":o<n(s)&&(l=i+1);break;case"ArrowUp":s>0&&(l=i-10);break;case"ArrowDown":if(s<a){const e=i+10;l=e<r?e:10*a+n(a)}}l!==i&&t.focusCellByIndex(l)}}!function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);o>3&&a&&Object.defineProperty(t,r,a)}([a()],x.prototype,"renderer",void 0);var j=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};const y=class{constructor(e){t(this,e),this.vegaClick=r(this,"vegaClick",7),this.click=r(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.translationSlimmer=new b,this.clickEventEmitter=d(y,f),this.renderer=new _,this.keyboardController=new x,this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.categories=[]}async resetPanel(){}render(){return o(e(i,null,this.renderer.render()),this.host)}get host(){return s(this)}};j([h()],y.prototype,"globalSlimmers",void 0),j([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j([c()],y.prototype,"translationSlimmer",void 0),j([c()],y.prototype,"clickEventEmitter",void 0),j([c()],y.prototype,"renderer",void 0),j([c()],y.prototype,"keyboardController",void 0),y.style=':host .panel{box-sizing:border-box;width:320px}:host .panel__header{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px}:host .panel__body{padding-top:12px;padding-bottom:12px}:host .panel__select{margin-bottom:8px}:host .panel__grid{display:grid;gap:2px;overflow-y:auto;grid-template-columns:repeat(var(--vega-special-characters-grid-columns), 1fr);max-height:240px}:host .panel__cell{display:flex;align-items:center;justify-content:center;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:4px;cursor:pointer;border:none;width:28px;height:28px;background:transparent;font-family:"Inter";font-size:16px;line-height:1}:host .panel__cell:hover{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .panel__cell:active{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host .panel__cell:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:-2px}:host .panel__footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;min-height:20px}:host .panel__footer-name{text-transform:uppercase}';export{y as vega_rich_text_special_characters_panel}
@@ -1 +1 @@
1
- import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-e62d41ee.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-8db904dc.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-55e0014a.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
1
+ import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-571ec00b.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-456f678b.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-0eb29065.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as s,a as p}from"./p-f0ff4463.js";import{s as o}from"./p-519a7d55.js";import{c as n,n as h}from"./p-262ec334.js";import{I as l}from"./p-6e1ab235.js";import{V as d,I as m}from"./p-8ce9e214.js";import{F as c}from"./p-56db3323.js";import{C as u}from"./p-2c737fc8.js";import{D as f}from"./p-526e3634.js";import{d as g,M as b,a as v}from"./p-5447a8e8.js";import{F as x}from"./p-cb378636.js";import{C as y}from"./p-2d0d575f.js";import{c as j}from"./p-66647244.js";import{a as w}from"./p-528748fa.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-4a2fe3a4.js";import"./p-874e5624.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-c41a2d4a.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";const I=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!1===t.autoValidation},{payloadKey:"BUTTON_VARIANT_IS_PRIMARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"primary"===t.buttonVariant},{payloadKey:"BUTTON_VARIANT_IS_SECONDARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"secondary"===t.buttonVariant}];var A=function(t,e,i,a){var r,s=arguments.length,p=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(p=(s<3?r(p):s>3?r(e,i,p):r(e,i))||p);return s>3&&p&&Object.defineProperty(e,i,p),p};const V=class{constructor(i){t(this,i),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.formFieldController=new c({propertyRules:[{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new p({maxValue:t}):null}],defaultValue:0,attributeGetter:t=>this[t],touchableAreaGetter:()=>this.touchableAreaGetter(),inputContainerGetter:()=>this.stepperContainerRef}),this.changeEventEmitter=j(V,g),this.inputEventPrevent=new u([b,g],(()=>this.stepperContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(I),this.max=9999,this.min=0,this.value=0,this.label="",this.inputDisabled=null,this.disabled=!1,this.isValid=null,this.autoValidation=!0,this.name="",this.buttonVariant="primary",this.onDecrease=()=>{this.value>this.max?this.value=this.max:this.value>this.min&&(this.value-=1)},this.onIncrease=()=>{this.value<this.max&&(this.value+=1)},this.onChildInputChange=t=>{""!==t.detail&&(this.value=n(t.detail))},this.handleInputBlur=t=>{""===t.host.value&&(this.value=this.min)},this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValue(){const t=h(n(this.value,0),this.min,this.max);this.value=t,this.inputRef.value=t.toString(),this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}render(){return o(i(a,{class:w(["vega-flex-shrink-0",this.inputDisabled||this.disabled?"disabled":""])},this.renderLabelDom(),i("div",{class:{"vega-stepper-container":!0,"vega-stepper-container-edited":this.inputDisabled},ref:t=>this.stepperContainerRef=t},i("vega-button-circle",{label:"Decrease",showTooltip:!1,icon:"minus-sign",ref:t=>{f.addUniqueObserverToNode(t,v,(()=>this.onDecrease()))},disabled:this.value<=this.min||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"}),i("vega-input",{size:"small",type:"number",max:this.max,min:this.min,value:`${this.value}`,disabled:this.inputDisabled||this.disabled,name:this.name,showClearIcon:!1,ref:t=>(f.addUniqueObserverToNode(t,b,(t=>this.handleInputBlur(t))),f.addUniqueObserverToNode(t,g,(t=>this.onChildInputChange(t))),this.inputRef=t),"data-aria-label":this.label||"stepper"}),i("vega-button-circle",{label:"Increase",showTooltip:!1,ref:t=>{f.addUniqueObserverToNode(t,v,(()=>this.onIncrease()))},icon:"plus-sign",disabled:this.value>=this.max||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"})),i("div",{class:"aria-announcement","aria-live":"polite","aria-atomic":"true"},`${this.label||"stepper"}: ${this.value}`)),this.host)}renderLabelDom(){return this.label?i("label",{class:"v-text-center v-text-medium-typeset-1",htmlFor:this.stepperId},this.label):null}get host(){return r(this)}static get watchers(){return{value:["watchValue"]}}};A([m()],V.prototype,"globalSlimmers",void 0),A([l()],V.prototype,"formFieldController",void 0),A([l()],V.prototype,"changeEventEmitter",void 0),A([l()],V.prototype,"inputEventPrevent",void 0),A([l()],V.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),V.style=':host{display:inline-block;line-height:normal}:host>label{display:block;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){:host>label{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){:host>label{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){:host>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host>div{display:inline-flex;justify-content:center;align-items:center}:host>label+div{margin-top:8px}:host div.vega-stepper-container-edited vega-input::part(container-wrapper){padding-left:0px;padding-right:0px}:host(.disabled) vega-input::part(input-container){text-align:center;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));padding:0px;border:0;box-shadow:unset}:host(.disabled) vega-input::part(input-container):hover{border:0}:host(.disabled) vega-input::part(input){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:0}:host vega-input::part(input){width:48px;text-align:center;-moz-appearance:textfield}:host vega-input::part(input)::-webkit-inner-spin-button{-webkit-appearance:none}:host vega-input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none}:host vega-input::part(error){display:none}:host vega-input::part(container-wrapper){padding-left:8px;padding-right:8px}:host .vega-error{display:none}:host .vega-stepper-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-stepper-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-stepper-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.aria-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}';export{V as vega_stepper}