@heartlandone/vega 2.102.0 → 2.103.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 (387) hide show
  1. package/dist/cjs/{app-globals-49c2a999.js → app-globals-85986306.js} +10 -10
  2. package/dist/cjs/{code-block-06e6591f.js → code-block-72de6c4d.js} +80 -1
  3. package/dist/cjs/{component-value-history-controller-slimmer.abstract-f29908f8.js → component-value-history-controller-slimmer.abstract-23d2b3d8.js} +3 -3
  4. package/dist/cjs/{content-state-8c862e5e.js → content-state-ff40bdc6.js} +38 -5
  5. package/dist/cjs/{date-required-rule-b672c432.js → date-required-rule-608e704b.js} +1 -1
  6. package/dist/cjs/{design-token-351ffd2c.js → design-token-a101a8d0.js} +3 -3
  7. package/dist/cjs/{element-appender-slimmer-f932b166.js → element-appender-slimmer-b93cc564.js} +2 -2
  8. package/dist/cjs/{form-field-controller-slimmer-5adb86ae.js → form-field-controller-slimmer-124d54ea.js} +1 -1
  9. package/dist/cjs/{image-annotation-action-25907d6b.js → image-annotation-action-1ee41bc7.js} +2 -2
  10. package/dist/cjs/{image-extension-1cf84f27.js → image-extension-6a92c524.js} +247 -5
  11. package/dist/cjs/index.cjs.js +17 -17
  12. package/dist/cjs/{inject-keyboard-manager-84d33920.js → inject-keyboard-manager-32d7dd0e.js} +1 -1
  13. package/dist/cjs/{internal-calendar-period-factory-3c5236be.js → internal-calendar-period-factory-c3198ea7.js} +1 -1
  14. package/dist/cjs/{internal-translation-controller-eae8a8de.js → internal-translation-controller-0d67ca4d.js} +1 -0
  15. package/dist/cjs/{keyboard-manager-baa83a61.js → keyboard-manager-332eec89.js} +1 -1
  16. package/dist/cjs/{keyboard-manager-slimmer-d1974b28.js → keyboard-manager-slimmer-a2872981.js} +1 -1
  17. package/dist/cjs/{link-extension-2a6133b7.js → link-extension-1b4ed437.js} +3 -3
  18. package/dist/cjs/loader.cjs.js +12 -12
  19. package/dist/cjs/{month-view-generator-a6827548.js → month-view-generator-b6a2b8be.js} +1 -1
  20. package/dist/cjs/{public-rules-7f26e0ae.js → public-rules-2066613c.js} +7 -7
  21. package/dist/cjs/{range-518b95a2.js → range-712fe703.js} +1 -1
  22. package/dist/cjs/{responsive-format-facade-95c54444.js → responsive-format-facade-44d33457.js} +1 -1
  23. package/dist/cjs/{rich-text-editor-required-rule-5d0c76ec.js → rich-text-editor-required-rule-1aa75d22.js} +1 -1
  24. package/dist/cjs/{split-cell-operation-28f6f8d9.js → split-cell-operation-afc82323.js} +3 -3
  25. package/dist/cjs/{state-border-formatter-6c284859.js → state-border-formatter-49984fd6.js} +1 -1
  26. package/dist/cjs/{string-format-strategy.abstract-f15b6196.js → string-format-strategy.abstract-bd563c01.js} +1 -1
  27. package/dist/cjs/{string-input-formatter-slimmer-5a3f1b55.js → string-input-formatter-slimmer-4faebac9.js} +1 -1
  28. package/dist/cjs/{string-mask-strategy-af6f3ba0.js → string-mask-strategy-624c4398.js} +2 -2
  29. package/dist/cjs/{style-formatter-324211fd.js → style-formatter-151d89a3.js} +2 -2
  30. package/dist/cjs/{time-required-rule-9e714442.js → time-required-rule-8cd8f9b9.js} +1 -1
  31. package/dist/cjs/{token-extension-86723cad.js → token-extension-72d0cb08.js} +1011 -767
  32. package/dist/cjs/{translation-slimmer-0227ee24.js → translation-slimmer-1771d01f.js} +1 -1
  33. package/dist/cjs/{type-guard-29e01bd4.js → type-guard-cce6fe1f.js} +1 -1
  34. package/dist/cjs/{valid-credit-card-number-rule-4ec364af.js → valid-credit-card-number-rule-b13c2fc4.js} +1 -1
  35. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  36. package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
  37. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  38. package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
  39. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
  41. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  42. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  43. package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
  44. package/dist/cjs/vega-chip.cjs.entry.js +5 -5
  45. package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
  46. package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
  47. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
  48. package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
  49. package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
  50. package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
  51. package/dist/cjs/vega-dialog_2.cjs.entry.js +3 -3
  52. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  53. package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
  54. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  55. package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
  56. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  57. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  58. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  59. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  60. package/dist/cjs/vega-form.cjs.entry.js +2 -2
  61. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  62. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  63. package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
  64. package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
  65. package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -14
  66. package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
  67. package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
  68. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  69. package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
  70. package/dist/cjs/vega-input.cjs.entry.js +31 -27
  71. package/dist/cjs/vega-left-nav_5.cjs.entry.js +7 -7
  72. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  73. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  74. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  75. package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
  76. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
  77. package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
  78. package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +2 -2
  79. package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
  80. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +474 -207
  81. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
  82. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  83. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
  84. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
  85. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
  86. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  87. package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
  88. package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
  89. package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
  90. package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
  91. package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
  92. package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
  93. package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
  94. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  95. package/dist/cjs/vega.cjs.js +12 -12
  96. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-state-controller.js +0 -14
  97. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.js +11 -2
  98. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +11 -1
  99. package/dist/collection/components/vega-input/vega-input.js +52 -8
  100. package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +7 -1
  101. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +0 -8
  102. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +4 -0
  103. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.js +31 -0
  104. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
  105. package/dist/collection/components/vega-rich-text-editor/dto/actions/sequential-composition-action.js +14 -0
  106. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +4 -1
  107. package/dist/collection/components/vega-rich-text-editor/dto/flush-changes-payload.js +1 -0
  108. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +3 -2
  109. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +30 -0
  110. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +1 -0
  111. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.js +107 -0
  112. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.js +91 -0
  113. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.js +47 -0
  114. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.js +54 -0
  115. package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.js +17 -0
  116. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +3 -1
  117. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +41 -354
  118. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.js +36 -0
  119. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.js +23 -0
  120. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.js +30 -0
  121. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +34 -0
  122. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +19 -0
  123. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.js +74 -0
  124. package/dist/collection/components/vega-rich-text-editor/extensions/paste/type.js +1 -0
  125. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +67 -0
  126. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +67 -11
  127. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +4 -17
  128. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +34 -1
  129. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +13 -32
  130. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +60 -25
  131. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +55 -19
  132. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +165 -59
  133. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +55 -21
  134. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +2 -16
  135. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +11 -1
  136. package/dist/collection/components/vega-rich-text-editor/utils/html-to-plain-text-utils.js +240 -0
  137. package/dist/collection/helpers/translation/locales/en.js +1 -0
  138. package/dist/esm/{app-globals-da5c83c2.js → app-globals-8cdfc5c9.js} +10 -10
  139. package/dist/esm/{code-block-d8f83d85.js → code-block-9360c331.js} +74 -2
  140. package/dist/esm/{component-value-history-controller-slimmer.abstract-642e7147.js → component-value-history-controller-slimmer.abstract-9ea58806.js} +3 -3
  141. package/dist/esm/{content-state-486eae1d.js → content-state-67a12e74.js} +38 -5
  142. package/dist/esm/{date-required-rule-08695d25.js → date-required-rule-66b5bf02.js} +1 -1
  143. package/dist/esm/{design-token-df3331d9.js → design-token-acd1efeb.js} +3 -3
  144. package/dist/esm/{element-appender-slimmer-f02a227f.js → element-appender-slimmer-7e5bc1e9.js} +2 -2
  145. package/dist/esm/{form-field-controller-slimmer-a7c0a0f8.js → form-field-controller-slimmer-d653c494.js} +1 -1
  146. package/dist/esm/{image-annotation-action-df744ba5.js → image-annotation-action-9525be48.js} +2 -2
  147. package/dist/esm/{image-extension-20b39140.js → image-extension-aea75132.js} +246 -6
  148. package/dist/esm/index.js +17 -17
  149. package/dist/esm/{inject-keyboard-manager-399ed867.js → inject-keyboard-manager-f6522d2f.js} +1 -1
  150. package/dist/esm/{internal-calendar-period-factory-7b866c3b.js → internal-calendar-period-factory-261df2f2.js} +1 -1
  151. package/dist/esm/{internal-translation-controller-4a7ee4d5.js → internal-translation-controller-3637e47e.js} +1 -0
  152. package/dist/esm/{keyboard-manager-f5d13a34.js → keyboard-manager-53e8d8d0.js} +1 -1
  153. package/dist/esm/{keyboard-manager-slimmer-f40dcb54.js → keyboard-manager-slimmer-b3de042d.js} +1 -1
  154. package/dist/esm/{link-extension-3f93d70d.js → link-extension-57ba9520.js} +3 -3
  155. package/dist/esm/loader.js +12 -12
  156. package/dist/esm/{month-view-generator-0c665987.js → month-view-generator-15215a09.js} +1 -1
  157. package/dist/esm/{public-rules-470a1dac.js → public-rules-c77a1550.js} +7 -7
  158. package/dist/esm/{range-8e89fb54.js → range-3c74e1c8.js} +1 -1
  159. package/dist/esm/{responsive-format-facade-55131a33.js → responsive-format-facade-1b325d06.js} +1 -1
  160. package/dist/esm/{rich-text-editor-required-rule-06caf383.js → rich-text-editor-required-rule-cfd32ba2.js} +1 -1
  161. package/dist/esm/{split-cell-operation-e158366a.js → split-cell-operation-85a036f9.js} +3 -3
  162. package/dist/esm/{state-border-formatter-2b73fa08.js → state-border-formatter-ce3495b0.js} +1 -1
  163. package/dist/esm/{string-format-strategy.abstract-8c7937e3.js → string-format-strategy.abstract-8ce04558.js} +1 -1
  164. package/dist/esm/{string-input-formatter-slimmer-681c6b71.js → string-input-formatter-slimmer-0d60ba7d.js} +1 -1
  165. package/dist/esm/{string-mask-strategy-b8cceee6.js → string-mask-strategy-cabc1d50.js} +2 -2
  166. package/dist/esm/{style-formatter-fcd70869.js → style-formatter-00fe4f1c.js} +2 -2
  167. package/dist/esm/{time-required-rule-ce50859b.js → time-required-rule-57ceeae9.js} +1 -1
  168. package/dist/esm/{token-extension-2401e753.js → token-extension-645a9520.js} +1011 -767
  169. package/dist/esm/{translation-slimmer-b3f3cf65.js → translation-slimmer-b69057eb.js} +1 -1
  170. package/dist/esm/{type-guard-08c82e08.js → type-guard-204094c6.js} +1 -1
  171. package/dist/esm/{valid-credit-card-number-rule-66bad519.js → valid-credit-card-number-rule-0874e19f.js} +1 -1
  172. package/dist/esm/vega-accordion.entry.js +6 -6
  173. package/dist/esm/vega-app-header-button.entry.js +5 -5
  174. package/dist/esm/vega-box.entry.js +6 -6
  175. package/dist/esm/vega-button-circle.entry.js +5 -5
  176. package/dist/esm/vega-button.entry.js +3 -3
  177. package/dist/esm/vega-calendar_5.entry.js +7 -7
  178. package/dist/esm/vega-card.entry.js +5 -5
  179. package/dist/esm/vega-carousel.entry.js +3 -3
  180. package/dist/esm/vega-checkbox_2.entry.js +2 -2
  181. package/dist/esm/vega-chip.entry.js +5 -5
  182. package/dist/esm/vega-code-block.entry.js +8 -8
  183. package/dist/esm/vega-color-picker.entry.js +2 -2
  184. package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
  185. package/dist/esm/vega-color-swatch.entry.js +2 -2
  186. package/dist/esm/vega-combo-box.entry.js +8 -8
  187. package/dist/esm/vega-date-picker_2.entry.js +13 -13
  188. package/dist/esm/vega-dialog_2.entry.js +3 -3
  189. package/dist/esm/vega-divider.entry.js +5 -5
  190. package/dist/esm/vega-dropdown_5.entry.js +7 -7
  191. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  192. package/dist/esm/vega-field-label.entry.js +2 -2
  193. package/dist/esm/vega-file-uploader.entry.js +3 -3
  194. package/dist/esm/vega-flag-icon.entry.js +5 -5
  195. package/dist/esm/vega-flex.entry.js +6 -6
  196. package/dist/esm/vega-font.entry.js +5 -5
  197. package/dist/esm/vega-form.entry.js +2 -2
  198. package/dist/esm/vega-grid.entry.js +5 -5
  199. package/dist/esm/vega-icon.entry.js +5 -5
  200. package/dist/esm/vega-image-uploader.entry.js +5 -5
  201. package/dist/esm/vega-input-credit-card.entry.js +6 -6
  202. package/dist/esm/vega-input-numeric.entry.js +12 -14
  203. package/dist/esm/vega-input-passcode.entry.js +5 -5
  204. package/dist/esm/vega-input-phone-number.entry.js +4 -4
  205. package/dist/esm/vega-input-range.entry.js +3 -3
  206. package/dist/esm/vega-input-select.entry.js +5 -5
  207. package/dist/esm/vega-input.entry.js +31 -27
  208. package/dist/esm/vega-left-nav_5.entry.js +7 -7
  209. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  210. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  211. package/dist/esm/vega-pagination.entry.js +4 -4
  212. package/dist/esm/vega-popover_2.entry.js +8 -8
  213. package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
  214. package/dist/esm/vega-radio_2.entry.js +5 -5
  215. package/dist/esm/vega-rich-text-bookmark-editor.entry.js +2 -2
  216. package/dist/esm/vega-rich-text-content.entry.js +6 -6
  217. package/dist/esm/vega-rich-text-editor_4.entry.js +474 -207
  218. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
  219. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
  220. package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
  221. package/dist/esm/vega-selection-chip_2.entry.js +4 -4
  222. package/dist/esm/vega-selection-tile_2.entry.js +2 -2
  223. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  224. package/dist/esm/vega-signature-capture.entry.js +7 -7
  225. package/dist/esm/vega-stepper.entry.js +2 -2
  226. package/dist/esm/vega-tab-group_2.entry.js +6 -6
  227. package/dist/esm/vega-table_11.entry.js +4 -4
  228. package/dist/esm/vega-textarea.entry.js +2 -2
  229. package/dist/esm/vega-time-picker_2.entry.js +9 -9
  230. package/dist/esm/vega-toggle-switch.entry.js +2 -2
  231. package/dist/esm/vega-tooltip_2.entry.js +6 -6
  232. package/dist/esm/vega.js +12 -12
  233. package/dist/sri/vega-sri-manifest.json +321 -321
  234. package/dist/types/components/vega-input/slimmers/controllers/vega-input-state-controller.d.ts +0 -2
  235. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.d.ts +4 -0
  236. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +2 -0
  237. package/dist/types/components/vega-input/vega-input.d.ts +15 -3
  238. package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +2 -0
  239. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +0 -2
  240. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +4 -0
  241. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.d.ts +14 -0
  242. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +4 -1
  243. package/dist/types/components/vega-rich-text-editor/dto/actions/sequential-composition-action.d.ts +30 -0
  244. package/dist/types/components/vega-rich-text-editor/dto/flush-changes-payload.d.ts +16 -0
  245. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +7 -0
  246. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.d.ts +33 -0
  247. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.d.ts +43 -0
  248. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.d.ts +22 -0
  249. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.d.ts +29 -0
  250. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.d.ts +13 -0
  251. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +1 -1
  252. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +1 -1
  253. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +1 -0
  254. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +28 -93
  255. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.d.ts +10 -0
  256. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.d.ts +8 -0
  257. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.d.ts +18 -0
  258. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +28 -6
  259. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +13 -0
  260. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.d.ts +29 -0
  261. package/dist/types/components/vega-rich-text-editor/extensions/paste/type.d.ts +35 -0
  262. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +47 -0
  263. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +17 -6
  264. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +5 -1
  265. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +30 -1
  266. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +5 -1
  267. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.d.ts +21 -4
  268. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.d.ts +12 -4
  269. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +38 -5
  270. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.d.ts +7 -2
  271. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -0
  272. package/dist/types/components/vega-rich-text-editor/utils/html-to-plain-text-utils.d.ts +31 -0
  273. package/dist/types/components.d.ts +24 -0
  274. package/dist/types/helpers/translation/interface.d.ts +1 -0
  275. package/dist/types/types/public-api.d.ts +2 -1
  276. package/dist/vega/index.esm.js +1 -1
  277. package/dist/vega/{p-8a4cc7c2.entry.js → p-0169f71c.entry.js} +1 -1
  278. package/dist/vega/p-018bb83b.entry.js +1 -0
  279. package/dist/vega/{p-25e51acb.js → p-08bf08d2.js} +1 -1
  280. package/dist/vega/{p-85a940c0.entry.js → p-0b33753f.entry.js} +1 -1
  281. package/dist/vega/{p-a5fa260b.js → p-1537b1e4.js} +1 -1
  282. package/dist/vega/{p-7dfb1481.entry.js → p-17f6dc94.entry.js} +1 -1
  283. package/dist/vega/{p-dd673eb4.entry.js → p-1a4d1991.entry.js} +1 -1
  284. package/dist/vega/{p-557b64bd.js → p-1b2e5898.js} +1 -1
  285. package/dist/vega/{p-2256eb09.entry.js → p-1f1f93bf.entry.js} +1 -1
  286. package/dist/vega/{p-d86e0b01.js → p-1fb953f8.js} +1 -1
  287. package/dist/vega/{p-03efc67a.entry.js → p-2171b571.entry.js} +1 -1
  288. package/dist/vega/p-255fe20b.js +1 -0
  289. package/dist/vega/{p-cf5c5515.js → p-261cf764.js} +1 -1
  290. package/dist/vega/{p-f0b49ae4.entry.js → p-27e77ea1.entry.js} +1 -1
  291. package/dist/vega/{p-109f0e33.entry.js → p-28acbe42.entry.js} +1 -1
  292. package/dist/vega/{p-27c9c2a5.entry.js → p-2acc600a.entry.js} +1 -1
  293. package/dist/vega/p-2fc2299f.js +1 -0
  294. package/dist/vega/{p-b48caf90.entry.js → p-2ff659a1.entry.js} +1 -1
  295. package/dist/vega/{p-527c3211.entry.js → p-322da1eb.entry.js} +1 -1
  296. package/dist/vega/{p-dffe47db.js → p-3283fa2f.js} +1 -1
  297. package/dist/vega/p-3567dc55.entry.js +1 -0
  298. package/dist/vega/{p-c6419eb3.entry.js → p-36b795c6.entry.js} +1 -1
  299. package/dist/vega/p-37714a3a.js +1 -0
  300. package/dist/vega/{p-d7e59f31.js → p-3b4e2ba0.js} +1 -1
  301. package/dist/vega/{p-3d060d2f.entry.js → p-3b911043.entry.js} +1 -1
  302. package/dist/vega/{p-5c6d36ef.entry.js → p-3e270b65.entry.js} +1 -1
  303. package/dist/vega/{p-b68f55e2.js → p-4043508a.js} +1 -1
  304. package/dist/vega/p-4151d4a8.js +1 -0
  305. package/dist/vega/{p-c6b6987e.js → p-45af801f.js} +1 -1
  306. package/dist/vega/p-48c2150b.entry.js +1 -0
  307. package/dist/vega/p-4b253f74.entry.js +1 -0
  308. package/dist/vega/{p-75c7f8ea.entry.js → p-4cdc064d.entry.js} +1 -1
  309. package/dist/vega/{p-1d8a8507.entry.js → p-4e4b50f3.entry.js} +1 -1
  310. package/dist/vega/{p-d8fa2f19.entry.js → p-564110ba.entry.js} +1 -1
  311. package/dist/vega/p-5f377954.js +1 -1
  312. package/dist/vega/{p-bec31ffc.entry.js → p-608d3559.entry.js} +1 -1
  313. package/dist/vega/{p-3ce7521e.entry.js → p-64eb05d3.entry.js} +1 -1
  314. package/dist/vega/{p-2f5c4b61.entry.js → p-66bf209b.entry.js} +1 -1
  315. package/dist/vega/{p-83f5ef3a.entry.js → p-69eadbd8.entry.js} +1 -1
  316. package/dist/vega/{p-c66c6fd2.entry.js → p-6c4edee8.entry.js} +1 -1
  317. package/dist/vega/p-6e16bb3a.js +1 -0
  318. package/dist/vega/{p-7d748545.entry.js → p-76f4fdba.entry.js} +1 -1
  319. package/dist/vega/{p-4c6989ae.entry.js → p-7874055b.entry.js} +1 -1
  320. package/dist/vega/{p-ca60a74b.entry.js → p-7d3d24f6.entry.js} +1 -1
  321. package/dist/vega/{p-3bfb53e3.js → p-7f9ad7bc.js} +1 -1
  322. package/dist/vega/{p-18ddc6a4.entry.js → p-8193f4ef.entry.js} +1 -1
  323. package/dist/vega/{p-816064f2.entry.js → p-8197d172.entry.js} +1 -1
  324. package/dist/vega/{p-634b138c.entry.js → p-8ac0b1b2.entry.js} +1 -1
  325. package/dist/vega/{p-553510d8.entry.js → p-8c61db9d.entry.js} +1 -1
  326. package/dist/vega/{p-061a76c3.entry.js → p-8de29082.entry.js} +1 -1
  327. package/dist/vega/{p-325b804d.entry.js → p-8e59606f.entry.js} +1 -1
  328. package/dist/vega/p-8ea41806.js +1 -0
  329. package/dist/vega/{p-ff9090af.entry.js → p-9153c2f5.entry.js} +1 -1
  330. package/dist/vega/{p-a0c87e88.entry.js → p-92411f56.entry.js} +1 -1
  331. package/dist/vega/{p-049e64b1.entry.js → p-94d65dcf.entry.js} +1 -1
  332. package/dist/vega/{p-a261a675.entry.js → p-9a96fb05.entry.js} +1 -1
  333. package/dist/vega/{p-7044bb48.js → p-9fcfd738.js} +1 -1
  334. package/dist/vega/{p-b1e1c7d0.js → p-a2c7a3bc.js} +1 -1
  335. package/dist/vega/p-a2dcde12.js +1 -0
  336. package/dist/vega/{p-be0eb72f.js → p-a60d75d9.js} +1 -1
  337. package/dist/vega/{p-5a347a15.js → p-a9fc4043.js} +1 -1
  338. package/dist/vega/{p-efef0dfe.entry.js → p-abe5f7f0.entry.js} +1 -1
  339. package/dist/vega/{p-197388a5.entry.js → p-ac98c189.entry.js} +1 -1
  340. package/dist/vega/{p-dd273d89.entry.js → p-ade903b3.entry.js} +1 -1
  341. package/dist/vega/{p-c0eb8c58.js → p-affb40e8.js} +1 -1
  342. package/dist/vega/{p-277aab9b.js → p-b3a1cd22.js} +1 -1
  343. package/dist/vega/p-b63a90b3.entry.js +1 -0
  344. package/dist/vega/{p-f9f96030.entry.js → p-ba050d63.entry.js} +1 -1
  345. package/dist/vega/{p-bf0b46c1.js → p-ba67eb96.js} +1 -1
  346. package/dist/vega/{p-f0c6e9c5.entry.js → p-c08ac33f.entry.js} +1 -1
  347. package/dist/vega/{p-46be74fc.entry.js → p-c7ec97d1.entry.js} +1 -1
  348. package/dist/vega/{p-effbfc50.entry.js → p-ca1fe571.entry.js} +1 -1
  349. package/dist/vega/{p-408c3ad4.entry.js → p-cc9fc36a.entry.js} +1 -1
  350. package/dist/vega/{p-741e064e.entry.js → p-d044d54f.entry.js} +1 -1
  351. package/dist/vega/{p-0e0e66c9.entry.js → p-d3a9355c.entry.js} +1 -1
  352. package/dist/vega/p-d5a75228.js +1 -0
  353. package/dist/vega/{p-76135e80.entry.js → p-dc83fa6b.entry.js} +1 -1
  354. package/dist/vega/{p-92efdbf0.entry.js → p-dcfce26e.entry.js} +1 -1
  355. package/dist/vega/p-df9585f6.js +3 -0
  356. package/dist/vega/{p-f5f26b44.entry.js → p-e2c8a470.entry.js} +1 -1
  357. package/dist/vega/{p-23781e76.js → p-e33a954f.js} +1 -1
  358. package/dist/vega/{p-e577dda8.entry.js → p-e5fc6583.entry.js} +1 -1
  359. package/dist/vega/p-e668cf11.js +1 -0
  360. package/dist/vega/{p-0338f621.entry.js → p-e6b0a292.entry.js} +1 -1
  361. package/dist/vega/{p-381d8781.js → p-e84c2589.js} +1 -1
  362. package/dist/vega/{p-1b97e751.entry.js → p-eb945d34.entry.js} +1 -1
  363. package/dist/vega/{p-d8a0e3e0.entry.js → p-ebe1dd2b.entry.js} +1 -1
  364. package/dist/vega/{p-6beaf1c8.entry.js → p-f818bb20.entry.js} +1 -1
  365. package/dist/vega/p-f981cf2c.js +1 -0
  366. package/dist/vega/p-f9d09b0c.js +1 -0
  367. package/dist/vega/{p-4d20a56f.js → p-fdbdf12f.js} +1 -1
  368. package/dist/vega/{p-48100d38.entry.js → p-fee080b9.entry.js} +1 -1
  369. package/dist/vega/vega.esm.js +1 -1
  370. package/package.json +1 -1
  371. package/dist/vega/p-040bd9ca.js +0 -1
  372. package/dist/vega/p-087240db.js +0 -1
  373. package/dist/vega/p-15052b2e.entry.js +0 -1
  374. package/dist/vega/p-28c16885.js +0 -1
  375. package/dist/vega/p-30cc31dd.entry.js +0 -1
  376. package/dist/vega/p-3ec4d710.js +0 -1
  377. package/dist/vega/p-43ea1e86.js +0 -1
  378. package/dist/vega/p-7228088b.entry.js +0 -1
  379. package/dist/vega/p-7f711049.js +0 -1
  380. package/dist/vega/p-7fd15dd1.js +0 -1
  381. package/dist/vega/p-85695819.js +0 -1
  382. package/dist/vega/p-8e1f30ec.entry.js +0 -1
  383. package/dist/vega/p-9680dfe6.js +0 -1
  384. package/dist/vega/p-ae12cc3f.js +0 -3
  385. package/dist/vega/p-c0823f32.js +0 -1
  386. package/dist/vega/p-c5af2ecc.entry.js +0 -1
  387. package/dist/vega/p-fa43272c.js +0 -1
