@globalpayments/vega 2.49.0 → 2.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/dist/cjs/{app-globals-e17dedba.js → app-globals-65622aeb.js} +1 -1
  2. package/dist/cjs/{array-3aa164ce.js → array-249289f2.js} +18 -15
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-37870b2e.js → child-nodes-event-prevent-slimmer-cc193ee1.js} +1 -1
  4. package/dist/cjs/{design-token-6e2c52f1.js → design-token-cba4222e.js} +1 -1
  5. package/dist/cjs/{element-appender-slimmer-9fb99abd.js → element-appender-slimmer-4a26ecb2.js} +1 -1
  6. package/dist/cjs/{feature-flag-controller-075fa683.js → feature-flag-controller-5e58aae4.js} +6 -0
  7. package/dist/cjs/{form-field-controller-slimmer-527c25a0.js → form-field-controller-slimmer-4b0af5bc.js} +5 -3
  8. package/dist/cjs/index.cjs.js +4 -4
  9. package/dist/cjs/{legend-input-processor-b071654c.js → legend-input-processor-8bcce3bf.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{mutation-observer-filters-1f8c32a3.js → mutation-observer-filters-38cebc6d.js} +1 -1
  12. package/dist/cjs/{responsive-format-facade-9be0a851.js → responsive-format-facade-263d49f6.js} +2 -2
  13. package/dist/cjs/{style-formatter-5b95a2a6.js → style-formatter-ae0ef7fc.js} +1 -1
  14. package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
  15. package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
  16. package/dist/cjs/vega-banner.cjs.entry.js +1 -1
  17. package/dist/cjs/vega-bar-chart.cjs.entry.js +3 -3
  18. package/dist/cjs/vega-box.cjs.entry.js +5 -5
  19. package/dist/cjs/vega-breadcrumb.cjs.entry.js +2 -2
  20. package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
  21. package/dist/cjs/vega-button-group_2.cjs.entry.js +2 -2
  22. package/dist/cjs/vega-button-link.cjs.entry.js +2 -2
  23. package/dist/cjs/vega-button.cjs.entry.js +4 -4
  24. package/dist/cjs/vega-calendar_3.cjs.entry.js +3 -3
  25. package/dist/cjs/vega-card.cjs.entry.js +4 -4
  26. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  27. package/dist/cjs/vega-checkbox_2.cjs.entry.js +5 -5
  28. package/dist/cjs/vega-chip.cjs.entry.js +5 -5
  29. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -3
  30. package/dist/cjs/vega-combo-box.cjs.entry.js +5 -5
  31. package/dist/cjs/vega-date-picker_2.cjs.entry.js +7 -7
  32. package/dist/cjs/vega-dialog_2.cjs.entry.js +5 -5
  33. package/dist/cjs/vega-divider.cjs.entry.js +4 -4
  34. package/dist/cjs/vega-dropdown_5.cjs.entry.js +5 -5
  35. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  36. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  37. package/dist/cjs/vega-flag-icon.cjs.entry.js +4 -4
  38. package/dist/cjs/vega-flex.cjs.entry.js +5 -5
  39. package/dist/cjs/vega-font.cjs.entry.js +4 -4
  40. package/dist/cjs/vega-form.cjs.entry.js +5 -5
  41. package/dist/cjs/vega-grid.cjs.entry.js +4 -4
  42. package/dist/cjs/vega-icon.cjs.entry.js +4 -4
  43. package/dist/cjs/vega-image-uploader.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-input-credit-card.cjs.entry.js +5 -5
  45. package/dist/cjs/vega-input-numeric.cjs.entry.js +5 -5
  46. package/dist/cjs/vega-input-phone-number.cjs.entry.js +21 -13
  47. package/dist/cjs/vega-input-range.cjs.entry.js +5 -5
  48. package/dist/cjs/vega-input-select.cjs.entry.js +6 -6
  49. package/dist/cjs/vega-input.cjs.entry.js +16 -5
  50. package/dist/cjs/vega-left-nav_5.cjs.entry.js +4 -4
  51. package/dist/cjs/vega-line-chart.cjs.entry.js +3 -3
  52. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  53. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
  54. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  55. package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
  56. package/dist/cjs/vega-popover_2.cjs.entry.js +4 -4
  57. package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
  58. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +24 -24
  59. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +6 -6
  60. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +5 -5
  61. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  62. package/dist/cjs/vega-signature-capture.cjs.entry.js +6 -6
  63. package/dist/cjs/vega-stepper.cjs.entry.js +5 -5
  64. package/dist/cjs/vega-tab-group_2.cjs.entry.js +2 -2
  65. package/dist/cjs/vega-table_8.cjs.entry.js +5 -5
  66. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  67. package/dist/cjs/vega-time-picker_2.cjs.entry.js +7 -7
  68. package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
  69. package/dist/cjs/vega-tooltip_2.cjs.entry.js +4 -4
  70. package/dist/cjs/vega.cjs.js +2 -2
  71. package/dist/cjs/{y-axis-input-processor-72684c57.js → y-axis-input-processor-e371c142.js} +2 -2
  72. package/dist/collection/components/vega-input/vega-input.js +13 -2
  73. package/dist/collection/components/vega-input-phone-number/slimmers/renderers/country-select-renderer.js +2 -0
  74. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.js +17 -17
  75. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +1 -1
  76. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +1 -1
  77. package/dist/collection/helpers/feature-control/feature-flags-map.js +6 -0
  78. package/dist/collection/helpers/slimmers/form-field-controller-slimmer.js +3 -1
  79. package/dist/collection/utils/array.js +18 -15
  80. package/dist/collection/utils/test/array.test.js +78 -16
  81. package/dist/esm/{app-globals-b7b43a4e.js → app-globals-1f8c30e9.js} +1 -1
  82. package/dist/esm/{array-3113609f.js → array-7888f339.js} +18 -15
  83. package/dist/esm/{child-nodes-event-prevent-slimmer-d3a94ef2.js → child-nodes-event-prevent-slimmer-5d45361e.js} +1 -1
  84. package/dist/esm/{design-token-e263e6a2.js → design-token-0699f0ca.js} +1 -1
  85. package/dist/esm/{element-appender-slimmer-55d63b1f.js → element-appender-slimmer-96cb54e2.js} +1 -1
  86. package/dist/esm/{feature-flag-controller-690eac1d.js → feature-flag-controller-0fbe8fb0.js} +6 -0
  87. package/dist/esm/{form-field-controller-slimmer-e7dc3db1.js → form-field-controller-slimmer-89a72ee7.js} +5 -3
  88. package/dist/esm/index.js +4 -4
  89. package/dist/esm/{legend-input-processor-8bcd5c5a.js → legend-input-processor-8f76ce8a.js} +1 -1
  90. package/dist/esm/loader.js +2 -2
  91. package/dist/esm/{mutation-observer-filters-7ee2b410.js → mutation-observer-filters-1a054fb0.js} +1 -1
  92. package/dist/esm/{responsive-format-facade-bc2f8ad3.js → responsive-format-facade-42f3fcfa.js} +2 -2
  93. package/dist/esm/{style-formatter-0f221459.js → style-formatter-cb00c709.js} +1 -1
  94. package/dist/esm/vega-accordion.entry.js +4 -4
  95. package/dist/esm/vega-app-header-button.entry.js +5 -5
  96. package/dist/esm/vega-banner.entry.js +1 -1
  97. package/dist/esm/vega-bar-chart.entry.js +3 -3
  98. package/dist/esm/vega-box.entry.js +5 -5
  99. package/dist/esm/vega-breadcrumb.entry.js +2 -2
  100. package/dist/esm/vega-button-circle.entry.js +5 -5
  101. package/dist/esm/vega-button-group_2.entry.js +2 -2
  102. package/dist/esm/vega-button-link.entry.js +2 -2
  103. package/dist/esm/vega-button.entry.js +4 -4
  104. package/dist/esm/vega-calendar_3.entry.js +3 -3
  105. package/dist/esm/vega-card.entry.js +4 -4
  106. package/dist/esm/vega-carousel.entry.js +3 -3
  107. package/dist/esm/vega-checkbox_2.entry.js +5 -5
  108. package/dist/esm/vega-chip.entry.js +5 -5
  109. package/dist/esm/vega-color-picker.entry.js +3 -3
  110. package/dist/esm/vega-combo-box.entry.js +5 -5
  111. package/dist/esm/vega-date-picker_2.entry.js +7 -7
  112. package/dist/esm/vega-dialog_2.entry.js +5 -5
  113. package/dist/esm/vega-divider.entry.js +4 -4
  114. package/dist/esm/vega-dropdown_5.entry.js +5 -5
  115. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  116. package/dist/esm/vega-file-uploader.entry.js +3 -3
  117. package/dist/esm/vega-flag-icon.entry.js +4 -4
  118. package/dist/esm/vega-flex.entry.js +5 -5
  119. package/dist/esm/vega-font.entry.js +4 -4
  120. package/dist/esm/vega-form.entry.js +5 -5
  121. package/dist/esm/vega-grid.entry.js +4 -4
  122. package/dist/esm/vega-icon.entry.js +4 -4
  123. package/dist/esm/vega-image-uploader.entry.js +6 -6
  124. package/dist/esm/vega-input-credit-card.entry.js +5 -5
  125. package/dist/esm/vega-input-numeric.entry.js +5 -5
  126. package/dist/esm/vega-input-phone-number.entry.js +21 -13
  127. package/dist/esm/vega-input-range.entry.js +5 -5
  128. package/dist/esm/vega-input-select.entry.js +6 -6
  129. package/dist/esm/vega-input.entry.js +16 -5
  130. package/dist/esm/vega-left-nav_5.entry.js +4 -4
  131. package/dist/esm/vega-line-chart.entry.js +3 -3
  132. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  133. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +2 -2
  134. package/dist/esm/vega-pagination.entry.js +4 -4
  135. package/dist/esm/vega-pie-chart.entry.js +2 -2
  136. package/dist/esm/vega-popover_2.entry.js +4 -4
  137. package/dist/esm/vega-radio_2.entry.js +5 -5
  138. package/dist/esm/vega-rich-text-editor_4.entry.js +24 -24
  139. package/dist/esm/vega-selection-chip_2.entry.js +6 -6
  140. package/dist/esm/vega-selection-tile_2.entry.js +5 -5
  141. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  142. package/dist/esm/vega-signature-capture.entry.js +6 -6
  143. package/dist/esm/vega-stepper.entry.js +5 -5
  144. package/dist/esm/vega-tab-group_2.entry.js +2 -2
  145. package/dist/esm/vega-table_8.entry.js +5 -5
  146. package/dist/esm/vega-textarea.entry.js +5 -5
  147. package/dist/esm/vega-time-picker_2.entry.js +7 -7
  148. package/dist/esm/vega-toggle-switch.entry.js +3 -3
  149. package/dist/esm/vega-tooltip_2.entry.js +4 -4
  150. package/dist/esm/vega.js +2 -2
  151. package/dist/esm/{y-axis-input-processor-26fab110.js → y-axis-input-processor-e090b01c.js} +2 -2
  152. package/dist/types/components/vega-input/vega-input.d.ts +4 -0
  153. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.d.ts +11 -11
  154. package/dist/types/helpers/feature-control/feature-flag.d.ts +2 -1
  155. package/dist/types/utils/array.d.ts +6 -5
  156. package/dist/vega/index.esm.js +1 -1
  157. package/dist/vega/{p-f7423232.entry.js → p-0079088b.entry.js} +1 -1
  158. package/dist/vega/p-02d7d948.entry.js +1 -0
  159. package/dist/vega/{p-27e3825f.entry.js → p-06adb37e.entry.js} +1 -1
  160. package/dist/vega/p-06c5fe97.entry.js +1 -0
  161. package/dist/vega/{p-01fd343e.entry.js → p-0ed7a098.entry.js} +1 -1
  162. package/dist/vega/p-0f6b3a89.entry.js +1 -0
  163. package/dist/vega/{p-5cbadf95.entry.js → p-136f665b.entry.js} +1 -1
  164. package/dist/vega/{p-472727a4.entry.js → p-147e3cbd.entry.js} +1 -1
  165. package/dist/vega/p-16fd7c32.js +1 -0
  166. package/dist/vega/{p-e719b1a9.entry.js → p-1971d980.entry.js} +1 -1
  167. package/dist/vega/{p-2bd64faf.entry.js → p-1a263af1.entry.js} +1 -1
  168. package/dist/vega/{p-c96effa5.entry.js → p-1af4771a.entry.js} +1 -1
  169. package/dist/vega/{p-3aa244d4.entry.js → p-1c63afd2.entry.js} +1 -1
  170. package/dist/vega/{p-be40684b.entry.js → p-1e05b7b4.entry.js} +1 -1
  171. package/dist/vega/{p-84aac4b1.entry.js → p-1ea863a6.entry.js} +1 -1
  172. package/dist/vega/{p-2198de3e.entry.js → p-252e42c7.entry.js} +1 -1
  173. package/dist/vega/{p-58b8c06b.entry.js → p-271b30b9.entry.js} +1 -1
  174. package/dist/vega/{p-a8b681ed.entry.js → p-2d1d4f33.entry.js} +1 -1
  175. package/dist/vega/{p-63414091.entry.js → p-353b3ded.entry.js} +1 -1
  176. package/dist/vega/{p-3220920f.js → p-45e28b9b.js} +1 -1
  177. package/dist/vega/{p-431ab4dd.js → p-45f696b4.js} +1 -1
  178. package/dist/vega/{p-50355e06.entry.js → p-46714da3.entry.js} +1 -1
  179. package/dist/vega/{p-ac82ca73.entry.js → p-47ff95ba.entry.js} +1 -1
  180. package/dist/vega/{p-d6591d70.entry.js → p-4a32a6c0.entry.js} +1 -1
  181. package/dist/vega/{p-1e940ce8.js → p-4d793cb0.js} +1 -1
  182. package/dist/vega/{p-26e4221c.entry.js → p-4ec0d36f.entry.js} +1 -1
  183. package/dist/vega/{p-ff41dc6a.entry.js → p-5160a6b9.entry.js} +1 -1
  184. package/dist/vega/p-52b8f2d2.js +1 -0
  185. package/dist/vega/{p-88c9efbb.js → p-54add0d2.js} +1 -1
  186. package/dist/vega/{p-57e813f2.entry.js → p-54f17c2e.entry.js} +1 -1
  187. package/dist/vega/{p-ba6c7f00.entry.js → p-5c954088.entry.js} +1 -1
  188. package/dist/vega/p-5f377954.js +1 -1
  189. package/dist/vega/{p-8bc4c015.entry.js → p-61eb7f32.entry.js} +1 -1
  190. package/dist/vega/{p-52e17867.entry.js → p-646a9198.entry.js} +1 -1
  191. package/dist/vega/{p-a8e9bfae.entry.js → p-647025dd.entry.js} +1 -1
  192. package/dist/vega/{p-ccdd49be.entry.js → p-6a830bc5.entry.js} +1 -1
  193. package/dist/vega/{p-0a18f5f6.entry.js → p-7088ead9.entry.js} +1 -1
  194. package/dist/vega/{p-c1e1adf9.entry.js → p-77492977.entry.js} +1 -1
  195. package/dist/vega/{p-6cd8e6f4.entry.js → p-81fbfb6d.entry.js} +1 -1
  196. package/dist/vega/{p-28b7d6ba.entry.js → p-83ef9e7d.entry.js} +1 -1
  197. package/dist/vega/{p-cb637815.entry.js → p-8789d34d.entry.js} +1 -1
  198. package/dist/vega/{p-2565cb0c.entry.js → p-8813c0ac.entry.js} +1 -1
  199. package/dist/vega/{p-1abe125f.js → p-89ab72e3.js} +1 -1
  200. package/dist/vega/{p-8aec8dac.entry.js → p-8a85c7af.entry.js} +1 -1
  201. package/dist/vega/{p-6ec8a9d8.entry.js → p-8c388b58.entry.js} +1 -1
  202. package/dist/vega/{p-96b4c0cc.entry.js → p-9803042f.entry.js} +1 -1
  203. package/dist/vega/{p-ca34443a.entry.js → p-98c64d77.entry.js} +1 -1
  204. package/dist/vega/{p-fb853d5f.entry.js → p-9f3539a4.entry.js} +1 -1
  205. package/dist/vega/{p-1cd2d7b8.entry.js → p-a46bc9f1.entry.js} +1 -1
  206. package/dist/vega/{p-7f6702f7.js → p-a7dcb2a3.js} +1 -1
  207. package/dist/vega/{p-353d32c0.entry.js → p-b351ace3.entry.js} +1 -1
  208. package/dist/vega/{p-33ffaa71.entry.js → p-b42aea55.entry.js} +1 -1
  209. package/dist/vega/{p-34a70d18.entry.js → p-b5d70ee0.entry.js} +1 -1
  210. package/dist/vega/{p-5a8f129f.entry.js → p-b649e86e.entry.js} +1 -1
  211. package/dist/vega/{p-4fa94b35.entry.js → p-b847a143.entry.js} +1 -1
  212. package/dist/vega/{p-8afa2115.js → p-bc2dd43d.js} +1 -1
  213. package/dist/vega/{p-fda0c179.entry.js → p-bfb344e1.entry.js} +1 -1
  214. package/dist/vega/{p-fd018044.entry.js → p-c9a4e79a.entry.js} +1 -1
  215. package/dist/vega/{p-700da800.entry.js → p-cfda64fd.entry.js} +1 -1
  216. package/dist/vega/p-d27ae9ff.js +1 -0
  217. package/dist/vega/{p-429616af.entry.js → p-e2e36d2b.entry.js} +1 -1
  218. package/dist/vega/{p-7db32dc0.entry.js → p-ec1f2d21.entry.js} +1 -1
  219. package/dist/vega/{p-a25939ad.js → p-eda5b7fd.js} +1 -1
  220. package/dist/vega/{p-6aa569e5.entry.js → p-ef8272b5.entry.js} +1 -1
  221. package/dist/vega/p-f4c1d961.js +1 -0
  222. package/dist/vega/{p-59ccf915.entry.js → p-f5279deb.entry.js} +1 -1
  223. package/dist/vega/{p-57cdacb1.entry.js → p-f8033cd3.entry.js} +1 -1
  224. package/dist/vega/{p-e29da13d.entry.js → p-fe63bd50.entry.js} +1 -1
  225. package/dist/vega/vega.esm.js +1 -1
  226. package/package.json +1 -1
  227. package/dist/vega/p-24e0cdcc.entry.js +0 -1
  228. package/dist/vega/p-3647d61d.js +0 -1
  229. package/dist/vega/p-4e167a8c.js +0 -1
  230. package/dist/vega/p-6b75fe39.js +0 -1
  231. package/dist/vega/p-b5f5a5e0.js +0 -1
  232. package/dist/vega/p-c5f8b3a3.entry.js +0 -1
  233. package/dist/vega/p-ce70a54a.entry.js +0 -1
@@ -4,12 +4,12 @@ import { R as RequiredFieldRule } from './required-field-rule-ab4bdc47.js';
4
4
  import { s as sanitizeVegaComponent } from './component-cae24190.js';
5
5
  import { I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
6
6
  import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-385c7124.js';
7
- import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-e7dc3db1.js';
7
+ import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-89a72ee7.js';
8
8
  import { b as FORM_ELEMENT_VALUE_CHANGE } from './static-subject-title-ca83d6b6.js';
9
9
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
10
10
  import { c as createEventEmitSlimmer } from './event-emit-slimmer-b7d511f6.js';
11
11
  import { f as VegaChange, B as VegaBlur } from './dom-node-subject-factory-f77cf9cc.js';
12
- import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-d3a94ef2.js';
12
+ import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-5d45361e.js';
13
13
  import './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
14
14
  import './string-be824360.js';
15
15
  import './observer-3959f9dd.js';
@@ -23,13 +23,13 @@ import './ui-8424715a.js';
23
23
  import './breakpoints-d9faf11c.js';
24
24
  import './dom-node-subject-observer-factory-715dccf9.js';
25
25
  import './mutation-observer-slimmer-6cef9549.js';
26
- import './mutation-observer-filters-7ee2b410.js';
27
- import './array-3113609f.js';
26
+ import './mutation-observer-filters-1a054fb0.js';
27
+ import './array-7888f339.js';
28
28
  import './number-4398f2e1.js';
29
29
  import './sub-state-observer-slimmer-be7a6ce3.js';
30
30
  import './internal-vega-event-manager-87dc436c.js';
31
31
  import './vega-env-manager-8f8dc473.js';
32
- import './feature-flag-controller-690eac1d.js';
32
+ import './feature-flag-controller-0fbe8fb0.js';
33
33
  import './index-44c794b4.js';
34
34
  import './_commonjsHelpers-9943807e.js';
35
35
 
@@ -4,20 +4,20 @@ import { T as TimeRangeRequiredRule, a as TimeRequiredRule } from './time-requir
4
4
  import { s as sanitizeVegaComponent } from './component-cae24190.js';
5
5
  import { c as MapToComponentField, V as VegaSlimmer, M as MapToComponentMethod, L as LogUtility, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
6
6
  import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-385c7124.js';
7
- import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-e7dc3db1.js';
7
+ import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-89a72ee7.js';
8
8
  import { D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-715dccf9.js';
9
9
  import { f as VegaChange, A as VegaFocus, B as VegaBlur, a as VegaClick } from './dom-node-subject-factory-f77cf9cc.js';
10
10
  import { g as getDeviceType, D as DeviceType } from './ui-ed1283bb.js';
11
11
  import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
12
12
  import { a as isTimeStr, p as pad, e as convert12HourTo24HourFormat } from './date-c55b97f0.js';
13
- import { i as isArrayEqual } from './array-3113609f.js';
13
+ import { i as isArrayEqual } from './array-7888f339.js';
14
14
  import { b as FORM_ELEMENT_VALUE_CHANGE } from './static-subject-title-ca83d6b6.js';
15
15
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
16
- import { E as ElementAppenderSlimmer } from './element-appender-slimmer-55d63b1f.js';
16
+ import { E as ElementAppenderSlimmer } from './element-appender-slimmer-96cb54e2.js';
17
17
  import { K as KeyboardManagerSlimmer } from './keyboard-manager-slimmer-42bf9773.js';
18
18
  import { i as isNonNullable } from './type-guard-158f6d7a.js';
19
19
  import { I as InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
20
- import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-d3a94ef2.js';
20
+ import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-5d45361e.js';
21
21
  import { c as createEventEmitSlimmer } from './event-emit-slimmer-b7d511f6.js';
22
22
  import { T as TranslationSlimmer } from './translation-slimmer-88966d5c.js';
23
23
  import './string-be824360.js';
@@ -30,17 +30,17 @@ import './page-resize-observer-slimmer-15a84d26.js';
30
30
  import './ui-8424715a.js';
31
31
  import './breakpoints-d9faf11c.js';
32
32
  import './mutation-observer-slimmer-6cef9549.js';
33
- import './mutation-observer-filters-7ee2b410.js';
33
+ import './mutation-observer-filters-1a054fb0.js';
34
34
  import './sub-state-observer-slimmer-be7a6ce3.js';
35
35
  import './number-4398f2e1.js';
36
36
  import './vega-skeleton-loader-controller-c2a8bd27.js';
37
37
  import './dark-mode-style-controller-2ada8e22.js';
38
38
  import './_commonjsHelpers-9943807e.js';
39
39
  import './internal-vega-event-manager-87dc436c.js';
40
- import './responsive-format-facade-bc2f8ad3.js';
40
+ import './responsive-format-facade-42f3fcfa.js';
41
41
  import './pixel-f32c07ce.js';
42
42
  import './vega-env-manager-8f8dc473.js';
43
- import './feature-flag-controller-690eac1d.js';
43
+ import './feature-flag-controller-0fbe8fb0.js';
44
44
  import './index-44c794b4.js';
45
45
  import './icon-manager-638dd4d4.js';
46
46
  import './wait-for-vega-handler-b18eb955.js';
@@ -5,7 +5,7 @@ import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0f
5
5
  import { s as sanitizeVegaComponent } from './component-cae24190.js';
6
6
  import { I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
7
7
  import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-385c7124.js';
8
- import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-e7dc3db1.js';
8
+ import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-89a72ee7.js';
9
9
  import { T as ToggleSwitchRequiredRule } from './toggle-switch-required-rule-b3cf4302.js';
10
10
  import { b as FORM_ELEMENT_VALUE_CHANGE } from './static-subject-title-ca83d6b6.js';
11
11
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
@@ -23,8 +23,8 @@ import './ui-8424715a.js';
23
23
  import './breakpoints-d9faf11c.js';
24
24
  import './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
25
25
  import './mutation-observer-slimmer-6cef9549.js';
26
- import './mutation-observer-filters-7ee2b410.js';
27
- import './array-3113609f.js';
26
+ import './mutation-observer-filters-1a054fb0.js';
27
+ import './array-7888f339.js';
28
28
  import './number-4398f2e1.js';
29
29
  import './sub-state-observer-slimmer-be7a6ce3.js';
30
30
 
@@ -3,7 +3,7 @@ import { s as sanitizeVegaComponent } from './component-cae24190.js';
3
3
  import { I as InjectKeyboardManager } from './inject-keyboard-manager-f513be4a.js';
4
4
  import { c as MapToComponentField, M as MapToComponentMethod, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
5
5
  import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-385c7124.js';
6
- import { E as ElementAppenderSlimmer } from './element-appender-slimmer-55d63b1f.js';
6
+ import { E as ElementAppenderSlimmer } from './element-appender-slimmer-96cb54e2.js';
7
7
  import { c as createDeprecatedPropertySlimmer } from './deprecated-property-slimmer-32575f02.js';
8
8
  import './keyboard-manager-262be5ce.js';
9
9
  import './ui-ed1283bb.js';
@@ -24,11 +24,11 @@ import './_commonjsHelpers-9943807e.js';
24
24
  import './internal-vega-event-manager-87dc436c.js';
25
25
  import './dom-node-subject-factory-f77cf9cc.js';
26
26
  import './number-4398f2e1.js';
27
- import './responsive-format-facade-bc2f8ad3.js';
27
+ import './responsive-format-facade-42f3fcfa.js';
28
28
  import './pixel-f32c07ce.js';
29
- import './array-3113609f.js';
29
+ import './array-7888f339.js';
30
30
  import './vega-env-manager-8f8dc473.js';
31
- import './feature-flag-controller-690eac1d.js';
31
+ import './feature-flag-controller-0fbe8fb0.js';
32
32
  import './index-44c794b4.js';
33
33
  import './icon-manager-638dd4d4.js';
34
34
  import './wait-for-vega-handler-b18eb955.js';
package/dist/esm/vega.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { p as promiseResolve, b as bootstrapLazy } from './index-187f71d1.js';
2
- import { g as globalScripts } from './app-globals-b7b43a4e.js';
3
- import './feature-flag-controller-690eac1d.js';
2
+ import { g as globalScripts } from './app-globals-1f8c30e9.js';
3
+ import './feature-flag-controller-0fbe8fb0.js';
4
4
  import './global-slimmer-registry-17c4efd4.js';
5
5
  import './index-44c794b4.js';
6
6
  import './_commonjsHelpers-9943807e.js';
@@ -1,5 +1,5 @@
1
- import { d as constant, i as interpolateNumber, e as color, f as interpolateRgb, g as interpolateString, B as BaseDrawer } from './legend-input-processor-8bcd5c5a.js';
2
- import { f as flatNestedArray } from './array-3113609f.js';
1
+ import { d as constant, i as interpolateNumber, e as color, f as interpolateRgb, g as interpolateString, B as BaseDrawer } from './legend-input-processor-8f76ce8a.js';
2
+ import { f as flatNestedArray } from './array-7888f339.js';
3
3
 
4
4
  function ascending(a, b) {
5
5
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
@@ -328,4 +328,8 @@ export declare class VegaInput {
328
328
  */
329
329
  private inputChangeHandler;
330
330
  private handleLabelButtonClick;
331
+ /**
332
+ * Compares two MaskConfigType objects or arrays for equality.
333
+ */
334
+ private areMaskConfigsEqual;
331
335
  }
@@ -1,4 +1,4 @@
1
- import { VegaRTEBlockAnnotations, VegaRTETextAnnotations, VegaRTETextNode } from '../../../../interface';
1
+ import { VegaRTEBlockAnnotations, VegaRTECodeAnnotations, VegaRTETextAnnotations, VegaRTETextNode } from '../../../../interface';
2
2
  import { ElementToDTOStrategy } from './element-to-dto-strategy.abstract';
3
3
  /** Abstract class for block html element to RTE block dto */
4
4
  export declare abstract class BlockToRTEBlockStrategyAbstract extends ElementToDTOStrategy {
@@ -20,10 +20,10 @@ export declare abstract class BlockToRTEBlockStrategyAbstract extends ElementToD
20
20
  * </li>
21
21
  *
22
22
  * @param {HTMLElement[]} elements - Child elements.
23
- * @param {HTMLElement[]} annotations - Parent annotations.
23
+ * @param {VegaRTETextAnnotations | VegaRTECodeAnnotations} annotations - Parent annotations.
24
24
  * @returns {VegaRTETextNode[]} - Text node DTO.
25
25
  */
26
- protected generateChildNodes(elements: HTMLElement[], annotations?: VegaRTETextAnnotations): VegaRTETextNode[];
26
+ protected generateChildNodes(elements: HTMLElement[], annotations?: VegaRTETextAnnotations | VegaRTECodeAnnotations): VegaRTETextNode[];
27
27
  /**
28
28
  * Generate annotations map for block element.
29
29
  *
@@ -31,6 +31,14 @@ export declare abstract class BlockToRTEBlockStrategyAbstract extends ElementToD
31
31
  * @returns {VegaRTEBlockAnnotations} - Text block annotations.
32
32
  */
33
33
  protected generateBlockAnnotations(element: HTMLElement): VegaRTEBlockAnnotations;
34
+ /**
35
+ * Generate annotations map for text node element.
36
+ *
37
+ * @param {HTMLElement} element - current element.
38
+ * @param {VegaRTETextAnnotations | VegaRTECodeAnnotations} parentAnnotations - parent annotations
39
+ * @returns {VegaRTETextAnnotations | VegaRTECodeAnnotations} - Text node annotations.
40
+ */
41
+ protected generateTextNodeAnnotations(element: HTMLElement, parentAnnotations?: VegaRTETextAnnotations | VegaRTECodeAnnotations): VegaRTETextAnnotations | VegaRTECodeAnnotations;
34
42
  /**
35
43
  * Check is a invalid text node.
36
44
  *
@@ -38,14 +46,6 @@ export declare abstract class BlockToRTEBlockStrategyAbstract extends ElementToD
38
46
  * @returns {boolean} - boolean.
39
47
  */
40
48
  private isInvalidTextNode;
41
- /**
42
- * Generate annotations map for text node element.
43
- *
44
- * @param {HTMLElement} element - current element.
45
- * @param {VegaRTETextAnnotations} parentAnnotations - parent annotations
46
- * @returns {VegaRTETextAnnotations | VegaRTECodeAnnotations} - Text node annotations.
47
- */
48
- private generateTextNodeAnnotations;
49
49
  /**
50
50
  * Is code element.
51
51
  *
@@ -58,4 +58,5 @@ export type FeatureFlagKey =
58
58
  | 'VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN'
59
59
  | 'VEGA_TABLE.REVERSE_SORT_ORDER'
60
60
  | 'VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE'
61
- | 'VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR';
61
+ | 'VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR'
62
+ | 'VEGA_INPUT_PHONE_NUMBER.ENABLE_CALCULATION_POSITION_BY_SCREEN';
@@ -8,21 +8,22 @@
8
8
  */
9
9
  export declare const flattenChildren: <T>(arr: T[], children?: string) => T[];
10
10
  /**
11
- * The function checks if two arrays are equal, either in order or ignoring order.
11
+ * The function checks if two arrays are equal, either in order or ignoring order with specific comparator.
12
12
  *
13
- * @param {T[]} first - An array of type T, which is the first array to compare.
14
- * @param {T[]} second - `second` is the second array that is being compared for equality with the
15
- * first array (`first`).
13
+ * @param {T[]} array1 - An array of type T, which is the first array to compare.
14
+ * @param {T[]} array2 - `array2` is the second array that is being compared for equality with the
15
+ * first array (`array1`).
16
16
  * @param {boolean} [ignoreOrder=false] - The `ignoreOrder` parameter is a boolean flag that determines
17
17
  * whether the order of elements in the arrays should be taken into account when comparing them. If
18
18
  * `ignoreOrder` is set to `true`, the function will return `true` if the two arrays contain the same
19
19
  * elements, regardless of their order
20
+ * @param {boolean} [comparator=(a: T, b: T) => number] - The `comparator` parameter is the specific custom method used to compare the two arrays.
20
21
  * @returns {boolean} The function `isArrayEqual` returns a boolean value indicating whether the two input arrays
21
22
  * are equal or not. If the arrays are equal, it returns `true`, otherwise it returns `false`. The
22
23
  * equality of the arrays can be determined either by comparing the elements in the same order or by
23
24
  * ignoring the order of the elements.
24
25
  */
25
- export declare const isArrayEqual: <T>(first: T[], second: T[], ignoreOrder?: boolean) => boolean;
26
+ export declare const isArrayEqual: <T>(array1: T[], array2: T[], ignoreOrder?: boolean, comparator?: (a: T, b: T) => number) => boolean;
26
27
  /**
27
28
  * Return true if all the keys of the object are numbers since it's an array-like object, false otherwise.
28
29
  *
@@ -1 +1 @@
1
- export{g as getCurrentBreakpoint}from"./p-c0291e2e.js";export{L as LogUtility,s as setVegaLogLevel}from"./p-6e1ab235.js";export{d as formatAndValidBackgroundColor,e as formatAndValidBorderColor,g as formatAndValidBorderRadius,c as formatAndValidBreakpointSize,a as formatAndValidGap,h as formatAndValidPadding,f as formatAndValidResponsiveToken,b as formatAndValidShadow,i as formatAndValidTextColor}from"./p-88c9efbb.js";export{c as camelToDashCase}from"./p-0bb29d98.js";export{d as BackgroundColorMap,a as BackgroundColors,e as BorderColorMap,b as BorderColors,B as BorderRadius,C as Colors,F as FillBackgroundColors,g as ShadowMap,f as Shadows,h as Spacing,S as StrokeBackgroundColors,c as TextColorMap,T as TextColors}from"./p-b1f65b13.js";export{B as Breakpoints}from"./p-ed45b3b6.js";export{I as Icons,g as getIconFromToken}from"./p-16493e5b.js";export{b as Typography,a as TypographyKeys,T as TypographyUrls}from"./p-d884c644.js";export{e as BoxDisplay,B as BreakpointKeys,C as CssStates,F as FlexDirections}from"./p-74168615.js";export{F as FrameworkEnum,v as VegaEnvManager}from"./p-5f377954.js";export{c as VegaDialog,d as VegaEventManager,V as VegaLoader,a as VegaNotify,f as VegaSkeletonLoader,b as VegaThemeManager,e as VegaZIndexManager}from"./p-8ade44bf.js";export{F as FeatureFlag}from"./p-1e940ce8.js";export{B as VegaJQueryDelegatedEventStrategy}from"./p-804f71b3.js";export{V as VegaIconManager}from"./p-cc63e827.js";export{V as ValidCreditCardNumberRule}from"./p-6f90d444.js";export{w as waitForVega}from"./p-bf1894ec.js";export{a as VegaTranslation,s as VegaTranslationResourceEN}from"./p-8d283666.js";export{M as ModifyContentAction,d as RTEBlock,a as RTEImageBlock,e as RTEImageNode,c as RTEListBlock,b as RTEListItemBlock,g as RTENode,R as RTETextBlock,f as RTETextNode,V as VegaRTEContent}from"./p-44b0a005.js";export{G as GridColumns,a as GridRows}from"./p-8afa2115.js";export{C as CheckBoxRequiredRule}from"./p-590fd123.js";export{D as DateRequiredRule}from"./p-8fae8f9e.js";export{I as InputPhoneNumberRequiredRule}from"./p-07c2725a.js";export{I as InputRangeRequiredRule}from"./p-f396c69a.js";export{R as RequiredFieldRule}from"./p-280cbcdb.js";export{R as RichTextEditorRequiredRule}from"./p-2da83c2a.js";export{T as TimeRangeRequiredRule,a as TimeRequiredRule}from"./p-924b4e24.js";export{T as ToggleSwitchRequiredRule}from"./p-7c0b4c36.js";export{F as FileUploaderRequiredRule}from"./p-0bb860cc.js";import"./p-2205ee4c.js";import"./p-3a0a4d15.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-bf953152.js";import"./p-50677c8e.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-7a40e033.js";import"./p-6f81fe1e.js";import"./p-abd7aeaa.js";import"./p-0fd6c35b.js";import"./p-c754b32c.js";import"./p-0c667d6a.js";import"./p-3647d61d.js";import"./p-08835909.js";const o=["ring-input-focus","dark-ring-input-focus","ring-input-danger-focus","dark-ring-input-danger-focus","ring-action-focus","dark-ring-action-focus","ring-action-danger-focus","dark-ring-action-danger-focus"];export{o as Rings}
1
+ export{g as getCurrentBreakpoint}from"./p-c0291e2e.js";export{L as LogUtility,s as setVegaLogLevel}from"./p-6e1ab235.js";export{d as formatAndValidBackgroundColor,e as formatAndValidBorderColor,g as formatAndValidBorderRadius,c as formatAndValidBreakpointSize,a as formatAndValidGap,h as formatAndValidPadding,f as formatAndValidResponsiveToken,b as formatAndValidShadow,i as formatAndValidTextColor}from"./p-54add0d2.js";export{c as camelToDashCase}from"./p-0bb29d98.js";export{d as BackgroundColorMap,a as BackgroundColors,e as BorderColorMap,b as BorderColors,B as BorderRadius,C as Colors,F as FillBackgroundColors,g as ShadowMap,f as Shadows,h as Spacing,S as StrokeBackgroundColors,c as TextColorMap,T as TextColors}from"./p-b1f65b13.js";export{B as Breakpoints}from"./p-ed45b3b6.js";export{I as Icons,g as getIconFromToken}from"./p-16493e5b.js";export{b as Typography,a as TypographyKeys,T as TypographyUrls}from"./p-d884c644.js";export{e as BoxDisplay,B as BreakpointKeys,C as CssStates,F as FlexDirections}from"./p-74168615.js";export{F as FrameworkEnum,v as VegaEnvManager}from"./p-5f377954.js";export{c as VegaDialog,d as VegaEventManager,V as VegaLoader,a as VegaNotify,f as VegaSkeletonLoader,b as VegaThemeManager,e as VegaZIndexManager}from"./p-8ade44bf.js";export{F as FeatureFlag}from"./p-4d793cb0.js";export{B as VegaJQueryDelegatedEventStrategy}from"./p-804f71b3.js";export{V as VegaIconManager}from"./p-cc63e827.js";export{V as ValidCreditCardNumberRule}from"./p-6f90d444.js";export{w as waitForVega}from"./p-bf1894ec.js";export{a as VegaTranslation,s as VegaTranslationResourceEN}from"./p-8d283666.js";export{M as ModifyContentAction,d as RTEBlock,a as RTEImageBlock,e as RTEImageNode,c as RTEListBlock,b as RTEListItemBlock,g as RTENode,R as RTETextBlock,f as RTETextNode,V as VegaRTEContent}from"./p-44b0a005.js";export{G as GridColumns,a as GridRows}from"./p-bc2dd43d.js";export{C as CheckBoxRequiredRule}from"./p-590fd123.js";export{D as DateRequiredRule}from"./p-8fae8f9e.js";export{I as InputPhoneNumberRequiredRule}from"./p-07c2725a.js";export{I as InputRangeRequiredRule}from"./p-f396c69a.js";export{R as RequiredFieldRule}from"./p-280cbcdb.js";export{R as RichTextEditorRequiredRule}from"./p-2da83c2a.js";export{T as TimeRangeRequiredRule,a as TimeRequiredRule}from"./p-924b4e24.js";export{T as ToggleSwitchRequiredRule}from"./p-7c0b4c36.js";export{F as FileUploaderRequiredRule}from"./p-0bb860cc.js";import"./p-2205ee4c.js";import"./p-3a0a4d15.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-bf953152.js";import"./p-50677c8e.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-7a40e033.js";import"./p-6f81fe1e.js";import"./p-abd7aeaa.js";import"./p-0fd6c35b.js";import"./p-c754b32c.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-08835909.js";const o=["ring-input-focus","dark-ring-input-focus","ring-input-danger-focus","dark-ring-input-danger-focus","ring-action-focus","dark-ring-action-focus","ring-action-danger-focus","dark-ring-action-danger-focus"];export{o as Rings}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,g as a}from"./p-1c298d5a.js";import{F as r}from"./p-7f6702f7.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{g as h,b as l,d,c as m,e as c,F as p,a as f}from"./p-5773a9a3.js";import{d as u}from"./p-3647d61d.js";import{s as b}from"./p-9b797118.js";import{f as v,c as j,i as w}from"./p-bf953152.js";import{I as g}from"./p-b28d4f7d.js";import{c as V,I as F}from"./p-6e1ab235.js";import{V as y,I as E}from"./p-4387d550.js";import{c as R}from"./p-a821bcf3.js";import{C as S}from"./p-431ab4dd.js";import{w as C,x as O,y as I,d as P}from"./p-6f81fe1e.js";import{C as B}from"./p-5064a804.js";import{d as M}from"./p-c754b32c.js";import{c as A}from"./p-6cabdb36.js";import{S as D}from"./p-72ecfd40.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-8d283666.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-6e898779.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-262ec334.js";import"./p-804f71b3.js";import"./p-5f377954.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-112455b1.js";var N=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};class x extends D{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}N([V()],x.prototype,"host",void 0),N([V({writable:!0})],x.prototype,"disableBlurValidation",void 0);var H=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};const k=class{constructor(s){t(this,s),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=R(k,C),this.resetEventEmitter=R(k,O),this.validateEventEmitter=R(k,I),this.disableBlurValidationNotifySlimmer=A(k,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new x,this.childEventPrevent=new S([C,O],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new S([I],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new B(h,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new B(l,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new y,this.invalidFieldPathMap=new g(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new g(new Map,(t=>{this.pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.controlledFieldPathSet=new Set,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.updateInternalValidStatus=t=>{if(t.host!==this.host){const i=t.host,s=t.detail;r.isValidFormField(i)&&this.shouldVisitElement(i,!1,!1)&&(s?this.invalidFieldPathMap.delete(i):this.invalidFieldPathMap.set(i,i.dataset.vegaForm))}}}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(h,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async disconnectedCallback(){o.notify(d,{host:this.host}),o.unregister(d,this.formFieldDisconnectedObserver),o.unregister(m,this.formFieldPendingValidObserver)}async componentDidLoad(){await this.navigateVegaFormChildren((async(t,i)=>{i||this.controlledFieldPathSet.add(this.getFormFieldName(t,!0))})),this.initFormFieldDisconnectedObserver(),this.registerFormSubmitChangeManager(),this.registerFormResetChangeManager(),this.registerFormFieldPendingValidChangeManager()}async valid(t=!0){const i={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(s,e)=>{if("function"==typeof s.valid&&e){const e=await s.valid(t);e.isValid||(i.isValid=!1,i.invalidFields.push(...e.invalidFields),i.invalidFieldsErrorMessages=Object.assign(Object.assign({},i.invalidFieldsErrorMessages),e.invalidFieldsErrorMessages))}else{const{isValid:e,message:a}=await this.handleChildFormFieldElementValid(s,t);e||(i.isValid=!1,i.invalidFields.push(this.getFormFieldName(s)),i.invalidFieldsErrorMessages||(i.invalidFieldsErrorMessages={}),i.invalidFieldsErrorMessages[this.getFormFieldName(s)]=a)}})),i}async getValue(t){const i={};return await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);i[a]=e?await s.getValue(t):k.getFormFieldValue(s)}),t),u(i)?Object.values(i):i}async setValue(t,i){t&&(await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e?await s.setValue(t[a],i):(await s.componentOnReady(),void 0!==t[a]&&("function"==typeof s.setValue?await s.setValue(t[a]):s.value=t[a]))}),i),this.isTouched=!1)}async reset(t={},i){await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e&&await s.reset(t[a]||{},i)}),i),o.notify(c,{host:this.host,defaultValueMap:t,option:i}),this.isTouched=!1}static getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}render(){return b(s(e,null,s("slot",null)),this.host)}updateInternalTouchedStatus(){this.isTouched=!0}async navigateVegaFormChildren(t,i,s=this.host){const e=[];Array.from(s.children).forEach((s=>{r.isValidFormField(s)?this.shouldVisitElement(s,null==i?void 0:i.skipDisabled,null==i?void 0:i.skipInvisible)&&e.push(t(s,"VEGA-FORM"===s.tagName)):e.push(this.navigateVegaFormChildren(t,i,s))})),await Promise.all(e)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}getFormFieldName(t,i){let s=t.dataset.vegaForm;if(i){let i=v(t,"vega-form");for(;i&&i!==this.host;)s=i.dataset.vegaForm+" -> "+s,i=v(i,"vega-form")}return s}shouldVisitElement(t,i,s){return this.getFormFieldName(t)&&(!i||!t.disabled)&&(!s||j(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new n(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(d,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}registerFormSubmitChangeManager(){this.formEventsObserver=new n(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),o.register(p,this.formEventsObserver)}canAcceptFormSubmitEvent(t){return this.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.valid()).isValid){const t=await this.getValue();this.submitEventEmitter.emit(t)}}registerFormResetChangeManager(){this.formEventsObserver=new n(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(f,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new n(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(m,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||w(t,this.host)}async handleChildFormFieldElementValid(t,i){const s=P.getSubject(t,M),{isValid:e,message:a}=await new Promise((e=>{const a=setTimeout((()=>{e({isValid:!0,message:""})}),2e3);o.notify(s,{host:t,message:i,promiseResolve:e,timerId:a})}));return{isValid:e,message:a}}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};H([E()],k.prototype,"globalSlimmers",void 0),H([F()],k.prototype,"submitEventEmitter",void 0),H([F()],k.prototype,"resetEventEmitter",void 0),H([F()],k.prototype,"validateEventEmitter",void 0),H([F()],k.prototype,"disableBlurValidationNotifySlimmer",void 0),H([F()],k.prototype,"stateController",void 0),H([F()],k.prototype,"childEventPrevent",void 0),H([F()],k.prototype,"childFormValidateEventPrevent",void 0),H([F()],k.prototype,"childNotifyObserver",void 0),H([F()],k.prototype,"childNodeValueChangeObserver",void 0),H([F()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),k.style=":host{display:block}";export{k as vega_form}
1
+ import{r as t,c as i,h as s,H as e,g as a}from"./p-1c298d5a.js";import{F as r}from"./p-a7dcb2a3.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{g as h,b as l,d,c as m,e as c,F as p,a as f}from"./p-5773a9a3.js";import{d as u}from"./p-d27ae9ff.js";import{s as b}from"./p-9b797118.js";import{f as v,c as j,i as w}from"./p-bf953152.js";import{I as g}from"./p-b28d4f7d.js";import{c as V,I as F}from"./p-6e1ab235.js";import{V as y,I as E}from"./p-4387d550.js";import{c as R}from"./p-a821bcf3.js";import{C as S}from"./p-45f696b4.js";import{w as C,x as O,y as I,d as P}from"./p-6f81fe1e.js";import{C as B}from"./p-5064a804.js";import{d as M}from"./p-c754b32c.js";import{c as A}from"./p-6cabdb36.js";import{S as D}from"./p-72ecfd40.js";import"./p-0bb29d98.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-8d283666.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-abd7aeaa.js";import"./p-6e898779.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-262ec334.js";import"./p-804f71b3.js";import"./p-5f377954.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-112455b1.js";var N=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};class x extends D{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation"}]})}}N([V()],x.prototype,"host",void 0),N([V({writable:!0})],x.prototype,"disableBlurValidation",void 0);var H=function(t,i,s,e){var a,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(o=(r<3?a(o):r>3?a(i,s,o):a(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};const k=class{constructor(s){t(this,s),this.vegaValidate=i(this,"vegaValidate",7),this.validate=i(this,"validate",7),this.vegaFormSubmit=i(this,"vegaFormSubmit",7),this.formSubmit=i(this,"formSubmit",7),this.vegaFormReset=i(this,"vegaFormReset",7),this.formReset=i(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=R(k,C),this.resetEventEmitter=R(k,O),this.validateEventEmitter=R(k,I),this.disableBlurValidationNotifySlimmer=A(k,"disableBlurValidation","watchDisableBlurValidation"),this.stateController=new x,this.childEventPrevent=new S([C,O],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new S([I],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new B(h,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new B(l,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new y,this.invalidFieldPathMap=new g(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new g(new Map,(t=>{this.pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.controlledFieldPathSet=new Set,this.isValid=null,this.isTouched=!1,this.disableBlurValidation=!1,this.updateInternalValidStatus=t=>{if(t.host!==this.host){const i=t.host,s=t.detail;r.isValidFormField(i)&&this.shouldVisitElement(i,!1,!1)&&(s?this.invalidFieldPathMap.delete(i):this.invalidFieldPathMap.set(i,i.dataset.vegaForm))}}}watchIsValid(){this.validateEventEmitter.emit(this.isValid),o.notify(h,{host:this.host,detail:this.isValid})}watchDisableBlurValidation(){}async disconnectedCallback(){o.notify(d,{host:this.host}),o.unregister(d,this.formFieldDisconnectedObserver),o.unregister(m,this.formFieldPendingValidObserver)}async componentDidLoad(){await this.navigateVegaFormChildren((async(t,i)=>{i||this.controlledFieldPathSet.add(this.getFormFieldName(t,!0))})),this.initFormFieldDisconnectedObserver(),this.registerFormSubmitChangeManager(),this.registerFormResetChangeManager(),this.registerFormFieldPendingValidChangeManager()}async valid(t=!0){const i={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(s,e)=>{if("function"==typeof s.valid&&e){const e=await s.valid(t);e.isValid||(i.isValid=!1,i.invalidFields.push(...e.invalidFields),i.invalidFieldsErrorMessages=Object.assign(Object.assign({},i.invalidFieldsErrorMessages),e.invalidFieldsErrorMessages))}else{const{isValid:e,message:a}=await this.handleChildFormFieldElementValid(s,t);e||(i.isValid=!1,i.invalidFields.push(this.getFormFieldName(s)),i.invalidFieldsErrorMessages||(i.invalidFieldsErrorMessages={}),i.invalidFieldsErrorMessages[this.getFormFieldName(s)]=a)}})),i}async getValue(t){const i={};return await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);i[a]=e?await s.getValue(t):k.getFormFieldValue(s)}),t),u(i)?Object.values(i):i}async setValue(t,i){t&&(await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e?await s.setValue(t[a],i):(await s.componentOnReady(),void 0!==t[a]&&("function"==typeof s.setValue?await s.setValue(t[a]):s.value=t[a]))}),i),this.isTouched=!1)}async reset(t={},i){await this.navigateVegaFormChildren((async(s,e)=>{const a=this.getFormFieldName(s);e&&await s.reset(t[a]||{},i)}),i),o.notify(c,{host:this.host,defaultValueMap:t,option:i}),this.isTouched=!1}static getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}render(){return b(s(e,null,s("slot",null)),this.host)}updateInternalTouchedStatus(){this.isTouched=!0}async navigateVegaFormChildren(t,i,s=this.host){const e=[];Array.from(s.children).forEach((s=>{r.isValidFormField(s)?this.shouldVisitElement(s,null==i?void 0:i.skipDisabled,null==i?void 0:i.skipInvisible)&&e.push(t(s,"VEGA-FORM"===s.tagName)):e.push(this.navigateVegaFormChildren(t,i,s))})),await Promise.all(e)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}getFormFieldName(t,i){let s=t.dataset.vegaForm;if(i){let i=v(t,"vega-form");for(;i&&i!==this.host;)s=i.dataset.vegaForm+" -> "+s,i=v(i,"vega-form")}return s}shouldVisitElement(t,i,s){return this.getFormFieldName(t)&&(!i||!t.disabled)&&(!s||j(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new n(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),o.register(d,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}registerFormSubmitChangeManager(){this.formEventsObserver=new n(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),o.register(p,this.formEventsObserver)}canAcceptFormSubmitEvent(t){return this.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.valid()).isValid){const t=await this.getValue();this.submitEventEmitter.emit(t)}}registerFormResetChangeManager(){this.formEventsObserver=new n(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),o.register(f,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new n(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),o.register(m,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||w(t,this.host)}async handleChildFormFieldElementValid(t,i){const s=P.getSubject(t,M),{isValid:e,message:a}=await new Promise((e=>{const a=setTimeout((()=>{e({isValid:!0,message:""})}),2e3);o.notify(s,{host:t,message:i,promiseResolve:e,timerId:a})}));return{isValid:e,message:a}}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"],disableBlurValidation:["watchDisableBlurValidation"]}}};H([E()],k.prototype,"globalSlimmers",void 0),H([F()],k.prototype,"submitEventEmitter",void 0),H([F()],k.prototype,"resetEventEmitter",void 0),H([F()],k.prototype,"validateEventEmitter",void 0),H([F()],k.prototype,"disableBlurValidationNotifySlimmer",void 0),H([F()],k.prototype,"stateController",void 0),H([F()],k.prototype,"childEventPrevent",void 0),H([F()],k.prototype,"childFormValidateEventPrevent",void 0),H([F()],k.prototype,"childNotifyObserver",void 0),H([F()],k.prototype,"childNodeValueChangeObserver",void 0),H([F()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),k.style=":host{display:block}";export{k as vega_form}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as n,g as a}from"./p-1c298d5a.js";import{I as r}from"./p-abd7aeaa.js";import{M as s,a as o}from"./p-4e68dfd9.js";import{M as p,a as l}from"./p-cdbbdcc2.js";import{R as h}from"./p-280cbcdb.js";import{s as d}from"./p-9b797118.js";import{c as u}from"./p-86194314.js";import{C as c}from"./p-75b58efe.js";import{c as f,V as x,M as g,I as m}from"./p-6e1ab235.js";import{s as v}from"./p-6bd5c49b.js";import{V as b,I as w}from"./p-4387d550.js";import{F as y}from"./p-a7dcb2a3.js";import{c as j}from"./p-a821bcf3.js";import{f as I,A as z,B as C,r as k}from"./p-6f81fe1e.js";import{b as S}from"./p-5773a9a3.js";import{C as R}from"./p-2d0d575f.js";import{S as N,a as T,b as E}from"./p-5e3a15a1.js";import{i as A}from"./p-b1f65b13.js";import{D as O}from"./p-6e898779.js";import{P as D}from"./p-c0291e2e.js";import{S as V}from"./p-72ecfd40.js";import{i as $}from"./p-d27ae9ff.js";import{d as F}from"./p-47a4c625.js";import"./p-262ec334.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-bf953152.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-c754b32c.js";import"./p-8d283666.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-804f71b3.js";import"./p-bf1894ec.js";import"./p-0fd6c35b.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";const L=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class M extends r{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=L.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class P extends x{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);r>3&&s&&Object.defineProperty(e,i,s)}([f()],P.prototype,"disableCopyPaste",void 0);var _=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class B extends x{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}_([f()],B.prototype,"host",void 0),_([f()],B.prototype,"prefixIcon",void 0);class U extends N{format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),a=i.substring(0,e),r=(n.match(/,/g)||[]).length;return e+((a.match(/,/g)||[]).length-r)}}class W extends N{constructor(t){super(),this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.mask=new RegExp(this.getRegExp())}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t)&&i.pop()}return i.join("")}calculateCaretPosition(t,e){if(A(e)){const i=this.redressAbnormalNumber(t);return e-(t.length-i.length)}}inputNeedFormat(t){return!this.mask.test(t)}redressAbnormalNumber(t){let e=t.replace(/^0+(?!$)/,"");return e.startsWith(".")&&(e=`0${e}`),e}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}}class K extends N{constructor(t,e=!1){super(),this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(A(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}class q extends W{constructor(t){super(t)}format(t){const e=this.redressAbnormalNumber(t);if(this.skipFormat(e))return e;const i=[...e];for(let t=e.length-1;t>=0;t--){const t=i.join("");this.inputNeedFormat(t.replace(/,/g,""))&&i.pop()}return this.thousandCommaFormat(i.join(""))}calculateCaretPosition(t,e){const i=this.redressAbnormalNumber(t),n=this.format(t),a=t.substring(0,e),r=n.substring(0,e),s=(a.match(/,/g)||[]).length;return e+((r.match(/,/g)||[]).length-s)-(t.length-i.length)}thousandCommaFormat(t){if(!t.length)return t;const e=t.replace(/[^\d.-]/g,""),i=e.indexOf("."),n=e.length>1&&i>=1?e.slice(i):"",a=Number(e.split(".")[0]);return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a.toLocaleString("en-US")+n:e}}var G=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class H extends T{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRef,this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}setupStringFormatter(t){this.inputRef=t,this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=E.PHONE_MASK;break;case"taxId":i=E.TAX_ID_MASK;break;case"zipcode":i=E.ZIPCODE_MASK;break;case"thousand-comma":i=new U;break;case"number":i=this.getNumberTypeMaskStrategy(e.options);break;case"custom":i=new E(e.options);break;case"custom-formatter":i=new K(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new W),i}getNumberTypeMaskStrategy(t){return t&&t.thousandComma?new q(t):new W(t)}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}}G([f()],H.prototype,"maskConfig",void 0),G([f()],H.prototype,"disableCopyPaste",void 0),G([f()],H.prototype,"type",void 0);const J=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var Q=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class X extends x{componentDidLoad(){this.setInputAutoWidth()}watchValue(){this.setInputAutoWidth()}watchSuffixText(){this.setInputAutoWidth()}setInputAutoWidth(){const t=this.host.shadowRoot.querySelector(".vega-input-container"),e=null==t?void 0:t.querySelector(".vega-input-input"),i=null==e?void 0:e.querySelector("input");if(i&&(t.classList.remove("auto-width"),i.style.removeProperty("width"),this.isCompactInputWidth&&this.suffixText)){const n=this.getActualInputWidth();e.getBoundingClientRect().width>n&&(i.style.width=`${n}px`,t.classList.add("auto-width"))}}getActualInputWidth(){const t=this.getCalculateTextWidthContainer();t.style.display="inline-block",t.textContent=`${this.value||this.placeholder||""}`;const e=t.getBoundingClientRect().width;return t.style.display="none",e}getCalculateTextWidthContainer(){if(!this.calculateTextWidthContainer){const t=document.createElement("div");t.classList.add("v-font-field-value"),t.style.visibility="hidden",t.style.display="none",this.host.shadowRoot.append(t),this.calculateTextWidthContainer=t}return this.calculateTextWidthContainer}}Q([f()],X.prototype,"host",void 0),Q([f()],X.prototype,"value",void 0),Q([f()],X.prototype,"placeholder",void 0),Q([f()],X.prototype,"isCompactInputWidth",void 0),Q([f()],X.prototype,"suffixText",void 0),Q([g("componentDidLoad")],X.prototype,"componentDidLoad",null),Q([g("watchValue")],X.prototype,"watchValue",null),Q([g("watchSuffixText")],X.prototype,"watchSuffixText",null);var Y=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Z extends V{constructor(){super({parent:"vega-input-numeric",subStates:[{subStateName:"prefixText",parentStateName:"prefixText"},{subStateName:"suffixText",parentStateName:"suffixText"},{subStateName:"isCompactInputWidth",parentStateName:"isCompactInputWidth"}]})}}Y([f()],Z.prototype,"host",void 0),Y([f({writable:!0})],Z.prototype,"prefixText",void 0),Y([f({writable:!0})],Z.prototype,"suffixText",void 0),Y([f({writable:!0})],Z.prototype,"isCompactInputWidth",void 0);var tt=function(t,e,i,n){var a,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const et=class{constructor(n){e(this,n),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaLabelButtonClick=i(this,"vegaLabelButtonClick",7),this.labelButtonClick=i(this,"labelButtonClick",7),this.globalSlimmers={},this.formFieldController=new y({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new h:null},{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new o({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new p({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new l({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new M:null},{propertyName:"type",ruleFactory:t=>"email"===t?new M:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.pageResizeObserverSlimmer=new D({callback:()=>this.compactWidthController.setInputAutoWidth()}),this.copyPasteController=new P,this.compactWidthController=new X,this.stateController=new Z,this.maskConfigController=new H,this.prefixSlotRenderer=new B,this.changeEventEmitter=j(et,I),this.focusEventEmitter=j(et,z),this.blurEventEmitter=j(et,C),this.labelButtonClickEventEmitter=j(et,k),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(J),this.label="",this.labelSuffixButtonProps=null,this.value="",this.valueUpdateTrigger="input",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1,this.focusInput=()=>{this.inputRef.focus()},this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.maskConfigController.setupStringFormatter(t))},this.renderPrefixText=()=>this.prefixText&&t("div",{class:"prefix-text"},this.prefixText),this.renderSuffixText=()=>this.suffixText&&t("div",{class:"suffix-text"},this.suffixText),this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.onClickClearIcon=()=>{this.value=""},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value),this.onInputHandler=t=>{"change"!==this.valueUpdateTrigger&&(this.value=t.target.value)},this.inputChangeHandler=t=>{"change"===this.valueUpdateTrigger&&(this.value=t.target.value)},this.handleLabelButtonClick=()=>{this.labelButtonClickEventEmitter.emit()}}watchSuffixText(){}watchValue(t){this.changeEventEmitter.emit(t),this.inputRef.value!==this.value&&(this.inputRef.value=this.value),R.notify(S,{host:this.host,detail:this.value})}watchValidationRules(){}watchMaskChange(t,e){this.areMaskConfigsEqual(t,e)||this.maskConfigController.setupStringFormatter(this.inputRef)}async doFocus(){this.focusInput()}async doBlur(){this.inputRef.blur()}render(){return v(t("slot",null)),d(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.groupDom()),this.host)}containerDom(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:"number"===this.type?"text":this.type,autoComplete:this.autocomplete,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t),onChange:this.inputChangeHandler,onInput:this.onInputHandler},this.copyPasteController.getCopyPasteProps())))}groupDom(){let e="vega-input-container";return this.value&&(e+=" with-value"),e+="small"===this.size?" vega-input-size-small":" vega-input-size-default",e+=this.disabled?" vega-input-disabled":"",this.isCompactInputWidth&&(e+=" compact-input-width"),t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:e,onClick:this.focusInput,"aria-label":"input container","aria-disabled":`${this.disabled}`,role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:u()},this.prefixSlotRenderer.render(),this.renderPrefixText(),this.containerDom(),this.renderSuffixText(),this.showClearIcon&&this.renderClearIcon()),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{onClick:this.focusInput,"is-field-required":this.required,disabled:this.disabled,label:this.label,suffixButtonProps:this.labelSuffixButtonProps,ref:t=>{O.addUniqueObserverToNode(t,k,this.handleLabelButtonClick)}})}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:-1,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:u()},t("vega-icon",{icon:"close"}))}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}areMaskConfigsEqual(t,e){const i=Array.isArray(t)?t:[t],n=Array.isArray(e)?e:[e];return $(i,n,!0,((t,e)=>F(t,e)?0:-1))}get host(){return a(this)}static get watchers(){return{suffixText:["watchSuffixText"],value:["watchValue"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};tt([w()],et.prototype,"globalSlimmers",void 0),tt([m()],et.prototype,"formFieldController",void 0),tt([m()],et.prototype,"pageResizeObserverSlimmer",void 0),tt([m()],et.prototype,"copyPasteController",void 0),tt([m()],et.prototype,"compactWidthController",void 0),tt([m()],et.prototype,"stateController",void 0),tt([m()],et.prototype,"maskConfigController",void 0),tt([m()],et.prototype,"prefixSlotRenderer",void 0),tt([m()],et.prototype,"changeEventEmitter",void 0),tt([m()],et.prototype,"focusEventEmitter",void 0),tt([m()],et.prototype,"blurEventEmitter",void 0),tt([m()],et.prototype,"labelButtonClickEventEmitter",void 0),tt([m()],et.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),tt([c()],et.prototype,"watchMaskChange",null),et.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{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-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-input-container:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-container.error:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.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}}.vega-error{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));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@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-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.vega-input-container.compact-input-width{gap:0px}.vega-input-container.compact-input-width .vega-input-prefix{margin-right:8px}.vega-input-container.compact-input-width .prefix-text,.vega-input-container.compact-input-width .suffix-text{margin-right:2px}.vega-input-container.compact-input-width .vega-input-clear-icon{margin-left:2px}.vega-input-container.compact-input-width .vega-input-input input{padding:0px;min-width:1px}.vega-input-container.compact-input-width.auto-width .vega-input-input{flex-grow:0}.vega-input-container.compact-input-width.auto-width .suffix-text{flex-grow:1}.vega-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0;flex-grow:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-container .prefix-text,.vega-input-container .suffix-text{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-input-container .prefix-text,.vega-input-container .suffix-text{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-input-container .prefix-text,.vega-input-container .suffix-text{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.v-font-field-value{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){.v-font-field-value{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){.v-font-field-value{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){.v-font-field-value{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}';export{et as vega_input}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as r,g as o}from"./p-1c298d5a.js";import{R as s}from"./p-280cbcdb.js";import{c as a}from"./p-86194314.js";import{s as n}from"./p-9b797118.js";import{a as l,h as p,b as h}from"./p-bf953152.js";import{F as d}from"./p-7f6702f7.js";import{I as c}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-4387d550.js";import{b as g}from"./p-5773a9a3.js";import{c as x}from"./p-a821bcf3.js";import{C as b}from"./p-2d0d575f.js";import{f as v}from"./p-6f81fe1e.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-c754b32c.js";import"./p-8d283666.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-6e898779.js";import"./p-987fbbd0.js";import"./p-b5f5a5e0.js";import"./p-3647d61d.js";import"./p-262ec334.js";import"./p-72ecfd40.js";import"./p-804f71b3.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,r){var o,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const y=class{constructor(r){e(this,r),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.globalSlimmers={},this.formFieldController=new d({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.colorPickerContainerRef,touchableAreaGetter:()=>[this.colorPickerTouchableAreaRef]}),this.changeEventEmitter=x(y,v),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(u),this.value="",this.hint="",this.disabled=!1,this.required=!1,this.label="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.colors=["#73E6DC","#806BFF","#FFDC83","#FF9571","#00BBFF","#FF82C9","#259F9F","#563D82"],this.isInline=!1,this.renderColorPickerContainer=()=>i("div",{class:l([this.isInline?null:"color-picker-inline"]),ref:e=>this.colorPickerContainerRef=e},i("vega-flex",{direction:"row",gap:"size-8",alignItems:"center"},this.colors.map((e=>{const t=this.value===e;return i("div",{id:e,class:{"color-picker-inline-items":!0,selected:t},ref:e=>this.colorPickerTouchableAreaRef=e,style:{backgroundColor:e},onClick:this.updateValueProp,role:"button",tabIndex:0,"aria-label":"color",onKeyDown:a()},t?i("vega-icon",{icon:"checkmark",size:"size-16",class:{"v-text-black":this.isDarkColorCheckmark(this.value),"v-text-white":!this.isDarkColorCheckmark(this.value)}}):null)})))),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.updateValueProp=async e=>{this.disabled||(this.value=String(e.currentTarget.getAttribute("id")))}}watchValue(){this.resetValueIfInvalid(),this.changeEventEmitter.emit(this.value),b.notify(g,{host:this.host,detail:this.value})}watchValidationRules(){}connectedCallback(){this.resetValueIfInvalid()}render(){return n(i(r,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderColorPickerContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}isDarkColorCheckmark(e,t="#fcfcfc",i="#203645"){const r=this.getLuminance(e),o=this.getLuminance(t),s=this.getLuminance(i);return r>Math.sqrt((o+.05)*(s+.05))-.05}getLuminance(e){const t=[p(e).r/255,p(e).g/255,p(e).b/255].map((e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4));return.2126*t[0]+.7152*t[1]+.0722*t[2]}resetValueIfInvalid(){this.colors.some((e=>h(e).toUpperCase()==h(this.value).toUpperCase()))||(this.value="")}get host(){return o(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([f()],y.prototype,"globalSlimmers",void 0),w([c()],y.prototype,"formFieldController",void 0),w([c()],y.prototype,"changeEventEmitter",void 0),w([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;text-align:left;line-height:normal}:host vega-field-label{margin-bottom:8px}:host(.disabled) .color-picker-inline{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.disabled) .color-picker-inline-items:hover{box-shadow:none}:host(.disabled) .color-picker-inline-items:focus-within{box-shadow:none}:host .color-picker-inline{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding:12px;max-width:max-content}:host .color-picker-inline-items{display:flex;border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1));border-radius:4px;width:24px;height:24px;cursor:pointer;align-items:center;justify-content:center}:host .color-picker-inline-items.selected{border-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1))}:host .color-picker-inline-items:hover{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host .color-picker-inline-items:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));box-shadow:0px 0px 0px 1px rgba(var(--v-bg-primary, 252, 252, 252, 1)) inset;border:1px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host .checkmark-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .checkmark-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host vega-text{padding-left:8px;padding-right:8px;padding-top:4px;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){:host vega-text{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-text{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-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}: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 .color-picker-inline.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-hidden{display:none}:host vega-flex{flex-wrap:wrap;max-width:264px}';export{y as vega_color_picker}
1
+ import{r as e,c as t,h as i,H as r,g as o}from"./p-1c298d5a.js";import{R as s}from"./p-280cbcdb.js";import{c as a}from"./p-86194314.js";import{s as n}from"./p-9b797118.js";import{a as l,h as p,b as h}from"./p-bf953152.js";import{F as d}from"./p-a7dcb2a3.js";import{I as c}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-4387d550.js";import{b as g}from"./p-5773a9a3.js";import{c as b}from"./p-a821bcf3.js";import{C as x}from"./p-2d0d575f.js";import{f as v}from"./p-6f81fe1e.js";import"./p-abd7aeaa.js";import"./p-0bb29d98.js";import"./p-331a62d5.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-c754b32c.js";import"./p-8d283666.js";import"./p-c0291e2e.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-6e898779.js";import"./p-987fbbd0.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-72ecfd40.js";import"./p-804f71b3.js";const u=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the color picker when a color is selected",payloadValue:e=>!1===e.autoValidation}];var w=function(e,t,i,r){var o,s=arguments.length,a=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const y=class{constructor(r){e(this,r),this.vegaChange=t(this,"vegaChange",7),this.change=t(this,"change",7),this.globalSlimmers={},this.formFieldController=new d({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new s:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.colorPickerContainerRef,touchableAreaGetter:()=>[this.colorPickerTouchableAreaRef]}),this.changeEventEmitter=b(y,v),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(u),this.value="",this.hint="",this.disabled=!1,this.required=!1,this.label="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.colors=["#73E6DC","#806BFF","#FFDC83","#FF9571","#00BBFF","#FF82C9","#259F9F","#563D82"],this.isInline=!1,this.renderColorPickerContainer=()=>i("div",{class:l([this.isInline?null:"color-picker-inline"]),ref:e=>this.colorPickerContainerRef=e},i("vega-flex",{direction:"row",gap:"size-8",alignItems:"center"},this.colors.map((e=>{const t=this.value===e;return i("div",{id:e,class:{"color-picker-inline-items":!0,selected:t},ref:e=>this.colorPickerTouchableAreaRef=e,style:{backgroundColor:e},onClick:this.updateValueProp,role:"button",tabIndex:0,"aria-label":"color",onKeyDown:a()},t?i("vega-icon",{icon:"checkmark",size:"size-16",class:{"v-text-black":this.isDarkColorCheckmark(this.value),"v-text-white":!this.isDarkColorCheckmark(this.value)}}):null)})))),this.renderHintMessage=()=>i("vega-text",null,this.hint),this.updateValueProp=async e=>{this.disabled||(this.value=String(e.currentTarget.getAttribute("id")))}}watchValue(){this.resetValueIfInvalid(),this.changeEventEmitter.emit(this.value),x.notify(g,{host:this.host,detail:this.value})}watchValidationRules(){}connectedCallback(){this.resetValueIfInvalid()}render(){return n(i(r,{class:{disabled:this.disabled}},this.renderLabelDom(),this.renderColorPickerContainer(),this.hint&&this.renderHintMessage()),this.host)}renderLabelDom(){return i("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}isDarkColorCheckmark(e,t="#fcfcfc",i="#203645"){const r=this.getLuminance(e),o=this.getLuminance(t),s=this.getLuminance(i);return r>Math.sqrt((o+.05)*(s+.05))-.05}getLuminance(e){const t=[p(e).r/255,p(e).g/255,p(e).b/255].map((e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4));return.2126*t[0]+.7152*t[1]+.0722*t[2]}resetValueIfInvalid(){this.colors.some((e=>h(e).toUpperCase()==h(this.value).toUpperCase()))||(this.value="")}get host(){return o(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};w([f()],y.prototype,"globalSlimmers",void 0),w([c()],y.prototype,"formFieldController",void 0),w([c()],y.prototype,"changeEventEmitter",void 0),w([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=':host{display:inline-block;text-align:left;line-height:normal}:host vega-field-label{margin-bottom:8px}:host(.disabled) .color-picker-inline{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.disabled) .color-picker-inline-items:hover{box-shadow:none}:host(.disabled) .color-picker-inline-items:focus-within{box-shadow:none}:host .color-picker-inline{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding:12px;max-width:max-content}:host .color-picker-inline-items{display:flex;border:1px solid rgba(var(--v-border-chip, 205, 209, 211, 1));border-radius:4px;width:24px;height:24px;cursor:pointer;align-items:center;justify-content:center}:host .color-picker-inline-items.selected{border-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1))}:host .color-picker-inline-items:hover{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25))}:host .color-picker-inline-items:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));box-shadow:0px 0px 0px 1px rgba(var(--v-bg-primary, 252, 252, 252, 1)) inset;border:1px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host .checkmark-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .checkmark-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host vega-text{padding-left:8px;padding-right:8px;padding-top:4px;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){:host vega-text{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-text{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-text{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}: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 .color-picker-inline.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-hidden{display:none}:host vega-flex{flex-wrap:wrap;max-width:264px}';export{y as vega_color_picker}
@@ -0,0 +1 @@
1
+ import{h as t,f as s,r as e,H as o,g as i}from"./p-1c298d5a.js";import{s as r}from"./p-9b797118.js";import{c as p,V as c,M as n,L as a,I as l}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-4387d550.js";import{V as d}from"./p-c9b9322b.js";import{V as j}from"./p-cc63e827.js";import{f as h}from"./p-54add0d2.js";import{h as b}from"./p-5773a9a3.js";import{O as u}from"./p-331a62d5.js";import{C as v}from"./p-2d0d575f.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-b1f65b13.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-bc2dd43d.js";import"./p-c0291e2e.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-8ade44bf.js";import"./p-bf953152.js";import"./p-50677c8e.js";import"./p-112455b1.js";import"./p-804f71b3.js";import"./p-6f81fe1e.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-0fd6c35b.js";import"./p-8d283666.js";import"./p-44b0a005.js";import"./p-c754b32c.js";import"./p-2205ee4c.js";var g=function(t,s,e,o){var i,r=arguments.length,p=r<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,s,e,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(p=(r<3?i(p):r>3?i(s,e,p):i(s,e))||p);return r>3&&p&&Object.defineProperty(s,e,p),p};class y extends c{render(){const s=d.getIconKey(this.country),e=j.hasIcon(s),o=h(this.size,"widthAndHeight"),i=`calc(${o} * 4 / 3)`;return e?t("vega-icon",{icon:s,size:this.size,style:{width:i}}):t("vega-skeleton",{type:"image",corners:"rounded-2",height:o,width:i})}}g([p()],y.prototype,"size",void 0),g([p()],y.prototype,"country",void 0);var R=function(t,s,e,o){var i,r=arguments.length,p=r<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,s,e,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(p=(r<3?i(p):r>3?i(s,e,p):i(s,e))||p);return r>3&&p&&Object.defineProperty(s,e,p),p};class O extends c{constructor(){super(...arguments),this.isAcceptObserver=()=>!0,this.listenerCallback=()=>{s(this.host)}}componentWillLoad(){this.country&&(this.isFlagForCountryCodeLoaded(this.country)||this.registerObserver())}unRegisterObserver(){this.observer&&(v.unregister(b,this.observer),this.observer=null)}registerObserver(){this.observer=new u(this.isAcceptObserver.bind(this),this.listenerCallback.bind(this)),v.register(b,this.observer)}isFlagForCountryCodeLoaded(t){const s=d.getIconKey(t);return d.hasIcon(s)}}!async function(){try{const t=(await import("./p-1e926324.js")).CountryFlags;d.register(t),v.notify(b,{})}catch(t){a.error("Error loading flag module:",t)}}(),R([p()],O.prototype,"host",void 0),R([p()],O.prototype,"country",void 0),R([n("componentWillLoad")],O.prototype,"componentWillLoad",null),R([n("disconnectedCallback")],O.prototype,"unRegisterObserver",null);var w=function(t,s,e,o){var i,r=arguments.length,p=r<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,s,e,o);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(p=(r<3?i(p):r>3?i(s,e,p):i(s,e))||p);return r>3&&p&&Object.defineProperty(s,e,p),p};const C=class{constructor(t){e(this,t),this.globalSlimmers={},this.renderer=new y,this.vegaFlagIconController=new O,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.size="size-16"}render(){return r(t(o,null,this.renderer.render()),this.host)}get host(){return i(this)}};w([f()],C.prototype,"globalSlimmers",void 0),w([l()],C.prototype,"renderer",void 0),w([l()],C.prototype,"vegaFlagIconController",void 0),w([l()],C.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),C.style=":host{display:inline-block}:host vega-icon,:host vega-skeleton,:host svg{display:block}";export{C as vega_flag_icon}
@@ -1 +1 @@
1
- import{h as e,H as t,r as i,c as o,g as r}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as a,M as l,V as n,I as d,L as c}from"./p-6e1ab235.js";import{V as h,I as p}from"./p-4387d550.js";import{R as v}from"./p-8afa2115.js";import{c as g}from"./p-86194314.js";import{S as b}from"./p-72ecfd40.js";import{O as f}from"./p-331a62d5.js";import{d as m,f as u}from"./p-6f81fe1e.js";import{c as x}from"./p-c754b32c.js";import{f as w}from"./p-bf953152.js";import{C as j}from"./p-2d0d575f.js";import{P as y,g as k}from"./p-c0291e2e.js";import{c as C}from"./p-a821bcf3.js";import{b as R}from"./p-5773a9a3.js";import{M as z}from"./p-987fbbd0.js";import{a as S}from"./p-b5f5a5e0.js";import{i as O}from"./p-3647d61d.js";import{c as E}from"./p-6cabdb36.js";import{C as T}from"./p-431ab4dd.js";import{F as I}from"./p-7f6702f7.js";import{R as V}from"./p-280cbcdb.js";import"./p-b1f65b13.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-8ade44bf.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-50677c8e.js";import"./p-112455b1.js";import"./p-804f71b3.js";import"./p-1e940ce8.js";import"./p-7a40e033.js";import"./p-cc63e827.js";import"./p-0fd6c35b.js";import"./p-8d283666.js";import"./p-44b0a005.js";import"./p-6e898779.js";import"./p-0bb29d98.js";import"./p-abd7aeaa.js";var N=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class L extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:g(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:L.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:L.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}L.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},L.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},N([a()],L.prototype,"host",void 0),N([a()],L.prototype,"label",void 0),N([a()],L.prototype,"block",void 0),N([a()],L.prototype,"size",void 0),N([a()],L.prototype,"variant",void 0),N([a()],L.prototype,"swatchColor",void 0),N([a()],L.prototype,"disabledTooltip",void 0),N([a()],L.prototype,"disabled",void 0),N([a()],L.prototype,"selectType",void 0),N([a()],L.prototype,"checked",void 0),N([a()],L.prototype,"checkedController",void 0),N([a()],L.prototype,"showError",void 0),N([l("componentWillRender")],L.prototype,"componentWillRender",null);var A=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class F extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}A([a()],F.prototype,"host",void 0),A([a({writable:!0})],F.prototype,"checked",void 0),A([a()],F.prototype,"changeEventEmitter",void 0),A([a()],F.prototype,"value",void 0);var D=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class G extends b{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}D([a()],G.prototype,"host",void 0),D([a({writable:!0})],G.prototype,"disabled",void 0),D([a({writable:!0})],G.prototype,"selectType",void 0),D([a()],G.prototype,"value",void 0),D([a()],G.prototype,"checkedController",void 0);var W=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class M extends n{connectedCallback(){this.selectionChipGroup=w(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new f(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),j.register(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&j.unregister(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}W([a({writable:!0})],M.prototype,"showError",void 0),W([a()],M.prototype,"host",void 0),W([l("connectedCallback")],M.prototype,"connectedCallback",null),W([l("disconnectedCallback")],M.prototype,"disconnectedCallback",null);var _=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const H=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.checkedController=new F,this.stateController=new G,this.showErrorController=new M,this.pageResizeObserverSlimmer=new y,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(H,u),this.showError=!1,this.currentBreakpoint=k(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return s(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{size:["watchSize"]}}};_([p()],H.prototype,"globalSlimmers",void 0),_([d()],H.prototype,"renderer",void 0),_([d()],H.prototype,"checkedController",void 0),_([d()],H.prototype,"stateController",void 0),_([d()],H.prototype,"showErrorController",void 0),_([d()],H.prototype,"pageResizeObserverSlimmer",void 0),_([d()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([d()],H.prototype,"changeEventEmitter",void 0),H.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var P=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class $ extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([a()],$.prototype,"host",void 0),P([a()],$.prototype,"label",void 0),P([a()],$.prototype,"required",void 0),P([a()],$.prototype,"hint",void 0),P([a()],$.prototype,"disabled",void 0);var q=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class U extends n{watchValue(){this.changeEventEmitter.emit(this.value),j.notify(R,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}q([a()],U.prototype,"host",void 0),q([a({writable:!0})],U.prototype,"value",void 0),q([a()],U.prototype,"changeEventEmitter",void 0),q([a()],U.prototype,"selectType",void 0),q([l("watchValue")],U.prototype,"watchValue",null);var K=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class B extends n{constructor(){super(...arguments),this.mutationObserver=new z({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:S("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){const e=this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value));O(this.value,e,!0)||this.valueController.setValue(e)}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}K([a()],B.prototype,"host",void 0),K([a()],B.prototype,"selectType",void 0),K([a()],B.prototype,"valueController",void 0),K([a()],B.prototype,"value",void 0),K([d()],B.prototype,"mutationObserver",void 0),K([l("disconnectedCallback")],B.prototype,"disconnectedCallback",null),K([l("componentWillLoad")],B.prototype,"componentWillLoad",null),K([l("componentDidLoad")],B.prototype,"componentDidLoad",null),K([l("watchSelectType")],B.prototype,"watchSelectType",null);var J=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const Q=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new $,this.itemsController=new B,this.valueController=new U,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(Q,u),this.valueNotifySlimmer=E(Q,"value","watchValue"),this.disabledNotifySlimmer=E(Q,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=E(Q,"selectType","watchSelectType"),this.changeEventPrevent=new T([u],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return s(e(t,null,this.renderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};J([p()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"renderer",void 0),J([d()],Q.prototype,"itemsController",void 0),J([d()],Q.prototype,"valueController",void 0),J([d()],Q.prototype,"formFieldController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J([d()],Q.prototype,"changeEventEmitter",void 0),J([d()],Q.prototype,"valueNotifySlimmer",void 0),J([d()],Q.prototype,"disabledNotifySlimmer",void 0),J([d()],Q.prototype,"selectTypeNotifySlimmer",void 0),J([d()],Q.prototype,"changeEventPrevent",void 0),Q.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{H as vega_selection_chip,Q as vega_selection_chip_group}
1
+ import{h as e,H as t,r as i,c as o,g as r}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as a,M as l,V as n,I as d,L as c}from"./p-6e1ab235.js";import{V as h,I as p}from"./p-4387d550.js";import{R as v}from"./p-bc2dd43d.js";import{c as b}from"./p-86194314.js";import{S as g}from"./p-72ecfd40.js";import{O as f}from"./p-331a62d5.js";import{d as m,f as u}from"./p-6f81fe1e.js";import{c as x}from"./p-c754b32c.js";import{f as w}from"./p-bf953152.js";import{C as j}from"./p-2d0d575f.js";import{P as y,g as k}from"./p-c0291e2e.js";import{c as C}from"./p-a821bcf3.js";import{b as R}from"./p-5773a9a3.js";import{M as z}from"./p-987fbbd0.js";import{a as S}from"./p-52b8f2d2.js";import{i as O}from"./p-d27ae9ff.js";import{c as E}from"./p-6cabdb36.js";import{C as T}from"./p-45f696b4.js";import{F as I}from"./p-a7dcb2a3.js";import{R as V}from"./p-280cbcdb.js";import"./p-b1f65b13.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-5f377954.js";import"./p-8ade44bf.js";import"./p-37b05e0b.js";import"./p-6a334573.js";import"./p-50677c8e.js";import"./p-112455b1.js";import"./p-804f71b3.js";import"./p-4d793cb0.js";import"./p-7a40e033.js";import"./p-cc63e827.js";import"./p-0fd6c35b.js";import"./p-8d283666.js";import"./p-44b0a005.js";import"./p-6e898779.js";import"./p-0bb29d98.js";import"./p-abd7aeaa.js";var N=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class L extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:b(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:L.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:L.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}L.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},L.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},N([a()],L.prototype,"host",void 0),N([a()],L.prototype,"label",void 0),N([a()],L.prototype,"block",void 0),N([a()],L.prototype,"size",void 0),N([a()],L.prototype,"variant",void 0),N([a()],L.prototype,"swatchColor",void 0),N([a()],L.prototype,"disabledTooltip",void 0),N([a()],L.prototype,"disabled",void 0),N([a()],L.prototype,"selectType",void 0),N([a()],L.prototype,"checked",void 0),N([a()],L.prototype,"checkedController",void 0),N([a()],L.prototype,"showError",void 0),N([l("componentWillRender")],L.prototype,"componentWillRender",null);var A=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class F extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}A([a()],F.prototype,"host",void 0),A([a({writable:!0})],F.prototype,"checked",void 0),A([a()],F.prototype,"changeEventEmitter",void 0),A([a()],F.prototype,"value",void 0);var D=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class G extends g{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}D([a()],G.prototype,"host",void 0),D([a({writable:!0})],G.prototype,"disabled",void 0),D([a({writable:!0})],G.prototype,"selectType",void 0),D([a()],G.prototype,"value",void 0),D([a()],G.prototype,"checkedController",void 0);var W=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class M extends n{connectedCallback(){this.selectionChipGroup=w(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new f(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),j.register(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&j.unregister(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}W([a({writable:!0})],M.prototype,"showError",void 0),W([a()],M.prototype,"host",void 0),W([l("connectedCallback")],M.prototype,"connectedCallback",null),W([l("disconnectedCallback")],M.prototype,"disconnectedCallback",null);var _=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const H=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new L,this.checkedController=new F,this.stateController=new G,this.showErrorController=new M,this.pageResizeObserverSlimmer=new y,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(H,u),this.showError=!1,this.currentBreakpoint=k(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return s(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{size:["watchSize"]}}};_([p()],H.prototype,"globalSlimmers",void 0),_([d()],H.prototype,"renderer",void 0),_([d()],H.prototype,"checkedController",void 0),_([d()],H.prototype,"stateController",void 0),_([d()],H.prototype,"showErrorController",void 0),_([d()],H.prototype,"pageResizeObserverSlimmer",void 0),_([d()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_([d()],H.prototype,"changeEventEmitter",void 0),H.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var P=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class $ extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}P([a()],$.prototype,"host",void 0),P([a()],$.prototype,"label",void 0),P([a()],$.prototype,"required",void 0),P([a()],$.prototype,"hint",void 0),P([a()],$.prototype,"disabled",void 0);var q=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class U extends n{watchValue(){this.changeEventEmitter.emit(this.value),j.notify(R,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}q([a()],U.prototype,"host",void 0),q([a({writable:!0})],U.prototype,"value",void 0),q([a()],U.prototype,"changeEventEmitter",void 0),q([a()],U.prototype,"selectType",void 0),q([l("watchValue")],U.prototype,"watchValue",null);var K=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class B extends n{constructor(){super(...arguments),this.mutationObserver=new z({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:S("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){const e=this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value));O(this.value,e,!0)||this.valueController.setValue(e)}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}K([a()],B.prototype,"host",void 0),K([a()],B.prototype,"selectType",void 0),K([a()],B.prototype,"valueController",void 0),K([a()],B.prototype,"value",void 0),K([d()],B.prototype,"mutationObserver",void 0),K([l("disconnectedCallback")],B.prototype,"disconnectedCallback",null),K([l("componentWillLoad")],B.prototype,"componentWillLoad",null),K([l("componentDidLoad")],B.prototype,"componentDidLoad",null),K([l("watchSelectType")],B.prototype,"watchSelectType",null);var J=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const Q=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new $,this.itemsController=new B,this.valueController=new U,this.formFieldController=new I({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=C(Q,u),this.valueNotifySlimmer=E(Q,"value","watchValue"),this.disabledNotifySlimmer=E(Q,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=E(Q,"selectType","watchSelectType"),this.changeEventPrevent=new T([u],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return s(e(t,null,this.renderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};J([p()],Q.prototype,"globalSlimmers",void 0),J([d()],Q.prototype,"renderer",void 0),J([d()],Q.prototype,"itemsController",void 0),J([d()],Q.prototype,"valueController",void 0),J([d()],Q.prototype,"formFieldController",void 0),J([d()],Q.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),J([d()],Q.prototype,"changeEventEmitter",void 0),J([d()],Q.prototype,"valueNotifySlimmer",void 0),J([d()],Q.prototype,"disabledNotifySlimmer",void 0),J([d()],Q.prototype,"selectTypeNotifySlimmer",void 0),J([d()],Q.prototype,"changeEventPrevent",void 0),Q.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{H as vega_selection_chip,Q as vega_selection_chip_group}