@@ -1 +1 @@
1
- import{h as t,F as e,r as a,c as i,H as o,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,V as l,M as d,I as c}from"./p-6e1ab235.js";import{s as h}from"./p-6bd5c49b.js";import{V as b,I as v}from"./p-5c8e4e8f.js";import{P as g}from"./p-81dd00d0.js";import{d as p}from"./p-1bc5b3bc.js";import{f as u}from"./p-bf0b46c1.js";import{c as f}from"./p-8387896e.js";import{D as m}from"./p-36a57431.js";import{d as y,b as w}from"./p-a83cef5a.js";import{C as x}from"./p-2d0d575f.js";import{O as T}from"./p-331a62d5.js";import{T as C}from"./p-cb378636.js";import{f as R,j,k as I,l as D}from"./p-aa135628.js";import{S as P}from"./p-1fb56e14.js";import{C as k}from"./p-abad8ffd.js";import{c as S}from"./p-3b6a6f08.js";import{T as O}from"./p-7f711049.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-4d20a56f.js";import"./p-b438e68b.js";import"./p-c0eb8c58.js";import"./p-b1e1c7d0.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-85695819.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-6a334573.js";var G=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class A extends l{getTabMenuContainer(){return this.tabMenuContainer}render(){return t(e,null,t("div",{class:{"tab-content-container":!0,"more-tab":this.tabPages.length>1,"tab-style-secondary":"secondary"===this.variant,"tab-style-primary":"secondary"!==this.variant,"swipe-more-tabs":"scroll"===this.overflow},ref:t=>this.tabMenuContainer=t},"menu"===this.overflow&&this.directionButtonRenderer.render("left"),this.tabListRenderer.render(),"menu"===this.overflow&&this.directionButtonRenderer.render("right")),t("div",{class:"horizontal-divider"}),this.contentRenderer.render())}}G([s()],A.prototype,"tabPages",void 0),G([s()],A.prototype,"variant",void 0),G([s()],A.prototype,"overflow",void 0),G([s({componentFieldName:"vegaTabGroupTabListRenderer"})],A.prototype,"tabListRenderer",void 0),G([s({componentFieldName:"vegaTabGroupDirectionButtonRenderer"})],A.prototype,"directionButtonRenderer",void 0),G([s({componentFieldName:"vegaTabGroupContentRenderer"})],A.prototype,"contentRenderer",void 0);var L=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class W extends l{setSelectedDataTarget(t){this.selectedTabDataTarget=t}handleTabItemClick(t){const e=this.clickEventEmitter.emit(t);e&&!e.defaultPrevented&&(t===this.selectedTabDataTarget?this.vegaTabGroupPageIndexController.setCurrentPageIndexBySelectedTab(t):this.setSelectedDataTarget(t))}}L([s()],W.prototype,"clickEventEmitter",void 0),L([s({writable:!0})],W.prototype,"selectedTabDataTarget",void 0),L([s()],W.prototype,"vegaTabGroupPageIndexController",void 0);class F{paginate(t,e,a){const i=t.map(e);return this.doPaginateByCapacity(t,i,a)}doPaginateByCapacity(t,e,a){const i=[];let o=0;for(;o<e.length;){const n=this.valueSum(o,e,a);if(0===n)break;i.push(t.slice(o,o+n)),o+=n}return i}valueSum(t,e,a){let i=0,o=!1,n=0;const r="function"==typeof a?a(t,e):a;return e.slice(t).forEach(((t,e)=>{i+=t,i>r&&!o&&(o=!0,n=e)})),o||(n=e.slice(t).length),n}}function N(t,e){return null!=t||e.length>0&&e.every((t=>null!=t.width))}function B(t,e){return null!=z(t,e)}function z(t,e){const a=null!=t.width?t.width:e;if(null==a)return null;const i=u(a,"widthAndHeight");if(null==i||!i.trim().endsWith("%"))return null;const o=Number.parseFloat(i);return Number.isFinite(o)?o:null}function V(t){return t.some((t=>{return null!=(e=t.width)&&("string"==typeof e?e.trim().endsWith("%"):"number"!=typeof e&&Object.values(e).some((t=>"string"==typeof t&&t.trim().endsWith("%"))));var e}))}var E=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class M extends g{constructor(){super({callback:()=>{N(this.tabItemWidth,this.tabItems)&&this.initTabsWidthArray(),this.initTabPagesWithDebounce()},target:()=>this.host,shouldTrigger:()=>!this.sliderStateController.isAnimationInProgress()}),this.TAB_SIDE_BUTTON_WIDTH=37,this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE=8,this.valuePaginator=new F,this.wasUsingConstrainedLayout=!1,this.initTabPagesWithDebounce=p(this.initTabPages,80,this),this.getTabContainerSpace=(t,e)=>{const a=this.host.getBoundingClientRect().width,i=this.shouldUsePercentageBasedCapacityPagination();let o="secondary"===this.variant?a:a-48;return"menu"===this.overflow&&(t>0&&(o-=this.TAB_SIDE_BUTTON_WIDTH+this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE),e.length>0&&e.slice(t).reduce(((t,e)=>t+e))>o&&o>0&&!i&&(o-=this.TAB_SIDE_BUTTON_WIDTH)),o},this.emptySourceAndHiddenDropdown=()=>{Array.from(this.host.shadowRoot.querySelectorAll("vega-dropdown")).forEach((async t=>{0===t.source.length&&await t.hide()}))}}componentDidLoad(){this.initTabPages()}componentDidRender(){this.initTabsWidthArray(),this.emptySourceAndHiddenDropdown()}handleGapChange(){this.initTabPages()}handleTabWidthArrayChange(){this.tabWidthArray.length>0&&this.initTabPages()}handleTabItemsChange(){this.initTabPagesWithDebounce()}handleTabItemWidthChange(){this.initTabPages()}setTabItems(t){this.tabItems=t}setTabWidthArray(t){this.tabWidthArray=t}initTabPages(){if(this.tabItems)if("scroll"===this.overflow)this.tabPages=[[...this.tabItems]];else{const t=this.shouldUsePercentageBasedCapacityPagination(),e=Number(this.formatAndValidGap(this.gap));this.tabPages=this.valuePaginator.paginate(this.tabItems,((a,i)=>{var o;const n=this.tabWidthArray[i];return n<=0?n:t?null!==(o=z(this.tabItems[i],this.tabItemWidth))&&void 0!==o?o:n:i>0&&!B(this.tabItems[i],this.tabItemWidth)?n+e:n}),t?100:this.getTabContainerSpace)}}shouldUsePercentageBasedCapacityPagination(){return N(this.tabItemWidth,this.tabItems)&&this.tabItems.length>0&&this.tabItems.every((t=>B(t,this.tabItemWidth)))}formatAndValidGap(t){return t.replace("size-","")}initTabsWidthArray(){if(!this.tabItems||0===this.tabItems.length)return;if(!N(this.tabItemWidth,this.tabItems)){const t=this.wasUsingConstrainedLayout||0===this.tabWidthArray.length||this.tabWidthArray.length!==this.tabItems.length||this.tabWidthArray.some((t=>0===t));if(this.wasUsingConstrainedLayout=!1,t){const t=[];this.tabItems.forEach((e=>{const a=this.host.shadowRoot.querySelector(`.vega-tab[data-target='${e.dataTarget}']`);if(a){const e=a.getBoundingClientRect().width;t.push(e)}})),t.length>0&&!t.some((t=>0===t))&&(this.tabWidthArray=[...t])}return}this.wasUsingConstrainedLayout=!0;const t=[];this.tabItems.forEach((e=>{const a=this.host.shadowRoot.querySelector(`.vega-tab[data-target='${e.dataTarget}']`);if(a){const e=a.getBoundingClientRect().width;t.push(e)}})),t.length!==this.tabItems.length||t.some((t=>0===t))||(this.tabWidthArray.length!==t.length||t.some(((t,e)=>Math.abs(t-this.tabWidthArray[e])>.5)))&&(this.tabWidthArray=[...t])}}E([s()],M.prototype,"host",void 0),E([s()],M.prototype,"gap",void 0),E([s({writable:!0})],M.prototype,"tabPages",void 0),E([s({writable:!0})],M.prototype,"tabWidthArray",void 0),E([s({writable:!0})],M.prototype,"tabItems",void 0),E([s()],M.prototype,"variant",void 0),E([s()],M.prototype,"overflow",void 0),E([s()],M.prototype,"tabItemWidth",void 0),E([s({componentFieldName:"vegaTabGroupSliderStateController"})],M.prototype,"sliderStateController",void 0),E([d("componentDidLoad")],M.prototype,"componentDidLoad",null),E([d("componentDidRender")],M.prototype,"componentDidRender",null),E([d("watchGapChange")],M.prototype,"handleGapChange",null),E([d("watchTabWidthArrayChange")],M.prototype,"handleTabWidthArrayChange",null),E([d("watchTabItemsChange")],M.prototype,"handleTabItemsChange",null),E([d("watchTabItemWidthChange")],M.prototype,"handleTabItemWidthChange",null);var _=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class $ extends l{handleTabPagesChange(){this.selectedTabDataTarget?this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget):this.setCurrentPageIndexWhenTabPagesChange()}handleSelectedDataTargetChange(){this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget)}setCurrentPageIndexBySelectedTab(t){let e=-1;this.tabPages.forEach(((a,i)=>{-1!==a.findIndex((e=>e.dataTarget===t))&&(e=i)})),e>=0&&(this.currentPageIndex=e)}setPageIndex(t){this.currentPageIndex=t}setCurrentPageIndexWhenTabPagesChange(){this.tabPages&&this.tabPages.length&&!this.tabPages[this.currentPageIndex]&&(this.currentPageIndex=this.tabPages.length-1)}}_([s()],$.prototype,"tabPages",void 0),_([s({writable:!0})],$.prototype,"currentPageIndex",void 0),_([s()],$.prototype,"selectedTabDataTarget",void 0),_([d("watchTabPagesChange")],$.prototype,"handleTabPagesChange",null),_([d("watchSelectedTabDataTargetChange")],$.prototype,"handleSelectedDataTargetChange",null);var K=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class q extends l{constructor(){super(...arguments),this.onCloseTab=t=>{var e;const a=t.currentTarget,i=a.closest(".vega-tab"),o=(null===(e=this.host.shadowRoot)||void 0===e?void 0:e.activeElement)===a,n=this.tabItems.findIndex((t=>t.dataTarget===i.getAttribute("data-target")));let r;i.classList.contains("selected")&&(r=this.tabItems[n===this.tabItems.length-1?n-1:n+1].dataTarget,this.selectedTargetController.setSelectedDataTarget(r));const s=this.tabItems.slice(0,n).concat(this.tabItems.slice(n+1));this.tabPagesController.setTabItems(s);const l=this.tabWidthArray.slice(0,n).concat(this.tabWidthArray.slice(n+1));if(this.tabPagesController.setTabWidthArray(l),o&&r&&this.host.shadowRoot){const t=this.host.shadowRoot;requestAnimationFrame((()=>{const e=t.querySelector(`.vega-tab[data-target='${r}'] .label`);null==e||e.focus()}))}t.stopPropagation()}}render(e){return this.showCloseButton&&this.tabItems.length>1&&t("div",{class:this.showCloseButton?"vega-close-icon":"vega-close-icon vega-hidden",onClick:this.onCloseTab,role:"button",tabIndex:e.disabled?-1:0,onKeyDown:f(),"aria-label":"Close Button"},t("vega-icon",{icon:"close",size:"size-12"}))}}K([s()],q.prototype,"host",void 0),K([s()],q.prototype,"tabWidthArray",void 0),K([s()],q.prototype,"showCloseButton",void 0),K([s()],q.prototype,"tabItems",void 0),K([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],q.prototype,"selectedTargetController",void 0),K([s({componentFieldName:"vegaTabGroupPagesController"})],q.prototype,"tabPagesController",void 0);var U=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class H extends l{constructor(){super(...arguments),this.onDirectionButtonClick=t=>{this.pageIndexController.setPageIndex("left"===t?this.currentPageIndex-1:this.currentPageIndex+1)}}getDropdownRef(){return this.dropdownRef}render(e){const a=[];this.tabPages.slice("left"===e?0:this.currentPageIndex+1,"left"===e?this.currentPageIndex:this.tabPages.length).flat().map((t=>{a.push({key:t.dataTarget,label:t.label,disabled:t.disabled})}));const i="left"===e?0===this.currentPageIndex:this.currentPageIndex+1===this.tabPages.length||this.tabPages.length<=1,o="left"===e?"chevron-backward-rounded":"chevron-forward-rounded",n=a.find((t=>t.key===this.selectedTabDataTarget))?this.selectedTabDataTarget:"";return t("div",{class:{"tab-left-button":"left"===e,"tab-right-button":"right"===e,"vega-hidden":i},onClick:()=>this.onDirectionButtonClick(e),"aria-label":"left"===e?"Show previous tabs":"Show next tabs",role:"button",tabIndex:0,onKeyDown:f()},t("vega-dropdown",{source:a,translocation:{X:0,Y:16},selectType:"single",selectedSourceKey:n,"position-relative-to":this.positionRelativeTo,ref:t=>{this.dropdownRef=t,m.addUniqueObserverToNode(t,y,(t=>{this.vegaTabGroupSelectedTargetController.handleTabItemClick(t.detail)}))}},t("vega-icon",{size:"size-12",icon:o})))}}U([s()],H.prototype,"tabPages",void 0),U([s()],H.prototype,"currentPageIndex",void 0),U([s()],H.prototype,"selectedTabDataTarget",void 0),U([s()],H.prototype,"positionRelativeTo",void 0),U([s({componentFieldName:"vegaTabGroupPageIndexController"})],H.prototype,"pageIndexController",void 0),U([s()],H.prototype,"vegaTabGroupSelectedTargetController",void 0);var Y=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class X extends l{constructor(){super(...arguments),this.tabPanels=[],this.handlePanelUpdate=t=>{const{host:e,type:a}=t;"ADD"===a?this.tabPanels.push(e):this.tabPanels=this.tabPanels.filter((t=>t!==e))}}connectedCallback(){this.tabPanelUpdateObserver=new T(this.canAcceptPanelUpdate.bind(this),this.handlePanelUpdate),x.register(C,this.tabPanelUpdateObserver)}disconnectedCallback(){x.unregister(C,this.tabPanelUpdateObserver),this.tabPanels=[]}componentDidLoad(){this.initSelectedTabDataTarget()}watchSelectedTabDataTargetChange(){this.updateTabPanelsStatus(this.selectedTabDataTarget)}canAcceptPanelUpdate(t){const{host:e,type:a}=t;return"ADD"===a?R(t.host,"VEGA-TAB-GROUP")===this.host&&!this.tabPanels.includes(e):this.tabPanels&&this.tabPanels.includes(e)}initSelectedTabDataTarget(){if(this.selectedTabDataTarget)this.updateTabPanelsStatus(this.selectedTabDataTarget);else{let t=this.getDefaultActivePanelId();!t&&this.tabItems&&this.tabItems.length&&(t=this.tabItems[0].dataTarget),t&&this.selectTargetController.setSelectedDataTarget(t)}}getDefaultActivePanelId(){if(this.tabPanels&&this.tabPanels.length){const t=this.tabPanels.find((t=>!0===t.isActive));return t?t.getAttribute("id"):null}}updateTabPanelsStatus(t){this.tabPanels.length&&t&&this.tabPanels.forEach((e=>{const a=e.getAttribute("id"),i=a===t,o=this.tabItems.find((t=>t.dataTarget===a));e.setAttribute("role","tabpanel"),(null==o?void 0:o.label)?e.setAttribute("aria-label",o.label):e.removeAttribute("aria-label"),i?(e.isActive=!0,e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","false")):(e.isActive=!1,e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"))}))}}Y([s()],X.prototype,"host",void 0),Y([s()],X.prototype,"selectedTabDataTarget",void 0),Y([s()],X.prototype,"tabItems",void 0),Y([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],X.prototype,"selectTargetController",void 0),Y([d("connectedCallback")],X.prototype,"connectedCallback",null),Y([d("disconnectedCallback")],X.prototype,"disconnectedCallback",null),Y([d("componentDidLoad")],X.prototype,"componentDidLoad",null),Y([d("watchSelectedTabDataTargetChange")],X.prototype,"watchSelectedTabDataTargetChange",null);class J extends l{handleVoiceOverPanelFocus(t,e){j(t)&&requestAnimationFrame((()=>{const t=this.findPanelById(e),a=t&&I(t)||t;null==a||a.focus()}))}findPanelById(t){return Array.from(this.host.querySelectorAll("vega-tab-group-panel")).find((e=>(null==e?void 0:e.getAttribute("id"))===t))}}!function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);n>3&&r&&Object.defineProperty(e,a,r)}([s()],J.prototype,"host",void 0);var Q=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class Z extends l{constructor(){super(...arguments),this.TAB_LABEL_MAX_SIZE=32,this.getCarouselDomRef=()=>this.carouselDom}render(){const e=N(this.tabItemWidth,this.tabItems),a=V(this.tabItems)&&!e;return t("div",{class:{"tab-list":!0,menu:"menu"===this.overflow,scroll:"scroll"===this.overflow,"custom-tab-width":e,"mixed-percentage-tab-width":a}},"menu"===this.overflow&&this.renderTabListInMenuOverflow(a),"scroll"===this.overflow&&this.renderTabListInScrollOverflow())}renderTabListInMenuOverflow(e){const a=N(this.tabItemWidth,this.tabItems),i=e||a?{paddingRight:"1px"}:void 0;return t("vega-carousel",{showSlider:!1,ref:t=>this.carouselDom=t},this.tabPages.length>0?this.tabPages.map(((e,a)=>t("div",{key:a,style:i},this.renderTabList(e)))):t("div",{style:i},this.renderTabList(this.tabItems)))}renderTabListInScrollOverflow(){return t("div",{class:"overflow-scroll"},this.tabPages.map(((e,a)=>t("div",{key:a},this.renderTabList(e)))))}renderTabList(e){const a=N(this.tabItemWidth,this.tabItems),i=V(this.tabItems)&&!a,o=a||V(this.tabItems);return t("vega-flex",{gap:this.gap,role:"tablist",style:o?{width:"100%"}:void 0},e.map((e=>{const o=i&&null==e.width,n=a||o||null!=e.width,r=o||a&&B(e,this.tabItemWidth),s=D(e.dataTarget,"vega-tab-label");return t("div",{class:{"vega-tab":!0,"custom-tab-label-width":a||null!=e.width,selected:this.selectedTabDataTarget===e.dataTarget,"last-page":this.currentPageIndex+1===this.tabPages.length,"vega-flex-shrink-0":!r,"v-min-w-min":!n,disabled:Boolean(e.disabled)},style:Object.assign({flexGrow:null!=e.width?"0":void 0,width:this.resolveTabWidth(e)},r?{minWidth:"0",flexShrink:"1"}:{}),"data-target":e.dataTarget,key:e.dataTarget},t("div",{class:"vega-tab-container"},t("div",{class:{label:!0,"vega-close-icon-space":this.showCloseButton},onClick:t=>this.handleTabItemClick(t,e.dataTarget),id:s,"aria-label":this.getTabAriaLabel(e),"aria-selected":(this.selectedTabDataTarget===e.dataTarget).toString(),role:"tab",tabIndex:e.disabled?-1:0,onKeyDown:f()},this.renderPrefixIconDom(e),this.renderTabLabelDom(e,a||null!=e.width),this.renderCounterBadgeDom(e)),this.closeButtonRenderer.render(e)))})))}renderPrefixIconDom(e){const a=e.prefixIcon;return a&&t("vega-icon",{icon:a})}renderTabLabelDom(e,a){return a?this.constrainedTabLabelRenderer.render(e):e.label.length>this.TAB_LABEL_MAX_SIZE?t("vega-tooltip",{text:e.label,placement:"bottom","position-relative-to":this.positionRelativeTo},t("span",null,e.label.substring(0,this.TAB_LABEL_MAX_SIZE),"...")):e.label}renderCounterBadgeDom(e){const a=e.counterBadge,i=this.getCounterBadgeClassByCount(a);return a&&(!!a.dot||void 0!==a.count&&a.count>0)&&t("div",{class:`vega-counter-badge ${i}`,"aria-hidden":"true"},t("vega-counter-badge",{count:a.count,color:a.color,dot:a.dot}))}getTabAriaLabel(t){const e=t.counterBadge;return(null==e?void 0:e.dot)?`${t.label}, ${this.translationSlimmer.t("notification")}`:(null==e?void 0:e.count)&&e.count>0?`${t.label}, ${e.count}`:t.label}getCounterBadgeClassByCount(t){if(null==t?void 0:t.dot)return"dot-variant";if(null==t?void 0:t.count){const e=t.count.toString().length;return 1===e?"one-digit":2===e?"two-digits":"multi-digits"}return""}resolveTabWidth(t){var e,a;return null!=t.width?null!==(e=u(t.width,"widthAndHeight"))&&void 0!==e?e:void 0:null!=this.tabItemWidth&&null!==(a=u(this.tabItemWidth,"widthAndHeight"))&&void 0!==a?a:void 0}handleTabItemClick(t,e){this.selectedTargetController.handleTabItemClick(e),this.voiceOverFocusController.handleVoiceOverPanelFocus(t,e)}}Q([s()],Z.prototype,"tabPages",void 0),Q([s()],Z.prototype,"currentPageIndex",void 0),Q([s()],Z.prototype,"selectedTabDataTarget",void 0),Q([s()],Z.prototype,"gap",void 0),Q([s()],Z.prototype,"showCloseButton",void 0),Q([s()],Z.prototype,"tabItems",void 0),Q([s()],Z.prototype,"overflow",void 0),Q([s()],Z.prototype,"tabItemWidth",void 0),Q([s()],Z.prototype,"positionRelativeTo",void 0),Q([s({componentFieldName:"vegaTabGroupCloseButtonRenderer"})],Z.prototype,"closeButtonRenderer",void 0),Q([s({componentFieldName:"vegaTabGroupConstrainedTabLabelRenderer"})],Z.prototype,"constrainedTabLabelRenderer",void 0),Q([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],Z.prototype,"selectedTargetController",void 0),Q([s({componentFieldName:"vegaTabGroupVoiceOverFocusController"})],Z.prototype,"voiceOverFocusController",void 0),Q([s()],Z.prototype,"translationSlimmer",void 0);var tt=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class et extends l{constructor(){super(...arguments),this.tabLabelRefs={},this.tabTooltipRefs={}}componentDidRender(){this.refreshTooltipTriggers()}refreshTooltipTriggers(){Object.keys(this.tabLabelRefs).forEach((t=>{const e=this.tabLabelRefs[t],a=this.tabTooltipRefs[t];e&&a&&(a.trigger=e.scrollWidth>e.clientWidth?"hover":"none")}))}render(e){return t("vega-tooltip",{text:e.label,trigger:"none",placement:"bottom","position-relative-to":this.positionRelativeTo,ref:t=>{this.tabTooltipRefs[e.dataTarget]=t}},t("span",{class:"tab-label-ellipsis",ref:t=>{this.tabLabelRefs[e.dataTarget]=t}},e.label))}}tt([s()],et.prototype,"positionRelativeTo",void 0),tt([d("componentDidRender")],et.prototype,"componentDidRender",null);class at extends l{render(){return"secondary"===this.variant?t("div",{class:"vega-tab-group-content"},t("slot",null)):t("vega-card",{margin:"0",padding:{default:"size-24",S:"size-12"},variant:"shadow",backgroundColor:"bg-primary"},t("div",{class:"vega-tab-group-content"},t("slot",null)))}}!function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);n>3&&r&&Object.defineProperty(e,a,r)}([s()],at.prototype,"variant",void 0);var it=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class ot extends l{constructor(){super(...arguments),this.UPDATE_ANIMATION_FLAG_DELAY=32,this.goToPageTaskQueue=new P,this.pendingCarouselActionCount=0}async componentDidRender(){await this.goToPageTaskQueue.runTask()}async handlePageIndexChange(){const t=this.tabListRenderer.getCarouselDomRef();t&&(this.pendingCarouselActionCount+=1,setTimeout((()=>{this&&"number"==typeof this.pendingCarouselActionCount&&(this.pendingCarouselActionCount-=1)}),this.UPDATE_ANIMATION_FLAG_DELAY),await this.goToPageTaskQueue.enqueue({run:async()=>{await t.goToPage(this.currentPageIndex+1),(null!=this.tabItemWidth||this.tabItems.some((t=>null!=t.width)))&&this.constrainedTabLabelRenderer.refreshTooltipTriggers()}},!1))}isAnimationInProgress(){return this.pendingCarouselActionCount>0}}it([s({componentFieldName:"vegaTabGroupTabListRenderer"})],ot.prototype,"tabListRenderer",void 0),it([s({componentFieldName:"vegaTabGroupConstrainedTabLabelRenderer"})],ot.prototype,"constrainedTabLabelRenderer",void 0),it([s()],ot.prototype,"currentPageIndex",void 0),it([s()],ot.prototype,"tabItemWidth",void 0),it([s()],ot.prototype,"tabItems",void 0),it([d("componentDidRender")],ot.prototype,"componentDidRender",null),it([d("watchCurrentPageIndexChange")],ot.prototype,"handlePageIndexChange",null);const nt=[{payloadKey:"VARIANT_IS_PRIMARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:t=>"primary"===t.variant},{payloadKey:"VARIANT_IS_SECONDARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:t=>"secondary"===t.variant}];var rt=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};const st=class{constructor(t){a(this,t),this.vegaClick=i(this,"vegaClick",7),this.click=i(this,"click",7),this.globalSlimmers=new Map,this.vegaTabGroupRenderer=new A,this.translationSlimmer=new O,this.vegaTabGroupDirectionButtonRenderer=new H,this.vegaTabGroupTabListRenderer=new Z,this.vegaTabGroupConstrainedTabLabelRenderer=new et,this.vegaTabGroupCloseButtonRenderer=new q,this.vegaTabGroupPagesController=new M,this.vegaTabGroupSelectedTargetController=new W,this.vegaTabGroupPageIndexController=new $,this.vegaTabGroupPanelController=new X,this.vegaTabGroupVoiceOverFocusController=new J,this.vegaTabGroupContentRenderer=new at,this.vegaTabGroupSliderStateController=new ot,this.clickEventEmitter=S(st,w),this.dropdownEventPrevent=new k([w],(()=>this.vegaTabGroupRenderer.getTabMenuContainer())),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(nt),this.tabPages=[],this.tabWidthArray=[],this.currentPageIndex=0,this.selectedTabDataTarget="",this.gap="size-8",this.showCloseButton=!1,this.tabItems=[],this.variant="primary",this.overflow="menu"}watchTabPagesChange(){}watchTabWidthArrayChange(){}async watchCurrentPageIndexChange(t){}watchSelectedTabDataTargetChange(){}watchGapChange(){}watchTabItemsChange(){}watchTabItemWidthChange(){}componentDidLoad(){}componentDidRender(){}render(){return h(t("slot",null)),r(t(o,null,this.vegaTabGroupRenderer.render()),this.host)}get host(){return n(this)}static get watchers(){return{tabPages:["watchTabPagesChange"],tabWidthArray:["watchTabWidthArrayChange"],currentPageIndex:["watchCurrentPageIndexChange"],selectedTabDataTarget:["watchSelectedTabDataTargetChange"],gap:["watchGapChange"],tabItems:["watchTabItemsChange"],tabItemWidth:["watchTabItemWidthChange"]}}};rt([v()],st.prototype,"globalSlimmers",void 0),rt([c()],st.prototype,"vegaTabGroupRenderer",void 0),rt([c()],st.prototype,"translationSlimmer",void 0),rt([c()],st.prototype,"vegaTabGroupDirectionButtonRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupTabListRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupConstrainedTabLabelRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupCloseButtonRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupPagesController",void 0),rt([c()],st.prototype,"vegaTabGroupSelectedTargetController",void 0),rt([c()],st.prototype,"vegaTabGroupPageIndexController",void 0),rt([c()],st.prototype,"vegaTabGroupPanelController",void 0),rt([c()],st.prototype,"vegaTabGroupVoiceOverFocusController",void 0),rt([c()],st.prototype,"vegaTabGroupContentRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupSliderStateController",void 0),rt([c()],st.prototype,"clickEventEmitter",void 0),rt([c()],st.prototype,"dropdownEventPrevent",void 0),rt([c()],st.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),st.style='.tab-content-container.tab-style-primary{margin-left:24px;margin-right:24px}.vega-tab{cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.tab-content-container .tab-list.scroll{width:100%;overflow:hidden}.tab-content-container .tab-list.scroll .overflow-scroll>div{display:flex;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.tab-content-container .tab-list.scroll .overflow-scroll>div::-webkit-scrollbar{display:none}.tab-content-container.more-tab .vega-tab{flex-grow:1}.tab-content-container.more-tab .tab-list.custom-tab-width .vega-tab{flex-grow:0}.tab-content-container.more-tab .vega-tab.last-page{flex-grow:0}.vega-tab>div.vega-tab-container{display:flex;align-items:center}.vega-tab.custom-tab-label-width>div.vega-tab-container{min-width:0px}.vega-tab>div.vega-tab-container>div{flex-grow:1}.vega-tab.custom-tab-label-width>div.vega-tab-container>div{min-width:0px}.tab-style-primary .vega-tab:hover{background-color:rgba(var(--v-bg-tab-hover, 245, 247, 247, 1))}.tab-style-primary .vega-tab.selected,.tab-style-primary .vega-tab.selected:hover{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-tab>div>.label{display:inline-flex;align-items:center;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;cursor:pointer;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-tab>div>.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){.vega-tab>div>.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){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-tab.custom-tab-label-width>div>.label{overflow:hidden;min-width:0px;max-width:100%}.vega-tab.custom-tab-label-width>div>.label .tab-label-ellipsis{display:block;min-width:0px;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vega-tab.custom-tab-label-width>div>.label vega-tooltip{display:block;flex-grow:1;min-width:0px;max-width:100%;overflow:hidden}.vega-tab>div>.label vega-icon{padding-right:8px}.vega-tab>div>.label .vega-counter-badge{position:relative;height:20px;padding-left:8px}.vega-tab>div>.label .vega-counter-badge vega-counter-badge{position:absolute;padding-left:8px;top:10px}.vega-tab>div>.label .vega-counter-badge.dot-variant{width:20px}.vega-tab>div>.label .vega-counter-badge.dot-variant vega-counter-badge{left:10px}.vega-tab>div>.label .vega-counter-badge.one-digit{width:20px}.vega-tab>div>.label .vega-counter-badge.one-digit vega-counter-badge{left:10px}.vega-tab>div>.label .vega-counter-badge.two-digits{width:28px}.vega-tab>div>.label .vega-counter-badge.two-digits vega-counter-badge{left:14px}.vega-tab>div>.label .vega-counter-badge.multi-digits{width:32px}.vega-tab>div>.label .vega-counter-badge.multi-digits vega-counter-badge{left:16px}.vega-tab>div>.label.vega-close-icon-space{padding-right:12px}.vega-tab>div>div.vega-close-icon{padding-left:0px;flex-grow:0;padding-right:13px}.vega-tab>div>div.vega-hidden{display:none}.vega-tab>div vega-icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1));box-sizing:content-box}.vega-tab>div>div.vega-close-icon vega-icon{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-tab.disabled{pointer-events:none;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.vega-tab.disabled .label,.vega-tab.disabled vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host{display:block;width:100%;text-align:left;line-height:normal;min-width:270px}.horizontal-divider{height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));width:100%;display:none;margin-top:-1px}.tab-content-container{display:flex;gap:8px;justify-content:space-between}.tab-content-container.more-tab .tab-list{flex-grow:1;min-width:0px;width:auto}.tab-content-container .tab-list.custom-tab-width{flex-grow:1;min-width:0px;width:auto}.tab-content-container .tab-list.mixed-percentage-tab-width{flex-grow:1;min-width:0px;width:auto}div.tab-left-button,div.tab-right-button{display:inline-block;cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}div.tab-left-button.vega-hidden,div.tab-right-button.vega-hidden{display:none}div.tab-left-button vega-icon,div.tab-right-button vega-icon{box-sizing:content-box;padding:13px 13px 13px 12px}.vega-tab-group-content vega-tab-group-panel{display:none}.vega-tab-group-content vega-tab-group-panel.active{display:block}.tab-style-secondary .vega-tab>div.vega-tab-container{align-items:baseline}.tab-style-secondary+.horizontal-divider{display:block}.tab-style-secondary .vega-tab{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary .vega-tab>div>.label{padding-left:16px;padding-right:16px;padding-top:0px;padding-bottom:12px}.tab-style-secondary .vega-tab.selected>div>.label,.tab-style-secondary .vega-tab.selected>div>.label vega-icon,.tab-style-secondary .vega-tab:hover>div>.label,.tab-style-secondary .vega-tab:hover>div>.label vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.tab-style-secondary .vega-tab{border-top-width:0px;border-left-width:0px;border-right-width:0px;border-bottom-width:2px;border-style:solid;border-color:transparent}.tab-style-secondary .vega-tab.selected{border-color:rgba(var(--v-border-color-action, 19, 98, 226, 1))}.tab-style-secondary div.tab-left-button,.tab-style-secondary div.tab-right-button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary div.tab-left-button vega-icon,.tab-style-secondary div.tab-right-button vega-icon{padding:6px 13px 13px 6px}.tab-style-secondary div.tab-left-button:hover vega-icon,.tab-style-secondary div.tab-right-button:hover vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}';var lt=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};const dt=class{constructor(t){a(this,t),this.globalSlimmers=new Map,this.clickEventPrevent=new k([w],(()=>this.host),void 0,!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.isActive=!1}connectedCallback(){this.notifyGroupAddOrDelPanel("ADD")}disconnectedCallback(){this.notifyGroupAddOrDelPanel("DEL")}componentWillLoad(){this.notifyGroupAddOrDelPanel("ADD")}render(){return r(t(o,{class:this.isActive?"active":""},t("slot",null)),this.host)}notifyGroupAddOrDelPanel(t){x.notify(C,{host:this.host,type:t})}get host(){return n(this)}};lt([v()],dt.prototype,"globalSlimmers",void 0),lt([c()],dt.prototype,"clickEventPrevent",void 0),lt([c()],dt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),dt.style=":host{display:none}:host(.active){display:block}";export{st as vega_tab_group,dt as vega_tab_group_panel}
1
+ import{h as t,F as e,r as a,c as i,H as o,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{c as s,V as l,M as d,I as c}from"./p-6e1ab235.js";import{s as h}from"./p-6bd5c49b.js";import{V as b,I as v}from"./p-5c8e4e8f.js";import{P as g}from"./p-81dd00d0.js";import{d as p}from"./p-1bc5b3bc.js";import{f as u}from"./p-ba67eb96.js";import{c as f}from"./p-8387896e.js";import{D as m}from"./p-36a57431.js";import{d as y,b as w}from"./p-a83cef5a.js";import{C as x}from"./p-2d0d575f.js";import{O as T}from"./p-331a62d5.js";import{T as C}from"./p-cb378636.js";import{f as R,j,k as I,l as D}from"./p-aa135628.js";import{S as P}from"./p-1fb56e14.js";import{C as k}from"./p-abad8ffd.js";import{c as S}from"./p-3b6a6f08.js";import{T as O}from"./p-37714a3a.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-b75ee3ba.js";import"./p-fdbdf12f.js";import"./p-b438e68b.js";import"./p-affb40e8.js";import"./p-a2c7a3bc.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-255fe20b.js";import"./p-29584bb5.js";import"./p-5f377954.js";import"./p-6a334573.js";var G=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class A extends l{getTabMenuContainer(){return this.tabMenuContainer}render(){return t(e,null,t("div",{class:{"tab-content-container":!0,"more-tab":this.tabPages.length>1,"tab-style-secondary":"secondary"===this.variant,"tab-style-primary":"secondary"!==this.variant,"swipe-more-tabs":"scroll"===this.overflow},ref:t=>this.tabMenuContainer=t},"menu"===this.overflow&&this.directionButtonRenderer.render("left"),this.tabListRenderer.render(),"menu"===this.overflow&&this.directionButtonRenderer.render("right")),t("div",{class:"horizontal-divider"}),this.contentRenderer.render())}}G([s()],A.prototype,"tabPages",void 0),G([s()],A.prototype,"variant",void 0),G([s()],A.prototype,"overflow",void 0),G([s({componentFieldName:"vegaTabGroupTabListRenderer"})],A.prototype,"tabListRenderer",void 0),G([s({componentFieldName:"vegaTabGroupDirectionButtonRenderer"})],A.prototype,"directionButtonRenderer",void 0),G([s({componentFieldName:"vegaTabGroupContentRenderer"})],A.prototype,"contentRenderer",void 0);var L=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class W extends l{setSelectedDataTarget(t){this.selectedTabDataTarget=t}handleTabItemClick(t){const e=this.clickEventEmitter.emit(t);e&&!e.defaultPrevented&&(t===this.selectedTabDataTarget?this.vegaTabGroupPageIndexController.setCurrentPageIndexBySelectedTab(t):this.setSelectedDataTarget(t))}}L([s()],W.prototype,"clickEventEmitter",void 0),L([s({writable:!0})],W.prototype,"selectedTabDataTarget",void 0),L([s()],W.prototype,"vegaTabGroupPageIndexController",void 0);class F{paginate(t,e,a){const i=t.map(e);return this.doPaginateByCapacity(t,i,a)}doPaginateByCapacity(t,e,a){const i=[];let o=0;for(;o<e.length;){const n=this.valueSum(o,e,a);if(0===n)break;i.push(t.slice(o,o+n)),o+=n}return i}valueSum(t,e,a){let i=0,o=!1,n=0;const r="function"==typeof a?a(t,e):a;return e.slice(t).forEach(((t,e)=>{i+=t,i>r&&!o&&(o=!0,n=e)})),o||(n=e.slice(t).length),n}}function N(t,e){return null!=t||e.length>0&&e.every((t=>null!=t.width))}function B(t,e){return null!=z(t,e)}function z(t,e){const a=null!=t.width?t.width:e;if(null==a)return null;const i=u(a,"widthAndHeight");if(null==i||!i.trim().endsWith("%"))return null;const o=Number.parseFloat(i);return Number.isFinite(o)?o:null}function V(t){return t.some((t=>{return null!=(e=t.width)&&("string"==typeof e?e.trim().endsWith("%"):"number"!=typeof e&&Object.values(e).some((t=>"string"==typeof t&&t.trim().endsWith("%"))));var e}))}var E=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class M extends g{constructor(){super({callback:()=>{N(this.tabItemWidth,this.tabItems)&&this.initTabsWidthArray(),this.initTabPagesWithDebounce()},target:()=>this.host,shouldTrigger:()=>!this.sliderStateController.isAnimationInProgress()}),this.TAB_SIDE_BUTTON_WIDTH=37,this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE=8,this.valuePaginator=new F,this.wasUsingConstrainedLayout=!1,this.initTabPagesWithDebounce=p(this.initTabPages,80,this),this.getTabContainerSpace=(t,e)=>{const a=this.host.getBoundingClientRect().width,i=this.shouldUsePercentageBasedCapacityPagination();let o="secondary"===this.variant?a:a-48;return"menu"===this.overflow&&(t>0&&(o-=this.TAB_SIDE_BUTTON_WIDTH+this.TAB_SIDE_BUTTON_AND_CONTENT_SPACE),e.length>0&&e.slice(t).reduce(((t,e)=>t+e))>o&&o>0&&!i&&(o-=this.TAB_SIDE_BUTTON_WIDTH)),o},this.emptySourceAndHiddenDropdown=()=>{Array.from(this.host.shadowRoot.querySelectorAll("vega-dropdown")).forEach((async t=>{0===t.source.length&&await t.hide()}))}}componentDidLoad(){this.initTabPages()}componentDidRender(){this.initTabsWidthArray(),this.emptySourceAndHiddenDropdown()}handleGapChange(){this.initTabPages()}handleTabWidthArrayChange(){this.tabWidthArray.length>0&&this.initTabPages()}handleTabItemsChange(){this.initTabPagesWithDebounce()}handleTabItemWidthChange(){this.initTabPages()}setTabItems(t){this.tabItems=t}setTabWidthArray(t){this.tabWidthArray=t}initTabPages(){if(this.tabItems)if("scroll"===this.overflow)this.tabPages=[[...this.tabItems]];else{const t=this.shouldUsePercentageBasedCapacityPagination(),e=Number(this.formatAndValidGap(this.gap));this.tabPages=this.valuePaginator.paginate(this.tabItems,((a,i)=>{var o;const n=this.tabWidthArray[i];return n<=0?n:t?null!==(o=z(this.tabItems[i],this.tabItemWidth))&&void 0!==o?o:n:i>0&&!B(this.tabItems[i],this.tabItemWidth)?n+e:n}),t?100:this.getTabContainerSpace)}}shouldUsePercentageBasedCapacityPagination(){return N(this.tabItemWidth,this.tabItems)&&this.tabItems.length>0&&this.tabItems.every((t=>B(t,this.tabItemWidth)))}formatAndValidGap(t){return t.replace("size-","")}initTabsWidthArray(){if(!this.tabItems||0===this.tabItems.length)return;if(!N(this.tabItemWidth,this.tabItems)){const t=this.wasUsingConstrainedLayout||0===this.tabWidthArray.length||this.tabWidthArray.length!==this.tabItems.length||this.tabWidthArray.some((t=>0===t));if(this.wasUsingConstrainedLayout=!1,t){const t=[];this.tabItems.forEach((e=>{const a=this.host.shadowRoot.querySelector(`.vega-tab[data-target='${e.dataTarget}']`);if(a){const e=a.getBoundingClientRect().width;t.push(e)}})),t.length>0&&!t.some((t=>0===t))&&(this.tabWidthArray=[...t])}return}this.wasUsingConstrainedLayout=!0;const t=[];this.tabItems.forEach((e=>{const a=this.host.shadowRoot.querySelector(`.vega-tab[data-target='${e.dataTarget}']`);if(a){const e=a.getBoundingClientRect().width;t.push(e)}})),t.length!==this.tabItems.length||t.some((t=>0===t))||(this.tabWidthArray.length!==t.length||t.some(((t,e)=>Math.abs(t-this.tabWidthArray[e])>.5)))&&(this.tabWidthArray=[...t])}}E([s()],M.prototype,"host",void 0),E([s()],M.prototype,"gap",void 0),E([s({writable:!0})],M.prototype,"tabPages",void 0),E([s({writable:!0})],M.prototype,"tabWidthArray",void 0),E([s({writable:!0})],M.prototype,"tabItems",void 0),E([s()],M.prototype,"variant",void 0),E([s()],M.prototype,"overflow",void 0),E([s()],M.prototype,"tabItemWidth",void 0),E([s({componentFieldName:"vegaTabGroupSliderStateController"})],M.prototype,"sliderStateController",void 0),E([d("componentDidLoad")],M.prototype,"componentDidLoad",null),E([d("componentDidRender")],M.prototype,"componentDidRender",null),E([d("watchGapChange")],M.prototype,"handleGapChange",null),E([d("watchTabWidthArrayChange")],M.prototype,"handleTabWidthArrayChange",null),E([d("watchTabItemsChange")],M.prototype,"handleTabItemsChange",null),E([d("watchTabItemWidthChange")],M.prototype,"handleTabItemWidthChange",null);var _=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class $ extends l{handleTabPagesChange(){this.selectedTabDataTarget?this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget):this.setCurrentPageIndexWhenTabPagesChange()}handleSelectedDataTargetChange(){this.setCurrentPageIndexBySelectedTab(this.selectedTabDataTarget)}setCurrentPageIndexBySelectedTab(t){let e=-1;this.tabPages.forEach(((a,i)=>{-1!==a.findIndex((e=>e.dataTarget===t))&&(e=i)})),e>=0&&(this.currentPageIndex=e)}setPageIndex(t){this.currentPageIndex=t}setCurrentPageIndexWhenTabPagesChange(){this.tabPages&&this.tabPages.length&&!this.tabPages[this.currentPageIndex]&&(this.currentPageIndex=this.tabPages.length-1)}}_([s()],$.prototype,"tabPages",void 0),_([s({writable:!0})],$.prototype,"currentPageIndex",void 0),_([s()],$.prototype,"selectedTabDataTarget",void 0),_([d("watchTabPagesChange")],$.prototype,"handleTabPagesChange",null),_([d("watchSelectedTabDataTargetChange")],$.prototype,"handleSelectedDataTargetChange",null);var K=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class q extends l{constructor(){super(...arguments),this.onCloseTab=t=>{var e;const a=t.currentTarget,i=a.closest(".vega-tab"),o=(null===(e=this.host.shadowRoot)||void 0===e?void 0:e.activeElement)===a,n=this.tabItems.findIndex((t=>t.dataTarget===i.getAttribute("data-target")));let r;i.classList.contains("selected")&&(r=this.tabItems[n===this.tabItems.length-1?n-1:n+1].dataTarget,this.selectedTargetController.setSelectedDataTarget(r));const s=this.tabItems.slice(0,n).concat(this.tabItems.slice(n+1));this.tabPagesController.setTabItems(s);const l=this.tabWidthArray.slice(0,n).concat(this.tabWidthArray.slice(n+1));if(this.tabPagesController.setTabWidthArray(l),o&&r&&this.host.shadowRoot){const t=this.host.shadowRoot;requestAnimationFrame((()=>{const e=t.querySelector(`.vega-tab[data-target='${r}'] .label`);null==e||e.focus()}))}t.stopPropagation()}}render(e){return this.showCloseButton&&this.tabItems.length>1&&t("div",{class:this.showCloseButton?"vega-close-icon":"vega-close-icon vega-hidden",onClick:this.onCloseTab,role:"button",tabIndex:e.disabled?-1:0,onKeyDown:f(),"aria-label":"Close Button"},t("vega-icon",{icon:"close",size:"size-12"}))}}K([s()],q.prototype,"host",void 0),K([s()],q.prototype,"tabWidthArray",void 0),K([s()],q.prototype,"showCloseButton",void 0),K([s()],q.prototype,"tabItems",void 0),K([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],q.prototype,"selectedTargetController",void 0),K([s({componentFieldName:"vegaTabGroupPagesController"})],q.prototype,"tabPagesController",void 0);var U=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class H extends l{constructor(){super(...arguments),this.onDirectionButtonClick=t=>{this.pageIndexController.setPageIndex("left"===t?this.currentPageIndex-1:this.currentPageIndex+1)}}getDropdownRef(){return this.dropdownRef}render(e){const a=[];this.tabPages.slice("left"===e?0:this.currentPageIndex+1,"left"===e?this.currentPageIndex:this.tabPages.length).flat().map((t=>{a.push({key:t.dataTarget,label:t.label,disabled:t.disabled})}));const i="left"===e?0===this.currentPageIndex:this.currentPageIndex+1===this.tabPages.length||this.tabPages.length<=1,o="left"===e?"chevron-backward-rounded":"chevron-forward-rounded",n=a.find((t=>t.key===this.selectedTabDataTarget))?this.selectedTabDataTarget:"";return t("div",{class:{"tab-left-button":"left"===e,"tab-right-button":"right"===e,"vega-hidden":i},onClick:()=>this.onDirectionButtonClick(e),"aria-label":"left"===e?"Show previous tabs":"Show next tabs",role:"button",tabIndex:0,onKeyDown:f()},t("vega-dropdown",{source:a,translocation:{X:0,Y:16},selectType:"single",selectedSourceKey:n,"position-relative-to":this.positionRelativeTo,ref:t=>{this.dropdownRef=t,m.addUniqueObserverToNode(t,y,(t=>{this.vegaTabGroupSelectedTargetController.handleTabItemClick(t.detail)}))}},t("vega-icon",{size:"size-12",icon:o})))}}U([s()],H.prototype,"tabPages",void 0),U([s()],H.prototype,"currentPageIndex",void 0),U([s()],H.prototype,"selectedTabDataTarget",void 0),U([s()],H.prototype,"positionRelativeTo",void 0),U([s({componentFieldName:"vegaTabGroupPageIndexController"})],H.prototype,"pageIndexController",void 0),U([s()],H.prototype,"vegaTabGroupSelectedTargetController",void 0);var Y=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class X extends l{constructor(){super(...arguments),this.tabPanels=[],this.handlePanelUpdate=t=>{const{host:e,type:a}=t;"ADD"===a?this.tabPanels.push(e):this.tabPanels=this.tabPanels.filter((t=>t!==e))}}connectedCallback(){this.tabPanelUpdateObserver=new T(this.canAcceptPanelUpdate.bind(this),this.handlePanelUpdate),x.register(C,this.tabPanelUpdateObserver)}disconnectedCallback(){x.unregister(C,this.tabPanelUpdateObserver),this.tabPanels=[]}componentDidLoad(){this.initSelectedTabDataTarget()}watchSelectedTabDataTargetChange(){this.updateTabPanelsStatus(this.selectedTabDataTarget)}canAcceptPanelUpdate(t){const{host:e,type:a}=t;return"ADD"===a?R(t.host,"VEGA-TAB-GROUP")===this.host&&!this.tabPanels.includes(e):this.tabPanels&&this.tabPanels.includes(e)}initSelectedTabDataTarget(){if(this.selectedTabDataTarget)this.updateTabPanelsStatus(this.selectedTabDataTarget);else{let t=this.getDefaultActivePanelId();!t&&this.tabItems&&this.tabItems.length&&(t=this.tabItems[0].dataTarget),t&&this.selectTargetController.setSelectedDataTarget(t)}}getDefaultActivePanelId(){if(this.tabPanels&&this.tabPanels.length){const t=this.tabPanels.find((t=>!0===t.isActive));return t?t.getAttribute("id"):null}}updateTabPanelsStatus(t){this.tabPanels.length&&t&&this.tabPanels.forEach((e=>{const a=e.getAttribute("id"),i=a===t,o=this.tabItems.find((t=>t.dataTarget===a));e.setAttribute("role","tabpanel"),(null==o?void 0:o.label)?e.setAttribute("aria-label",o.label):e.removeAttribute("aria-label"),i?(e.isActive=!0,e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","false")):(e.isActive=!1,e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"))}))}}Y([s()],X.prototype,"host",void 0),Y([s()],X.prototype,"selectedTabDataTarget",void 0),Y([s()],X.prototype,"tabItems",void 0),Y([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],X.prototype,"selectTargetController",void 0),Y([d("connectedCallback")],X.prototype,"connectedCallback",null),Y([d("disconnectedCallback")],X.prototype,"disconnectedCallback",null),Y([d("componentDidLoad")],X.prototype,"componentDidLoad",null),Y([d("watchSelectedTabDataTargetChange")],X.prototype,"watchSelectedTabDataTargetChange",null);class J extends l{handleVoiceOverPanelFocus(t,e){j(t)&&requestAnimationFrame((()=>{const t=this.findPanelById(e),a=t&&I(t)||t;null==a||a.focus()}))}findPanelById(t){return Array.from(this.host.querySelectorAll("vega-tab-group-panel")).find((e=>(null==e?void 0:e.getAttribute("id"))===t))}}!function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);n>3&&r&&Object.defineProperty(e,a,r)}([s()],J.prototype,"host",void 0);var Q=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class Z extends l{constructor(){super(...arguments),this.TAB_LABEL_MAX_SIZE=32,this.getCarouselDomRef=()=>this.carouselDom}render(){const e=N(this.tabItemWidth,this.tabItems),a=V(this.tabItems)&&!e;return t("div",{class:{"tab-list":!0,menu:"menu"===this.overflow,scroll:"scroll"===this.overflow,"custom-tab-width":e,"mixed-percentage-tab-width":a}},"menu"===this.overflow&&this.renderTabListInMenuOverflow(a),"scroll"===this.overflow&&this.renderTabListInScrollOverflow())}renderTabListInMenuOverflow(e){const a=N(this.tabItemWidth,this.tabItems),i=e||a?{paddingRight:"1px"}:void 0;return t("vega-carousel",{showSlider:!1,ref:t=>this.carouselDom=t},this.tabPages.length>0?this.tabPages.map(((e,a)=>t("div",{key:a,style:i},this.renderTabList(e)))):t("div",{style:i},this.renderTabList(this.tabItems)))}renderTabListInScrollOverflow(){return t("div",{class:"overflow-scroll"},this.tabPages.map(((e,a)=>t("div",{key:a},this.renderTabList(e)))))}renderTabList(e){const a=N(this.tabItemWidth,this.tabItems),i=V(this.tabItems)&&!a,o=a||V(this.tabItems);return t("vega-flex",{gap:this.gap,role:"tablist",style:o?{width:"100%"}:void 0},e.map((e=>{const o=i&&null==e.width,n=a||o||null!=e.width,r=o||a&&B(e,this.tabItemWidth),s=D(e.dataTarget,"vega-tab-label");return t("div",{class:{"vega-tab":!0,"custom-tab-label-width":a||null!=e.width,selected:this.selectedTabDataTarget===e.dataTarget,"last-page":this.currentPageIndex+1===this.tabPages.length,"vega-flex-shrink-0":!r,"v-min-w-min":!n,disabled:Boolean(e.disabled)},style:Object.assign({flexGrow:null!=e.width?"0":void 0,width:this.resolveTabWidth(e)},r?{minWidth:"0",flexShrink:"1"}:{}),"data-target":e.dataTarget,key:e.dataTarget},t("div",{class:"vega-tab-container"},t("div",{class:{label:!0,"vega-close-icon-space":this.showCloseButton},onClick:t=>this.handleTabItemClick(t,e.dataTarget),id:s,"aria-label":this.getTabAriaLabel(e),"aria-selected":(this.selectedTabDataTarget===e.dataTarget).toString(),role:"tab",tabIndex:e.disabled?-1:0,onKeyDown:f()},this.renderPrefixIconDom(e),this.renderTabLabelDom(e,a||null!=e.width),this.renderCounterBadgeDom(e)),this.closeButtonRenderer.render(e)))})))}renderPrefixIconDom(e){const a=e.prefixIcon;return a&&t("vega-icon",{icon:a})}renderTabLabelDom(e,a){return a?this.constrainedTabLabelRenderer.render(e):e.label.length>this.TAB_LABEL_MAX_SIZE?t("vega-tooltip",{text:e.label,placement:"bottom","position-relative-to":this.positionRelativeTo},t("span",null,e.label.substring(0,this.TAB_LABEL_MAX_SIZE),"...")):e.label}renderCounterBadgeDom(e){const a=e.counterBadge,i=this.getCounterBadgeClassByCount(a);return a&&(!!a.dot||void 0!==a.count&&a.count>0)&&t("div",{class:`vega-counter-badge ${i}`,"aria-hidden":"true"},t("vega-counter-badge",{count:a.count,color:a.color,dot:a.dot}))}getTabAriaLabel(t){const e=t.counterBadge;return(null==e?void 0:e.dot)?`${t.label}, ${this.translationSlimmer.t("notification")}`:(null==e?void 0:e.count)&&e.count>0?`${t.label}, ${e.count}`:t.label}getCounterBadgeClassByCount(t){if(null==t?void 0:t.dot)return"dot-variant";if(null==t?void 0:t.count){const e=t.count.toString().length;return 1===e?"one-digit":2===e?"two-digits":"multi-digits"}return""}resolveTabWidth(t){var e,a;return null!=t.width?null!==(e=u(t.width,"widthAndHeight"))&&void 0!==e?e:void 0:null!=this.tabItemWidth&&null!==(a=u(this.tabItemWidth,"widthAndHeight"))&&void 0!==a?a:void 0}handleTabItemClick(t,e){this.selectedTargetController.handleTabItemClick(e),this.voiceOverFocusController.handleVoiceOverPanelFocus(t,e)}}Q([s()],Z.prototype,"tabPages",void 0),Q([s()],Z.prototype,"currentPageIndex",void 0),Q([s()],Z.prototype,"selectedTabDataTarget",void 0),Q([s()],Z.prototype,"gap",void 0),Q([s()],Z.prototype,"showCloseButton",void 0),Q([s()],Z.prototype,"tabItems",void 0),Q([s()],Z.prototype,"overflow",void 0),Q([s()],Z.prototype,"tabItemWidth",void 0),Q([s()],Z.prototype,"positionRelativeTo",void 0),Q([s({componentFieldName:"vegaTabGroupCloseButtonRenderer"})],Z.prototype,"closeButtonRenderer",void 0),Q([s({componentFieldName:"vegaTabGroupConstrainedTabLabelRenderer"})],Z.prototype,"constrainedTabLabelRenderer",void 0),Q([s({componentFieldName:"vegaTabGroupSelectedTargetController"})],Z.prototype,"selectedTargetController",void 0),Q([s({componentFieldName:"vegaTabGroupVoiceOverFocusController"})],Z.prototype,"voiceOverFocusController",void 0),Q([s()],Z.prototype,"translationSlimmer",void 0);var tt=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class et extends l{constructor(){super(...arguments),this.tabLabelRefs={},this.tabTooltipRefs={}}componentDidRender(){this.refreshTooltipTriggers()}refreshTooltipTriggers(){Object.keys(this.tabLabelRefs).forEach((t=>{const e=this.tabLabelRefs[t],a=this.tabTooltipRefs[t];e&&a&&(a.trigger=e.scrollWidth>e.clientWidth?"hover":"none")}))}render(e){return t("vega-tooltip",{text:e.label,trigger:"none",placement:"bottom","position-relative-to":this.positionRelativeTo,ref:t=>{this.tabTooltipRefs[e.dataTarget]=t}},t("span",{class:"tab-label-ellipsis",ref:t=>{this.tabLabelRefs[e.dataTarget]=t}},e.label))}}tt([s()],et.prototype,"positionRelativeTo",void 0),tt([d("componentDidRender")],et.prototype,"componentDidRender",null);class at extends l{render(){return"secondary"===this.variant?t("div",{class:"vega-tab-group-content"},t("slot",null)):t("vega-card",{margin:"0",padding:{default:"size-24",S:"size-12"},variant:"shadow",backgroundColor:"bg-primary"},t("div",{class:"vega-tab-group-content"},t("slot",null)))}}!function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);n>3&&r&&Object.defineProperty(e,a,r)}([s()],at.prototype,"variant",void 0);var it=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};class ot extends l{constructor(){super(...arguments),this.UPDATE_ANIMATION_FLAG_DELAY=32,this.goToPageTaskQueue=new P,this.pendingCarouselActionCount=0}async componentDidRender(){await this.goToPageTaskQueue.runTask()}async handlePageIndexChange(){const t=this.tabListRenderer.getCarouselDomRef();t&&(this.pendingCarouselActionCount+=1,setTimeout((()=>{this&&"number"==typeof this.pendingCarouselActionCount&&(this.pendingCarouselActionCount-=1)}),this.UPDATE_ANIMATION_FLAG_DELAY),await this.goToPageTaskQueue.enqueue({run:async()=>{await t.goToPage(this.currentPageIndex+1),(null!=this.tabItemWidth||this.tabItems.some((t=>null!=t.width)))&&this.constrainedTabLabelRenderer.refreshTooltipTriggers()}},!1))}isAnimationInProgress(){return this.pendingCarouselActionCount>0}}it([s({componentFieldName:"vegaTabGroupTabListRenderer"})],ot.prototype,"tabListRenderer",void 0),it([s({componentFieldName:"vegaTabGroupConstrainedTabLabelRenderer"})],ot.prototype,"constrainedTabLabelRenderer",void 0),it([s()],ot.prototype,"currentPageIndex",void 0),it([s()],ot.prototype,"tabItemWidth",void 0),it([s()],ot.prototype,"tabItems",void 0),it([d("componentDidRender")],ot.prototype,"componentDidRender",null),it([d("watchCurrentPageIndexChange")],ot.prototype,"handlePageIndexChange",null);const nt=[{payloadKey:"VARIANT_IS_PRIMARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:t=>"primary"===t.variant},{payloadKey:"VARIANT_IS_SECONDARY",payloadDescription:"Specifies the visual style and prominence of the tab group",payloadValue:t=>"secondary"===t.variant}];var rt=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};const st=class{constructor(t){a(this,t),this.vegaClick=i(this,"vegaClick",7),this.click=i(this,"click",7),this.globalSlimmers=new Map,this.vegaTabGroupRenderer=new A,this.translationSlimmer=new O,this.vegaTabGroupDirectionButtonRenderer=new H,this.vegaTabGroupTabListRenderer=new Z,this.vegaTabGroupConstrainedTabLabelRenderer=new et,this.vegaTabGroupCloseButtonRenderer=new q,this.vegaTabGroupPagesController=new M,this.vegaTabGroupSelectedTargetController=new W,this.vegaTabGroupPageIndexController=new $,this.vegaTabGroupPanelController=new X,this.vegaTabGroupVoiceOverFocusController=new J,this.vegaTabGroupContentRenderer=new at,this.vegaTabGroupSliderStateController=new ot,this.clickEventEmitter=S(st,w),this.dropdownEventPrevent=new k([w],(()=>this.vegaTabGroupRenderer.getTabMenuContainer())),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(nt),this.tabPages=[],this.tabWidthArray=[],this.currentPageIndex=0,this.selectedTabDataTarget="",this.gap="size-8",this.showCloseButton=!1,this.tabItems=[],this.variant="primary",this.overflow="menu"}watchTabPagesChange(){}watchTabWidthArrayChange(){}async watchCurrentPageIndexChange(t){}watchSelectedTabDataTargetChange(){}watchGapChange(){}watchTabItemsChange(){}watchTabItemWidthChange(){}componentDidLoad(){}componentDidRender(){}render(){return h(t("slot",null)),r(t(o,null,this.vegaTabGroupRenderer.render()),this.host)}get host(){return n(this)}static get watchers(){return{tabPages:["watchTabPagesChange"],tabWidthArray:["watchTabWidthArrayChange"],currentPageIndex:["watchCurrentPageIndexChange"],selectedTabDataTarget:["watchSelectedTabDataTargetChange"],gap:["watchGapChange"],tabItems:["watchTabItemsChange"],tabItemWidth:["watchTabItemWidthChange"]}}};rt([v()],st.prototype,"globalSlimmers",void 0),rt([c()],st.prototype,"vegaTabGroupRenderer",void 0),rt([c()],st.prototype,"translationSlimmer",void 0),rt([c()],st.prototype,"vegaTabGroupDirectionButtonRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupTabListRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupConstrainedTabLabelRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupCloseButtonRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupPagesController",void 0),rt([c()],st.prototype,"vegaTabGroupSelectedTargetController",void 0),rt([c()],st.prototype,"vegaTabGroupPageIndexController",void 0),rt([c()],st.prototype,"vegaTabGroupPanelController",void 0),rt([c()],st.prototype,"vegaTabGroupVoiceOverFocusController",void 0),rt([c()],st.prototype,"vegaTabGroupContentRenderer",void 0),rt([c()],st.prototype,"vegaTabGroupSliderStateController",void 0),rt([c()],st.prototype,"clickEventEmitter",void 0),rt([c()],st.prototype,"dropdownEventPrevent",void 0),rt([c()],st.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),st.style='.tab-content-container.tab-style-primary{margin-left:24px;margin-right:24px}.vega-tab{cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.tab-content-container .tab-list.scroll{width:100%;overflow:hidden}.tab-content-container .tab-list.scroll .overflow-scroll>div{display:flex;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.tab-content-container .tab-list.scroll .overflow-scroll>div::-webkit-scrollbar{display:none}.tab-content-container.more-tab .vega-tab{flex-grow:1}.tab-content-container.more-tab .tab-list.custom-tab-width .vega-tab{flex-grow:0}.tab-content-container.more-tab .vega-tab.last-page{flex-grow:0}.vega-tab>div.vega-tab-container{display:flex;align-items:center}.vega-tab.custom-tab-label-width>div.vega-tab-container{min-width:0px}.vega-tab>div.vega-tab-container>div{flex-grow:1}.vega-tab.custom-tab-label-width>div.vega-tab-container>div{min-width:0px}.tab-style-primary .vega-tab:hover{background-color:rgba(var(--v-bg-tab-hover, 245, 247, 247, 1))}.tab-style-primary .vega-tab.selected,.tab-style-primary .vega-tab.selected:hover{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-tab>div>.label{display:inline-flex;align-items:center;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;padding-top:8px;padding-bottom:8px;padding-left:16px;padding-right:16px;cursor:pointer;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-tab>div>.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){.vega-tab>div>.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){.vega-tab>div>.label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}.vega-tab.custom-tab-label-width>div>.label{overflow:hidden;min-width:0px;max-width:100%}.vega-tab.custom-tab-label-width>div>.label .tab-label-ellipsis{display:block;min-width:0px;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vega-tab.custom-tab-label-width>div>.label vega-tooltip{display:block;flex-grow:1;min-width:0px;max-width:100%;overflow:hidden}.vega-tab>div>.label vega-icon{padding-right:8px}.vega-tab>div>.label .vega-counter-badge{position:relative;height:20px;padding-left:8px}.vega-tab>div>.label .vega-counter-badge vega-counter-badge{position:absolute;padding-left:8px;top:10px}.vega-tab>div>.label .vega-counter-badge.dot-variant{width:20px}.vega-tab>div>.label .vega-counter-badge.dot-variant vega-counter-badge{left:10px}.vega-tab>div>.label .vega-counter-badge.one-digit{width:20px}.vega-tab>div>.label .vega-counter-badge.one-digit vega-counter-badge{left:10px}.vega-tab>div>.label .vega-counter-badge.two-digits{width:28px}.vega-tab>div>.label .vega-counter-badge.two-digits vega-counter-badge{left:14px}.vega-tab>div>.label .vega-counter-badge.multi-digits{width:32px}.vega-tab>div>.label .vega-counter-badge.multi-digits vega-counter-badge{left:16px}.vega-tab>div>.label.vega-close-icon-space{padding-right:12px}.vega-tab>div>div.vega-close-icon{padding-left:0px;flex-grow:0;padding-right:13px}.vega-tab>div>div.vega-hidden{display:none}.vega-tab>div vega-icon{color:rgba(var(--v-text-primary, 32, 54, 69, 1));box-sizing:content-box}.vega-tab>div>div.vega-close-icon vega-icon{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-tab.disabled{pointer-events:none;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1))}.vega-tab.disabled .label,.vega-tab.disabled vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host{display:block;width:100%;text-align:left;line-height:normal;min-width:270px}.horizontal-divider{height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));width:100%;display:none;margin-top:-1px}.tab-content-container{display:flex;gap:8px;justify-content:space-between}.tab-content-container.more-tab .tab-list{flex-grow:1;min-width:0px;width:auto}.tab-content-container .tab-list.custom-tab-width{flex-grow:1;min-width:0px;width:auto}.tab-content-container .tab-list.mixed-percentage-tab-width{flex-grow:1;min-width:0px;width:auto}div.tab-left-button,div.tab-right-button{display:inline-block;cursor:pointer;border-top-left-radius:8px;border-top-right-radius:8px;background-color:rgba(var(--v-bg-action-quaternary, 222, 225, 227, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}div.tab-left-button.vega-hidden,div.tab-right-button.vega-hidden{display:none}div.tab-left-button vega-icon,div.tab-right-button vega-icon{box-sizing:content-box;padding:13px 13px 13px 12px}.vega-tab-group-content vega-tab-group-panel{display:none}.vega-tab-group-content vega-tab-group-panel.active{display:block}.tab-style-secondary .vega-tab>div.vega-tab-container{align-items:baseline}.tab-style-secondary+.horizontal-divider{display:block}.tab-style-secondary .vega-tab{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary .vega-tab>div>.label{padding-left:16px;padding-right:16px;padding-top:0px;padding-bottom:12px}.tab-style-secondary .vega-tab.selected>div>.label,.tab-style-secondary .vega-tab.selected>div>.label vega-icon,.tab-style-secondary .vega-tab:hover>div>.label,.tab-style-secondary .vega-tab:hover>div>.label vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.tab-style-secondary .vega-tab{border-top-width:0px;border-left-width:0px;border-right-width:0px;border-bottom-width:2px;border-style:solid;border-color:transparent}.tab-style-secondary .vega-tab.selected{border-color:rgba(var(--v-border-color-action, 19, 98, 226, 1))}.tab-style-secondary div.tab-left-button,.tab-style-secondary div.tab-right-button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}.tab-style-secondary div.tab-left-button vega-icon,.tab-style-secondary div.tab-right-button vega-icon{padding:6px 13px 13px 6px}.tab-style-secondary div.tab-left-button:hover vega-icon,.tab-style-secondary div.tab-right-button:hover vega-icon{color:rgba(var(--v-text-link, 19, 98, 226, 1))}';var lt=function(t,e,a,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(n<3?o(r):n>3?o(e,a,r):o(e,a))||r);return n>3&&r&&Object.defineProperty(e,a,r),r};const dt=class{constructor(t){a(this,t),this.globalSlimmers=new Map,this.clickEventPrevent=new k([w],(()=>this.host),void 0,!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.isActive=!1}connectedCallback(){this.notifyGroupAddOrDelPanel("ADD")}disconnectedCallback(){this.notifyGroupAddOrDelPanel("DEL")}componentWillLoad(){this.notifyGroupAddOrDelPanel("ADD")}render(){return r(t(o,{class:this.isActive?"active":""},t("slot",null)),this.host)}notifyGroupAddOrDelPanel(t){x.notify(C,{host:this.host,type:t})}get host(){return n(this)}};lt([v()],dt.prototype,"globalSlimmers",void 0),lt([c()],dt.prototype,"clickEventPrevent",void 0),lt([c()],dt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),dt.style=":host{display:none}:host(.active){display:block}";export{st as vega_tab_group,dt as vega_tab_group_panel}
@@ -1 +1 @@
1
- import{h as e,F as t,r as o,c as i,H as r,g as a}from"./p-6b2342e0.js";import{s as l}from"./p-519a7d55.js";import{c as s,V as n,M as d,I as c}from"./p-6e1ab235.js";import{V as v,I as p}from"./p-5c8e4e8f.js";import{V as h}from"./p-44245a36.js";import{D as f}from"./p-36a57431.js";import{b as g,c as u,F as b,t as m,G as x,H as w}from"./p-a83cef5a.js";import{g as C}from"./p-8b5d3a52.js";import{c as y}from"./p-8387896e.js";import{t as j}from"./p-aacf6920.js";import{c as F}from"./p-3b6a6f08.js";import{C as R}from"./p-2d0d575f.js";import{F as L}from"./p-cb378636.js";import{F as k}from"./p-5a347a15.js";import{F as z}from"./p-fd70418f.js";import{D as E}from"./p-b19b1c08.js";import{T as M}from"./p-7f711049.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-29584bb5.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-53e3f259.js";import"./p-c0eb8c58.js";import"./p-cc569b54.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-7d3419c7.js";import"./p-8bc15ed0.js";import"./p-87a4d75f.js";import"./p-982747ef.js";var V=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class I extends n{render(){return e(t,null,e("vega-field-label",{isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label}),this.vegaFileUploaderContainerRenderer.render(),this.hint?e("vega-hint",null,this.hint):null,this.vegaFileUploaderFileListRenderer.render())}}V([s()],I.prototype,"required",void 0),V([s()],I.prototype,"optional",void 0),V([s()],I.prototype,"disabled",void 0),V([s()],I.prototype,"label",void 0),V([s()],I.prototype,"hint",void 0),V([s()],I.prototype,"vegaFileUploaderContainerRenderer",void 0),V([s()],I.prototype,"vegaFileUploaderFileListRenderer",void 0);var U=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class O extends n{constructor(){super(...arguments),this.handleDropAreaClick=e=>{e.stopPropagation(),this.shouldDisableUploadButton()||this.triggerFileInputClick()},this.triggerFileInputClick=()=>{this.inputElementRef.click()},this.inputChangeHandler=e=>{e.stopPropagation();const t=this.getVegaFilesFromFileList(e.target.files);this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(t)),this.inputElementRef.value=""},this.dropHandler=e=>{var t;if(e.preventDefault(),!this.shouldDisableUploadButton()){const o=this.getVegaFilesFromFileList(this.dropFileFilterController.process(null===(t=e.dataTransfer)||void 0===t?void 0:t.files));this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(o))}}}getUploaderContainerRef(){return this.uploaderContainerRef}render(){return e("div",{class:"vega-file-uploader-container",ref:e=>this.uploaderContainerRef=e},e("input",{onChange:this.inputChangeHandler,type:"file",multiple:!this.fileLimitController.isSingleMode(),accept:this.accept,style:{display:"none"},ref:e=>this.inputElementRef=e}),"uploadButton"===this.variant?this.renderUploadButton():this.renderUploadDropArea())}renderUploadButton(){return e("vega-button",{label:"Upload Document",icon:h.getIconKey("arrow-up-from-line"),variant:"secondary",size:"small",disabled:this.shouldDisableUploadButton(),ref:e=>{f.addUniqueObserverToNode(e,g,this.triggerFileInputClick)}})}renderUploadDropArea(){return e("vega-box",{class:{"vega-file-upload-area":!0,disabled:this.shouldDisableUploadButton()},padding:"size-24",border:"border-input-field",borderStyle:"dashed",backgroundColor:"bg-tertiary",corners:"rounded-8",tabIndex:0,onDrop:this.dropHandler,onDragEnter:this.preventDefaultBehavior,onDragOver:this.preventDefaultBehavior,onClick:this.handleDropAreaClick,onKeyDown:y()},e("vega-flex",{gap:"size-8",alignItems:"center",justifyContent:"center"},e("vega-icon",{color:"text-link",icon:h.getIconKey("arrow-up-from-line")}),e("vega-font",{color:"text-link",variant:"font-btn-label"},this.translationSlimmer.t("Select or drop your file here"))))}preventDefaultBehavior(e){e.preventDefault()}selectFileChangeEventEmitHandler(e){e&&e.length&&(this.selectFileChangeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value&&this.value.length?(new Array).concat(this.value,e):e))}getVegaFilesFromFileList(e){const t=[];return e&&e.length&&Array.from(e).map((e=>{t.push({key:C(),name:e.name,url:e})})),t}shouldDisableUploadButton(){return this.disabled||!!(this.value&&this.maxCount&&this.value.length>=this.maxCount)}filterExceedLimitFiles(e){const t=Number(this.maxCount);if(!isNaN(t)&&t&&e.length){const o=Math.max(0,t-(this.value?this.value.length:0));return e.slice(0,o)}return e}}h.register({"arrow-up-from-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.3V208 320c0 17.7 14.3 32 32 32s32-14.3 32-32V208 141.3l73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"/></svg>'}}),U([s()],O.prototype,"variant",void 0),U([s()],O.prototype,"accept",void 0),U([s()],O.prototype,"disabled",void 0),U([s()],O.prototype,"value",void 0),U([s()],O.prototype,"selectFileChangeEventEmitter",void 0),U([s()],O.prototype,"vegaFileUploaderValueController",void 0),U([s()],O.prototype,"dropFileFilterController",void 0),U([s()],O.prototype,"translationSlimmer",void 0),U([s()],O.prototype,"fileLimitController",void 0),U([s()],O.prototype,"maxCount",void 0);var D=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class A extends n{constructor(){super(...arguments),this.isDeleteButtonDisabled=e=>this.disabled||this.disableDeleteOnUpload&&"uploading"===e.status,this.isDeleteButtonHidden=e=>this.hideDeleteButton||!0===e.hideDeleteButton,this.fileRemoveHandler=e=>{this.removeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value.filter((t=>t!==e)))},this.fileReUploadHandler=e=>{this.retryEventEmitter.emit(e)},this.filePreviewHandler=e=>{this.previewEventEmitter.emit(e)}}render(){const t=!this.value||this.value.length<1;return e("div",{class:{"vega-file-uploader-file-list":!0,"vega-file-list-hidden":t}},!t&&this.value.map((t=>{const o=this.isDeleteButtonDisabled(t),i=this.isDeleteButtonHidden(t);return e("vega-box",{key:t.key,class:"vega-file-uploader-file",padding:"size-8",corners:"rounded-8"},e("vega-flex",{alignItems:"start",justifyContent:"space-between"},e("vega-flex",{class:"vega-file-status-and-name",gap:"size-8",alignItems:"start"},e("div",{style:{paddingTop:"3px"}},this.vegaFileUploaderFileStatusRenderer.render(t.status,t.uploadingPercent)),e("vega-flex",{gap:"size-4",direction:"col"},e("vega-font",{color:"done"===t.status||"error"===t.status?"text-primary":"text-secondary",variant:"font-field-label"},t.name),"error"===t.status&&t.errorMessage&&e("vega-font",{color:"text-error",variant:"font-footnote1-short"},t.errorMessage))),e("vega-flex",{gap:"size-4",class:"vega-file-list-buttons",justifyContent:"end"},t.previewable&&e("vega-button-circle",{class:"vega-file-preview-button",variant:"icon-only",size:"small",icon:"zoom-in",iconColor:"text-secondary",label:"Preview",tooltip:{disableInteractive:!0},ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.filePreviewHandler(t)}))}}),"error"===t.status&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("arrow-rotate-right"),iconColor:"text-secondary",label:"Retry",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileReUploadHandler(t)}))}}),!i&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("trash-can"),iconColor:"text-secondary",label:"Delete",tooltip:{disableInteractive:!0},disabled:o,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileRemoveHandler(t)}))}}))))})))}}h.register({"trash-can":j,"arrow-rotate-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M456 224c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24s-24 10.7-24 24v80.1l-20-23.5C371 63.4 309.1 32 240 32C116.3 32 16 132.3 16 256s100.3 224 224 224c50.4 0 97-16.7 134.4-44.8c10.6-8 12.7-23 4.8-33.6s-23-12.7-33.6-4.8C316.2 418.9 279.7 432 240 432c-97.2 0-176-78.8-176-176s78.8-176 176-176c54.3 0 102.9 24.6 135.2 63.4l.1 .2 0 0L402.9 176H312c-13.3 0-24 10.7-24 24s10.7 24 24 24H456z"/></svg>'}}),D([s()],A.prototype,"value",void 0),D([s()],A.prototype,"disabled",void 0),D([s()],A.prototype,"hideDeleteButton",void 0),D([s()],A.prototype,"disableDeleteOnUpload",void 0),D([s()],A.prototype,"vegaFileUploaderFileStatusRenderer",void 0),D([s()],A.prototype,"removeEventEmitter",void 0),D([s()],A.prototype,"vegaFileUploaderValueController",void 0),D([s()],A.prototype,"retryEventEmitter",void 0),D([s()],A.prototype,"previewEventEmitter",void 0);class S extends n{render(t,o){switch(t){case"uploading":return e("vega-loading-indicator",Object.assign({class:"vega-file-list-status",mode:o?"determinate":"indeterminate",size:"micro"},o?{percent:o}:{}));case"done":return e("vega-icon",{class:"vega-file-list-status",color:"text-success",icon:h.getIconKey("circle-check-regular")});case"error":return e("vega-icon",{class:"vega-file-list-status",color:"text-error",icon:h.getIconKey("circle-xmark")});default:return e("vega-loading-indicator",{class:"vega-file-list-status",mode:"determinate",size:"micro"})}}}h.register({"circle-check-regular":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'},"circle-xmark":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175V175zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'}});var B=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class H extends n{valueChangeHandler(e){!e||Array.isArray(e)?(this.changeEventEmitter.emit(e),R.notify(L,{host:this.host,detail:this.value})):e&&!Array.isArray(e)&&this.setValue(null)}setValue(e){this.value=e}}B([s()],H.prototype,"host",void 0),B([s({writable:!0})],H.prototype,"value",void 0),B([s()],H.prototype,"changeEventEmitter",void 0),B([d("watchValue")],H.prototype,"valueChangeHandler",null);var N=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class P extends n{isSingleMode(){return 1===Number(this.maxCount)}checkMaxCount(){null!==this.maxCount&&this.maxCount<1&&(this.maxCount=null)}}N([s({writable:!0})],P.prototype,"maxCount",void 0),N([d("componentDidLoad"),d("watchMaxCount")],P.prototype,"checkMaxCount",null);var G=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const q=class{constructor(e){o(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaSelectedFileChange=i(this,"vegaSelectedFileChange",7),this.selectedFileChange=i(this,"selectedFileChange",7),this.vegaRemove=i(this,"vegaRemove",7),this.remove=i(this,"remove",7),this.vegaRetry=i(this,"vegaRetry",7),this.retry=i(this,"retry",7),this.vegaPreview=i(this,"vegaPreview",7),this.preview=i(this,"preview",7),this.globalSlimmers=new Map,this.translationSlimmer=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new z:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaFileUploaderContainerRenderer.getUploaderContainerRef(),touchableAreaGetter:()=>[this.vegaFileUploaderContainerRenderer.getUploaderContainerRef()]}),this.vegaFileUploaderRenderer=new I,this.vegaFileUploaderContainerRenderer=new O,this.vegaFileUploaderFileListRenderer=new A,this.vegaFileUploaderFileStatusRenderer=new S,this.vegaFileUploaderValueController=new H,this.dropFileFilterController=new E,this.fileLimitController=new P,this.changeEventEmitter=F(q,u),this.selectFileChangeEventEmitter=F(q,b),this.removeEventEmitter=F(q,m),this.retryEventEmitter=F(q,x),this.previewEventEmitter=F(q,w),this.label="",this.variant="uploadArea",this.hint="",this.value=[],this.disabled=!1,this.hideDeleteButton=!1,this.disableDeleteOnUpload=!1,this.maxCount=null,this.required=!1,this.optional=!1,this.name="",this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchValue(e){}watchMaxCount(){}watchValidationRules(){}render(){return l(e(r,null,this.vegaFileUploaderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],maxCount:["watchMaxCount"],validationRules:["watchValidationRules"]}}};G([p()],q.prototype,"globalSlimmers",void 0),G([c()],q.prototype,"translationSlimmer",void 0),G([c()],q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G([c()],q.prototype,"formFieldController",void 0),G([c()],q.prototype,"vegaFileUploaderRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderContainerRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderFileListRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderFileStatusRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderValueController",void 0),G([c()],q.prototype,"dropFileFilterController",void 0),G([c()],q.prototype,"fileLimitController",void 0),G([c()],q.prototype,"changeEventEmitter",void 0),G([c()],q.prototype,"selectFileChangeEventEmitter",void 0),G([c()],q.prototype,"removeEventEmitter",void 0),G([c()],q.prototype,"retryEventEmitter",void 0),G([c()],q.prototype,"previewEventEmitter",void 0),q.style=':host{display:inline-block;text-align:left;width:100%;line-height:normal}:host .vega-file-uploader-container .vega-file-upload-area{text-align:center}:host .vega-file-uploader-container .vega-file-upload-area:hover{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1))}:host .vega-file-uploader-container .vega-file-upload-area:hover vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:hover vega-font{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-file-uploader-container .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-file-uploader-container .vega-file-upload-area:active{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area:active vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:active vega-font{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area.disabled{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1));outline:none}:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-icon,:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-file-uploader-container vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error .vega-file-upload-area{border-color:rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:hover{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-file-uploader-container.error .vega-file-upload-area:active{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error vega-button::part(button),:host .vega-file-uploader-container.error vega-button::part(button):hover{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1));border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error vega-button::part(button):hover{background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-file-uploader-container.error vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error vega-button::part(button):active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-file-uploader-file-list .vega-file-uploader-file .vega-file-preview-button{visibility:hidden}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover{background-color:rgba(var(--v-bg-action-tertiary-hover, 4, 4, 28, 0.05))}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover .vega-file-preview-button{visibility:visible}:host .vega-file-uploader-file-list .vega-file-list-buttons{margin-left:8px;flex-shrink:0}:host .vega-file-uploader-file-list .vega-file-list-status svg{width:16px;height:16px}:host .vega-file-uploader-file-list .vega-file-status-and-name{padding-top:5px}:host .vega-file-uploader-file-list .vega-file-status-and-name vega-font{word-break:break-word}:host vega-field-label{margin-bottom:8px}:host .vega-file-uploader-file-list{margin-top:8px}:host .vega-file-uploader-file-list.vega-file-list-hidden{display:none}:host .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){: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{q as vega_file_uploader}
1
+ import{h as e,F as t,r as o,c as i,H as r,g as a}from"./p-6b2342e0.js";import{s as l}from"./p-519a7d55.js";import{c as s,V as n,M as d,I as c}from"./p-6e1ab235.js";import{V as v,I as p}from"./p-5c8e4e8f.js";import{V as h}from"./p-44245a36.js";import{D as f}from"./p-36a57431.js";import{b as g,c as u,F as b,t as m,G as x,H as w}from"./p-a83cef5a.js";import{g as C}from"./p-8b5d3a52.js";import{c as y}from"./p-8387896e.js";import{t as j}from"./p-aacf6920.js";import{c as F}from"./p-3b6a6f08.js";import{C as R}from"./p-2d0d575f.js";import{F as L}from"./p-cb378636.js";import{F as k}from"./p-a9fc4043.js";import{F as z}from"./p-fd70418f.js";import{D as E}from"./p-b19b1c08.js";import{T as M}from"./p-37714a3a.js";import"./p-d1d91f1a.js";import"./p-5c285374.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-aa135628.js";import"./p-29584bb5.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-53e3f259.js";import"./p-affb40e8.js";import"./p-cc569b54.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-71909102.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-7d3419c7.js";import"./p-8bc15ed0.js";import"./p-87a4d75f.js";import"./p-982747ef.js";var V=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class I extends n{render(){return e(t,null,e("vega-field-label",{isFieldRequired:this.required,disabled:this.disabled,optional:this.optional,label:this.label}),this.vegaFileUploaderContainerRenderer.render(),this.hint?e("vega-hint",null,this.hint):null,this.vegaFileUploaderFileListRenderer.render())}}V([s()],I.prototype,"required",void 0),V([s()],I.prototype,"optional",void 0),V([s()],I.prototype,"disabled",void 0),V([s()],I.prototype,"label",void 0),V([s()],I.prototype,"hint",void 0),V([s()],I.prototype,"vegaFileUploaderContainerRenderer",void 0),V([s()],I.prototype,"vegaFileUploaderFileListRenderer",void 0);var U=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class O extends n{constructor(){super(...arguments),this.handleDropAreaClick=e=>{e.stopPropagation(),this.shouldDisableUploadButton()||this.triggerFileInputClick()},this.triggerFileInputClick=()=>{this.inputElementRef.click()},this.inputChangeHandler=e=>{e.stopPropagation();const t=this.getVegaFilesFromFileList(e.target.files);this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(t)),this.inputElementRef.value=""},this.dropHandler=e=>{var t;if(e.preventDefault(),!this.shouldDisableUploadButton()){const o=this.getVegaFilesFromFileList(this.dropFileFilterController.process(null===(t=e.dataTransfer)||void 0===t?void 0:t.files));this.selectFileChangeEventEmitHandler(this.filterExceedLimitFiles(o))}}}getUploaderContainerRef(){return this.uploaderContainerRef}render(){return e("div",{class:"vega-file-uploader-container",ref:e=>this.uploaderContainerRef=e},e("input",{onChange:this.inputChangeHandler,type:"file",multiple:!this.fileLimitController.isSingleMode(),accept:this.accept,style:{display:"none"},ref:e=>this.inputElementRef=e}),"uploadButton"===this.variant?this.renderUploadButton():this.renderUploadDropArea())}renderUploadButton(){return e("vega-button",{label:"Upload Document",icon:h.getIconKey("arrow-up-from-line"),variant:"secondary",size:"small",disabled:this.shouldDisableUploadButton(),ref:e=>{f.addUniqueObserverToNode(e,g,this.triggerFileInputClick)}})}renderUploadDropArea(){return e("vega-box",{class:{"vega-file-upload-area":!0,disabled:this.shouldDisableUploadButton()},padding:"size-24",border:"border-input-field",borderStyle:"dashed",backgroundColor:"bg-tertiary",corners:"rounded-8",tabIndex:0,onDrop:this.dropHandler,onDragEnter:this.preventDefaultBehavior,onDragOver:this.preventDefaultBehavior,onClick:this.handleDropAreaClick,onKeyDown:y()},e("vega-flex",{gap:"size-8",alignItems:"center",justifyContent:"center"},e("vega-icon",{color:"text-link",icon:h.getIconKey("arrow-up-from-line")}),e("vega-font",{color:"text-link",variant:"font-btn-label"},this.translationSlimmer.t("Select or drop your file here"))))}preventDefaultBehavior(e){e.preventDefault()}selectFileChangeEventEmitHandler(e){e&&e.length&&(this.selectFileChangeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value&&this.value.length?(new Array).concat(this.value,e):e))}getVegaFilesFromFileList(e){const t=[];return e&&e.length&&Array.from(e).map((e=>{t.push({key:C(),name:e.name,url:e})})),t}shouldDisableUploadButton(){return this.disabled||!!(this.value&&this.maxCount&&this.value.length>=this.maxCount)}filterExceedLimitFiles(e){const t=Number(this.maxCount);if(!isNaN(t)&&t&&e.length){const o=Math.max(0,t-(this.value?this.value.length:0));return e.slice(0,o)}return e}}h.register({"arrow-up-from-line":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.3V208 320c0 17.7 14.3 32 32 32s32-14.3 32-32V208 141.3l73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"/></svg>'}}),U([s()],O.prototype,"variant",void 0),U([s()],O.prototype,"accept",void 0),U([s()],O.prototype,"disabled",void 0),U([s()],O.prototype,"value",void 0),U([s()],O.prototype,"selectFileChangeEventEmitter",void 0),U([s()],O.prototype,"vegaFileUploaderValueController",void 0),U([s()],O.prototype,"dropFileFilterController",void 0),U([s()],O.prototype,"translationSlimmer",void 0),U([s()],O.prototype,"fileLimitController",void 0),U([s()],O.prototype,"maxCount",void 0);var D=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class A extends n{constructor(){super(...arguments),this.isDeleteButtonDisabled=e=>this.disabled||this.disableDeleteOnUpload&&"uploading"===e.status,this.isDeleteButtonHidden=e=>this.hideDeleteButton||!0===e.hideDeleteButton,this.fileRemoveHandler=e=>{this.removeEventEmitter.emit(e).defaultPrevented||this.vegaFileUploaderValueController.setValue(this.value.filter((t=>t!==e)))},this.fileReUploadHandler=e=>{this.retryEventEmitter.emit(e)},this.filePreviewHandler=e=>{this.previewEventEmitter.emit(e)}}render(){const t=!this.value||this.value.length<1;return e("div",{class:{"vega-file-uploader-file-list":!0,"vega-file-list-hidden":t}},!t&&this.value.map((t=>{const o=this.isDeleteButtonDisabled(t),i=this.isDeleteButtonHidden(t);return e("vega-box",{key:t.key,class:"vega-file-uploader-file",padding:"size-8",corners:"rounded-8"},e("vega-flex",{alignItems:"start",justifyContent:"space-between"},e("vega-flex",{class:"vega-file-status-and-name",gap:"size-8",alignItems:"start"},e("div",{style:{paddingTop:"3px"}},this.vegaFileUploaderFileStatusRenderer.render(t.status,t.uploadingPercent)),e("vega-flex",{gap:"size-4",direction:"col"},e("vega-font",{color:"done"===t.status||"error"===t.status?"text-primary":"text-secondary",variant:"font-field-label"},t.name),"error"===t.status&&t.errorMessage&&e("vega-font",{color:"text-error",variant:"font-footnote1-short"},t.errorMessage))),e("vega-flex",{gap:"size-4",class:"vega-file-list-buttons",justifyContent:"end"},t.previewable&&e("vega-button-circle",{class:"vega-file-preview-button",variant:"icon-only",size:"small",icon:"zoom-in",iconColor:"text-secondary",label:"Preview",tooltip:{disableInteractive:!0},ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.filePreviewHandler(t)}))}}),"error"===t.status&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("arrow-rotate-right"),iconColor:"text-secondary",label:"Retry",tooltip:{disableInteractive:!0},disabled:this.disabled,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileReUploadHandler(t)}))}}),!i&&e("vega-button-circle",{variant:"icon-only",size:"small",icon:h.getIconKey("trash-can"),iconColor:"text-secondary",label:"Delete",tooltip:{disableInteractive:!0},disabled:o,ref:e=>{f.addUniqueObserverToNode(e,g,(()=>{this.fileRemoveHandler(t)}))}}))))})))}}h.register({"trash-can":j,"arrow-rotate-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M456 224c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24s-24 10.7-24 24v80.1l-20-23.5C371 63.4 309.1 32 240 32C116.3 32 16 132.3 16 256s100.3 224 224 224c50.4 0 97-16.7 134.4-44.8c10.6-8 12.7-23 4.8-33.6s-23-12.7-33.6-4.8C316.2 418.9 279.7 432 240 432c-97.2 0-176-78.8-176-176s78.8-176 176-176c54.3 0 102.9 24.6 135.2 63.4l.1 .2 0 0L402.9 176H312c-13.3 0-24 10.7-24 24s10.7 24 24 24H456z"/></svg>'}}),D([s()],A.prototype,"value",void 0),D([s()],A.prototype,"disabled",void 0),D([s()],A.prototype,"hideDeleteButton",void 0),D([s()],A.prototype,"disableDeleteOnUpload",void 0),D([s()],A.prototype,"vegaFileUploaderFileStatusRenderer",void 0),D([s()],A.prototype,"removeEventEmitter",void 0),D([s()],A.prototype,"vegaFileUploaderValueController",void 0),D([s()],A.prototype,"retryEventEmitter",void 0),D([s()],A.prototype,"previewEventEmitter",void 0);class S extends n{render(t,o){switch(t){case"uploading":return e("vega-loading-indicator",Object.assign({class:"vega-file-list-status",mode:o?"determinate":"indeterminate",size:"micro"},o?{percent:o}:{}));case"done":return e("vega-icon",{class:"vega-file-list-status",color:"text-success",icon:h.getIconKey("circle-check-regular")});case"error":return e("vega-icon",{class:"vega-file-list-status",color:"text-error",icon:h.getIconKey("circle-xmark")});default:return e("vega-loading-indicator",{class:"vega-file-list-status",mode:"determinate",size:"micro"})}}}h.register({"circle-check-regular":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'},"circle-xmark":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M175 175C184.4 165.7 199.6 165.7 208.1 175L255.1 222.1L303 175C312.4 165.7 327.6 165.7 336.1 175C346.3 184.4 346.3 199.6 336.1 208.1L289.9 255.1L336.1 303C346.3 312.4 346.3 327.6 336.1 336.1C327.6 346.3 312.4 346.3 303 336.1L255.1 289.9L208.1 336.1C199.6 346.3 184.4 346.3 175 336.1C165.7 327.6 165.7 312.4 175 303L222.1 255.1L175 208.1C165.7 199.6 165.7 184.4 175 175V175zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>'}});var B=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class H extends n{valueChangeHandler(e){!e||Array.isArray(e)?(this.changeEventEmitter.emit(e),R.notify(L,{host:this.host,detail:this.value})):e&&!Array.isArray(e)&&this.setValue(null)}setValue(e){this.value=e}}B([s()],H.prototype,"host",void 0),B([s({writable:!0})],H.prototype,"value",void 0),B([s()],H.prototype,"changeEventEmitter",void 0),B([d("watchValue")],H.prototype,"valueChangeHandler",null);var N=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};class P extends n{isSingleMode(){return 1===Number(this.maxCount)}checkMaxCount(){null!==this.maxCount&&this.maxCount<1&&(this.maxCount=null)}}N([s({writable:!0})],P.prototype,"maxCount",void 0),N([d("componentDidLoad"),d("watchMaxCount")],P.prototype,"checkMaxCount",null);var G=function(e,t,o,i){var r,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(l=(a<3?r(l):a>3?r(t,o,l):r(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const q=class{constructor(e){o(this,e),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaSelectedFileChange=i(this,"vegaSelectedFileChange",7),this.selectedFileChange=i(this,"selectedFileChange",7),this.vegaRemove=i(this,"vegaRemove",7),this.remove=i(this,"remove",7),this.vegaRetry=i(this,"vegaRetry",7),this.retry=i(this,"retry",7),this.vegaPreview=i(this,"vegaPreview",7),this.preview=i(this,"preview",7),this.globalSlimmers=new Map,this.translationSlimmer=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new z:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.vegaFileUploaderContainerRenderer.getUploaderContainerRef(),touchableAreaGetter:()=>[this.vegaFileUploaderContainerRenderer.getUploaderContainerRef()]}),this.vegaFileUploaderRenderer=new I,this.vegaFileUploaderContainerRenderer=new O,this.vegaFileUploaderFileListRenderer=new A,this.vegaFileUploaderFileStatusRenderer=new S,this.vegaFileUploaderValueController=new H,this.dropFileFilterController=new E,this.fileLimitController=new P,this.changeEventEmitter=F(q,u),this.selectFileChangeEventEmitter=F(q,b),this.removeEventEmitter=F(q,m),this.retryEventEmitter=F(q,x),this.previewEventEmitter=F(q,w),this.label="",this.variant="uploadArea",this.hint="",this.value=[],this.disabled=!1,this.hideDeleteButton=!1,this.disableDeleteOnUpload=!1,this.maxCount=null,this.required=!1,this.optional=!1,this.name="",this.validationRules=[],this.autoValidation=!0,this.isValid=null}watchValue(e){}watchMaxCount(){}watchValidationRules(){}render(){return l(e(r,null,this.vegaFileUploaderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],maxCount:["watchMaxCount"],validationRules:["watchValidationRules"]}}};G([p()],q.prototype,"globalSlimmers",void 0),G([c()],q.prototype,"translationSlimmer",void 0),G([c()],q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G([c()],q.prototype,"formFieldController",void 0),G([c()],q.prototype,"vegaFileUploaderRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderContainerRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderFileListRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderFileStatusRenderer",void 0),G([c()],q.prototype,"vegaFileUploaderValueController",void 0),G([c()],q.prototype,"dropFileFilterController",void 0),G([c()],q.prototype,"fileLimitController",void 0),G([c()],q.prototype,"changeEventEmitter",void 0),G([c()],q.prototype,"selectFileChangeEventEmitter",void 0),G([c()],q.prototype,"removeEventEmitter",void 0),G([c()],q.prototype,"retryEventEmitter",void 0),G([c()],q.prototype,"previewEventEmitter",void 0),q.style=':host{display:inline-block;text-align:left;width:100%;line-height:normal}:host .vega-file-uploader-container .vega-file-upload-area{text-align:center}:host .vega-file-uploader-container .vega-file-upload-area:hover{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-input-field-hover, 115, 160, 190, 1))}:host .vega-file-uploader-container .vega-file-upload-area:hover vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:hover vega-font{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host .vega-file-uploader-container .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-file-uploader-container .vega-file-upload-area:active{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area:active vega-icon,:host .vega-file-uploader-container .vega-file-upload-area:active vega-font{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host .vega-file-uploader-container .vega-file-upload-area.disabled{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-tertiary, 240, 243, 247, 1));outline:none}:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-icon,:host .vega-file-uploader-container .vega-file-upload-area.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-file-uploader-container vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error .vega-file-upload-area{border-color:rgba(var(--v-border-color-input-field-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:hover{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error .vega-file-upload-area:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-file-uploader-container.error .vega-file-upload-area:active{border-color:rgba(var(--v-border-color-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-file-uploader-container.error vega-button::part(button),:host .vega-file-uploader-container.error vega-button::part(button):hover{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1));border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1))}:host .vega-file-uploader-container.error vega-button::part(button):hover{background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host .vega-file-uploader-container.error vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;box-shadow:0 0 0}:host .vega-file-uploader-container.error vega-button::part(button):active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-file-uploader-file-list .vega-file-uploader-file .vega-file-preview-button{visibility:hidden}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover{background-color:rgba(var(--v-bg-action-tertiary-hover, 4, 4, 28, 0.05))}:host .vega-file-uploader-file-list .vega-file-uploader-file:hover .vega-file-preview-button{visibility:visible}:host .vega-file-uploader-file-list .vega-file-list-buttons{margin-left:8px;flex-shrink:0}:host .vega-file-uploader-file-list .vega-file-list-status svg{width:16px;height:16px}:host .vega-file-uploader-file-list .vega-file-status-and-name{padding-top:5px}:host .vega-file-uploader-file-list .vega-file-status-and-name vega-font{word-break:break-word}:host vega-field-label{margin-bottom:8px}:host .vega-file-uploader-file-list{margin-top:8px}:host .vega-file-uploader-file-list.vega-file-list-hidden{display:none}:host .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){: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{q as vega_file_uploader}
@@ -1 +1 @@
1
- import{X as r}from"./p-4d20a56f.js";import{I as e}from"./p-abd7aeaa.js";class s extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e} for range mode`);const s=Array.isArray(e)&&2===e.length&&e.every((e=>r(e,this.config.timeFormat)));return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||Array.isArray(r)}}class t extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e}`);const s=r(e,this.config.timeFormat);return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||"string"==typeof r}}export{s as T,t as a}
1
+ import{X as r}from"./p-fdbdf12f.js";import{I as e}from"./p-abd7aeaa.js";class s extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e} for range mode`);const s=Array.isArray(e)&&2===e.length&&e.every((e=>r(e,this.config.timeFormat)));return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||Array.isArray(r)}}class t extends e{constructor(r){super(),this.config=r}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e}`);const s=r(e,this.config.timeFormat);return{isValid:s,message:s?"":"This field is required"}}canEvaluate(r,e){return e?this.isAcceptedInputType(r)&&!e.disabled&&e.visible:this.isAcceptedInputType(r)}shouldShowError(r){return!r.disabled&&r.visible&&(r.touched||r.modified)}isAcceptedInputType(r){return null==r||"string"==typeof r}}export{s as T,t as a}
@@ -1 +1 @@
1
- import{w as t,x as e,n as a,y as r,l as s,z as o,E as n,G as i,H as u,I as l,J as d,K as m,L as f,N as c,O as p,P as $,o as b,Q as v,B as g,R as h}from"./p-4d20a56f.js";import{L as x}from"./p-6e1ab235.js";import{G as T,F as w,a as y,b as j,c as k,d as O,T as I}from"./p-d4ea8e22.js";import{g as N,c as R}from"./p-49a2e141.js";import{i as C}from"./p-262ec334.js";import{p as E}from"./p-0c667d6a.js";import{B as A}from"./p-ed45b3b6.js";import{s as F}from"./p-d27ae9ff.js";import{F as S}from"./p-87a4d75f.js";class D{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const G={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},_=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-p-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${G[e]}-${t[e]}`)).join(" "):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},B={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},H=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return o(t)?`${r}v-m-${t}`:n(t)?Object.keys(t).map((e=>`${r}v-${B[e]}-${t[e]}`)).join(" "):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},J={x:"gap-col",y:"gap-row"},L=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-gap-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${J[e]}-${t[e]}`)).join(" "):(x.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},z=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],K=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],P=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return i(t)?`${r}v-grid-cols-${t}`:(x.warn(`The column value ${t} is invalid, it must be a value of: `,K),"")}},V=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return u(t)?`${r}v-grid-rows-${t}`:(x.warn(`The row value ${t} is invalid, it must be a value of: `,z),"")}},W=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return l(t)?`${r}v-justify-items-${t}`:(x.warn(`The grid justifyItems value ${t} is invalid, it must be a value of: `,T),"")}},M=new class{format(e){const a=N();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&C(e)?e:t(e)?(e=R(e))[a]:null:Number(e)}},Q=new class{format(e){if(d(e))return e;if(t(e)){const t=N();return(e=R(e))[t]}return null}},U=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${r}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${r}v-block`:(x.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},q=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return m(t)?`${r}v-flex-${t}`:(x.warn(`The direction value ${t} is invalid, it must be a value of: `,w),"")}},X=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return f(t)?`${r}v-items-${t}`:(x.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,y),"")}},Y=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return c(t)?`${r}v-justify-${this.mapInput(t)}`:(x.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,j),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},Z=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return p(t)?`${r}v-flex-${t}`:(x.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,k),"")}},tt=new class{format(e){const a=N();return t(e)?(e=R(e))[a]:e}},et=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return $(t)?"none"==t?`${r}v-hidden`:`${r}v-${t}`:(x.warn(`The box display value ${t} is invalid, it must be a value of: `,O),"")}},at=new class{format(e){const a=N();return t(e)?(e=R(e),E(e[a])):E(e)}},rt={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},st=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return b(t)?`${r}v-${this.transformRoundedNoneAndFill(t)}`:v(t)?Object.keys(t).map((e=>`${r}v-rounded-${rt[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},ot=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return h(t)?`${r}v-text-${t}`:(x.warn(`The text align value ${t} is invalid, it must be a value of: `,I),"")}};class nt{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let a="";return t&&(a=e&&"default"!==e?`@media (min-width:${A[e]}px){:host{${t}}}`:`:host{${t}}`),a}}const it={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},ut=new class extends nt{formatToken(t){return a(t)?`padding:${s[t]}px`:r(t)?Object.keys(t).map((e=>it[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},lt={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},dt=new class extends nt{formatToken(t){return a(t)?`margin:${s[t]}px`:r(t)?Object.keys(t).map((e=>lt[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},mt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},ft=new class extends nt{formatToken(t){return b(t)?`border-radius:${g[t]}px`:v(t)?this.getDirectionKeys(t).map((e=>mt[e].map((a=>`${a}:${g[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}getDirectionKeys(t){const e=Object.keys(t);return S.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?F(e,(e=>t[e]),void 0,Object.keys(g)):e}},ct=new class{format(t,e){switch(e){case"padding":return _.format(t);case"margin":return H.format(t);case"gap":return L.format(t);case"gridColumn":return P.format(t);case"gridRow":return V.format(t);case"gridJustifyItems":return W.format(t);case"size":return M.format(t);case"translocation":return Q.format(t);case"display":return U.format(t);case"flexDirection":return q.format(t);case"flexAlignItem":return X.format(t);case"flexJustifyContent":return Y.format(t);case"flexWrap":return Z.format(t);case"boxDisplay":return et.format(t);case"widthAndHeight":return at.format(t);case"corners":return st.format(t);case"textAlign":return ot.format(t);case"paddingStyle":return ut.format(t);case"marginStyle":return dt.format(t);case"cornersStyle":return ft.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return tt.format(t)}};export{K as G,ct as R,z as a}
1
+ import{w as t,x as e,n as a,y as r,l as s,z as o,E as n,G as i,H as u,I as l,J as d,K as m,L as f,N as c,O as p,P as $,o as b,Q as v,B as g,R as h}from"./p-fdbdf12f.js";import{L as x}from"./p-6e1ab235.js";import{G as T,F as w,a as y,b as j,c as k,d as O,T as I}from"./p-d4ea8e22.js";import{g as N,c as R}from"./p-49a2e141.js";import{i as C}from"./p-262ec334.js";import{p as E}from"./p-0c667d6a.js";import{B as A}from"./p-ed45b3b6.js";import{s as F}from"./p-d27ae9ff.js";import{F as S}from"./p-87a4d75f.js";class D{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const G={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},_=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-p-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${G[e]}-${t[e]}`)).join(" "):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},B={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},H=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return o(t)?`${r}v-m-${t}`:n(t)?Object.keys(t).map((e=>`${r}v-${B[e]}-${t[e]}`)).join(" "):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},J={x:"gap-col",y:"gap-row"},L=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-gap-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${J[e]}-${t[e]}`)).join(" "):(x.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},z=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],K=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],P=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return i(t)?`${r}v-grid-cols-${t}`:(x.warn(`The column value ${t} is invalid, it must be a value of: `,K),"")}},V=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return u(t)?`${r}v-grid-rows-${t}`:(x.warn(`The row value ${t} is invalid, it must be a value of: `,z),"")}},W=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return l(t)?`${r}v-justify-items-${t}`:(x.warn(`The grid justifyItems value ${t} is invalid, it must be a value of: `,T),"")}},M=new class{format(e){const a=N();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&C(e)?e:t(e)?(e=R(e))[a]:null:Number(e)}},Q=new class{format(e){if(d(e))return e;if(t(e)){const t=N();return(e=R(e))[t]}return null}},U=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${r}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${r}v-block`:(x.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},q=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return m(t)?`${r}v-flex-${t}`:(x.warn(`The direction value ${t} is invalid, it must be a value of: `,w),"")}},X=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return f(t)?`${r}v-items-${t}`:(x.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,y),"")}},Y=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return c(t)?`${r}v-justify-${this.mapInput(t)}`:(x.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,j),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},Z=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return p(t)?`${r}v-flex-${t}`:(x.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,k),"")}},tt=new class{format(e){const a=N();return t(e)?(e=R(e))[a]:e}},et=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return $(t)?"none"==t?`${r}v-hidden`:`${r}v-${t}`:(x.warn(`The box display value ${t} is invalid, it must be a value of: `,O),"")}},at=new class{format(e){const a=N();return t(e)?(e=R(e),E(e[a])):E(e)}},rt={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},st=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return b(t)?`${r}v-${this.transformRoundedNoneAndFill(t)}`:v(t)?Object.keys(t).map((e=>`${r}v-rounded-${rt[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},ot=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return h(t)?`${r}v-text-${t}`:(x.warn(`The text align value ${t} is invalid, it must be a value of: `,I),"")}};class nt{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let a="";return t&&(a=e&&"default"!==e?`@media (min-width:${A[e]}px){:host{${t}}}`:`:host{${t}}`),a}}const it={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},ut=new class extends nt{formatToken(t){return a(t)?`padding:${s[t]}px`:r(t)?Object.keys(t).map((e=>it[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},lt={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},dt=new class extends nt{formatToken(t){return a(t)?`margin:${s[t]}px`:r(t)?Object.keys(t).map((e=>lt[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},mt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},ft=new class extends nt{formatToken(t){return b(t)?`border-radius:${g[t]}px`:v(t)?this.getDirectionKeys(t).map((e=>mt[e].map((a=>`${a}:${g[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}getDirectionKeys(t){const e=Object.keys(t);return S.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?F(e,(e=>t[e]),void 0,Object.keys(g)):e}},ct=new class{format(t,e){switch(e){case"padding":return _.format(t);case"margin":return H.format(t);case"gap":return L.format(t);case"gridColumn":return P.format(t);case"gridRow":return V.format(t);case"gridJustifyItems":return W.format(t);case"size":return M.format(t);case"translocation":return Q.format(t);case"display":return U.format(t);case"flexDirection":return q.format(t);case"flexAlignItem":return X.format(t);case"flexJustifyContent":return Y.format(t);case"flexWrap":return Z.format(t);case"boxDisplay":return et.format(t);case"widthAndHeight":return at.format(t);case"corners":return st.format(t);case"textAlign":return ot.format(t);case"paddingStyle":return ut.format(t);case"marginStyle":return dt.format(t);case"cornersStyle":return ft.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return tt.format(t)}};export{K as G,ct as R,z as a}
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-6b2342e0.js";import{V as e}from"./p-44245a36.js";import{c as o,V as s}from"./p-6e1ab235.js";import{A as r,a1 as i,R as n,av as c,N as l,k as a}from"./p-f9d09b0c.js";import{D as h}from"./p-36a57431.js";import{b as u,a as d,V as p,c as f}from"./p-a83cef5a.js";import{a as v}from"./p-d1f47512.js";import{e as m}from"./p-df9585f6.js";var b=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class C extends s{constructor({icon:e,tooltip:o,ariaLabel:s,autoFocusOnClick:r=!0}){super(),this.renderBtn=({showArrowIcon:e,iconColor:o}={})=>{var s;return t("vega-tooltip",{text:this.translationSlimmer.t(this.tooltip.text),placement:["bottom","top"]},t("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:e,icon:this.icon,iconColor:o,"data-aria-label":this.ariaLabel,ref:t=>{h.addUniqueObserverToNode(t,u,(()=>{this.handleClick()}))},selected:this.isSelected(),disabled:this.isDisabled(),hidden:this.isHidden()},this.preventLostFocus()),null===(s=this.renderSlotContent)||void 0===s?void 0:s.call(this)))},this.handleClick=()=>{"function"==typeof this.onClick&&(!this.selectionController.getSelectedNodes().length&&this.autoFocusOnClick?this.focusController.focusOnLastTextNode().then((()=>{this.onClick()})):this.onClick())},this.icon=e,this.tooltip=o,this.ariaLabel=null!=s?s:o.text,this.autoFocusOnClick=r}setIcon(t){this.icon=t}isHidden(){return!1}render(){return"function"==typeof this.renderBtnWrapper?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:t=>t.preventDefault()}}}b([o()],C.prototype,"translationSlimmer",void 0),b([o()],C.prototype,"selectionController",void 0),b([o()],C.prototype,"focusController",void 0),b([o()],C.prototype,"disabled",void 0);class w extends C{constructor(t){super(t)}isHidden(){return this.sourceView}isDisabled(){return super.isDisabled()&&!this.sourceView}shouldDisabledToolbar(t,e){return t&&!r.canHandle(e,t)}}!function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);i>3&&n&&Object.defineProperty(e,o,n)}([o()],w.prototype,"sourceView",void 0);var j=function(t,e,o,s){var r,i=arguments.length,n=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class x extends w{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,v.registerCustomDarkModeColor(x.formatDarkModeColor())}static formatDarkModeColor(){return i.reduce(((t,e)=>(e.dark&&(t[`rich-text-editor-${e.key}`]=e.dark),t)),{})}renderSlotContent(){return t("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return t("vega-popover",{placement:"bottom",alignment:"center",isScreenPosition:!0,role:"presentation",ref:t=>{this.popoverRef=t,h.addUniqueObserverToNode(t,d,this.handlePopoverShowChange.bind(this)),h.addUniqueObserverToNode(t,p,this.handlePopoverHideChange.bind(this))}},t("div",{slot:"popover-content"},e({showArrowIcon:!1})),t("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return t("vega-color-picker",{isInline:!0,colors:i.map((t=>t[this.isInDarkMode?"dark":"light"])),ref:t=>{h.addUniqueObserverToNode(t,f,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(t){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter((t=>t instanceof n)).forEach((e=>e.apply(new c(this.matchColor(t.detail).key))))),this.popoverRef.hide()}matchColor(t){return i.find((e=>e[this.isInDarkMode?"dark":"light"]===t))}getCurrentColor(){let t=i[0];const e=this.selectionController.getSelectedNodes();return e.length>1&&(t=this.isSelectedSameColor(e)?this.getTextColor(e[0]):null),1===e.length&&(t=this.getTextColor(e[0])),t?t[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(t){return t.every((e=>this.getTextColor(e).key===this.getTextColor(t[0]).key))}getTextColor(t){var e;return(null===(e=t.getAnnotationByType("TEXT_COLOR"))||void 0===e?void 0:e.textColor)||i[0]}isDisabled(){const t=this.selectionController.getSelectedNodes();return super.isDisabled()||t.some((t=>{var e;return(null===(e=t.getAnnotationByType(l.CODE))||void 0===e?void 0:e.code)||t.getAnnotationByType(l.LINK)||this.shouldDisabledToolbar(t,c.typeName)}))}}e.register({text:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'}}),j([o()],x.prototype,"host",void 0),j([o()],x.prototype,"isInDarkMode",void 0),j([o()],x.prototype,"selectionController",void 0),j([o()],x.prototype,"focusController",void 0);const g=/^((\w+:(\/{2,})?)|(\W))/i;function y(t,e){const o=(t||"").trim();if(!o)return o;const s=(e||"").trim();return!s||g.test(o)?o:`${s}${o}`}class O extends a{constructor(t,e){super(),this.isFlushable=!0,this.size=t,this.alt=e}toAnnotation(){return new m(this.size,this.alt)}}O.typeName="ImageAnnotationAction";export{O as I,x as T,w as V,C as a,y as n}
@@ -1 +1 @@
1
- import{C as e,a as t,b as a,W as r}from"./p-4d20a56f.js";class n{static createCalendarPeriod(n,o="month",s,d=!0){const c=e.fromString(n,"MM/DD/YYYY",s);let i;switch(o){case"week":i=new r(c,d,s);break;case"day":i=new a(c,d,s);break;default:i=new t(c,d,s)}return i}static fromCalendarPeriodType(e,t,a=!0){const{currentPeriod:r,viewMode:o}=e,{year:s,month:d,startDate:c}=r;let i=`${d}/01/${s}`;return"day"!==o&&"week"!==o||(i=`${c.month}/${c.date}/${c.year}`),n.createCalendarPeriod(i,o,t,a)}static toCalendarPeriodType(e){const{current:t,startDate:a,endDate:r}=e;return{viewMode:e.type,currentPeriod:{year:t.year,month:t.month,startDate:{date:a.date,month:a.month,year:a.year},endDate:{date:r.date,month:r.month,year:r.year}}}}}export{n as I}
1
+ import{C as e,a as t,b as a,W as r}from"./p-fdbdf12f.js";class n{static createCalendarPeriod(n,o="month",s,d=!0){const c=e.fromString(n,"MM/DD/YYYY",s);let i;switch(o){case"week":i=new r(c,d,s);break;case"day":i=new a(c,d,s);break;default:i=new t(c,d,s)}return i}static fromCalendarPeriodType(e,t,a=!0){const{currentPeriod:r,viewMode:o}=e,{year:s,month:d,startDate:c}=r;let i=`${d}/01/${s}`;return"day"!==o&&"week"!==o||(i=`${c.month}/${c.date}/${c.year}`),n.createCalendarPeriod(i,o,t,a)}static toCalendarPeriodType(e){const{current:t,startDate:a,endDate:r}=e;return{viewMode:e.type,currentPeriod:{year:t.year,month:t.month,startDate:{date:a.date,month:a.month,year:a.year},endDate:{date:r.date,month:r.month,year:r.year}}}}}export{n as I}
@@ -1 +1 @@
1
- import{V as t,I as s,c as e,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-cb378636.js";import{f as m,e as p}from"./p-aa135628.js";import{a as v,g as b}from"./p-8b5d3a52.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-36a57431.js";import{i as y,g as w,j as O}from"./p-53e3f259.js";import{V as E}from"./p-c0eb8c58.js";import{h as V,l as F}from"./p-cc569b54.js";import{P as I}from"./p-81dd00d0.js";import{I as C}from"./p-abd7aeaa.js";import{g as S,i as A}from"./p-71909102.js";import{M as k}from"./p-78a57a17.js";import{A as T}from"./p-52b8f2d2.js";import{i as L}from"./p-d27ae9ff.js";import{S as M}from"./p-7d3419c7.js";class D{constructor(t){this.rule=t}getStatus(t,s,e){return{canEvaluate:this.rule.canEvaluate(t,s,e),isAsync:v(this.rule.evaluate)}}shouldShowError(t,s){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,s):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class B{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,s,e){return!!this.handlers.find((i=>{const r=i.getStatus(t,s,e);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new D(t))):[]}async process(t,s,e,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,s,e);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(s,e);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,s,e,i){this.processId===t&&i(s,e)}}class H{run(t){const s=t.nextElementSibling;return s&&s.querySelector(".vega-error")?s.querySelector(".vega-error"):null}}class U{run(t){let s=t.nextElementSibling;return s&&!s.classList.contains("vega-error")&&(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class x{run(t){let s=t.nextElementSibling;return s||(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class G extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var P=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class W extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new G,this.fieldErrorUiControllerStrategies=[new H,new U,new x],this.initTranslationObserver()}applyInputInvalidUI(t){const s=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),s&&(s.classList.add("error"),t)){this.errorMessage=t;const e=this.getErrorContainer(s);e.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),F),e.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const s of this.fieldErrorUiControllerStrategies){const e=s.run(t);if(e)return e}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const s=this.getErrorContainer(t);s&&(s.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage),F))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}P([s()],W.prototype,"formFieldMessageTranslatorSlimmer",void 0),P([e()],W.prototype,"host",void 0),P([e()],W.prototype,"options",void 0);var z=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class K{constructor(t,s,e,i){var r,n;this.formFieldMessageTranslatorSlimmer=new G,this.fieldErrorUIController=new W,this.resizeObserverSlimmer=g(K,I,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const s=this.isVisible,e=t[0].contentRect.height>0;this.isVisible=e,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&s!==e&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new B,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,s)=>{let e=!0;return s?("rule"===t?s.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI(),e=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(e),o.notify(l,{host:this.host,detail:e}),e},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=s,this.defaultValue=e,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((s=>this.overrideDefaultRuleByAdditionalRule(s,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,s="rule"){const e=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,e,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,e,t,s,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((s=>s.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const s=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(s===t?[]:["touched"])}updateIsModified(t){const s=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(s===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var s,e;if(this.shouldVisitElement(this.host,null===(s=t.option)||void 0===s?void 0:s.skipDisabled,null===(e=t.option)||void 0===e?void 0:e.skipInvisible)){const s=t.defaultValueMap,e=S(this.host),i=null==s[e]?this.getDefaultValue():s[e];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,s,e){return!(!S(t)||s&&t.disabled||e&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const s="Enter"===t.key||13===t.keyCode,e=s&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return e&&t.preventDefault(),e;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return s}}overrideDefaultRuleByAdditionalRule(t,s){if(t&&s){const e=s.findIndex((s=>s instanceof C&&s instanceof t.constructor&&s.overrideDefault));if(e>-1)return s.splice(e,1)[0]}return t}}z([s()],K.prototype,"formFieldMessageTranslatorSlimmer",void 0),z([s()],K.prototype,"fieldErrorUIController",void 0),z([s()],K.prototype,"resizeObserverSlimmer",void 0);var N=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class X extends t{constructor(){super(...arguments),this.fieldErrorUIController=new W,this.handleFieldErrorMessageUpdate=t=>{const{message:s,isValid:e}=t;e?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(s)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:s}=t,e=this.host.parentElement;return e&&e===s&&"VEGA-FIELD-ERROR"===e.tagName||this.host===s}}N([e()],X.prototype,"host",void 0),N([e()],X.prototype,"options",void 0),N([s()],X.prototype,"fieldErrorUIController",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),N([i("disconnectedCallback")],X.prototype,"handleUnregisterObserver",null);var q=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class J extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const s=await this.validator.validate(t.message);if(s){const{isValid:e,message:i}=s;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:e,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}q([e()],J.prototype,"host",void 0),q([e()],J.prototype,"validator",void 0),q([i("setInjectFormFieldHelper")],J.prototype,"registerValidInvocationObserver",null),q([i("disconnectedCallback")],J.prototype,"handleUnregisterObserver",null);var Q=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class Y extends M{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var s;null===(s=this.validator)||void 0===s||s.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}Q([e()],Y.prototype,"host",void 0),Q([e()],Y.prototype,"validator",void 0),Q([i("setInjectFormFieldHelper")],Y.prototype,"componentWillLoad",null);var Z=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class $ extends t{constructor(t){super(),this.fieldErrorSlimmer=new X,this.formFieldValidInvokeSlimmer=new J,this.formFormStateController=new Y,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}watchValidationRulesByFormControllerSlimmer(t,s){L(t,s,!1,((t,s)=>t===s?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(A(this.host)){const{defaultValue:t}=this.options,s=new K(this.getPropertyRules(),this.host,t,this.options);s.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=s,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:s}=this.options;return t.map((t=>{const e=t.dependence&&"string"==typeof t.dependence?[s(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>s(t))):[null];return t.ruleFactory(s(t.propertyName),...e)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new k({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:T(),callback:this.mutationObserverCallBack})}}Z([e()],$.prototype,"host",void 0),Z([e({writable:!0})],$.prototype,"validationRules",void 0),Z([e()],$.prototype,"disabled",void 0),Z([e()],$.prototype,"autoValidation",void 0),Z([e({writable:!0})],$.prototype,"isValid",void 0),Z([s()],$.prototype,"fieldErrorSlimmer",void 0),Z([s()],$.prototype,"formFieldValidInvokeSlimmer",void 0),Z([s()],$.prototype,"mutationObserverSlimmer",void 0),Z([s()],$.prototype,"formFormStateController",void 0),Z([i("connectedCallback")],$.prototype,"connectedCallback",null),Z([i("disconnectedCallback")],$.prototype,"disconnectedCallback",null),Z([i("componentDidLoad")],$.prototype,"componentDidLoad",null),Z([i("watchValidationRules")],$.prototype,"watchValidationRulesByFormControllerSlimmer",null),Z([i("componentWillLoad")],$.prototype,"setInjectFormFieldHelper",null);export{$ as F}
1
+ import{V as t,I as s,c as e,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-cb378636.js";import{f as m,e as p}from"./p-aa135628.js";import{a as v,g as b}from"./p-8b5d3a52.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-36a57431.js";import{i as y,g as w,j as O}from"./p-53e3f259.js";import{V as E}from"./p-affb40e8.js";import{h as V,l as F}from"./p-cc569b54.js";import{P as I}from"./p-81dd00d0.js";import{I as C}from"./p-abd7aeaa.js";import{g as S,i as A}from"./p-71909102.js";import{M as k}from"./p-78a57a17.js";import{A as T}from"./p-52b8f2d2.js";import{i as L}from"./p-d27ae9ff.js";import{S as M}from"./p-7d3419c7.js";class D{constructor(t){this.rule=t}getStatus(t,s,e){return{canEvaluate:this.rule.canEvaluate(t,s,e),isAsync:v(this.rule.evaluate)}}shouldShowError(t,s){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,s):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class B{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,s,e){return!!this.handlers.find((i=>{const r=i.getStatus(t,s,e);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new D(t))):[]}async process(t,s,e,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,s,e);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(s,e);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,s,e,i){this.processId===t&&i(s,e)}}class H{run(t){const s=t.nextElementSibling;return s&&s.querySelector(".vega-error")?s.querySelector(".vega-error"):null}}class U{run(t){let s=t.nextElementSibling;return s&&!s.classList.contains("vega-error")&&(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class x{run(t){let s=t.nextElementSibling;return s||(s=document.createElement("label"),s.classList.add("vega-error"),s.setAttribute("part","field-error-message"),t.after(s)),s}}class G extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var P=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class W extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new G,this.fieldErrorUiControllerStrategies=[new H,new U,new x],this.initTranslationObserver()}applyInputInvalidUI(t){const s=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),s&&(s.classList.add("error"),t)){this.errorMessage=t;const e=this.getErrorContainer(s);e.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),F),e.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const s of this.fieldErrorUiControllerStrategies){const e=s.run(t);if(e)return e}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const s=this.getErrorContainer(t);s&&(s.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage),F))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}P([s()],W.prototype,"formFieldMessageTranslatorSlimmer",void 0),P([e()],W.prototype,"host",void 0),P([e()],W.prototype,"options",void 0);var z=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class K{constructor(t,s,e,i){var r,n;this.formFieldMessageTranslatorSlimmer=new G,this.fieldErrorUIController=new W,this.resizeObserverSlimmer=g(K,I,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const s=this.isVisible,e=t[0].contentRect.height>0;this.isVisible=e,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&s!==e&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new B,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,s)=>{let e=!0;return s?("rule"===t?s.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(s.message):this.fieldErrorUIController.resetInputInvalidUI(),e=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(e),o.notify(l,{host:this.host,detail:e}),e},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=s,this.defaultValue=e,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((s=>this.overrideDefaultRuleByAdditionalRule(s,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,s="rule"){const e=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,e,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,e,t,s,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((s=>s.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const s=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(s===t?[]:["touched"])}updateIsModified(t){const s=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(s===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var s,e;if(this.shouldVisitElement(this.host,null===(s=t.option)||void 0===s?void 0:s.skipDisabled,null===(e=t.option)||void 0===e?void 0:e.skipInvisible)){const s=t.defaultValueMap,e=S(this.host),i=null==s[e]?this.getDefaultValue():s[e];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,s,e){return!(!S(t)||s&&t.disabled||e&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const s="Enter"===t.key||13===t.keyCode,e=s&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return e&&t.preventDefault(),e;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return s}}overrideDefaultRuleByAdditionalRule(t,s){if(t&&s){const e=s.findIndex((s=>s instanceof C&&s instanceof t.constructor&&s.overrideDefault));if(e>-1)return s.splice(e,1)[0]}return t}}z([s()],K.prototype,"formFieldMessageTranslatorSlimmer",void 0),z([s()],K.prototype,"fieldErrorUIController",void 0),z([s()],K.prototype,"resizeObserverSlimmer",void 0);var N=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class X extends t{constructor(){super(...arguments),this.fieldErrorUIController=new W,this.handleFieldErrorMessageUpdate=t=>{const{message:s,isValid:e}=t;e?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(s)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:s}=t,e=this.host.parentElement;return e&&e===s&&"VEGA-FIELD-ERROR"===e.tagName||this.host===s}}N([e()],X.prototype,"host",void 0),N([e()],X.prototype,"options",void 0),N([s()],X.prototype,"fieldErrorUIController",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),N([i("disconnectedCallback")],X.prototype,"handleUnregisterObserver",null);var q=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class J extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const s=await this.validator.validate(t.message);if(s){const{isValid:e,message:i}=s;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:e,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}q([e()],J.prototype,"host",void 0),q([e()],J.prototype,"validator",void 0),q([i("setInjectFormFieldHelper")],J.prototype,"registerValidInvocationObserver",null),q([i("disconnectedCallback")],J.prototype,"handleUnregisterObserver",null);var Q=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class Y extends M{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var s;null===(s=this.validator)||void 0===s||s.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}Q([e()],Y.prototype,"host",void 0),Q([e()],Y.prototype,"validator",void 0),Q([i("setInjectFormFieldHelper")],Y.prototype,"componentWillLoad",null);var Z=function(t,s,e,i){var r,o=arguments.length,n=o<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(s,e,n):r(s,e))||n);return o>3&&n&&Object.defineProperty(s,e,n),n};class $ extends t{constructor(t){super(),this.fieldErrorSlimmer=new X,this.formFieldValidInvokeSlimmer=new J,this.formFormStateController=new Y,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}watchValidationRulesByFormControllerSlimmer(t,s){L(t,s,!1,((t,s)=>t===s?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(A(this.host)){const{defaultValue:t}=this.options,s=new K(this.getPropertyRules(),this.host,t,this.options);s.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=s,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:s}=this.options;return t.map((t=>{const e=t.dependence&&"string"==typeof t.dependence?[s(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>s(t))):[null];return t.ruleFactory(s(t.propertyName),...e)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new k({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:T(),callback:this.mutationObserverCallBack})}}Z([e()],$.prototype,"host",void 0),Z([e({writable:!0})],$.prototype,"validationRules",void 0),Z([e()],$.prototype,"disabled",void 0),Z([e()],$.prototype,"autoValidation",void 0),Z([e({writable:!0})],$.prototype,"isValid",void 0),Z([s()],$.prototype,"fieldErrorSlimmer",void 0),Z([s()],$.prototype,"formFieldValidInvokeSlimmer",void 0),Z([s()],$.prototype,"mutationObserverSlimmer",void 0),Z([s()],$.prototype,"formFormStateController",void 0),Z([i("connectedCallback")],$.prototype,"connectedCallback",null),Z([i("disconnectedCallback")],$.prototype,"disconnectedCallback",null),Z([i("componentDidLoad")],$.prototype,"componentDidLoad",null),Z([i("watchValidationRules")],$.prototype,"watchValidationRulesByFormControllerSlimmer",null),Z([i("componentWillLoad")],$.prototype,"setInjectFormFieldHelper",null);export{$ as F}
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,H as a,g as r}from"./p-6b2342e0.js";import{c as o}from"./p-8387896e.js";import{s as n}from"./p-519a7d55.js";import{C as s}from"./p-2d0d575f.js";import{R as l,i as d,F as h}from"./p-cb378636.js";import{O as c}from"./p-331a62d5.js";import{f as p}from"./p-aa135628.js";import{c as g,M as v,V as f,I as b}from"./p-6e1ab235.js";import{V as m,I as u}from"./p-5c8e4e8f.js";import{c as x}from"./p-3b6a6f08.js";import{c as w,N as y,O as j}from"./p-a83cef5a.js";import{i as R}from"./p-53e3f259.js";import{d as k}from"./p-36a57431.js";import{R as I}from"./p-8bc15ed0.js";import{C}from"./p-75b58efe.js";import{F as O}from"./p-5a347a15.js";import{C as E}from"./p-6eedbc4f.js";import{C as A}from"./p-abad8ffd.js";import{K as V}from"./p-23781e76.js";import{M as z}from"./p-78a57a17.js";import{T as D}from"./p-52b8f2d2.js";import"./p-6a334573.js";import"./p-29584bb5.js";import"./p-b75ee3ba.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-c0eb8c58.js";import"./p-cc569b54.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-71909102.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-7d3419c7.js";import"./p-5f377954.js";import"./p-d86e0b01.js";import"./p-4d20a56f.js";import"./p-b438e68b.js";var F=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class G extends f{connectedCallback(){this.radioGroup=p(this.host,"vega-radio-group")||p(this.host,"vega-selection-tile-group"),this.radioGroup&&(this.fieldErrorObserver=new c(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(k.getSubject(this.radioGroup,R),this.fieldErrorObserver))}disconnectedCallback(){this.radioGroup&&s.unregister(k.getSubject(this.radioGroup,R),this.fieldErrorObserver)}canAcceptFieldErrorObserver(e){return("VEGA-RADIO-GROUP"===e.host.tagName||"VEGA-SELECTION-TILE-GROUP"===e.host.tagName)&&this.radioGroup===e.host}fieldErrorObserverListener(e){this.showError=e.showError}}F([g({writable:!0})],G.prototype,"showError",void 0),F([g()],G.prototype,"host",void 0),F([v("connectedCallback")],G.prototype,"connectedCallback",null),F([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var L=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const N=class{constructor(t){e(this,t),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.changeEventEmitter=x(N,w),this.focusEventEmitter=x(N,y),this.blurEventEmitter=x(N,j),this.vegaRadioShowErrorController=new G,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.value="",this.checked=!1,this.disabled=!1,this.size="default",this.updateValue=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.handleFocus=e=>{this.focusEventEmitter.emit(e,e)},this.handleBlur=e=>{this.blurEventEmitter.emit(e,e)},this.handleClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.changeEventEmitter.emit(this.checked),s.notify(l,{host:this.host,detail:this.checked})}connectedCallback(){this.ariaLabel=this.host.textContent,""==this.ariaLabel&&(this.ariaLabel=this.value)}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentDidLoad(){""===this.host.textContent&&this.labelElement.classList.add("vega-hidden"),this.initAndRegisterGroupDisabledObserver()}render(){var e;const i="VEGA-RADIO-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return n(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i}},t("label",{class:{"vega-radio-container":!0,[this.size]:!0,"vega-radio-checked":this.checked,"vega-radio-disabled":this.isDisabled(),error:this.showError}},t("input",{type:"radio",name:this.name,checked:this.checked,value:this.value,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onChange:this.updateValue,"aria-label":this.ariaLabel||"No label defined",disabled:this.isDisabled(),tabIndex:this.isDisabled()?-1:0,onKeyDown:o()}),t("span",{class:"vega-radio-icon"},t("span",{class:"vega-radio-circle"})),t("div",{class:"vega-radio-label",ref:e=>this.labelElement=e},t("slot",null)))),this.host)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return p(this.host,"vega-radio-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){p(this.host,"vega-radio-group")&&(this.groupDisabledObserver=new c(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};L([u()],N.prototype,"globalSlimmers",void 0),L([b()],N.prototype,"changeEventEmitter",void 0),L([b()],N.prototype,"focusEventEmitter",void 0),L([b()],N.prototype,"blurEventEmitter",void 0),L([b()],N.prototype,"vegaRadioShowErrorController",void 0),L([b()],N.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),N.style=':host{display:inline-block;box-sizing:border-box;height:24px}.vega-radio-container{position:relative;display:inline-flex;gap:8px;cursor:not-allowed}.vega-radio-container:not(.vega-radio-disabled){cursor:pointer}.vega-radio-container input{position:absolute;left:0px;top:0px;opacity:0}.vega-radio-icon{display:inline-block;box-sizing:border-box;border-style:solid;border-radius:9999px;position:relative;left:0px;flex-shrink:0;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-radio-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-radio-container.default .vega-radio-icon{width:24px;height:24px;padding:5px}.vega-radio-container.small .vega-radio-icon{width:16px;height:16px;padding:4px}.vega-radio-checked:hover .vega-radio-circle{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-radio-container input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-radio-container:not(.vega-radio-disabled):active .vega-radio-icon{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}.vega-radio-checked:active .vega-radio-circle{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.vega-radio-checked .vega-radio-circle{display:block;width:100%;height:100%;border-radius:9999px;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}.vega-radio-disabled .vega-radio-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))}.vega-radio-disabled .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-disabled:hover .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-container .vega-radio-label{display:inline-block;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.vega-radio-container .vega-radio-label.vega-hidden{display:none}.vega-radio-container.default .vega-radio-label{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-radio-container.default .vega-radio-label{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-radio-container.default .vega-radio-label{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-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-radio-disabled .vega-radio-label{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}label{-webkit-tap-highlight-color:transparent}.vega-radio-container.error .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-radio-container.error:hover .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-radio-container.error input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-container.error:active .vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-checked.error .vega-radio-circle{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-radio-checked.error:hover .vega-radio-circle{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-radio-checked.error:active .vega-radio-circle{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}';class S extends V{constructor(){super((e=>(e.setRadioArrayTabIndex(),[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[e.host],callback:e=>{this.updateRadioFocusStates(e)}}])))}setRadioArrayTabIndex(){const e=this.getNotDisabledRadioArray();if(e){const i=e.findIndex((e=>e.checked)),t=i>-1?i:0;e.forEach(((e,i)=>{const a=i===t?"0":"-1";e.shadowRoot.querySelector("input").setAttribute("tabIndex",a)}))}}updateRadioFocusStates(e){const i=e.key,t=this.getNotDisabledRadioArray();if(!t||0===t.length)return;t.forEach((e=>e.shadowRoot.querySelector("input").setAttribute("tabIndex","-1")));const a=t.findIndex((i=>i===e.target));let r;"ArrowDown"===i?r=a===t.length-1?t[0]:t[a+1]:"ArrowUp"===i&&(r=0===a?t[t.length-1]:t[a-1]),r&&(r.shadowRoot.querySelector("input").focus(),r.checked=!0,r.shadowRoot.querySelector("input").tabIndex=0)}getNotDisabledRadioArray(){const e=Array.from(this.host.querySelectorAll("vega-radio"));if(e.length>0)return e.filter((e=>!e.disabled))}}!function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);o>3&&n&&Object.defineProperty(i,t,n)}([g()],S.prototype,"host",void 0);var P=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class M extends f{emitEventAndNotifyValueChangeSubject(e){this.changeEventEmitter.emit(e),s.notify(h,{host:this.host,detail:e})}setValue(e){this.value=e}}P([g()],M.prototype,"host",void 0),P([g({writable:!0})],M.prototype,"value",void 0),P([g()],M.prototype,"changeEventEmitter",void 0),P([g()],M.prototype,"radioItemsController",void 0),P([v("watchValue")],M.prototype,"emitEventAndNotifyValueChangeSubject",null);var U=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class B extends f{constructor(){super(...arguments),this.vegaRadioArray=[]}componentWillLoad(){this.syncRadioArrayAndValue()}setRadioItemName(){this.vegaRadioArray.forEach((e=>{e.name=this.name?this.name:e.getAttribute("name")}))}setRadioItemCheckedByValue(e){this.vegaRadioArray.forEach((i=>{i.checked=i.value===e}))}syncRadioItemsStatus(){this.setRadioItemCheckedByValue(this.value),this.setRadioItemName()}getRadioItemsArray(){return this.vegaRadioArray}syncRadioArrayAndValue(){this.vegaRadioArray=Array.from(this.host.querySelectorAll("vega-radio")),this.vegaRadioArray.forEach((e=>{e.checked&&this.valueController.setValue(e.value)}))}}U([g()],B.prototype,"host",void 0),U([g()],B.prototype,"value",void 0),U([g()],B.prototype,"name",void 0),U([g()],B.prototype,"valueController",void 0),U([v("componentWillLoad")],B.prototype,"componentWillLoad",null),U([v("watchName")],B.prototype,"setRadioItemName",null),U([v("watchValue")],B.prototype,"setRadioItemCheckedByValue",null),U([v("componentDidLoad")],B.prototype,"syncRadioItemsStatus",null);var T=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const W=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.formFieldController=new O({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new I:null}],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.radioItemsController.getRadioItemsArray().map((e=>e.shadowRoot.querySelector("input"))),defaultValue:"",attributeGetter:e=>this[e],validationRulesName:"validationRules"}),this.radioValueChangeObserver=new E(l,(e=>this.childRadioValueChange(e))),this.radioEventPrevent=new A([w],(()=>this.vegaFlexElement)),this.slotMutationObserver=new z({options:{childList:!0},mutationFilter:D("VEGA-RADIO"),callback:()=>this.radioItemsController.syncRadioArrayAndValue()}),this.changeEventEmitter=x(W,w),this.keyboardController=new S,this.radioItemsController=new B,this.valueController=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value="",this.name="",this.vegaFlexProp={},this.required=!1,this.optional=!1,this.hint="",this.isValid=null,this.disabled=!1,this.autoValidation=!0,this.validationRules=[],this.childRadioValueChange=e=>{e.detail&&this.valueController.setValue(e.host.value)}}async watchValue(e){}watchName(){}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentWillLoad(){}componentDidLoad(){this.setVegaFlexProperty(),this.disabled&&this.notifyGroupDisabledChange()}render(){return n(t(a,{role:"radiogroup"},this.renderLabelDom(),t("div",{class:"vega-radio-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,disabled:this.disabled,optional:this.optional})}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)}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],name:["watchName"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};T([u()],W.prototype,"globalSlimmers",void 0),T([b()],W.prototype,"formFieldController",void 0),T([b()],W.prototype,"radioValueChangeObserver",void 0),T([b()],W.prototype,"radioEventPrevent",void 0),T([b()],W.prototype,"slotMutationObserver",void 0),T([b()],W.prototype,"changeEventEmitter",void 0),T([b()],W.prototype,"keyboardController",void 0),T([b()],W.prototype,"radioItemsController",void 0),T([b()],W.prototype,"valueController",void 0),T([b()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T([C()],W.prototype,"watchVegaFlexProp",null),W.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{N as vega_radio,W as vega_radio_group}
1
+ import{r as e,c as i,h as t,H as a,g as r}from"./p-6b2342e0.js";import{c as o}from"./p-8387896e.js";import{s as n}from"./p-519a7d55.js";import{C as s}from"./p-2d0d575f.js";import{R as l,i as d,F as h}from"./p-cb378636.js";import{O as c}from"./p-331a62d5.js";import{f as p}from"./p-aa135628.js";import{c as g,M as v,V as f,I as b}from"./p-6e1ab235.js";import{V as m,I as u}from"./p-5c8e4e8f.js";import{c as x}from"./p-3b6a6f08.js";import{c as w,N as y,O as j}from"./p-a83cef5a.js";import{i as R}from"./p-53e3f259.js";import{d as k}from"./p-36a57431.js";import{R as I}from"./p-8bc15ed0.js";import{C}from"./p-75b58efe.js";import{F as O}from"./p-a9fc4043.js";import{C as E}from"./p-6eedbc4f.js";import{C as A}from"./p-abad8ffd.js";import{K as V}from"./p-e33a954f.js";import{M as z}from"./p-78a57a17.js";import{T as D}from"./p-52b8f2d2.js";import"./p-6a334573.js";import"./p-29584bb5.js";import"./p-b75ee3ba.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-affb40e8.js";import"./p-cc569b54.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-71909102.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-7d3419c7.js";import"./p-5f377954.js";import"./p-1fb953f8.js";import"./p-fdbdf12f.js";import"./p-b438e68b.js";var F=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class G extends f{connectedCallback(){this.radioGroup=p(this.host,"vega-radio-group")||p(this.host,"vega-selection-tile-group"),this.radioGroup&&(this.fieldErrorObserver=new c(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(k.getSubject(this.radioGroup,R),this.fieldErrorObserver))}disconnectedCallback(){this.radioGroup&&s.unregister(k.getSubject(this.radioGroup,R),this.fieldErrorObserver)}canAcceptFieldErrorObserver(e){return("VEGA-RADIO-GROUP"===e.host.tagName||"VEGA-SELECTION-TILE-GROUP"===e.host.tagName)&&this.radioGroup===e.host}fieldErrorObserverListener(e){this.showError=e.showError}}F([g({writable:!0})],G.prototype,"showError",void 0),F([g()],G.prototype,"host",void 0),F([v("connectedCallback")],G.prototype,"connectedCallback",null),F([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var L=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const N=class{constructor(t){e(this,t),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.changeEventEmitter=x(N,w),this.focusEventEmitter=x(N,y),this.blurEventEmitter=x(N,j),this.vegaRadioShowErrorController=new G,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.value="",this.checked=!1,this.disabled=!1,this.size="default",this.updateValue=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.handleFocus=e=>{this.focusEventEmitter.emit(e,e)},this.handleBlur=e=>{this.blurEventEmitter.emit(e,e)},this.handleClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.changeEventEmitter.emit(this.checked),s.notify(l,{host:this.host,detail:this.checked})}connectedCallback(){this.ariaLabel=this.host.textContent,""==this.ariaLabel&&(this.ariaLabel=this.value)}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentDidLoad(){""===this.host.textContent&&this.labelElement.classList.add("vega-hidden"),this.initAndRegisterGroupDisabledObserver()}render(){var e;const i="VEGA-RADIO-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return n(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i}},t("label",{class:{"vega-radio-container":!0,[this.size]:!0,"vega-radio-checked":this.checked,"vega-radio-disabled":this.isDisabled(),error:this.showError}},t("input",{type:"radio",name:this.name,checked:this.checked,value:this.value,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onChange:this.updateValue,"aria-label":this.ariaLabel||"No label defined",disabled:this.isDisabled(),tabIndex:this.isDisabled()?-1:0,onKeyDown:o()}),t("span",{class:"vega-radio-icon"},t("span",{class:"vega-radio-circle"})),t("div",{class:"vega-radio-label",ref:e=>this.labelElement=e},t("slot",null)))),this.host)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return p(this.host,"vega-radio-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){p(this.host,"vega-radio-group")&&(this.groupDisabledObserver=new c(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};L([u()],N.prototype,"globalSlimmers",void 0),L([b()],N.prototype,"changeEventEmitter",void 0),L([b()],N.prototype,"focusEventEmitter",void 0),L([b()],N.prototype,"blurEventEmitter",void 0),L([b()],N.prototype,"vegaRadioShowErrorController",void 0),L([b()],N.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),N.style=':host{display:inline-block;box-sizing:border-box;height:24px}.vega-radio-container{position:relative;display:inline-flex;gap:8px;cursor:not-allowed}.vega-radio-container:not(.vega-radio-disabled){cursor:pointer}.vega-radio-container input{position:absolute;left:0px;top:0px;opacity:0}.vega-radio-icon{display:inline-block;box-sizing:border-box;border-style:solid;border-radius:9999px;position:relative;left:0px;flex-shrink:0;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-radio-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-radio-container.default .vega-radio-icon{width:24px;height:24px;padding:5px}.vega-radio-container.small .vega-radio-icon{width:16px;height:16px;padding:4px}.vega-radio-checked:hover .vega-radio-circle{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-radio-container input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-radio-container:not(.vega-radio-disabled):active .vega-radio-icon{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}.vega-radio-checked:active .vega-radio-circle{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.vega-radio-checked .vega-radio-circle{display:block;width:100%;height:100%;border-radius:9999px;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}.vega-radio-disabled .vega-radio-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))}.vega-radio-disabled .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-disabled:hover .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-container .vega-radio-label{display:inline-block;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.vega-radio-container .vega-radio-label.vega-hidden{display:none}.vega-radio-container.default .vega-radio-label{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-radio-container.default .vega-radio-label{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-radio-container.default .vega-radio-label{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-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-radio-disabled .vega-radio-label{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}label{-webkit-tap-highlight-color:transparent}.vega-radio-container.error .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-radio-container.error:hover .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-radio-container.error input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-container.error:active .vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-checked.error .vega-radio-circle{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-radio-checked.error:hover .vega-radio-circle{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-radio-checked.error:active .vega-radio-circle{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}';class S extends V{constructor(){super((e=>(e.setRadioArrayTabIndex(),[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[e.host],callback:e=>{this.updateRadioFocusStates(e)}}])))}setRadioArrayTabIndex(){const e=this.getNotDisabledRadioArray();if(e){const i=e.findIndex((e=>e.checked)),t=i>-1?i:0;e.forEach(((e,i)=>{const a=i===t?"0":"-1";e.shadowRoot.querySelector("input").setAttribute("tabIndex",a)}))}}updateRadioFocusStates(e){const i=e.key,t=this.getNotDisabledRadioArray();if(!t||0===t.length)return;t.forEach((e=>e.shadowRoot.querySelector("input").setAttribute("tabIndex","-1")));const a=t.findIndex((i=>i===e.target));let r;"ArrowDown"===i?r=a===t.length-1?t[0]:t[a+1]:"ArrowUp"===i&&(r=0===a?t[t.length-1]:t[a-1]),r&&(r.shadowRoot.querySelector("input").focus(),r.checked=!0,r.shadowRoot.querySelector("input").tabIndex=0)}getNotDisabledRadioArray(){const e=Array.from(this.host.querySelectorAll("vega-radio"));if(e.length>0)return e.filter((e=>!e.disabled))}}!function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);o>3&&n&&Object.defineProperty(i,t,n)}([g()],S.prototype,"host",void 0);var P=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class M extends f{emitEventAndNotifyValueChangeSubject(e){this.changeEventEmitter.emit(e),s.notify(h,{host:this.host,detail:e})}setValue(e){this.value=e}}P([g()],M.prototype,"host",void 0),P([g({writable:!0})],M.prototype,"value",void 0),P([g()],M.prototype,"changeEventEmitter",void 0),P([g()],M.prototype,"radioItemsController",void 0),P([v("watchValue")],M.prototype,"emitEventAndNotifyValueChangeSubject",null);var U=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class B extends f{constructor(){super(...arguments),this.vegaRadioArray=[]}componentWillLoad(){this.syncRadioArrayAndValue()}setRadioItemName(){this.vegaRadioArray.forEach((e=>{e.name=this.name?this.name:e.getAttribute("name")}))}setRadioItemCheckedByValue(e){this.vegaRadioArray.forEach((i=>{i.checked=i.value===e}))}syncRadioItemsStatus(){this.setRadioItemCheckedByValue(this.value),this.setRadioItemName()}getRadioItemsArray(){return this.vegaRadioArray}syncRadioArrayAndValue(){this.vegaRadioArray=Array.from(this.host.querySelectorAll("vega-radio")),this.vegaRadioArray.forEach((e=>{e.checked&&this.valueController.setValue(e.value)}))}}U([g()],B.prototype,"host",void 0),U([g()],B.prototype,"value",void 0),U([g()],B.prototype,"name",void 0),U([g()],B.prototype,"valueController",void 0),U([v("componentWillLoad")],B.prototype,"componentWillLoad",null),U([v("watchName")],B.prototype,"setRadioItemName",null),U([v("watchValue")],B.prototype,"setRadioItemCheckedByValue",null),U([v("componentDidLoad")],B.prototype,"syncRadioItemsStatus",null);var T=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const W=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers=new Map,this.formFieldController=new O({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new I:null}],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.radioItemsController.getRadioItemsArray().map((e=>e.shadowRoot.querySelector("input"))),defaultValue:"",attributeGetter:e=>this[e],validationRulesName:"validationRules"}),this.radioValueChangeObserver=new E(l,(e=>this.childRadioValueChange(e))),this.radioEventPrevent=new A([w],(()=>this.vegaFlexElement)),this.slotMutationObserver=new z({options:{childList:!0},mutationFilter:D("VEGA-RADIO"),callback:()=>this.radioItemsController.syncRadioArrayAndValue()}),this.changeEventEmitter=x(W,w),this.keyboardController=new S,this.radioItemsController=new B,this.valueController=new M,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value="",this.name="",this.vegaFlexProp={},this.required=!1,this.optional=!1,this.hint="",this.isValid=null,this.disabled=!1,this.autoValidation=!0,this.validationRules=[],this.childRadioValueChange=e=>{e.detail&&this.valueController.setValue(e.host.value)}}async watchValue(e){}watchName(){}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentWillLoad(){}componentDidLoad(){this.setVegaFlexProperty(),this.disabled&&this.notifyGroupDisabledChange()}render(){return n(t(a,{role:"radiogroup"},this.renderLabelDom(),t("div",{class:"vega-radio-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,disabled:this.disabled,optional:this.optional})}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)}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],name:["watchName"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};T([u()],W.prototype,"globalSlimmers",void 0),T([b()],W.prototype,"formFieldController",void 0),T([b()],W.prototype,"radioValueChangeObserver",void 0),T([b()],W.prototype,"radioEventPrevent",void 0),T([b()],W.prototype,"slotMutationObserver",void 0),T([b()],W.prototype,"changeEventEmitter",void 0),T([b()],W.prototype,"keyboardController",void 0),T([b()],W.prototype,"radioItemsController",void 0),T([b()],W.prototype,"valueController",void 0),T([b()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T([C()],W.prototype,"watchVegaFlexProp",null),W.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{N as vega_radio,W as vega_radio_group}