q2-tecton-elements 1.49.2 → 1.49.3

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 (357) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +137 -139
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-a93362ed.js → index-83b024c4.js} +1 -21
  4. package/dist/cjs/index-83b024c4.js.map +1 -0
  5. package/dist/cjs/{index-42fcd170.js → index-f69742cf.js} +1 -1
  6. package/dist/cjs/{index-42fcd170.js.map → index-f69742cf.js.map} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  9. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
  12. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  14. package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
  15. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-data-table.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  23. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
  25. package/dist/cjs/q2-editable-field.cjs.entry.js +2 -2
  26. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-input.cjs.entry.js +2 -2
  28. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  29. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  34. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  35. package/dist/cjs/q2-option-list.cjs.entry.js +13 -11
  36. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  37. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  39. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-radio.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
  43. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  44. package/dist/cjs/q2-select.cjs.entry.js +108 -29
  45. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  46. package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  48. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  51. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  53. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  54. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  55. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  56. package/dist/collection/collection-manifest.json +5 -5
  57. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  58. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  59. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  60. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  61. package/dist/collection/components/q2-carousel/q2-carousel.js +1 -1
  62. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  63. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  64. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  65. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  66. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  67. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
  68. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  69. package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
  70. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  71. package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
  72. package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
  73. package/dist/collection/components/q2-input/q2-input.js +2 -2
  74. package/dist/collection/components/q2-item/q2-item.js +1 -1
  75. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  76. package/dist/collection/components/q2-list/q2-list.js +1 -1
  77. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  78. package/dist/collection/components/q2-message/q2-message.js +1 -1
  79. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  80. package/dist/collection/components/q2-option/q2-option.js +1 -1
  81. package/dist/collection/components/q2-option-list/q2-option-list.js +15 -13
  82. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  83. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  84. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  85. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  86. package/dist/collection/components/q2-popover/q2-popover.js +192 -193
  87. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  88. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  89. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  90. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  91. package/dist/collection/components/q2-section/q2-section.js +2 -2
  92. package/dist/collection/components/q2-select/q2-select.js +146 -31
  93. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  94. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  95. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  96. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  97. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  98. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  99. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  100. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  101. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  102. package/dist/components/index2.js +1 -20
  103. package/dist/components/index2.js.map +1 -1
  104. package/dist/components/q2-action-sheet.js +1 -1
  105. package/dist/components/q2-avatar2.js +1 -1
  106. package/dist/components/q2-calendar.js +1 -1
  107. package/dist/components/q2-carousel-pane.js +2 -2
  108. package/dist/components/q2-carousel.js +1 -1
  109. package/dist/components/q2-chart-area.js +1 -1
  110. package/dist/components/q2-chart-bar.js +1 -1
  111. package/dist/components/q2-chart-donut.js +1 -1
  112. package/dist/components/q2-checkbox-group.js +1 -1
  113. package/dist/components/q2-checkbox2.js +1 -1
  114. package/dist/components/q2-currency.js +1 -1
  115. package/dist/components/q2-data-table.js +1 -1
  116. package/dist/components/q2-detail.js +1 -1
  117. package/dist/components/q2-dropdown.js +1 -1
  118. package/dist/components/q2-editable-field.js +1 -1
  119. package/dist/components/q2-input2.js +1 -1
  120. package/dist/components/q2-item.js +1 -1
  121. package/dist/components/q2-legend2.js +1 -1
  122. package/dist/components/q2-list.js +1 -1
  123. package/dist/components/q2-loc.js +1 -1
  124. package/dist/components/q2-message2.js +1 -1
  125. package/dist/components/q2-month-picker.js +2 -2
  126. package/dist/components/q2-optgroup2.js +1 -1
  127. package/dist/components/q2-option-list2.js +12 -10
  128. package/dist/components/q2-option-list2.js.map +1 -1
  129. package/dist/components/q2-option2.js +1 -1
  130. package/dist/components/q2-pagination.js +2 -2
  131. package/dist/components/q2-pill.js +1 -1
  132. package/dist/components/q2-popover2.js +143 -145
  133. package/dist/components/q2-popover2.js.map +1 -1
  134. package/dist/components/q2-radio-group.js +1 -1
  135. package/dist/components/q2-radio.js +1 -1
  136. package/dist/components/q2-relative-time.js +1 -1
  137. package/dist/components/q2-section.js +2 -2
  138. package/dist/components/q2-select2.js +112 -32
  139. package/dist/components/q2-select2.js.map +1 -1
  140. package/dist/components/q2-stepper-pane.js +1 -1
  141. package/dist/components/q2-stepper-vertical.js +1 -1
  142. package/dist/components/q2-stepper.js +1 -1
  143. package/dist/components/q2-tab-container.js +1 -1
  144. package/dist/components/q2-tab-pane.js +1 -1
  145. package/dist/components/q2-tag.js +1 -1
  146. package/dist/components/q2-textarea.js +1 -1
  147. package/dist/components/tecton-tab-pane.js +2 -2
  148. package/dist/esm/click-elsewhere_2.entry.js +137 -139
  149. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  150. package/dist/esm/{index-1c019b24.js → index-3184c760.js} +1 -1
  151. package/dist/esm/{index-1c019b24.js.map → index-3184c760.js.map} +1 -1
  152. package/dist/esm/{index-3c5cd75e.js → index-e5ac05c3.js} +2 -21
  153. package/dist/esm/index-e5ac05c3.js.map +1 -0
  154. package/dist/esm/loader.js +1 -1
  155. package/dist/esm/q2-action-sheet.entry.js +2 -2
  156. package/dist/esm/q2-avatar.entry.js +1 -1
  157. package/dist/esm/q2-btn_2.entry.js +1 -1
  158. package/dist/esm/q2-calendar.entry.js +3 -3
  159. package/dist/esm/q2-card.entry.js +1 -1
  160. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  161. package/dist/esm/q2-carousel.entry.js +2 -2
  162. package/dist/esm/q2-chart-area.entry.js +2 -2
  163. package/dist/esm/q2-chart-bar.entry.js +2 -2
  164. package/dist/esm/q2-chart-donut.entry.js +2 -2
  165. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  166. package/dist/esm/q2-checkbox.entry.js +2 -2
  167. package/dist/esm/q2-currency.entry.js +1 -1
  168. package/dist/esm/q2-data-table.entry.js +2 -2
  169. package/dist/esm/q2-detail.entry.js +2 -2
  170. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  171. package/dist/esm/q2-dropdown.entry.js +2 -2
  172. package/dist/esm/q2-editable-field.entry.js +2 -2
  173. package/dist/esm/q2-icon.entry.js +1 -1
  174. package/dist/esm/q2-input.entry.js +2 -2
  175. package/dist/esm/q2-item.entry.js +2 -2
  176. package/dist/esm/q2-legend.entry.js +1 -1
  177. package/dist/esm/q2-list.entry.js +2 -2
  178. package/dist/esm/q2-loc.entry.js +2 -2
  179. package/dist/esm/q2-message.entry.js +2 -2
  180. package/dist/esm/q2-month-picker.entry.js +3 -3
  181. package/dist/esm/q2-optgroup.entry.js +2 -2
  182. package/dist/esm/q2-option-list.entry.js +13 -11
  183. package/dist/esm/q2-option-list.entry.js.map +1 -1
  184. package/dist/esm/q2-option.entry.js +1 -1
  185. package/dist/esm/q2-pagination.entry.js +3 -3
  186. package/dist/esm/q2-pill.entry.js +2 -2
  187. package/dist/esm/q2-radio-group.entry.js +2 -2
  188. package/dist/esm/q2-radio.entry.js +2 -2
  189. package/dist/esm/q2-relative-time.entry.js +3 -3
  190. package/dist/esm/q2-section.entry.js +3 -3
  191. package/dist/esm/q2-select.entry.js +109 -30
  192. package/dist/esm/q2-select.entry.js.map +1 -1
  193. package/dist/esm/q2-stepper-pane.entry.js +2 -2
  194. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  195. package/dist/esm/q2-stepper.entry.js +2 -2
  196. package/dist/esm/q2-tab-container.entry.js +2 -2
  197. package/dist/esm/q2-tab-pane.entry.js +1 -1
  198. package/dist/esm/q2-tag.entry.js +2 -2
  199. package/dist/esm/q2-tecton-elements.js +1 -1
  200. package/dist/esm/q2-textarea.entry.js +2 -2
  201. package/dist/esm/q2-tooltip.entry.js +1 -1
  202. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  203. package/dist/jest.setup.js +22 -0
  204. package/dist/jest.setup.js.map +1 -0
  205. package/dist/q2-tecton-elements/{p-40df4468.entry.js → p-04dd9b90.entry.js} +2 -2
  206. package/dist/q2-tecton-elements/{p-d78669df.entry.js → p-0c1e2b0d.entry.js} +2 -2
  207. package/dist/q2-tecton-elements/{p-0852e6fe.entry.js → p-11883a2d.entry.js} +2 -2
  208. package/dist/q2-tecton-elements/{p-5775b02b.entry.js → p-2154fd27.entry.js} +2 -2
  209. package/dist/q2-tecton-elements/{p-dbfab45b.entry.js → p-23638c08.entry.js} +2 -2
  210. package/dist/q2-tecton-elements/{p-f6358905.entry.js → p-24c2cc43.entry.js} +2 -2
  211. package/dist/q2-tecton-elements/{p-a8e7e591.entry.js → p-26a7f68d.entry.js} +2 -2
  212. package/dist/q2-tecton-elements/{p-da711c59.entry.js → p-2a21bb2a.entry.js} +2 -2
  213. package/dist/q2-tecton-elements/{p-25bfe0b2.entry.js → p-33a16719.entry.js} +2 -2
  214. package/dist/q2-tecton-elements/{p-db79c056.entry.js → p-36e541b9.entry.js} +2 -2
  215. package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js → p-38a2862e.entry.js} +2 -2
  216. package/dist/q2-tecton-elements/p-3fe148c2.entry.js +2 -0
  217. package/dist/q2-tecton-elements/{p-a657277b.entry.js.map → p-3fe148c2.entry.js.map} +1 -1
  218. package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js → p-436b9b84.entry.js} +2 -2
  219. package/dist/q2-tecton-elements/{p-ea7876eb.entry.js → p-45cf9f0b.entry.js} +2 -2
  220. package/dist/q2-tecton-elements/{p-9ecabc7a.entry.js → p-48181bc2.entry.js} +2 -2
  221. package/dist/q2-tecton-elements/p-48a45547.entry.js +2 -0
  222. package/dist/q2-tecton-elements/p-48a45547.entry.js.map +1 -0
  223. package/dist/q2-tecton-elements/{p-333a41ca.entry.js → p-4f6eebbf.entry.js} +2 -2
  224. package/dist/q2-tecton-elements/{p-08176bd0.entry.js → p-60940069.entry.js} +2 -2
  225. package/dist/q2-tecton-elements/{p-93680d12.entry.js → p-631226a9.entry.js} +2 -2
  226. package/dist/q2-tecton-elements/{p-4388e521.entry.js → p-6c64c5e9.entry.js} +2 -2
  227. package/dist/q2-tecton-elements/{p-793a453e.entry.js → p-6e4b1bfe.entry.js} +2 -2
  228. package/dist/q2-tecton-elements/{p-a177d812.entry.js → p-70e8ddbe.entry.js} +2 -2
  229. package/dist/q2-tecton-elements/{p-d8d9ba1f.entry.js → p-73c6ecee.entry.js} +2 -2
  230. package/dist/q2-tecton-elements/p-76bd33da.entry.js +2 -0
  231. package/dist/q2-tecton-elements/p-76bd33da.entry.js.map +1 -0
  232. package/dist/q2-tecton-elements/{p-76b98623.entry.js → p-85ddbe4f.entry.js} +2 -2
  233. package/dist/q2-tecton-elements/{p-e3ad770b.entry.js → p-85eff820.entry.js} +2 -2
  234. package/dist/q2-tecton-elements/{p-e0a6baea.entry.js → p-88ae4e26.entry.js} +2 -2
  235. package/dist/q2-tecton-elements/{p-05b30f98.entry.js → p-8b032c77.entry.js} +2 -2
  236. package/dist/q2-tecton-elements/{p-6c933b14.entry.js → p-960ee73c.entry.js} +2 -2
  237. package/dist/q2-tecton-elements/{p-baa2eaa9.entry.js → p-99a8fdc4.entry.js} +2 -2
  238. package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js → p-a4294b4d.entry.js} +2 -2
  239. package/dist/q2-tecton-elements/p-a6ca739a.entry.js +2 -0
  240. package/dist/q2-tecton-elements/{p-4da4cb5d.entry.js.map → p-a6ca739a.entry.js.map} +1 -1
  241. package/dist/q2-tecton-elements/p-ac6c467f.entry.js +2 -0
  242. package/dist/q2-tecton-elements/p-ac6c467f.entry.js.map +1 -0
  243. package/dist/q2-tecton-elements/{p-1e7fa870.entry.js → p-b45b6a3e.entry.js} +2 -2
  244. package/dist/q2-tecton-elements/{p-2810ba28.entry.js → p-ba7ffb2f.entry.js} +2 -2
  245. package/dist/q2-tecton-elements/{p-9c589ab3.entry.js → p-bd4c5570.entry.js} +2 -2
  246. package/dist/q2-tecton-elements/{p-c5aac064.entry.js → p-bf4a9be3.entry.js} +2 -2
  247. package/dist/q2-tecton-elements/p-cb4d177a.entry.js +2 -0
  248. package/dist/q2-tecton-elements/{p-9e90a38a.entry.js.map → p-cb4d177a.entry.js.map} +1 -1
  249. package/dist/q2-tecton-elements/{p-630613c7.entry.js → p-d1ba78ec.entry.js} +2 -2
  250. package/dist/q2-tecton-elements/p-d24bb23e.js +2 -0
  251. package/dist/q2-tecton-elements/p-d24bb23e.js.map +1 -0
  252. package/dist/q2-tecton-elements/{p-2bcb7e89.entry.js → p-d63cb875.entry.js} +2 -2
  253. package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js → p-d950ae4c.entry.js} +2 -2
  254. package/dist/q2-tecton-elements/{p-5037fa67.entry.js → p-dba6c931.entry.js} +2 -2
  255. package/dist/q2-tecton-elements/{p-e44560d9.entry.js → p-de4bce7e.entry.js} +2 -2
  256. package/dist/q2-tecton-elements/{p-c8b4f5f7.entry.js → p-e098f6c5.entry.js} +2 -2
  257. package/dist/q2-tecton-elements/{p-be518818.js → p-f1e887f5.js} +1 -1
  258. package/dist/q2-tecton-elements/{p-77a763eb.entry.js → p-f6901c57.entry.js} +2 -2
  259. package/dist/q2-tecton-elements/{p-da0cacef.entry.js → p-ff5f28fb.entry.js} +2 -2
  260. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  261. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  262. package/dist/test/elements/q2-calendar-test.e2e.js +2 -2
  263. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  264. package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
  265. package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
  266. package/dist/test/elements/q2-pagination-test.e2e.js +1 -0
  267. package/dist/test/elements/q2-pagination-test.e2e.js.map +1 -1
  268. package/dist/test/elements/q2-pill-test.e2e.js +1 -1
  269. package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
  270. package/dist/test/elements/q2-popover-test.e2e.js +1 -34
  271. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  272. package/dist/test/elements/q2-popover-test.spec.js +743 -435
  273. package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
  274. package/dist/test/elements/q2-select-test.e2e.js +1 -15
  275. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  276. package/dist/test/elements/q2-select-test.spec.js +412 -0
  277. package/dist/test/elements/q2-select-test.spec.js.map +1 -0
  278. package/dist/test/elements/q2-tag-test.e2e.js +1 -1
  279. package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
  280. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  281. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
  282. package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
  283. package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
  284. package/dist/types/components/q2-data-table/q2-data-table.d.ts +223 -0
  285. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +130 -0
  286. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +50 -0
  287. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +140 -0
  288. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
  289. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  290. package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
  291. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
  292. package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
  293. package/dist/types/components/q2-popover/q2-popover.d.ts +31 -31
  294. package/dist/types/components/q2-select/q2-select.d.ts +256 -0
  295. package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
  296. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
  297. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
  298. package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
  299. package/dist/types/components.d.ts +8 -0
  300. package/dist/types/utils/action-sheet.d.ts +12 -0
  301. package/package.json +3 -3
  302. package/dist/cjs/index-a93362ed.js.map +0 -1
  303. package/dist/esm/index-3c5cd75e.js.map +0 -1
  304. package/dist/q2-tecton-elements/p-089a7a1e.entry.js +0 -2
  305. package/dist/q2-tecton-elements/p-089a7a1e.entry.js.map +0 -1
  306. package/dist/q2-tecton-elements/p-2e6669a7.entry.js +0 -2
  307. package/dist/q2-tecton-elements/p-2e6669a7.entry.js.map +0 -1
  308. package/dist/q2-tecton-elements/p-4da4cb5d.entry.js +0 -2
  309. package/dist/q2-tecton-elements/p-84190698.js +0 -2
  310. package/dist/q2-tecton-elements/p-84190698.js.map +0 -1
  311. package/dist/q2-tecton-elements/p-9e90a38a.entry.js +0 -2
  312. package/dist/q2-tecton-elements/p-a657277b.entry.js +0 -2
  313. package/dist/q2-tecton-elements/p-d2d3d95b.entry.js +0 -2
  314. package/dist/q2-tecton-elements/p-d2d3d95b.entry.js.map +0 -1
  315. /package/dist/q2-tecton-elements/{p-40df4468.entry.js.map → p-04dd9b90.entry.js.map} +0 -0
  316. /package/dist/q2-tecton-elements/{p-d78669df.entry.js.map → p-0c1e2b0d.entry.js.map} +0 -0
  317. /package/dist/q2-tecton-elements/{p-0852e6fe.entry.js.map → p-11883a2d.entry.js.map} +0 -0
  318. /package/dist/q2-tecton-elements/{p-5775b02b.entry.js.map → p-2154fd27.entry.js.map} +0 -0
  319. /package/dist/q2-tecton-elements/{p-dbfab45b.entry.js.map → p-23638c08.entry.js.map} +0 -0
  320. /package/dist/q2-tecton-elements/{p-f6358905.entry.js.map → p-24c2cc43.entry.js.map} +0 -0
  321. /package/dist/q2-tecton-elements/{p-a8e7e591.entry.js.map → p-26a7f68d.entry.js.map} +0 -0
  322. /package/dist/q2-tecton-elements/{p-da711c59.entry.js.map → p-2a21bb2a.entry.js.map} +0 -0
  323. /package/dist/q2-tecton-elements/{p-25bfe0b2.entry.js.map → p-33a16719.entry.js.map} +0 -0
  324. /package/dist/q2-tecton-elements/{p-db79c056.entry.js.map → p-36e541b9.entry.js.map} +0 -0
  325. /package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js.map → p-38a2862e.entry.js.map} +0 -0
  326. /package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js.map → p-436b9b84.entry.js.map} +0 -0
  327. /package/dist/q2-tecton-elements/{p-ea7876eb.entry.js.map → p-45cf9f0b.entry.js.map} +0 -0
  328. /package/dist/q2-tecton-elements/{p-9ecabc7a.entry.js.map → p-48181bc2.entry.js.map} +0 -0
  329. /package/dist/q2-tecton-elements/{p-333a41ca.entry.js.map → p-4f6eebbf.entry.js.map} +0 -0
  330. /package/dist/q2-tecton-elements/{p-08176bd0.entry.js.map → p-60940069.entry.js.map} +0 -0
  331. /package/dist/q2-tecton-elements/{p-93680d12.entry.js.map → p-631226a9.entry.js.map} +0 -0
  332. /package/dist/q2-tecton-elements/{p-4388e521.entry.js.map → p-6c64c5e9.entry.js.map} +0 -0
  333. /package/dist/q2-tecton-elements/{p-793a453e.entry.js.map → p-6e4b1bfe.entry.js.map} +0 -0
  334. /package/dist/q2-tecton-elements/{p-a177d812.entry.js.map → p-70e8ddbe.entry.js.map} +0 -0
  335. /package/dist/q2-tecton-elements/{p-d8d9ba1f.entry.js.map → p-73c6ecee.entry.js.map} +0 -0
  336. /package/dist/q2-tecton-elements/{p-76b98623.entry.js.map → p-85ddbe4f.entry.js.map} +0 -0
  337. /package/dist/q2-tecton-elements/{p-e3ad770b.entry.js.map → p-85eff820.entry.js.map} +0 -0
  338. /package/dist/q2-tecton-elements/{p-e0a6baea.entry.js.map → p-88ae4e26.entry.js.map} +0 -0
  339. /package/dist/q2-tecton-elements/{p-05b30f98.entry.js.map → p-8b032c77.entry.js.map} +0 -0
  340. /package/dist/q2-tecton-elements/{p-6c933b14.entry.js.map → p-960ee73c.entry.js.map} +0 -0
  341. /package/dist/q2-tecton-elements/{p-baa2eaa9.entry.js.map → p-99a8fdc4.entry.js.map} +0 -0
  342. /package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js.map → p-a4294b4d.entry.js.map} +0 -0
  343. /package/dist/q2-tecton-elements/{p-1e7fa870.entry.js.map → p-b45b6a3e.entry.js.map} +0 -0
  344. /package/dist/q2-tecton-elements/{p-2810ba28.entry.js.map → p-ba7ffb2f.entry.js.map} +0 -0
  345. /package/dist/q2-tecton-elements/{p-9c589ab3.entry.js.map → p-bd4c5570.entry.js.map} +0 -0
  346. /package/dist/q2-tecton-elements/{p-c5aac064.entry.js.map → p-bf4a9be3.entry.js.map} +0 -0
  347. /package/dist/q2-tecton-elements/{p-630613c7.entry.js.map → p-d1ba78ec.entry.js.map} +0 -0
  348. /package/dist/q2-tecton-elements/{p-2bcb7e89.entry.js.map → p-d63cb875.entry.js.map} +0 -0
  349. /package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js.map → p-d950ae4c.entry.js.map} +0 -0
  350. /package/dist/q2-tecton-elements/{p-5037fa67.entry.js.map → p-dba6c931.entry.js.map} +0 -0
  351. /package/dist/q2-tecton-elements/{p-e44560d9.entry.js.map → p-de4bce7e.entry.js.map} +0 -0
  352. /package/dist/q2-tecton-elements/{p-c8b4f5f7.entry.js.map → p-e098f6c5.entry.js.map} +0 -0
  353. /package/dist/q2-tecton-elements/{p-be518818.js.map → p-f1e887f5.js.map} +0 -0
  354. /package/dist/q2-tecton-elements/{p-77a763eb.entry.js.map → p-f6901c57.entry.js.map} +0 -0
  355. /package/dist/q2-tecton-elements/{p-da0cacef.entry.js.map → p-ff5f28fb.entry.js.map} +0 -0
  356. /package/dist/types/{workspace/workspace/tecton-production_release_1.49.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
  357. /package/dist/types/{workspace/workspace/tecton-production_release_1.49.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["formatNumber","val","options","prefix","suffix","decimals","decimalSeparator","thousandsSeparator","allowDecimal","allowNegative","explicit","isNegative","value","parsedValue","replace","Number","toFixed","integerString","decimalString","splitValue","negativeSymbol","formattedValue","fullyFormattedValue","formattingCharacterCount","length","maxlength","MAX_SAFE_INTEGER","toString","unformattedValue","splitIndex","substring","padStart","formatValue","mask","trim","generateMask","minFormattedLength","getMinimumFormattedLength","optionalValidatingChars","isOptionalValidatingChar","character","includes","knownValidatingChars","isKnownValidatingChar","getStaticFormattingChars","knownChars","join","formattingChars","RegExp","split","Set","isStaticFormattingChar","has","getValidatedChar","char","matcher","toUpperCase","maskArray","currentValueIndex","reduce","acc","getNextNonFormattingCharIndex","validChar","currencyFormats","AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SKK","SLL","SOS","SRD","STN","SVC","SYP","SZL","THB","TJS","TMM","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWD","formatCurrency","currencyCode","processedCurrencyCode","currencyFormat","Object","assign","phoneNumberFormats","AF","AL","DZ","AD","AO","AI","AG","AR","AM","AQ","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BR","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CO","KM","CD","CG","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","TL","EC","EG","SV","GQ","EE","ET","FK","FO","FJ","FI","FR","GF","PF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HK","HN","HT","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KR","KW","KG","LA","LV","LB","LS","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MU","MX","MD","MC","MN","MS","MA","MZ","MM","NA","NP","NL","AN","NC","NZ","NI","NE","NG","MP","NO","OM","PK","PW","PA","PG","PE","PH","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","VC","ST","SA","SN","SC","SL","SG","SK","SI","SB","ZA","ES","LK","SD","SR","SZ","SE","CH","SY","TJ","TZ","TH","TG","TT","TN","TR","TM","TC","UG","UA","AE","GB","UY","UZ","VE","VN","VG","VI","YE","ZM","ZW","AC","ME","PS","RS","TW","CW","US","formatPhoneNumber","isoCode","formatSSN","formatTIN","formatAlphanumeric","formatAlpha","modifier","getNumberFormat","formatOptions","numberFormat","formatParts","match","formatNumeric","formatPercentage","undefined","postalCodeFormats","AS","CX","CC","GG","GS","IM","JE","XK","LR","YT","FM","NF","PY","PM","PN","WS","SM","SO","SJ","YU","WF","formatPostalCode","dateFormats","formatDate","format","formattedValueObject","detectedType","formatCreditCard","detectCreditCardTypeFromValue","creditCardFormatters","leftIcon","unknownFormatter","unknownFn","valueObject","type","leftIconMuted","amexFormatter","amexFn","discoverFormatter","discoverFn","masterCardFormatter","masterCardFn","visaFormatter","visaFn","dinersClubInternationalFormatter","dinersClub","discover","amex","masterCard","visa","unknown","firstInt","parseInt","charAt","secondInt","firstfour","substr","thirdInt","firstthree","firstsix","q2InputCss","Q2InputStyle0","inputTypeMap","text","tel","number","password","search","url","email","currency","phone","ssn","alphanumeric","alpha","numeric","percentage","postal","date","Q2Input","this","guid","createGuid","isMobile","scheduledAfterRender","handleCurrencyKeydown","event","key","inputElement","inputField","textSelectedForDeletion","selectionStart","selectionEnd","handleValueAndCursor","cursorPosition","calculateCursorPositionOnInput","input","emit","clear","setCursorPosition","onClearInput","eventDetail","change","focus","onInputBlur","hasFocus","setMessageHeight","valueOnFocus","onInputClick","shouldCursorStayAtEnd","placeCursorAtEnd","onInputFocus","tagName","push","shouldCursorStartAtEnd","calculateCursorPositionOnFocus","onInputInput","stopPropagation","handleCurrencyDeletion","newFormattedValue","getFormattedValue","target","handleDataInput","validateInput","onInputKeydown","keysThatMoveCursor","preventDefault","onInputPaste","clipboardData","getData","onMutationObserved","checkSlotCount","onRefocusInput","showMessages","onToggleVisibility","hostElement","dispatchEvent","FocusEvent","textHidden","validity","_a","inputRef","_b","valid","invalid","disconnectedCallback","manageClearableResizeObserver","mutationObserver","disconnect","componentWillLoad","isNaN","stringValue","defineProperty","get","handleAriaLabel","clearable","componentDidLoad","pseudo","autofocus","overrideFocus","observer","MutationObserver","observe","childList","componentDidRender","forEach","fn","onHostElementChange","onchange","detail","onHostElementFocus","isEventFromElement","checkValidity","clearValue","setValue","InputEvent","ariaLabelObserver","isSmallThreshold","resizeObserver","ResizeObserver","entry","isSmall","contentRect","width","unobserve","errorsObserver","formatModifierObserver","formatAndUpdateValueFromProp","formattedValueObjectObserver","formatted","hintsObserver","typeObserver","valueObserver","ariaAttributes","ariaOwns","getAriaValueFromProp","ariaHaspopup","ariaExpanded","ariaActivedescendant","canSetSelection","computedType","clearClasses","classes","computedAutocomplete","autocomplete","computedClassForIconLeft","className","computedIconLeft","iconLeft","hasCustomDisplaySlot","querySelector","hasError","Array","isArray","errors","hasInputLeftSlot","hasSlotContent","hasInputRightSlot","inputDescribedBy","inputId","shadowRoot","inputMode","inputModeMap","tin","isMaskedType","maskedTypes","messages","hints","showIconSeparator","hideMessages","String","visibilityToggleAriaLabel","visibilityToggleText","loc","wrapperClasses","classNames","iconRight","valueLength","startingPosition","_c","previousValueLength","hasSelection","getSelection","formattedLength","currentValueLength","defaultPosition","countDOM","showCount","h","class","valueChangedFromProperty","formattingFunctions","formatModifier","inputType","cursorMap","valueBeforeCursor","isPrevCharAlphaNum","test","leftIndex","rightIndex","afterCursorOffset","newCursorOffset","valueAfterCursor","isNextCharAlphaNum","newValue","charactersAfterCursor","newCursorPosition","Math","max","setSelectionRange","nextPaint","inputContainerDOM","tabindex","name","onClick","pseudoInputDOM","standardInputDOM","ariaLabel","label","showVisibilityToggle","badgeValue","size","theme","badgeTheme","showPlaceholder","placeholder","id","role","disabled","onFocus","onBlur","cursorData","difference","newPosition","inputClasses","Fragment","ref","el","min","step","current","optional","autocapitalize","autocorrect","_role","readonly","_preventEntry","onKeyDown","onInput","onPaste","inputmode","pattern","render","labelDOM","messagesDOM"],"sources":["src/components/q2-input/formatting/number.ts","src/components/q2-input/formatting/generic.ts","src/components/q2-input/formatting/currency.ts","src/components/q2-input/formatting/phone.ts","src/components/q2-input/formatting/ssn.ts","src/components/q2-input/formatting/tin.ts","src/components/q2-input/formatting/alphanumeric.ts","src/components/q2-input/formatting/alpha.ts","src/components/q2-input/formatting/numeric.ts","src/components/q2-input/formatting/postal.ts","src/components/q2-input/formatting/date.ts","src/components/q2-input/formatting/credit-card.ts","src/components/q2-input/q2-input.scss?tag=q2-input&encapsulation=shadow","src/components/q2-input/q2-input.tsx"],"sourcesContent":["import { IFormatterValueObject, INumberInputFormatOptions } from '../q2-input-types';\n\nexport default function formatNumber(\n val: string = '',\n options: INumberInputFormatOptions = {\n prefix: '',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: '',\n allowDecimal: false,\n allowNegative: true,\n },\n explicit: boolean = false\n): IFormatterValueObject {\n const isNegative = val[0] === '-';\n\n let value = val;\n\n const allowDecimal = !!options.allowDecimal && !!options.decimals;\n\n if (explicit) {\n const parsedValue = value.replace(/[^\\d.]/g, '');\n value = (parsedValue && Number(parsedValue).toFixed(allowDecimal ? options.decimals : 0)) || '';\n }\n\n value = value.replace(/[^\\d]/g, '');\n\n let { integerString, decimalString } = splitValue(value, allowDecimal, options.decimals);\n\n // define decimalString\n let decimalSeparator = options.decimalSeparator;\n if (!allowDecimal) {\n decimalSeparator = '';\n decimalString = '';\n }\n\n // define negative\n const negativeSymbol = options.allowNegative && isNegative ? '-' : '';\n\n value = `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}`;\n\n // format integerString\n integerString = integerString.replace(/\\B(?=(\\d{3})+(?!\\d))/g, options.thousandsSeparator);\n\n const formattedValue: string =\n negativeSymbol || integerString ? `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}` : '';\n\n const fullyFormattedValue: string =\n negativeSymbol || integerString\n ? `${negativeSymbol}${options.prefix}${integerString}${decimalSeparator}${decimalString}${options.suffix}`\n : '';\n\n let formattingCharacterCount = formattedValue.length - value.length;\n\n if (decimalSeparator) {\n formattingCharacterCount = formattingCharacterCount + options.decimalSeparator.length;\n }\n\n const prefix = options.prefix || options.suffix;\n const maxlength = Number.MAX_SAFE_INTEGER.toString().length + formattingCharacterCount + decimalString.length;\n\n const unformattedValue = `${integerString.replace(/[^0-9]/g, '')}${decimalString}`.replace(/^0+/, '');\n\n return {\n value,\n formattedValue,\n fullyFormattedValue,\n prefix,\n suffix: '',\n formattingCharacterCount,\n maxlength,\n unformattedValue,\n };\n}\n\nfunction splitValue(\n value: string,\n allowDecimal: boolean = false,\n decimals: number\n): { integerString: string; decimalString: string } {\n if (!allowDecimal) {\n return {\n integerString: value,\n decimalString: '',\n };\n }\n\n const splitIndex = value.length - decimals;\n\n let integerString = value.substring(0, splitIndex).padStart(1, '0');\n if (integerString.length > 1 && integerString[0] === '0') {\n integerString = integerString.substring(1);\n }\n\n const decimalString = value.substring(splitIndex).padStart(decimals, '0');\n\n return {\n integerString,\n decimalString,\n };\n}\n","import { IFormatterValueObject } from '../q2-input-types';\n\nexport default function formatValue(\n value: string = '',\n mask: string = '',\n options?: {\n prefix?: string;\n suffix?: string;\n }\n): IFormatterValueObject {\n const prefix = (options && options.prefix) || '';\n const suffix = (options && options.suffix) || '';\n\n if (!value || !mask) {\n const fullyFormattedValue = `${prefix}${value}${suffix}`;\n return {\n value,\n formattedValue: value,\n fullyFormattedValue,\n prefix: prefix.trim() || suffix.trim(),\n formattingCharacterCount: 0,\n unformattedValue: value,\n };\n }\n\n const { unformattedValue, formattedValue, formattingCharacterCount } = generateMask(value, mask);\n\n const fullyFormattedValue = `${prefix}${formattedValue}${suffix}`;\n const maxlength = mask.length;\n const minFormattedLength = getMinimumFormattedLength(mask, prefix, suffix);\n\n return {\n value: unformattedValue,\n formattedValue,\n fullyFormattedValue,\n prefix: prefix.trim() || suffix.trim(),\n formattingCharacterCount,\n maxlength,\n minFormattedLength,\n unformattedValue,\n };\n}\n\nconst optionalValidatingChars = ['?'];\nfunction isOptionalValidatingChar(character: string): boolean {\n return optionalValidatingChars.includes(character);\n}\n\nconst knownValidatingChars = ['#', '@', '*', ...optionalValidatingChars];\nfunction isKnownValidatingChar(character: string): boolean {\n return knownValidatingChars.includes(character);\n}\n\nfunction getStaticFormattingChars(mask: string): Set<string> {\n const knownChars = knownValidatingChars.join('|');\n const formattingChars = mask.replace(new RegExp(`[${knownChars}]`, 'g'), '').split('');\n return new Set(formattingChars);\n}\n\nfunction isStaticFormattingChar(character: string, formattingChars: Set<string>): boolean {\n return formattingChars.has(character);\n}\n\nfunction getValidatedChar(char: string, matcher: string) {\n switch (matcher) {\n case '#':\n char = char.replace(/[^\\d]/g, '');\n break;\n case '@':\n char = char.toUpperCase().replace(/[^A-Z]+/g, ''); // allows only upper case\n break;\n case '*':\n char = char.toUpperCase().replace(/[^\\dA-Z]+/g, '');\n break;\n case '?':\n char = char.replace(/[^\\d]/g, '');\n break;\n default:\n return char;\n }\n return char;\n}\n\nfunction generateMask(value: string, mask: string) {\n const maskArray = mask.split('');\n const formattingChars = getStaticFormattingChars(mask);\n let currentValueIndex: number = 0;\n let formattingCharacterCount: number = 0;\n let unformattedValue: string = '';\n\n const formattedValue = maskArray.reduce((acc: string, character: string) => {\n if (currentValueIndex >= value.length) {\n return acc;\n }\n\n if (isOptionalValidatingChar(character) && isStaticFormattingChar(value[currentValueIndex], formattingChars)) {\n return acc;\n }\n\n if (isKnownValidatingChar(character)) {\n // Step value index if formatting character pushed out of place by user input\n currentValueIndex = getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars);\n\n if (currentValueIndex >= value.length) {\n return acc;\n }\n\n const validChar = getValidatedChar(value[currentValueIndex], character);\n acc += validChar;\n unformattedValue += validChar;\n currentValueIndex++;\n } else {\n // Static formatting characters added directly to formatted string\n acc += character;\n formattingCharacterCount++;\n\n if (character === value[currentValueIndex]) {\n // Continue to walk value if next value at this index matches formatting character\n currentValueIndex++;\n }\n }\n\n return acc;\n }, '');\n\n return {\n unformattedValue,\n formattedValue,\n formattingCharacterCount,\n };\n}\n\nfunction getNextNonFormattingCharIndex(value: string, currentValueIndex: number, formattingChars: Set<string>): number {\n if (isStaticFormattingChar(value[currentValueIndex], formattingChars)) {\n currentValueIndex++;\n return getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars);\n }\n\n return currentValueIndex;\n}\n\nfunction getMinimumFormattedLength(mask: string, prefix: string, suffix: string): number {\n return (\n mask.replace(new RegExp(`[${optionalValidatingChars.join('|')}]`, 'g'), '').length +\n prefix.length +\n suffix.length\n );\n}\n","import formatNumber from './number';\nimport formatValue from './generic';\nimport { IFormatterValueObject, INumberInputFormatOptions } from '../q2-input-types';\n\n// decimal data source: http://www.iso.org/iso/home/standards/currency_codes.htm 09/Nov/2016\nexport const currencyFormats = {\n AED: {\n prefix: '',\n suffix: 'د.إ',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.إ'\n AFN: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n ALL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n AMD: {\n prefix: 'դր.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'դր.9,999.99'\n ANG: {\n prefix: 'ƒ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ƒ9,999.99'\n AOA: {\n prefix: 'Kz',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Kz9,999.99'\n ARS: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n AUD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n AWG: {\n prefix: 'ƒ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ƒ9,999.99'\n AZN: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n BAM: {\n prefix: 'КМ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'КМ9,999.99'\n BBD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BDT: {\n prefix: '৳',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '৳9,999.99'\n BGN: {\n prefix: '৳',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '৳9,999.99'\n BHD: {\n prefix: '',\n suffix: 'ب.د',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ب.د'\n BIF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n BMD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BND: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BOB: {\n prefix: 'Bs.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Bs.9,999.99'\n BRL: {\n prefix: 'R$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'R$9,999.99'\n BSD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BTN: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n BWP: {\n prefix: 'P',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'P9,999.99'\n BYN: {\n prefix: 'Br',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Br9,999'\n BZD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CAD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CDF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999.99'\n CHF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999.99'\n CLF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 4,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9.999.9999'\n CLP: {\n prefix: '$',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999'\n CNY: {\n prefix: '¥',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¥9,999.99'\n COP: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CRC: {\n prefix: '₡',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₡9,999.99'\n CUC: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CUP: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CVE: {\n prefix: '$',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999'\n CZK: {\n prefix: 'Kč',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Kč9,999.99'\n DJF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n DKK: {\n prefix: 'kr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999.99'\n DOP: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n DZD: {\n prefix: '',\n suffix: 'د.ج',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.ج'\n EEK: {\n prefix: 'KR',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'KR9,999.99'\n EGP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n ERN: {\n prefix: 'Nfk',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Nfk9,999.99'\n ETB: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n EUR: {\n prefix: '€',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '€9,999.99'\n FJD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n FKP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n GBP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n GEL: {\n prefix: 'ლ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ლ9,999.99'\n GHS: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n GIP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n GMD: {\n prefix: 'D',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'D9,999.99'\n GNF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n GTQ: {\n prefix: 'Q',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Q9,999.99'\n GYD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n HKD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.9'\n HNL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n HRK: {\n prefix: 'kn',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kn9,999.99'\n HTG: {\n prefix: 'G',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'G9,999.99'\n HUF: {\n prefix: 'Ft',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Ft9,999.99'\n IDR: {\n prefix: 'Rs',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Rs9,999.99'\n ILS: {\n prefix: '₪',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₪9,999.99'\n INR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n IQD: {\n prefix: '',\n suffix: 'ع.د',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ع.د'\n IRR: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n ISK: {\n prefix: 'kr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999'\n JMD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n JOD: {\n prefix: '',\n suffix: 'د.ا',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.ا'\n JPY: {\n prefix: '¥',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¥9,999'\n KES: {\n prefix: 'Sh',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999.99'\n KGS: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n KHR: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n KMF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n KPW: {\n prefix: '₩',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₩9,999.99'\n KRW: {\n prefix: '₩',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₩9,999.99'\n KWD: {\n prefix: 'د.ك',\n suffix: '',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999د.ك'\n KYD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n KZT: {\n prefix: '〒',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '〒9,999.99'\n LAK: {\n prefix: '₭',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₭9,999.99'\n LBP: {\n prefix: '',\n suffix: 'ل.ل',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ل.ل9,999.99'\n LKR: {\n prefix: 'Rs',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Rs9,999.99'\n LRD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n LSL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n LTL: {\n prefix: 'Lt',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Lt9,999.99'\n LVL: {\n prefix: 'Ls',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Ls9,999.99'\n LYD: {\n prefix: '',\n suffix: 'ل.د',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ل.د'\n MAD: {\n prefix: '',\n suffix: 'د.م.',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.م.'\n MDL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n MGA: {\n prefix: '¤',\n suffix: '',\n decimals: 1,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.9'\n MKD: {\n prefix: 'ден',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ден9,999.99'\n MMK: {\n prefix: 'K',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'K9,999.99'\n MNT: {\n prefix: '₮',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₮9,999.99'\n MOP: {\n prefix: 'P',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'P9,999.99'\n MRU: {\n prefix: 'UM',\n suffix: '',\n decimals: 1,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'UM9,999.9'\n MUR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n MVR: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n MWK: {\n prefix: 'MK',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'MK9,999.99'\n MXN: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n MYR: {\n prefix: 'RM',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'RM9,999.99'\n MZN: {\n prefix: 'MTn',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'MTn9,999.99'\n NAD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n NGN: {\n prefix: '₦',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₦9,999.99'\n NIO: {\n prefix: 'C$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'C$9,999.99'\n NOK: {\n prefix: 'kr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999.99'\n NPR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n NZD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n OMR: {\n prefix: '',\n suffix: 'ر.ع.',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ر.ع.'\n PAB: {\n prefix: 'B/.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'B/.9,999.99'\n PEN: {\n prefix: 'S/.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'S/.9,999.99'\n PGK: {\n prefix: 'K',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'K9,999.99'\n PHP: {\n prefix: 'p',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'p9,999.99'\n PKR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n PLN: {\n prefix: 'zł',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'zł9,999.99'\n PYG: {\n prefix: '¤',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999'\n QAR: {\n prefix: '',\n suffix: 'ر.ق',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99ر.ق'\n RON: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n RSD: {\n prefix: 'дин.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'дин.9,999.99'\n RUB: {\n prefix: 'руб.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'руб.9,999.99'\n RWF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n SAR: {\n prefix: '',\n suffix: 'ر.س',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99ر.س'\n SBD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n SCR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n SDG: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n SEK: {\n prefix: 'kr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999.99'\n SGD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n SHP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n SKK: {\n prefix: 'Sk',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sk9,999.99'\n SLL: {\n prefix: 'Le',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Le9,999.99'\n SOS: {\n prefix: 'Sh',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999.99'\n SRD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n STN: {\n prefix: 'Db',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Db9,999.99'\n SVC: {\n prefix: '₡',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₡9,999.99'\n SYP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n SZL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n THB: {\n prefix: '฿',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '฿9,999.99'\n TJS: {\n prefix: 'ЅМ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ЅМ9,999.99'\n TMM: {\n prefix: 'm',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'm9,999.99'\n TND: {\n prefix: '',\n suffix: 'د.ت',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999د.ت'\n TOP: {\n prefix: 'T$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'T$9,999.99'\n TRY: {\n prefix: 'YTL',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'YTL9,999.99'\n TTD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n TWD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n TZS: {\n prefix: 'Sh',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999.99'\n UAH: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n UGX: {\n prefix: 'Sh',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999'\n USD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n UYU: {\n prefix: '$',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999'\n UZS: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n VEF: {\n prefix: 'Bs F',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Bs F9,999.99'\n VND: {\n prefix: '₫',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₫9,999'\n VUV: {\n prefix: 'Vt',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Vt9,999'\n WST: {\n prefix: 'T',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'T9,999.99'\n XAF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n XCD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n XOF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n XPF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n YER: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n ZAR: {\n prefix: 'R',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'R9,999.99'\n ZMW: {\n prefix: 'ZK',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ZK9,999.99'\n ZWD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n};\n\nexport default function formatCurrency(\n value: string,\n currencyCode: string = 'USD',\n explicit: boolean = false\n): IFormatterValueObject {\n let processedCurrencyCode = currencyCode || '';\n let allowDecimal = true;\n\n if (processedCurrencyCode.includes('-integer')) {\n processedCurrencyCode = processedCurrencyCode.split('-integer')[0];\n allowDecimal = false;\n }\n\n const currencyFormat = currencyFormats[processedCurrencyCode];\n\n if (!currencyFormat) {\n return formatValue(value);\n }\n\n const options: INumberInputFormatOptions = {\n ...currencyFormat,\n allowDecimal: allowDecimal && currencyFormat.decimals > 0,\n allowNegative: false,\n };\n\n return formatNumber(value, options, explicit);\n}\n","import { IFormatterValueObject } from '../q2-input-types';\nimport formatValue from './generic';\n\nexport const phoneNumberFormats = {\n AF: {\n mask: '(##) #######',\n prefix: '+93 ',\n },\n AL: {\n mask: '#######',\n prefix: '+355 ',\n },\n DZ: {\n mask: '(##) ###-###',\n prefix: '+213 ',\n },\n // AS\n AD: {\n mask: '(#) #####',\n prefix: '+376 ',\n },\n AO: {\n mask: '#########',\n prefix: '+244 ',\n },\n AI: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n AG: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n AR: {\n mask: '##########',\n prefix: '+54 ',\n },\n AM: {\n mask: '########',\n prefix: '+375 ',\n },\n AQ: {\n mask: '##-####',\n prefix: '+672 ',\n },\n AW: {\n mask: '###-####',\n prefix: '+297 ',\n },\n AU: {\n mask: '(##) ####-####',\n prefix: '+61 ',\n },\n /* AT: {\n mask:'####?????????',\n prefix: ''\n }, */\n AT: {\n mask: '#############',\n prefix: '+43 ',\n },\n /* AZ: {\n mask:'########?',\n prefix: ''\n }, */\n AZ: {\n mask: '#########',\n prefix: '+994 ',\n },\n BS: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n BH: {\n mask: '####-####',\n prefix: '+973 ',\n },\n /* BD: {\n mask:'#######??',\n prefix: ''\n }, */\n BD: {\n mask: '#########',\n prefix: '+880 ',\n },\n BB: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n BY: {\n mask: '#########',\n prefix: '+375 ',\n },\n BE: {\n mask: '########??',\n prefix: '+32 ',\n },\n BZ: {\n mask: '#######',\n prefix: '+501 ',\n },\n BJ: {\n mask: '(##) ###-###',\n prefix: '+229 ',\n },\n BM: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n BT: {\n mask: '(#) ###-###',\n prefix: '+975 ',\n },\n BO: {\n mask: '(#) ###-####',\n prefix: '+591 ',\n },\n BA: {\n mask: '(##) ##-##-##',\n prefix: '+387 ',\n },\n /* BW: {\n mask:'#######?',\n prefix: ''\n }, */\n BW: {\n mask: '########',\n prefix: '+267 ',\n },\n BR: {\n mask: '(##) ####-####',\n prefix: '+55 ',\n },\n BN: {\n mask: '###-####',\n prefix: '+673 ',\n },\n BG: {\n mask: '#######?',\n prefix: '+359 ',\n },\n BF: {\n mask: '##-##-##-##',\n prefix: '+226 ',\n },\n BI: {\n mask: '####-####',\n prefix: '+257 ',\n },\n KH: {\n mask: '(##) ######',\n prefix: '+855 ',\n },\n CM: {\n mask: '####-####',\n prefix: '+237 ',\n },\n CA: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n CV: {\n mask: '###-####',\n prefix: '+238 ',\n },\n KY: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n CF: {\n mask: '###-###',\n prefix: '+236 ',\n },\n TD: {\n mask: '###-##-##',\n prefix: '+235 ',\n },\n /* CL: {\n mask:'########?',\n prefix: ''\n }, */\n CL: {\n mask: '#########',\n prefix: '+56 ',\n },\n /* CN: {\n mask:'########???',\n prefix: ''\n }, */\n CN: {\n mask: '###########',\n prefix: '+86 ',\n },\n /* CO: {\n mask:'########??',\n prefix: ''\n }, */\n CO: {\n mask: '##########',\n prefix: '57 ',\n },\n KM: {\n mask: '###-####',\n prefix: '+269 ',\n },\n CD: {\n mask: '###-####',\n prefix: '+243 ',\n },\n CG: {\n mask: '###-####',\n prefix: '+242 ',\n },\n // CK\n CR: {\n mask: '####-####',\n prefix: '+506 ',\n },\n CI: {\n mask: '####-####',\n prefix: '+225 ',\n },\n HR: {\n mask: '########?',\n prefix: '+385 ',\n },\n /* CU: {\n mask:'#####?ID:?????',\n prefix: ''\n }, */\n CU: {\n mask: '###########',\n prefix: '+53 ',\n },\n CY: {\n mask: '####-####',\n prefix: '+357 ',\n },\n CZ: {\n mask: '#########',\n prefix: '+420 ',\n },\n DK: {\n mask: '####-####',\n prefix: '+45 ',\n },\n DJ: {\n mask: '##-##-##-##',\n prefix: '+253 ',\n },\n DM: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n DO: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n TL: {\n mask: '###-####',\n prefix: '+670 ',\n },\n EC: {\n mask: '(##) ###-####',\n prefix: '+593 ',\n },\n /* EG: {\n mask:'########??',\n prefix: ''\n }, */\n EG: {\n mask: '##########',\n prefix: '+20 ',\n },\n SV: {\n mask: '####-####',\n prefix: '+503 ',\n },\n GQ: {\n mask: '##-####',\n prefix: '+240 ',\n },\n // ER:\n EE: {\n mask: '#######?',\n prefix: '+372 ',\n },\n ET: {\n mask: '(##) ###-####',\n prefix: '+251 ',\n },\n FK: {\n mask: '#####',\n prefix: '+500 ',\n },\n FO: {\n mask: '######',\n prefix: '+298 ',\n },\n FJ: {\n mask: '###-####',\n prefix: '+679 ',\n },\n /* FI: {\n mask:'#####???????',\n prefix: ''\n }, */\n FI: {\n mask: '############',\n prefix: '+358 ',\n },\n FR: {\n mask: '#########',\n prefix: '+33 ',\n },\n /* GF: {\n mask:'#########?',\n prefix: ''\n }, */\n GF: {\n mask: '##########',\n prefix: '+594 ',\n },\n PF: {\n mask: '######',\n prefix: '+689 ',\n },\n GA: {\n mask: '######?',\n prefix: '+241 ',\n },\n GM: {\n mask: '###-####',\n prefix: '+220 ',\n },\n GE: {\n mask: '########',\n prefix: '+995 ',\n },\n /* DE: {\n mask:'######?????',\n prefix: ''\n }, */\n DE: {\n mask: '###########',\n prefix: '+49 ',\n },\n /* GH: {\n mask:'########?',\n prefix: ''\n }, */\n GH: {\n mask: '#########',\n prefix: '+233 ',\n },\n GI: {\n mask: '####-####',\n prefix: '+350 ',\n },\n GR: {\n mask: '##########',\n prefix: '+30 ',\n },\n GL: {\n mask: '###-###',\n prefix: '+299 ',\n },\n GD: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n GP: {\n mask: '##########',\n prefix: '+590 ',\n },\n GU: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n GT: {\n mask: '####-####',\n prefix: '+502 ',\n },\n GN: {\n mask: '####-####',\n prefix: '+224 ',\n },\n GW: {\n mask: '###-####',\n prefix: '+245 ',\n },\n GY: {\n mask: '(###) ####',\n prefix: '+592 ',\n },\n HK: {\n mask: '####-####',\n prefix: '+852 ',\n },\n HN: {\n mask: '########',\n prefix: '+504 ',\n },\n HT: {\n mask: '####-####',\n prefix: '+509 ',\n },\n HU: {\n mask: '########??',\n prefix: '+36 ',\n },\n /* IS: {\n mask:'#######??',\n prefix: ''\n }, */\n IS: {\n mask: '#########',\n prefix: '+354 ',\n },\n IN: {\n mask: '##########',\n prefix: '+91 ',\n },\n /* ID: {\n mask:'#######???',\n prefix: ''\n }, */\n ID: {\n mask: '#######??????', // allows 7 ~ 13 digits\n prefix: '+62 ',\n },\n IR: {\n mask: '##########',\n prefix: '+98 ',\n },\n /* IQ: {\n mask:'########??',\n prefix: ''\n }, */\n IQ: {\n mask: '##########',\n prefix: '+964 ',\n },\n /* IE: {\n mask:'#######??',\n prefix: ''\n }, */\n IE: {\n mask: '#########',\n prefix: '+353 ',\n },\n /* IL: {\n mask:'########?',\n prefix: ''\n }, */\n IL: {\n mask: '#########',\n prefix: '+972 ',\n },\n /* IT: {\n mask:'######????',\n prefix: ''\n }, */\n IT: {\n mask: '##########',\n prefix: '+39 ',\n },\n JM: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n JP: {\n mask: '#########??',\n prefix: '+81 ',\n },\n /* JO: {\n mask:'#######??',\n prefix: ''\n }, */\n JO: {\n mask: '#########',\n prefix: '+962 ',\n },\n KZ: {\n mask: '(###) ####-###',\n prefix: '+7 ',\n },\n /* KE: {\n mask:'######????',\n prefix: ''\n }, */\n KE: {\n mask: '##########',\n prefix: '+254 ',\n },\n KI: {\n mask: '##-###',\n prefix: '+686 ',\n },\n // kp\n /* KR: {\n mask:'####??????',\n prefix: ''\n }, */\n KR: {\n mask: '##########',\n prefix: '+82 ',\n },\n KW: {\n mask: '####-####',\n prefix: '+965 ',\n },\n KG: {\n mask: '#########',\n prefix: '+996 ',\n },\n LA: {\n mask: '########?',\n prefix: '+856 ',\n },\n LV: {\n mask: '####-####',\n prefix: '+371 ',\n },\n LB: {\n mask: '#######?',\n prefix: '+961 ',\n },\n LS: {\n mask: '##-###-###',\n prefix: '+266 ',\n },\n // LR\n /* LY: {\n mask:'########?',\n prefix: ''\n }, */\n LY: {\n mask: '########?',\n prefix: '+218 ',\n },\n LI: {\n mask: '###-####',\n prefix: '+423 ',\n },\n LT: {\n mask: '########',\n prefix: '+370 ',\n },\n /* LU: {\n mask:'#####??????',\n prefix: '+352 '\n }, */\n LU: {\n mask: '###########',\n prefix: '+352 ',\n },\n MO: {\n mask: '####-####',\n prefix: '+853 ',\n },\n MK: {\n mask: '########',\n prefix: '+389 ',\n },\n MG: {\n mask: '##-##-###-##',\n prefix: '+261 ',\n },\n /* MW: {\n mask:'#######??',\n prefix: '+265 '\n }, */\n MW: {\n mask: '#########',\n prefix: '+265 ',\n },\n /* MY: {\n mask:'#######???',\n prefix: '+60 '\n }, */\n MY: {\n mask: '##########',\n prefix: '+60 ',\n },\n MV: {\n mask: '###-####',\n prefix: '+960 ',\n },\n ML: {\n mask: '####-####',\n prefix: '+223 ',\n },\n MT: {\n mask: '##-##-##-##',\n prefix: '+356 ',\n },\n MH: {\n mask: '###-####',\n prefix: '+692 ',\n },\n MQ: {\n mask: '###-######',\n prefix: '+596 ',\n },\n // MR\n MU: {\n mask: '###-####',\n prefix: '+230 ',\n },\n // YT\n MX: {\n mask: '(###) ###-####',\n prefix: '+52 ',\n },\n // FM\n MD: {\n mask: '########',\n prefix: '+373 ',\n },\n MC: {\n mask: '####-####',\n prefix: '+377 ',\n },\n /* MN: {\n mask:'######?????',\n prefix: '+976 '\n }, */\n MN: {\n mask: '###########',\n prefix: '+976 ',\n },\n MS: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n MA: {\n mask: '#########?', // allows 9 ~ 10 digits\n prefix: '+212 ',\n },\n /* MZ: {\n mask:'########?',\n prefix: '+258 '\n }, */\n MZ: {\n mask: '#########',\n prefix: '+258 ',\n },\n /* MM: {\n mask:'#######?',\n prefix: '+95 '\n }, */\n MM: {\n mask: '########',\n prefix: '+95 ',\n },\n /* NA: {\n mask:'######????',\n prefix: '+264 '\n }, */\n NA: {\n mask: '##########',\n prefix: '+264 ',\n },\n // NR\n /* NP: {\n mask:'########??',\n prefix: '+977 '\n }, */\n NP: {\n mask: '##########',\n prefix: '+977 ',\n },\n NL: {\n mask: '#########',\n prefix: '+31 ',\n },\n /* AN: {\n mask:'#######?',\n prefix: '+599 '\n }, */\n AN: {\n mask: '########',\n prefix: '+599 ',\n },\n NC: {\n mask: '###-###',\n prefix: '+687 ',\n },\n /* NZ: {\n mask:'########??',\n prefix: '+64 '\n }, */\n NZ: {\n mask: '##########',\n prefix: '+64 ',\n },\n NI: {\n mask: '####-####',\n prefix: '+505 ',\n },\n NE: {\n mask: '##-###-###',\n prefix: '+227 ',\n },\n /* NG: {\n mask:'########??',\n prefix: '+234 '\n }, */\n NG: {\n mask: '##########',\n prefix: '+234 ',\n },\n // NU\n MP: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n NO: {\n mask: '####-####',\n prefix: '+47 ',\n },\n OM: {\n mask: '####-####',\n prefix: '+968 ',\n },\n /* PK: {\n mask:'#########?',\n prefix: '+92 '\n }, */\n PK: {\n mask: '##########',\n prefix: '+92 ',\n },\n PW: {\n mask: '###-####',\n prefix: '+680 ',\n },\n /* PA: {\n mask:'#######?',\n prefix: '+507 '\n }, */\n PA: {\n mask: '########',\n prefix: '+507 ',\n },\n /* PG: {\n mask:'#######?',\n prefix: '+675 '\n }, */\n PG: {\n mask: '########',\n prefix: '+675 ',\n },\n // PY\n /* PE: {\n mask:'#######????',\n prefix: '+51 '\n }, */\n PE: {\n mask: '###########',\n prefix: '+51 ',\n },\n /* PH: {\n mask:'########??',\n prefix: '+63 '\n }, */\n PH: {\n mask: '##########',\n prefix: '+63 ',\n },\n PL: {\n mask: '#########',\n prefix: '+48 ',\n },\n PT: {\n mask: '#-####-####',\n prefix: '+351 ',\n },\n PR: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n QA: {\n mask: '###-####',\n prefix: '+974 ',\n },\n RE: {\n mask: '###-###-###',\n prefix: '+262 ',\n },\n RO: {\n mask: '#########',\n prefix: '+40 ',\n },\n RU: {\n mask: '##########',\n prefix: '+7 ',\n },\n RW: {\n mask: '###-###-###',\n prefix: '+250 ',\n },\n SH: {\n mask: '#-###',\n prefix: '+290 ',\n },\n // PM\n KN: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n LC: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n VC: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n // WS\n // SM\n ST: {\n mask: '##-####',\n prefix: '+239 ',\n },\n /* SA: {\n mask:'########?',\n prefix: '+966 '\n }, */\n SA: {\n mask: '#########',\n prefix: '+966 ',\n },\n SN: {\n mask: '##-###-####',\n prefix: '+221 ',\n },\n SC: {\n mask: '###-###',\n prefix: '+248 ',\n },\n SL: {\n mask: '(##) ###-###',\n prefix: '+232 ',\n },\n SG: {\n mask: '####-####',\n prefix: '+65 ',\n },\n SK: {\n mask: '#########',\n prefix: '+421 ',\n },\n SI: {\n mask: '########',\n prefix: '+386 ',\n },\n SB: {\n mask: '##-###',\n prefix: '+677 ',\n },\n // SO\n ZA: {\n mask: '(##) ###-####',\n prefix: '+27 ',\n },\n ES: {\n mask: '###-###-###',\n prefix: '+34 ',\n },\n LK: {\n mask: '(##) ###-####',\n prefix: '+94 ',\n },\n SD: {\n mask: '##-###-####',\n prefix: '+249 ',\n },\n SR: {\n mask: '######?',\n prefix: '+597 ',\n },\n SZ: {\n mask: '###-####',\n prefix: '+268 ',\n },\n /* SE: {\n mask:'######?????',\n prefix: '+46 '\n }, */\n SE: {\n mask: '###########',\n prefix: '+46 ',\n },\n CH: {\n mask: '(##) ###-####',\n prefix: '+41 ',\n },\n /* SY: {\n mask:'########?',\n prefix: '+963 '\n }, */\n SY: {\n mask: '#########',\n prefix: '+963 ',\n },\n TJ: {\n mask: '#########',\n prefix: '+992 ',\n },\n TZ: {\n mask: '#########',\n prefix: '+255 ',\n },\n /* TH: {\n mask:'########?',\n prefix: '+66 '\n }, */\n TH: {\n mask: '#########',\n prefix: '+66 ',\n },\n TG: {\n mask: '###-####',\n prefix: '+228 ',\n },\n // TK\n // TO\n TT: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n TN: {\n mask: '##-###-###',\n prefix: '+216 ',\n },\n TR: {\n mask: '(###) ###-####',\n prefix: '+90 ',\n },\n TM: {\n mask: '########',\n prefix: '+993 ',\n },\n TC: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n // TV\n UG: {\n mask: '#########',\n prefix: '+256 ',\n },\n UA: {\n mask: '(##) ###-####',\n prefix: '+380 ',\n },\n /* AE: {\n mask:'########?',\n prefix: '+971 '\n }, */\n AE: {\n mask: '#########',\n prefix: '+971 ',\n },\n /* GB: {\n mask:'##########???',\n prefix: '+44 '\n }, */\n GB: {\n mask: '#########????',\n prefix: '+44 ',\n },\n UY: {\n mask: '########?',\n prefix: '+598 ',\n },\n UZ: {\n mask: '(##) ###-####',\n prefix: '+998 ',\n },\n // VU\n // VA\n VE: {\n mask: '(###) ###-####',\n prefix: '+58 ',\n },\n VN: {\n mask: '#######????',\n prefix: '+84 ',\n },\n VG: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n VI: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n // WF\n /* YE: {\n mask:'#######??',\n prefix: '+967 '\n }, */\n YE: {\n mask: '#########',\n prefix: '+967 ',\n },\n // YU\n ZM: {\n mask: '#########',\n prefix: '+260 ',\n },\n /* ZW: {\n mask:'####?????',\n prefix: '+263 '\n }, */\n ZW: {\n mask: '#########',\n prefix: '+263 ',\n },\n AC: {\n mask: '####',\n prefix: '+247 ',\n },\n ME: {\n mask: '(##) ###-###?',\n prefix: '+382 ',\n },\n /* PS: {\n mask:'########?',\n prefix: '+970 '\n }, */\n PS: {\n mask: '#########',\n prefix: '+970 ',\n },\n /* RS: {\n mask:'#######??',\n prefix: '+381 '\n }, */\n RS: {\n mask: '#########',\n prefix: '+381 ',\n },\n /* TW: {\n mask:'########?',\n prefix: '+886 '\n }, */\n TW: {\n mask: '#########',\n prefix: '+886 ',\n },\n CW: {\n mask: '#-###-####',\n prefix: '+599 ',\n },\n US: {\n mask: '(###) ###-####',\n prefix: '',\n },\n};\n\nexport default function formatPhoneNumber(value: string, isoCode: string = 'US'): IFormatterValueObject {\n const { mask, prefix } = phoneNumberFormats[isoCode] || phoneNumberFormats.US;\n\n const options = {\n prefix,\n };\n\n const val = value || '';\n // Brazil need edge case handle, mobile: (xx) xxxxx-xxxx, land phone: (xx) xxxx-xxxx\n if (isoCode === 'BR' && val.replace(/[^0-9]/g, '').length === 11) {\n return formatValue(val, '(##) #####-####', options);\n } else {\n return formatValue(val, mask, options);\n }\n}\n","import formatValue from './generic';\n\nexport default function formatSSN(value: string) {\n return formatValue(value, '###-##-####');\n}\n","import formatValue from './generic';\n\nexport default function formatTIN(value: string) {\n return formatValue(value, '##-#######');\n}\n","import formatValue from './generic';\n\nexport default function formatAlphanumeric(value: string) {\n const val = (value || '').replace(/[^\\da-zA-Z]/g, '');\n return formatValue(val);\n}\n","import formatValue from './generic';\n\nexport default function formatAlpha(value: string, modifier?: string) {\n let val = value || '';\n\n if (modifier === 'spaced') {\n val = val.replace(/[^a-zA-Z ]/g, '');\n } else {\n val = val.replace(/[^a-zA-Z]/g, '');\n }\n\n return formatValue(val);\n}\n","import formatNumber from './number';\nimport formatValue from './generic';\nimport { INumberInputFormatOptions } from '../q2-input-types';\n\nfunction getNumberFormat(formatOptions: string): INumberInputFormatOptions | undefined {\n const numberFormat: INumberInputFormatOptions = {\n prefix: '',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: '',\n allowDecimal: false,\n allowNegative: true,\n };\n const formatParts = formatOptions.split('-');\n\n // handle deprecated formats\n if (formatParts[0] === 'delimited') {\n // `delimited` - to be replaced by `integer-delimited`\n numberFormat.thousandsSeparator = ',';\n } else if (formatParts[0].match(/^[0-9]+dec$/)) {\n // `Ndec` - to be replaced by `Ndecimal`\n numberFormat.decimals = Number(formatParts[0].replace('dec', ''));\n numberFormat.allowDecimal = true;\n numberFormat.thousandsSeparator = ',';\n } else {\n // determine number type\n if (formatParts[0].includes('decimal')) {\n numberFormat.decimals = Number(formatParts[0].replace('decimal', ''));\n numberFormat.allowDecimal = true;\n } else if (formatParts[0] !== 'integer') {\n // Ignore any formats that don't start with Ndecimal or integer\n return;\n }\n\n // determine if negative numbers are allowed\n if (formatParts.includes('positive')) {\n numberFormat.allowNegative = false;\n }\n\n // determine if number is delimited\n if (formatParts.includes('delimited')) {\n numberFormat.thousandsSeparator = ',';\n }\n }\n\n return numberFormat;\n}\n\nfunction formatNumeric(value: string = '', modifier: string = '', explicit: boolean = false) {\n const numberFormat = getNumberFormat(modifier);\n\n if (!numberFormat) {\n const val = (value || '').replace(/[^\\d.,-]/g, '');\n return formatValue(val);\n }\n\n return formatNumber(value, numberFormat, explicit);\n}\n\nexport function formatPercentage(value: string = '', modifier: string = '', explicit: boolean = false) {\n const numberFormat = getNumberFormat(modifier);\n\n if (!numberFormat) {\n const val = (value || '').replace(/[^\\d.,-]/g, '');\n return formatValue(val, undefined, { suffix: '%' });\n }\n\n numberFormat.suffix = '%';\n\n return formatNumber(value, numberFormat, explicit);\n}\n\nexport default formatNumeric;\n","import formatValue from './generic';\nimport formatAlphanumeric from './alphanumeric';\n\nconst postalCodeFormats = {\n AF: '####',\n AL: '####',\n DZ: '#####',\n AC: 'ASCN 1ZZ',\n AD: 'AD###', // pre\n AR: '####',\n 'AR+': '@####@@@',\n AI: 'AI-2640',\n AM: '####',\n AS: '#####',\n 'AS+4': '#####-####',\n AU: '####',\n AT: '####',\n AZ: 'AZ ####', // pre\n BH: '###?',\n BD: '####',\n BB: 'BB#####', // pre\n BY: '######',\n BE: '####',\n BM: '@@ **',\n BT: '#####',\n BA: '######',\n BR: '#####',\n 'BR+3': '#####-###',\n VG: 'VG####', // pre\n BN: '@@####',\n BG: '####',\n KH: '#####',\n KY: 'KY#-####', // pre\n CA: '@#@ #@#',\n CL: '###-####',\n CN: '######',\n CX: '####',\n CC: '####',\n CO: '######',\n CR: '#####',\n 'CR+4': '#####-####',\n CV: '####',\n HR: '#####',\n CU: '#####',\n CY: '####',\n CZ: '### ##',\n DK: '####',\n DO: '#####',\n EC: '######',\n SV: '####',\n EG: '#####',\n EE: '#####',\n ET: '####',\n FK: 'FIQQ 1ZZ',\n FO: '###',\n FI: '#####',\n FR: '#####',\n GF: '973##', // pre?\n PF: '987##', // pre?\n GI: 'GX11 1AA',\n GE: '####',\n DE: '#####',\n GR: '### ##',\n GL: '####',\n GP: '971##', // pre?\n GU: '#####',\n 'GU+4': '#####-####',\n GT: '#####',\n GG: 'GY#? #@@',\n GN: '###',\n GS: 'SIQQ 1ZZ',\n GW: '####',\n HT: '####',\n HN: '@@####',\n 'HN-': '#####',\n HU: '####',\n IS: '###',\n IN: '### ###',\n ID: '#####',\n IE: '*** ****',\n IR: '##########',\n IQ: '#####',\n IM: 'IM#? #@@', // pre\n IL: '#######',\n IT: '#####',\n JM: '##',\n JP: '###-####',\n JE: 'JE#? #@@', // pre\n JO: '#####',\n KZ: '######',\n KE: '#####',\n KR: '#####',\n KN: 'KN####',\n XK: '#####',\n KW: '#####',\n KG: '######',\n LA: '#####',\n LV: 'LV-####', // pre\n LB: '####? ????', // also 00000\n LS: '###',\n LR: '####',\n LI: '####',\n LT: '#####', // pre-\n LU: '####',\n MK: '####',\n MG: '###',\n MY: '#####',\n MV: '#####',\n MT: '@@@ ####',\n MH: '#####',\n 'MH+4': '#####-####',\n MU: '#####',\n MQ: '972##', // pre?\n MW: '######',\n YT: '976##', // pre?\n MX: '#####',\n FM: '#####',\n 'FM+4': '#####-####',\n MD: '####', // pre\n MC: '980##', // pre?\n MN: '#####',\n ME: '#####',\n MA: '#####',\n MZ: '####',\n MM: '#####',\n NA: '#####',\n NP: '#####',\n NC: '988##', // pre?\n NZ: '####',\n NI: '#####',\n NE: '####',\n NG: '######',\n NF: '####',\n MP: '#####',\n NO: '####',\n OM: '###',\n PK: '#####',\n PW: '#####',\n 'PW+4': '#####-####',\n PS: '###',\n PA: '####',\n PG: '###',\n PY: '####',\n PE: '#####',\n 'PE+': '####', // pre\n PH: '####',\n PL: '##-###',\n PT: '####',\n 'PT+3': '####-###',\n PR: '#####',\n 'PR+4': '#####-####',\n RE: '974##', // pre?\n PM: '975##',\n PN: 'PCRN 1ZZ',\n RO: '######',\n RU: '######',\n LC: 'LC## ###', // pre\n VC: '####', // pre\n WS: '####', // pre\n SM: '4879#', // pre?\n SA: '#####',\n 'SA+4': '#####-####',\n SN: '#####',\n RS: '#####',\n SG: '######',\n SH: '@@@@ 1ZZ',\n SK: '### ##',\n SI: '####', // pre?\n SO: '@@ #####',\n ZA: '####',\n ES: '#####',\n LK: '#####',\n SD: '#####',\n SZ: '@###',\n SE: '### ##',\n CH: '####',\n SJ: '####',\n TW: '###',\n 'TW+2': '###-##?',\n TJ: '######',\n TZ: '#####',\n TH: '#####',\n TT: '######',\n TN: '####',\n TR: '#####',\n TM: '######',\n UA: '#####',\n UY: '#####',\n VI: '#####',\n 'VI+4': '#####-####',\n UZ: '######',\n VE: '####',\n 'VE-': '####-@',\n VN: '#####?',\n YU: '#####',\n WF: '986##', // pre?\n ZM: '#####',\n US: '#####',\n 'US+4': '#####-####',\n};\nexport default function formatPostalCode(value: string, modifier: string = 'US') {\n const mask = postalCodeFormats[modifier];\n\n if (!mask) {\n return formatAlphanumeric(value);\n }\n\n return formatValue(value, mask);\n}\n","import formatValue from './generic';\n\nconst dateFormats = {\n 'MM/DD/YYYY': '##/##/####',\n 'M/D/YYYY': '#?/#?/####',\n 'MM/DD/YY': '##/##/##',\n 'M/D/YY': '#?/#?/##',\n 'MM/YY': '##/##',\n 'M/YY': '#?/##',\n 'DD/MM/YYYY': '##/##/####',\n 'D/M/YYYY': '#?/#?/####',\n 'DD/MM/YY': '##/##/##',\n 'D/M/YY': '#?/#?/##',\n 'MM-DD-YYYY': '##-##-####',\n 'M-D-YYYY': '#?-#?-####',\n 'MM-DD-YY': '##-##-##',\n 'M-D-YY': '#?-#?-##',\n 'MM-YY': '##-##',\n 'M-YY': '#?-##',\n 'DD-MM-YYYY': '##-##-####',\n 'D-M-YYYY': '#?-#?-####',\n 'DD-MM-YY': '##-##-##',\n 'D-M-YY': '#?-#?-##',\n};\n\nexport default function formatDate(value: string, format: string = 'MM/DD/YYYY') {\n const mask = dateFormats[format?.toUpperCase()] || dateFormats['MM/DD/YYYY'];\n\n const formattedValueObject = formatValue(value, mask);\n\n return {\n ...formattedValueObject,\n value: formattedValueObject.formattedValue,\n };\n}\n","import formatValue from './generic';\nimport { IFormatterValueObject } from '../q2-input-types';\n\ninterface FormattedCreditCardObject extends IFormatterValueObject {\n type: string;\n leftIcon: string;\n leftIconMuted: boolean;\n}\n\ntype Formatter = (value: string) => FormattedCreditCardObject;\n\nfunction format(value: string): FormattedCreditCardObject {\n // have a initial generic mask which then converts to specific mask\n const detectedType = formatCreditCard.detectCreditCardTypeFromValue(value);\n const formattedValueObject = creditCardFormatters[detectedType](value);\n\n if (value.length < 2 && detectedType === 'unknown') {\n formattedValueObject.leftIcon = 'card';\n }\n return formattedValueObject;\n}\n\nconst unknownFormatter: Formatter = function unknownFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'unknown',\n leftIcon: 'card-unknown',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst amexFormatter: Formatter = function amexFn(value) {\n const valueObject = formatValue(value, '#### ###### #####');\n\n return {\n ...valueObject,\n type: 'amex',\n leftIcon: 'card-amex-color',\n leftIconMuted: value.length < 15,\n };\n};\n\nconst discoverFormatter: Formatter = function discoverFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'discover',\n leftIcon: 'card-discover-color',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst masterCardFormatter: Formatter = function masterCardFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'masterCard',\n leftIcon: 'card-mastercard-color',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst visaFormatter: Formatter = function visaFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'visa',\n leftIcon: 'card-visa-color',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst dinersClubInternationalFormatter: Formatter = function dinersClub(value) {\n const valueObject = formatValue(value, '#### ###### ####');\n\n return {\n ...valueObject,\n type: 'dinersClub',\n leftIcon: 'card-dinersclub-color',\n leftIconMuted: value.length < 14,\n };\n};\n\nconst creditCardFormatters = {\n discover: discoverFormatter,\n amex: amexFormatter,\n masterCard: masterCardFormatter,\n visa: visaFormatter,\n dinersClub: dinersClubInternationalFormatter,\n unknown: unknownFormatter,\n};\n\n/* tslint:disable:cyclomatic-complexity */\nfunction detectCreditCardTypeFromValue(value: string): string {\n // use value and some algorithm from the internet to detect and return card type based on string\n // return string 'unknown' if algorithm cannot detect or returns a type that is not one of our 5 supported types\n const firstInt = parseInt(value.charAt(0));\n const secondInt = parseInt(value.charAt(1));\n\n switch (firstInt) {\n case 2:\n if (secondInt > 1 && secondInt < 8) {\n if (value.length >= 4) {\n const firstfour = parseInt(value.substr(0, 4));\n if (firstfour >= 2221 && firstfour < 2721) {\n return 'masterCard';\n }\n } else {\n return 'masterCard';\n }\n }\n break;\n case 3:\n if (secondInt === 4 || secondInt === 7) {\n return 'amex';\n }\n if (secondInt === 0) {\n if (value.length > 2) {\n const thirdInt = parseInt(value.charAt(2));\n if (thirdInt < 6 || thirdInt === 9) {\n return 'dinersClub';\n }\n } else {\n return 'dinersClub';\n }\n }\n if (secondInt === 6 || secondInt === 8 || secondInt === 9) {\n return 'dinersClub';\n }\n break;\n case 4:\n return 'visa';\n case 5:\n if (secondInt > 0 && secondInt < 6) {\n return 'masterCard';\n }\n break;\n case 6:\n if (secondInt === 0) {\n if (value.length > 3) {\n const firstfour = value.substr(0, 4);\n if (firstfour === '6011') {\n return 'discover';\n }\n } else {\n return 'discover';\n }\n }\n if (secondInt === 4) {\n if (value.length > 2) {\n const firstthree = parseInt(value.substr(0, 3));\n if (firstthree > 643) {\n return 'discover';\n }\n } else {\n return 'discover';\n }\n }\n if (secondInt === 5) {\n return 'discover';\n }\n if (secondInt === 2) {\n if (value.length > 5) {\n const firstsix = parseInt(value.substr(0, 6));\n if (firstsix >= 622126 && firstsix <= 622925) {\n return 'discover';\n }\n } else {\n return 'discover';\n }\n }\n break;\n default:\n return 'unknown';\n }\n return 'unknown';\n}\n/* tslint:enable:cyclomatic-complexity */\n\nconst formatCreditCard = {\n detectCreditCardTypeFromValue,\n format,\n amexFormatter,\n dinersClubInternationalFormatter,\n discoverFormatter,\n masterCardFormatter,\n visaFormatter,\n unknownFormatter,\n};\n\nexport default formatCreditCard;\n","@import '../../styles/host';\n@import '../../styles/functions';\n\n:host {\n --comp-default-input-margin: #{var-list(var-prefixer(input-margin-top), --app-scale-6x, 30px) 0\n var-list(var-prefixer(input-margin-bottom), --app-scale-6x, 30px)};\n display: block;\n margin: var-list(--tct-input-margin, --comp-default-input-margin);\n font-size: var-list(var-prefixer(input-font-size), --app-font-size, inherit);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.field-container,\n.input-container {\n position: relative;\n}\n.field-container {\n --comp-input-tween: #{var-list(var-prefixer(input-tween), --tct-tween-2, --app-tween-2, unquote('0.4s ease'))};\n\n &.is-small {\n .btn-clear {\n --tct-btn-icon-width: 20px;\n --tct-icon-size: 17px;\n }\n }\n}\n\nlabel {\n --comp-label-padding: #{var-list(\n --tct-input-label-padding,\n unquote(\n '0 #{var-list(var-prefixer(input-label-padding-right), 0)} 0 #{var-list(var-prefixer(input-label-padding-left), 0)}'\n )\n )};\n display: block;\n padding: var(--comp-label-padding);\n color: var-list(var-prefixer(input-label-font-color), inherit);\n font-size: var-list(var-prefixer(input-label-font-size), inherit);\n font-weight: var-list(var-prefixer(input-label-font-weight), 600);\n text-transform: var-list(var-prefixer(input-label-text-transform), none);\n letter-spacing: var-list(var-prefixer(input-label-letter-spacing), normal);\n transition: color var(--comp-input-tween);\n}\n\n.optional-tag {\n --comp-label-optional-margin: #{var-list(\n --tct-input-label-optional-margin,\n unquote(\n '0 0 0 #{var-list(var-prefixer(input-label-optional-margin-left), --tct-scale-1, --app-scale-1x, 5px)}'\n )\n )};\n margin: var(--comp-label-optional-margin);\n color: var-list(\n var-prefixer(input-label-optional-font-color),\n --t-textA,\n --t-a11y-gray-color,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(input-label-optional-font-size), --app-font-size-small, 12px);\n font-weight: var-list(var-prefixer(input-label-optional-font-weight), 400);\n}\n\n.count-tag {\n color: var-list(--tct-input-count-font-color, --t-textA, --t-a11y-gray-color, rgba(77, 77, 77, 0.77));\n font-size: var-list(--tct-input-count-font-size, --app-font-size-small, 12px);\n font-weight: var-list(--tct-input-count-font-weight, 400);\n text-align: right;\n width: var(--tct-input-count-width, auto);\n}\n\n.label-wrapper {\n --comp-label-margin: #{var-list(\n --tct-input-label-margin,\n unquote(\n '#{var-list(var-prefixer(input-label-margin-top), 0)} 0 #{var-list(var-prefixer(input-label-margin-bottom), --tct-scale-1, --app-scale-1x, 5px)}'\n )\n )};\n display: flex;\n gap: var-list(--tct-input-label-gap, --app-scale-2x, 10px);\n justify-content: space-between;\n align-items: end;\n margin: var(--comp-label-margin);\n line-height: var-list(var-prefixer(input-label-line-height), inherit);\n\n &:has(label.sr) {\n margin: 0;\n }\n}\n\n.input-container {\n --comp-input-background: #{var-list(--tct-input-background, var-prefixer(input-bg), --t-gray-14, #fcfcfd)};\n --comp-input-horizontal-gap: #{var-list(var-prefixer(input-horizontal-gap), 0)};\n --comp-input-border-top-left-radius: #{var-list(\n var-prefixer(input-border-top-left-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-top-right-radius: #{var-list(\n var-prefixer(input-border-top-right-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-bottom-right-radius: #{var-list(\n var-prefixer(input-border-bottom-right-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-bottom-left-radius: #{var-list(\n var-prefixer(input-border-bottom-left-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-radius: var(--comp-input-border-top-left-radius) var(--comp-input-border-top-right-radius)\n var(--comp-input-border-bottom-right-radius) var(--comp-input-border-bottom-left-radius);\n --comp-input-border-width: var(--tct-input-border-top-width, 1px) var(--tct-input-border-right-width, 1px)\n var(--tct-input-border-bottom-width, 1px) var(--tct-input-border-left-width, 1px);\n --comp-input-border-color: #{var-list(var-prefixer(input-border-color), --t-a11y-gray-color-AA, #404040)};\n --comp-input-prefix-clearance: calc(3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px));\n --comp-input-icon-clearance: 34px;\n --comp-input-min-height: #{var-list(var-prefixer(input-min-height), 44px)};\n --comp-input-max-height: #{var-list(var-prefixer(input-max-height))};\n\n --comp-input-hover-ring-color: #{var-list(var-prefixer(input-hover-ring-color))};\n --comp-input-hover-ring: #{0 0 0 2px var(--t-base), 0 0 0 4px var(--comp-input-hover-ring-color),\n var-list(var-prefixer(input-hover-box-shadow), unquote('0 0 transparent'))};\n\n background: var(--comp-input-background);\n display: flex;\n align-items: center;\n gap: var-list(--tct-input-container-gap, --app-scale-2x, 10px);\n padding-inline: var-list(--tct-input-container-padding-inline);\n border-width: var(--comp-input-border-width);\n border-style: solid;\n border-color: var(--comp-input-border-color);\n border-radius: var(--comp-input-border-radius);\n box-shadow: var-list(var-prefixer(input-box-shadow), none);\n transition:\n border-width var(--comp-input-tween),\n border-color var(--comp-input-tween),\n box-shadow var(--comp-input-tween);\n\n :host([disabled]:not([disabled='false'])) & {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(input-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n }\n\n .has-error & {\n border-color: var-list(--tct-input-error-border-color, --const-stoplight-alert, #d20a0a);\n background: var-list(--tct-input-error-background, --comp-input-background);\n box-shadow: var-list(--tct-input-error-box-shadow, --comp-input-hover-ring);\n }\n\n &:hover {\n border-color: var-list(--tct-input-hover-border-color, --comp-input-border-color);\n background: var-list(--tct-input-hover-background, --comp-input-background);\n box-shadow: var-list(--tct-input-hover-box-shadow, --comp-input-hover-ring);\n\n .has-error & {\n border-color: var-list(\n --tct-input-error-hover-border-color,\n --tct-input-error-border-color,\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(\n --tct-input-error-hover-background,\n --tct-input-error-background,\n --comp-input-background\n );\n box-shadow: var-list(\n --tct-input-error-hover-box-shadow,\n --tct-input-error-box-shadow,\n --comp-input-hover-ring\n );\n }\n }\n\n .has-focus & {\n border-color: var-list(var-prefixer(input-focus-border-color), --comp-input-border-color);\n background: var-list(--tct-input-focus-background, --comp-input-background);\n box-shadow: var-list(--tct-input-focus-box-shadow, --const-double-focus-ring);\n }\n\n .has-focus.has-error &,\n .has-focus.has-error &:hover {\n border-color: var-list(\n --tct-input-error-focus-border-color,\n --tct-input-error-border-color,\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(--tct-input-error-focus-background, --tct-input-error-background, --comp-input-background);\n box-shadow: var-list(\n --tct-input-error-focus-box-shadow,\n --tct-input-error-box-shadow,\n --const-double-focus-ring\n );\n }\n}\n\n.input-field {\n flex: 1;\n border: 0;\n -webkit-appearance: none;\n appearance: none;\n box-sizing: border-box;\n min-height: var(--comp-input-min-height);\n max-height: var(--comp-input-max-height);\n overflow-y: hidden;\n height: var-list(var-prefixer(input-height), 44px);\n width: 100%;\n padding: var(--tct-input-padding, 0);\n background: transparent;\n color: var-list(var-prefixer(input-font-color), --t-text, inherit);\n display: inline-block;\n text-align: var(--tct-input-align, 'start');\n font-weight: var-list(var-prefixer(input-font-weight), 400);\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n /* To remove up/down arrow in number field for webkit based browser */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* For Firefox */\n &[type='number'] {\n -moz-appearance: textfield;\n }\n\n &::-ms-clear {\n display: none;\n }\n\n &[type='search'] {\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n display: none;\n }\n }\n\n &[disabled]:not([disabled='false']) {\n cursor: not-allowed;\n }\n\n .right-aligned & {\n text-align: right;\n }\n\n &:is(input) {\n flex: 1;\n }\n\n &:is(button) {\n display: inline-flex;\n align-items: center;\n\n .has-custom-display & {\n height: auto;\n padding: 0;\n }\n\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n }\n }\n}\n\n.custom-display-container {\n max-width: 100%;\n\n .has-custom-display & {\n --comp-default-padding: var(--app-scale-2x, 10px) var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);\n padding: var-list(var-prefixer(input-padding), --comp-default-padding);\n width: 100%;\n }\n}\n\n.input-field::placeholder,\n.placeholder-text {\n color: var-list(var-prefixer(input-placeholder-font-color), --t-textA, --app-gray-d1, rgba(77, 77, 77, 0.77));\n}\n\n.pseudo-input-container {\n min-width: 0;\n flex: 1;\n}\n\n.input-icons-container-left,\n.input-icons-container-right {\n --tct-btn-icon-hover-background: var(--tct-input-btn-hover-background);\n --tct-btn-hover-background: var(--tct-input-btn-hover-background);\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--comp-input-horizontal-gap);\n\n > div:not(.vertical-separator) {\n min-width: var-list(--tct-input-icon-container-icon-min-width, 44px);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var-list(--tct-input-icon-container-font-size, inherit);\n }\n\n &:empty {\n display: var(--tct-input-icon-container-empty-display, block);\n }\n}\n\n.input-icons-container-left {\n padding-left: var(--comp-input-horizontal-gap);\n}\n\n.input-icons-container-right {\n padding-right: var(--comp-input-horizontal-gap);\n --comp-visibility-toggle-padding: 0px #{var-list(--app-scale-2x, 10px)};\n\n .btn-visibility-toggle {\n --tct-btn-height: var(--comp-input-min-height);\n --tct-btn-padding-inline: #{var-list(--tct-input-visibility-toggle-padding, --app-scale-2x, 10px)};\n --tct-btn-font-weight: #{var-list(--tct-input-visibility-toggle-font-weight, 400)};\n\n color: var-list(--tct-input-visibility-toggle-font-color, --t-primary, #0079c1);\n font-size: var-list(--tct-input-visibility-toggle-font-size, --app-font-size-small, 12px);\n }\n}\n\nq2-icon {\n margin-top: calc(#{var-list(var-prefixer(input-border-top-width), 1px)} / 2);\n margin-bottom: calc(#{var-list(var-prefixer(input-border-bottom-width), 1px)} / 2);\n pointer-events: none;\n color: var-list(var-prefixer(input-icon-stroke-primary), --t-a11y-gray-color, --t-textA, --app-gray, #747474);\n --tct-icon-stroke-primary: #{var-list(\n var-prefixer(input-icon-stroke-primary),\n --t-a11y-gray-color,\n --t-textA,\n --app-gray,\n #747474\n )};\n}\n\n.icon-left-muted {\n opacity: 0.5;\n}\n\n.input-prefix,\n.input-suffix {\n min-height: var(--comp-input-min-height);\n max-height: var(--comp-input-max-height);\n height: var-list(var-prefixer(input-height), 44px);\n font-size: var-list(var-prefixer(input-prefix-font-size), inherit);\n color: var-list(var-prefixer(input-prefix-font-color), inherit);\n background: var-list(\n --tct-input-prefix-background,\n var-prefixer(input-prefix-bg),\n --tct-input-background,\n var-prefixer(input-bg),\n var-prefixer(gray-14),\n #f2f2f2\n );\n transition:\n color var(--comp-input-tween),\n background var(--comp-input-tween);\n}\n\n.input-prefix {\n border-top-left-radius: calc(\n var(--comp-input-border-top-left-radius) - #{var-list(var-prefixer(input-border-top-width), 1px)} - #{var-list(\n var-prefixer(input-border-left-width),\n 1px\n )}\n );\n border-bottom-left-radius: calc(\n var(--comp-input-border-bottom-left-radius) - #{var-list(var-prefixer(input-border-bottom-width), 1px)} - #{var-list(\n var-prefixer(input-border-left-width),\n 1px\n )}\n );\n pointer-events: none; /* used to allow iOS voiceover to display keyboard in input TCT-1194 */\n}\n\n.input-suffix {\n border-top-right-radius: calc(\n var(--comp-input-border-top-right-radius) - #{var-list(var-prefixer(input-border-top-width), 1px)} - #{var-list(\n var-prefixer(input-border-right-width),\n 1px\n )}\n );\n border-bottom-right-radius: calc(\n var(--comp-input-border-bottom-right-radius) - #{var-list(var-prefixer(input-border-bottom-width), 1px)} - #{var-list(\n var-prefixer(input-border-right-width),\n 1px\n )}\n );\n}\n\n.icon-error {\n color: var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n --tct-icon-stroke-primary: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n}\n\n.messages-container {\n height: 0px;\n overflow: hidden;\n background: var-list(\n --tct-message-background,\n var-prefixer(message-bg),\n var-prefixer(gray-14),\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n box-shadow: var-list(\n var-prefixer(input-message-box-shadow),\n --tct-box-shadow-1,\n --app-shadow-1,\n unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\")\n );\n transition: height var-list(var-prefixer(input-messages-tween), --tct-tween-1, --app-tween-1, unquote('0.2s ease'));\n margin-top: var-list(--tct-input-messages-margin-top, 2px);\n z-index: var-list(--tct-input-messages-z-index, 5);\n position: absolute;\n width: 100%;\n color: var-list(var-prefixer(input-messages-font-color), inherit);\n\n // Sync up border radius with q2-message\n border-radius: var(--tct-message-border-radius, inherit);\n}\n\n.has-error label {\n color: var-list(var-prefixer(input-error-label-font-color), var-prefixer(input-label-font-color), inherit);\n}\n\n.has-error:not(.has-focus) .input-prefix,\n.has-error:not(.has-focus) .input-suffix {\n color: var-list(var-prefixer(input-error-prefix-font-color), inherit);\n background: var-list(\n --tct-input-error-prefix-background,\n var-prefixer(input-error-prefix-bg),\n --tct-input-background,\n var-prefixer(input-bg),\n var-prefixer(gray-14),\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n}\n\n.icon-left {\n width: 26px;\n height: 26px;\n}\n\n.vertical-separator {\n height: calc(var(--comp-input-min-height) - 2px);\n border-right-width: var(--tct-input-prefix-border-width, 1px);\n border-right-style: solid;\n border-right-color: var-list(\n var-prefixer(input-prefix-border-color),\n var-prefixer(input-border-color),\n --t-a11y-gray-color-AA,\n #404040\n );\n}\n","import {\n Component,\n Prop,\n Element,\n State,\n Event,\n EventEmitter,\n h,\n Watch,\n Listen,\n Fragment,\n Method,\n} from '@stencil/core';\nimport {\n createGuid,\n getAriaValueFromProp,\n labelDOM,\n loc,\n messagesDOM,\n setMessageHeight,\n handleAriaLabel,\n overrideFocus,\n isEventFromElement,\n isMobile,\n hasSlotContent,\n nextPaint,\n} from 'src/utils';\nimport { IFormatterValueObject, ICursorData, IEventDetail } from './q2-input-types';\nimport formatCurrency from './formatting/currency';\nimport formatPhoneNumber from './formatting/phone';\nimport formatSSN from './formatting/ssn';\nimport formatTIN from './formatting/tin';\nimport formatAlphanumeric from './formatting/alphanumeric';\nimport formatAlpha from './formatting/alpha';\nimport formatNumeric, { formatPercentage } from './formatting/numeric';\nimport formatPostalCode from './formatting/postal';\nimport formatDate from './formatting/date';\nimport formatCreditCard from './formatting/credit-card';\nimport { Q2Icon } from '../q2-icon/q2-icon';\nimport { Q2Badge } from '../q2-badge/q2-badge';\n\nconst inputTypeMap = {\n text: 'text',\n tel: 'tel',\n number: 'number',\n password: 'text',\n search: 'search',\n url: 'url',\n email: 'email',\n currency: 'text',\n phone: 'tel',\n ssn: 'text',\n alphanumeric: 'text',\n alpha: 'text',\n numeric: 'text',\n percentage: 'text',\n postal: 'text',\n date: 'text',\n 'credit-card': 'text',\n};\n\nexport type InputType = keyof typeof inputTypeMap;\n\n@Component({ tag: 'q2-input', shadow: true, styleUrl: 'q2-input.scss' })\nexport class Q2Input {\n // #region Own Properties\n\n guid = createGuid();\n inputRef: HTMLInputElement;\n isMobile: boolean = isMobile();\n mutationObserver: MutationObserver;\n resizeObserver: ResizeObserver;\n scheduledAfterRender: (() => void)[] = [];\n textSelectedForDeletion: boolean;\n valueOnFocus: string;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n checkSlotCount: number = 0;\n\n @State()\n formattedValueObject: IFormatterValueObject;\n\n @State()\n hasFocus: boolean;\n\n @State()\n isSmall: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Sets readonly to true on the input without adding the \"read only\" label.\n *\n * Can be used to prevent user input while still presenting the necessary information for assistive technology.\n * @private\n */\n @Prop({ mutable: true })\n _preventEntry: boolean = undefined;\n\n /**\n * Allows for correct semantics of q2-input element when aria-expanded.\n * @private\n * Defaults to undefined\n * Will assign role to combobox when used inside q2-select and q2-calendar.\n */\n @Prop({ mutable: true })\n _role: 'combobox' | undefined = undefined;\n\n @Prop()\n ariaActivedescendant: string;\n\n @Prop()\n ariaControls: string;\n\n @Prop()\n ariaExpanded: string;\n\n @Prop()\n ariaHaspopup: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n @Prop()\n ariaOwns: string;\n\n /**\n * The `autocapitalize` attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n * @info\n * This attribute only affects the behavior of input mechanisms like virtual keyboards on mobile devices and voice input.\n */\n @Prop({ reflect: true })\n autocapitalize: string;\n\n /**\n * The HTML autocomplete attribute lets web developers specify what permission (if any) the user agent has to provide automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n *\n * [See MDN for a list of supported values](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values).\n */\n @Prop({ reflect: true })\n autocomplete: string;\n\n /**\n * A string that indicates whether or not to activate automatic correction while the user is editing this field.\n * @warning\n * This is currently only supported in Safari.\n */\n @Prop({ reflect: true })\n autocorrect: 'on' | 'off';\n\n /**\n * Autofocus is enabled when the property is added to an element. To disable, remove attribute or set it to false.\n * If applied to multiple elements, the first one will receive focus.\n */\n @Prop({ reflect: true })\n autofocus: boolean;\n\n /** The color of the badge when in the active state. */\n @Prop({ reflect: true })\n badgeTheme: Q2Badge['theme'];\n\n /** Displays a `q2-badge` element on the right side of the input. */\n @Prop({ reflect: true })\n badgeValue: string;\n\n /** Renders an icon button when the field is non-empty. Pressing the button clears all input from the field. */\n @Prop({ reflect: true })\n clearable: boolean;\n\n /**\n * If provided a value, it sets the `aria-current` attribute on the inner input.\n * [See MDN for more information on aria-current](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n @Prop()\n current: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';\n\n /** Indicates the field cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /**\n * Each item in the `errors` array will appear below the input field when the field is focused.\n * @localizable\n */\n @Prop()\n errors: string[];\n\n /**\n * Defines the field's expected input format, and automatically masks user input to conform.\n * Specific types support different modifier options. See the section on Format Modifiers for all available options.\n */\n @Prop({ reflect: true })\n formatModifier: string;\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * When `true` and the input field has an active validation error, the field shows the error state without displaying associated error messages below the field (from the errors array above).\n * Primarily used for dropdown selects and date pickers whose controls appear below the input field (where the error messages, if displayed, would also appear).\n */\n @Prop({ reflect: true })\n hideMessages: boolean;\n\n /**\n * Each item in the `hints` array will appear below the input field when the field is focused.\n * @info\n * The `errors` array takes precedence over the `hints` array. If an input field has both hints and errors, only the errors will display.\n * Once all errors are resolved, the hints display the next time the field is focused.\n * @localizable\n */\n @Prop()\n hints: string[];\n\n /** Shows a left-aligned [q2-icon](https://tecton.q2developer.com/design-system/q2-icon/) within the field. */\n @Prop({ reflect: true })\n iconLeft: Q2Icon['type'];\n\n /** Shows a right-aligned [q2-icon](https://tecton.q2developer.com/design-system/q2-icon/) within the field. */\n @Prop({ reflect: true })\n iconRight: Q2Icon['type'];\n\n /**\n * The label that appears above the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * When present, it does not allow a value greater than `max` when the user uses the Up/Down arrow keys to change the value.\n * @info\n * Only applicable when `type=\"number\"`.\n */\n @Prop({ reflect: true })\n max: number;\n\n /**\n * Defines the maximum allowed input length in characters. Formatting characters (e.g. `.`, `-`, etc) are included in the `maxlength` comparison.\n * Make sure you account for them when setting the `maxlength` value. Input types that use masks have their own inherent `maxlength`.\n */\n @Prop({ reflect: true, mutable: true })\n maxlength: number;\n\n /**\n * When present, it does not allow a value less than the `min` when the user uses the Up/Down arrow keys to change the value.\n * @info\n * Only applicable when `type=\"number\"`.\n */\n @Prop({ reflect: true })\n min: number;\n\n /** Appends \"(optional)\" to the field label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /**\n * The pattern string of the input field, regular expression string is expected.\n * This allows us to check the validity user's input.\n * For instance,\n * &lt;q2-input label=\"My input\" pattern=\"[a-zA-Z0-9]{3,5}\" id=\"myInput\"&gt;\n *\n * - Allows only 3~5 alphanumeric letters\n *\n * In Javascript, you can check the validity object in your q2-input\n * Type \"abcdefgh\", then access the validity object\n * @snippet\n * const myInput = document.querySelector('#myInput');\n * console.log(myInput.validity);\n */\n @Prop({ reflect: true, mutable: true })\n pattern: string;\n\n /**\n * Text that appears within the field when it is blurred and empty.\n * Placeholder text disappears when the user focuses on the field and provides input.\n * @info\n * Primarily used for rare cases in which a visible form label is not expected (e.g., search fields).\n * @localizable\n */\n @Prop({ reflect: true })\n placeholder: string;\n\n /** Component will display as a clickable `<button>` styled to be identical to the default `<input>` field. */\n @Prop({ reflect: true })\n pseudo: boolean;\n\n /**\n * Appends \"(read only)\" to the field label, and field becomes unusable, but remains focusable.\n * Takes priority over `optional` if both are `true`.\n */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /**\n * Indicates the element's intended purpose to assistive technology.\n * @deprecated\n */\n @Prop()\n role: string;\n\n /**\n * Shows a character counter above the input field to track the number of characters currently in the field.\n * If `maxlength` is set, `showCount` displays the number of characters in relation the `maxlength` value.\n */\n @Prop({ reflect: true })\n showCount: boolean;\n\n /**\n * Displays a toggle button at the end of the input field which shows or hides the actual value.\n * @info\n * Only applicable when `type` is `text`, `password`, or `ssn`.\n */\n @Prop({ reflect: true })\n showVisibilityToggle: boolean = false;\n\n /**\n * When present, it jumps the value in incremens of `step` when the user uses the Up/Down arrow keys to change the value.\n * @info\n * Only applicable when `type=\"number\"`.\n */\n @Prop({ reflect: true })\n step: number;\n\n /**\n * Controls visibility of the value when the type is `text`, `password`, or `ssn`.\n * When the input type is `password`, it will default to `true`, hiding the text.\n */\n @Prop({ reflect: true, mutable: true })\n textHidden: boolean;\n\n /** Specifies the field's expeted [input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types), and provides the optimal keyboard on mobile devices. */\n @Prop({ reflect: true })\n type: InputType = 'text';\n\n @Prop({ reflect: true, mutable: true })\n validity: ValidityState;\n\n /**\n * The value of the input field.\n * @info\n * The visible value of formatted input fields may not match the element's `value` property.\n * When setting an input's value programmatically (e.g. pre-populating a form), ensure that the supplied value is in a format that can be handled by its consuming logic.\n * `q2-input` does not change its own `value` outside of its default change event handler.\n *\n * In `q2-input` where `type=\"currency\"`\n * - element.value = 1234.56\n * - visible value: $1,234.56\n *\n */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the field loses focus after the value has been changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<IEventDetail>;\n\n /**\n * Emitted when the field value is cleared.\n *\n * Requires the `clearable` prop to be set to `true`.\n */\n @Event()\n clear: EventEmitter<undefined>;\n\n /**\n * Emitted when the field value is formatted.\n */\n @Event()\n formatted: EventEmitter<IFormatterValueObject>;\n\n /**\n * Emitted when the field value is updated.\n * @legacyEvent\n */\n @Event()\n input: EventEmitter<IEventDetail>;\n\n /**\n * Emitted when the validation is updated.\n * @legacyEvent\n */\n @Event()\n invalid: EventEmitter<IEventDetail>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.manageClearableResizeObserver();\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n Object.defineProperty(this.hostElement, 'formattedValue', {\n get: () => this.formattedValueObject?.formattedValue ?? '',\n });\n\n handleAriaLabel(this);\n if (this.textHidden === undefined) {\n this.textHidden = this.type === 'password';\n }\n\n this.manageClearableResizeObserver(this.clearable);\n }\n\n componentDidLoad() {\n if (!this.pseudo) {\n this.inputField.value = this.formattedValueObject.formattedValue;\n }\n\n if (this.autofocus === true) {\n this.inputField.focus();\n }\n\n overrideFocus(this.hostElement);\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n }\n\n componentDidRender() {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n event.stopPropagation();\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.inputField.focus();\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates firing checkValidity on `<input>`, emits `invalid` event if validation failed.\n */\n @Method()\n checkValidity() {\n this.inputRef.checkValidity();\n this.validateInput();\n }\n\n /**\n * Emulates clicking the clear button when the input is clearable.\n *\n * @warning\n * Only applicable when the input is clearable.\n *\n * @testOnly\n */\n @Method()\n clearValue() {\n if (!this.clearable) return;\n this.onClearInput();\n }\n\n /**\n * Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.\n *\n * This method leaves the focus on the `<input>` and as a result does not trigger the `change` event. If you want\n * to trigger the` change` event, move the focus to another element after calling this method.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n const { inputField } = this;\n inputField.focus();\n inputField.dispatchEvent(new FocusEvent('focus'));\n inputField.value = value;\n inputField.dispatchEvent(new InputEvent('input'));\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n @Watch('clearable')\n manageClearableResizeObserver(clearable?: boolean) {\n const isSmallThreshold = 190;\n if (clearable) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(([entry]) => {\n this.isSmall = isSmallThreshold > entry.contentRect.width;\n });\n this.resizeObserver.observe(this.hostElement);\n } else {\n this.isSmall = false;\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n }\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('formatModifier')\n formatModifierObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('formattedValueObject')\n formattedValueObjectObserver() {\n this.formatted.emit(this.formattedValueObject);\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('type')\n typeObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('value')\n valueObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n // #endregion\n // #region Local Methods\n\n get ariaAttributes() {\n return {\n ariaOwns: getAriaValueFromProp(this.ariaOwns),\n ariaHaspopup: getAriaValueFromProp(this.ariaHaspopup, [\n 'true',\n 'false',\n 'menu',\n 'listbox',\n 'tree',\n 'grid',\n 'dialog',\n ]),\n ariaExpanded: getAriaValueFromProp(this.ariaExpanded, ['true', 'false']),\n ariaActivedescendant: getAriaValueFromProp(this.ariaActivedescendant),\n };\n }\n\n get canSetSelection(): boolean {\n // email and number type don't support setSelectionRange\n return !['email', 'number'].includes(this.computedType);\n }\n\n get clearClasses() {\n const classes = ['btn-clear'];\n if (!this.clearable || !(this.inputField?.value || this.value)) {\n classes.push('hidden');\n }\n return classes;\n }\n\n get computedAutocomplete() {\n // force off for currency type\n if (this.type === 'currency') return 'transaction-amount';\n return this.autocomplete || 'off';\n }\n\n get computedClassForIconLeft(): string | undefined {\n let className = 'icon-left';\n if (this.formattedValueObject.leftIconMuted) {\n className += ' icon-left-muted';\n }\n return className;\n }\n\n get computedIconLeft(): string | undefined {\n if (this.formattedValueObject.prefix) {\n return;\n }\n\n if (this.type === 'search') {\n return 'search';\n }\n\n if (this.formattedValueObject.leftIcon) {\n return this.formattedValueObject.leftIcon;\n }\n\n return this.iconLeft;\n }\n\n get computedType() {\n if (['password', 'text', 'ssn'].includes(this.type) && this.textHidden) {\n return 'password';\n } else {\n return (this.type && inputTypeMap[this.type]) || 'text';\n }\n }\n\n get hasCustomDisplaySlot() {\n return !!this.hostElement.querySelector('[slot=custom-display]');\n }\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get hasInputLeftSlot() {\n return hasSlotContent(this.hostElement, 'input-left');\n }\n\n get hasInputRightSlot() {\n return hasSlotContent(this.hostElement, 'input-right');\n }\n\n get inputDescribedBy() {\n return this.showMessages ? `${this.inputId}-description` : undefined;\n }\n\n get inputField() {\n return this.hostElement.shadowRoot.querySelector<HTMLInputElement>('.input-field');\n }\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get inputMode() {\n const inputModeMap = {\n currency: 'numeric',\n ssn: 'numeric',\n tin: 'numeric',\n numeric: 'decimal',\n percentage: 'decimal',\n postal: 'numeric',\n date: 'numeric',\n 'credit-card': 'numeric',\n };\n\n return (this.type && inputModeMap[this.type]) || undefined;\n }\n\n get isMaskedType(): boolean {\n const maskedTypes: string[] = [\n 'currency',\n 'phone',\n 'ssn',\n 'tin',\n 'alphanumeric',\n 'alpha',\n 'numeric',\n 'percentage',\n 'postal',\n 'date',\n 'credit-card',\n ];\n\n return maskedTypes.includes(this.type);\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get shouldCursorStartAtEnd() {\n return this.type === 'currency';\n }\n\n get shouldCursorStayAtEnd() {\n return this.isMobile && this.type === 'currency';\n }\n\n get showIconSeparator(): boolean {\n return this.type === 'credit-card' || !!this.formattedValueObject.prefix;\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n get stringValue(): string {\n return (this.value && String(this.value)) || '';\n }\n\n get visibilityToggleAriaLabel(): string {\n return `tecton.element.input.toggleAriaLabel.${this.textHidden ? 'show' : 'hide'}`;\n }\n\n get visibilityToggleText(): string {\n return loc(`tecton.element.input.toggle.${this.textHidden ? 'show' : 'hide'}`);\n }\n\n get wrapperClasses() {\n const classNames = ['field-container'];\n if (this.hasError) classNames.push('has-error');\n if (!!this.value) classNames.push('has-value');\n if (this.clearable && !!this.value) classNames.push('has-clear');\n if (this.hasFocus) classNames.push('has-focus');\n if (this.isSmall) classNames.push('is-small');\n if (this.formattedValueObject.prefix) classNames.push('has-prefix');\n if (this.computedIconLeft) classNames.push('has-icon-left');\n if (this.showIconSeparator) classNames.push('has-icon-separator');\n if (this.formattedValueObject.suffix) classNames.push('has-suffix');\n if (!this.formattedValueObject.suffix && this.iconRight) classNames.push('has-icon-right');\n if (this.type === 'currency') classNames.push('right-aligned');\n else classNames.push('left-aligned');\n if (this.hasCustomDisplaySlot) classNames.push('has-custom-display');\n\n return classNames.join(' ');\n }\n\n calculateCursorPositionOnFocus(): ICursorData {\n const { inputField } = this;\n const valueLength = inputField?.value?.length ?? 0;\n const startingPosition = inputField?.selectionStart ?? valueLength;\n\n return {\n startingPosition,\n valueLength,\n previousValueLength: valueLength,\n hasSelection: getSelection().toString().length > 0,\n };\n }\n\n calculateCursorPositionOnInput(): ICursorData {\n const input = this.inputField;\n const formattedLength = this.formattedValueObject.formattedValue.length;\n const currentValueLength = input.value.length;\n const defaultPosition = this.type === 'currency' ? formattedLength : 0;\n return {\n startingPosition: (input && input.selectionStart) || defaultPosition,\n valueLength: formattedLength,\n previousValueLength: input && currentValueLength,\n hasSelection: false,\n };\n }\n\n countDOM() {\n if (!this.showCount) return;\n const { maxlength, formattedValueObject } = this;\n\n return (\n <div class=\"count-tag\">\n {formattedValueObject.unformattedValue.length}\n {maxlength && `/${maxlength}`}\n </div>\n );\n }\n\n formatAndUpdateValueFromProp() {\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n if (!this.pseudo) {\n const setValue = () => {\n this.inputField.value = this.formattedValueObject.formattedValue;\n };\n\n this.inputField ? setValue() : this.scheduledAfterRender.push(() => setValue());\n }\n }\n\n getFormattedValue(value: string, valueChangedFromProperty: boolean): IFormatterValueObject {\n const formattingFunctions = {\n currency: formatCurrency,\n phone: formatPhoneNumber,\n ssn: formatSSN,\n tin: formatTIN,\n alphanumeric: formatAlphanumeric,\n alpha: formatAlpha,\n numeric: formatNumeric,\n percentage: formatPercentage,\n postal: formatPostalCode,\n date: formatDate,\n 'credit-card': formatCreditCard.format,\n };\n\n if (formattingFunctions[this.type]) {\n return formattingFunctions[this.type](value, this.formatModifier, valueChangedFromProperty);\n }\n\n return {\n value,\n formattedValue: value,\n fullyFormattedValue: value,\n formattingCharacterCount: 0,\n unformattedValue: value,\n };\n }\n\n handleCurrencyDeletion(event: InputEvent) {\n // Don't do anything if text was selected for deletion\n if (this.textSelectedForDeletion) {\n this.textSelectedForDeletion = false;\n return;\n }\n // We only care about \"Backspace\" and \"Delete\" events\n if (event.inputType !== 'deleteContentBackward' && event.inputType !== 'deleteContentForward') return;\n\n const input = event.target as HTMLInputElement;\n const cursorPosition = input.selectionStart;\n const { formattedValue } = this.formattedValueObject;\n\n if (cursorPosition === null) return;\n\n let cursorMap;\n switch (event.inputType) {\n case 'deleteContentBackward':\n const valueBeforeCursor = formattedValue.substring(0, cursorPosition + 1);\n const isPrevCharAlphaNum = /[a-zA-Z0-9]$/.test(valueBeforeCursor);\n cursorMap = {\n leftIndex: isPrevCharAlphaNum ? cursorPosition : cursorPosition - 1,\n rightIndex: isPrevCharAlphaNum ? cursorPosition + 1 : cursorPosition,\n afterCursorOffset: 0,\n newCursorOffset: 1,\n };\n break;\n case 'deleteContentForward':\n const valueAfterCursor = formattedValue.substring(cursorPosition);\n const isNextCharAlphaNum = /^[a-zA-Z0-9]/.test(valueAfterCursor);\n cursorMap = {\n leftIndex: isNextCharAlphaNum ? cursorPosition : cursorPosition + 1,\n rightIndex: isNextCharAlphaNum ? cursorPosition + 1 : cursorPosition + 2,\n afterCursorOffset: 1,\n newCursorOffset: 0,\n };\n break;\n default:\n return;\n }\n\n // Ensure the cursor doesn't move with a newly formatted value\n const newValue = [\n formattedValue.substring(0, cursorMap.leftIndex),\n formattedValue.substring(cursorMap.rightIndex),\n ].join('');\n const charactersAfterCursor = formattedValue.length - cursorPosition - cursorMap.afterCursorOffset;\n const newFormattedValue = this.getFormattedValue(newValue, false).formattedValue;\n const newCursorPosition = Math.max(\n newFormattedValue.length - charactersAfterCursor + cursorMap.newCursorOffset,\n 0\n );\n\n input.value = newFormattedValue;\n input.setSelectionRange(newCursorPosition, newCursorPosition);\n\n // This handles a runtime issue when a character is deleted from the beginning of the input\n if (newCursorPosition === 0) {\n nextPaint(() => input.setSelectionRange(newCursorPosition, newCursorPosition));\n }\n }\n\n /**\n * Sets textSelectedForDeletion to true if the user has selected text for deletion\n * This is used to prevent other logic from running when text is deleted\n */\n handleCurrencyKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Backspace' && event.key !== 'Delete') return;\n const inputElement = this.inputField;\n this.textSelectedForDeletion = inputElement.selectionStart !== inputElement.selectionEnd;\n };\n\n handleDataInput(newFormattedValue: IFormatterValueObject) {\n if (\n this.maxlength === undefined ||\n newFormattedValue.unformattedValue.length <= this.maxlength ||\n newFormattedValue.unformattedValue.length <= this.formattedValueObject.unformattedValue.length\n ) {\n this.formattedValueObject = newFormattedValue;\n } else if (this.maxlength) {\n newFormattedValue = this.getFormattedValue(\n newFormattedValue.unformattedValue.substring(0, this.maxlength),\n false\n );\n this.formattedValueObject = newFormattedValue;\n }\n this.handleValueAndCursor();\n }\n\n handleValueAndCursor = () => {\n // ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position\n const cursorPosition = this.calculateCursorPositionOnInput();\n // when type=number: returns only valid decimal on input event, should not update itself (e.g. typing \"1.\" )\n if (this.type !== 'number') this.inputField.value = this.formattedValueObject.formattedValue;\n this.input.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n if (!this.formattedValueObject.value) {\n this.clear.emit();\n }\n this.setCursorPosition(cursorPosition);\n };\n\n /* tslint:disable:cyclomatic-complexity */\n inputContainerDOM() {\n const { hasInputLeftSlot, hasInputRightSlot } = this;\n return (\n <div\n class=\"input-container\"\n tabindex={-1}\n test-id=\"inputContainer\"\n >\n <div class=\"input-icons-container-left\">\n {this.formattedValueObject.prefix && (\n <div class=\"input-prefix\">{this.formattedValueObject.prefix}</div>\n )}\n {this.computedIconLeft && (\n <div>\n <q2-icon\n type={this.computedIconLeft}\n class={this.computedClassForIconLeft}\n />\n </div>\n )}\n {hasInputLeftSlot && <slot name=\"input-left\" />}\n {this.showIconSeparator && <div class=\"vertical-separator\" />}\n {this.hasError && this.type === 'currency' && (\n <div\n test-id=\"divIconError\"\n onClick={this.onRefocusInput}\n >\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n </div>\n {this.pseudo ? this.pseudoInputDOM() : this.standardInputDOM()}\n <div class=\"input-icons-container-right\">\n <q2-btn\n class={this.clearClasses.join(' ')}\n ariaLabel={loc('tecton.element.input.clear', [this.label])}\n test-id=\"clearButton\"\n onClick={this.onClearInput}\n >\n <q2-icon\n type=\"close\"\n class=\"icon-clear\"\n />\n </q2-btn>\n {['password', 'text', 'ssn', 'tin'].includes(this.type) && this.showVisibilityToggle && (\n <q2-btn\n class=\"btn-visibility-toggle\"\n test-id=\"toggleVisibilityButton\"\n onClick={this.onToggleVisibility}\n label={loc(this.visibilityToggleAriaLabel, { label: this.label })}\n hide-label={true}\n >\n {this.visibilityToggleText}\n </q2-btn>\n )}\n {this.formattedValueObject.suffix && (\n <span class=\"input-suffix\">{this.formattedValueObject.suffix}</span>\n )}\n {this.badgeValue && (\n <q2-badge\n size=\"large\"\n theme={this.badgeTheme}\n >\n {this.badgeValue}\n </q2-badge>\n )}\n {this.hasError && this.type !== 'currency' && (\n <div\n test-id=\"divIconError\"\n onClick={this.onRefocusInput}\n >\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n {this.iconRight && !this.formattedValueObject.suffix && (\n <div>\n <q2-icon\n type={this.iconRight}\n class=\"icon-right\"\n />\n </div>\n )}\n {hasInputRightSlot && <slot name=\"input-right\" />}\n </div>\n </div>\n );\n }\n\n onClearInput = () => {\n const eventDetail = {\n value: '',\n formattedValue: '',\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n };\n this.input.emit(eventDetail);\n this.change.emit(eventDetail);\n this.clear.emit();\n this.inputField.focus();\n };\n\n onInputBlur = () => {\n this.hasFocus = false;\n setMessageHeight(this);\n if (this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onInputClick = () => {\n if (this.shouldCursorStayAtEnd) this.placeCursorAtEnd();\n };\n\n onInputFocus = () => {\n if (this.inputField.tagName === 'INPUT') {\n this.scheduledAfterRender.push(() =>\n this.shouldCursorStartAtEnd\n ? this.placeCursorAtEnd()\n : this.setCursorPosition(this.calculateCursorPositionOnFocus())\n );\n }\n this.hasFocus = true;\n setMessageHeight(this);\n this.valueOnFocus = this.value;\n };\n\n onInputInput = (event: InputEvent) => {\n event.stopPropagation();\n if (this.type === 'currency') this.handleCurrencyDeletion(event);\n const newFormattedValue = this.getFormattedValue((event.target as HTMLInputElement).value, false);\n this.handleDataInput(newFormattedValue);\n this.validateInput();\n };\n\n onInputKeydown = (event: KeyboardEvent) => {\n const keysThatMoveCursor = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];\n const { key } = event;\n\n if (this.type === 'currency') this.handleCurrencyKeydown(event);\n if (this.shouldCursorStayAtEnd && keysThatMoveCursor.includes(key)) event.preventDefault();\n if (key === 'Enter' && this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onInputPaste = (event: ClipboardEvent) => {\n if (this.type === 'currency') {\n const clipboardData = event.clipboardData.getData('text');\n const newFormattedValue = this.getFormattedValue(clipboardData, true);\n event.preventDefault();\n this.handleDataInput(newFormattedValue);\n }\n };\n\n onMutationObserved = () => {\n // Updating checkSlotCount to force re-render when slot content changes\n this.checkSlotCount = this.checkSlotCount + 1;\n };\n\n onRefocusInput = () => {\n if (this.showMessages) {\n this.inputField.focus();\n setMessageHeight(this);\n }\n };\n\n onToggleVisibility = () => {\n this.hostElement.dispatchEvent(new FocusEvent('focus'));\n this.textHidden = !this.textHidden;\n };\n\n placeCursorAtEnd() {\n const { inputField } = this;\n inputField.selectionStart = inputField.selectionEnd = inputField.value.length;\n }\n\n /* tslint:enable:cyclomatic-complexity */\n\n pseudoInputDOM() {\n const showPlaceholder = !this.value && !!this.placeholder;\n const { ariaOwns, ariaHaspopup, ariaExpanded, ariaActivedescendant } = this.ariaAttributes;\n\n return (\n <div class=\"pseudo-input-container\">\n <button\n class=\"input-field\"\n type=\"button\"\n id={this.inputId}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-owns={ariaOwns}\n aria-haspopup={ariaHaspopup}\n aria-expanded={ariaExpanded}\n aria-activedescendant={ariaActivedescendant}\n role={(this.role && `${this.role}`) || 'textbox'}\n disabled={!!this.disabled}\n test-id=\"q2InputInnerClearButton\"\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n >\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\">\n <span class={showPlaceholder ? 'placeholder-text' : ''}>\n {showPlaceholder ? this.placeholder : this.value}\n </span>\n </slot>\n </div>\n </button>\n </div>\n );\n }\n\n setCursorPosition(cursorData: ICursorData) {\n if (this.canSetSelection && !cursorData.hasSelection) {\n const input = this.inputField;\n const { valueLength, previousValueLength, startingPosition } = cursorData;\n\n if (this.type === 'currency') {\n if (previousValueLength - valueLength === 1) {\n input.setSelectionRange(startingPosition - 1, startingPosition - 1);\n } else {\n const difference = previousValueLength - valueLength;\n input.setSelectionRange(startingPosition - difference, startingPosition - difference);\n }\n }\n\n if (this.type !== 'currency') {\n const difference = valueLength - previousValueLength;\n // Never allow the cursor to move in reverse\n const newPosition = startingPosition + (difference > 0 ? difference : 0);\n input.setSelectionRange(newPosition, newPosition);\n }\n }\n }\n\n /* tslint:enable:cyclomatic-complexity */\n\n /* tslint:disable:cyclomatic-complexity */\n standardInputDOM() {\n const { hasCustomDisplaySlot } = this;\n const inputClasses = ['input-field'];\n const { ariaOwns, ariaHaspopup, ariaExpanded, ariaActivedescendant } = this.ariaAttributes;\n if (hasCustomDisplaySlot) inputClasses.push('sr');\n return (\n <Fragment>\n {hasCustomDisplaySlot && (\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\"></slot>\n </div>\n )}\n <input\n ref={el => (this.inputRef = el)}\n class={inputClasses.join(' ')}\n id={this.inputId}\n type={this.computedType}\n size={this.formattedValueObject.prefix ? 10 : undefined}\n max={this.max}\n min={this.min}\n step={this.step}\n aria-current={this.current || undefined}\n aria-describedby={this.inputDescribedBy}\n aria-required={`${!this.optional}`}\n aria-invalid={`${this.hasError}`}\n aria-owns={ariaOwns}\n aria-haspopup={ariaHaspopup}\n aria-expanded={ariaExpanded}\n aria-activedescendant={ariaActivedescendant}\n autocomplete={this.computedAutocomplete}\n autocapitalize={this.autocapitalize}\n autocorrect={this.autocorrect === 'on' ? 'on' : 'off'}\n autofocus={this.autofocus}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n role={this._role}\n test-id=\"inputField\"\n readonly={this.readonly || this._preventEntry}\n disabled={!!this.disabled}\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n onClick={this.onInputClick}\n onKeyDown={this.onInputKeydown}\n onInput={this.onInputInput}\n onPaste={this.onInputPaste}\n inputmode={this.inputMode}\n pattern={this.pattern || undefined}\n />\n </Fragment>\n );\n }\n\n validateInput = () => {\n this.validity = this.inputRef?.validity;\n if (this.validity?.valid === false) {\n this.invalid.emit();\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n <div class=\"label-wrapper\">\n {labelDOM(this)}\n {this.countDOM()}\n </div>\n {this.inputContainerDOM()}\n {messagesDOM(this)}\n </div>\n );\n }\n\n // #endregion\n}\n"],"mappings":"2KAEwBA,EACpBC,EAAc,GACdC,EAAqC,CACjCC,OAAQ,GACRC,OAAQ,GACRC,SAAU,EACVC,iBAAkB,IAClBC,mBAAoB,GACpBC,aAAc,MACdC,cAAe,MAEnBC,EAAoB,OAEpB,MAAMC,EAAaV,EAAI,KAAO,IAE9B,IAAIW,EAAQX,EAEZ,MAAMO,IAAiBN,EAAQM,gBAAkBN,EAAQG,SAEzD,GAAIK,EAAU,CACV,MAAMG,EAAcD,EAAME,QAAQ,UAAW,IAC7CF,EAASC,GAAeE,OAAOF,GAAaG,QAAQR,EAAeN,EAAQG,SAAW,IAAO,E,CAGjGO,EAAQA,EAAME,QAAQ,SAAU,IAEhC,IAAIG,cAAEA,EAAaC,cAAEA,GAAkBC,EAAWP,EAAOJ,EAAcN,EAAQG,UAG/E,IAAIC,EAAmBJ,EAAQI,iBAC/B,IAAKE,EAAc,CACfF,EAAmB,GACnBY,EAAgB,E,CAIpB,MAAME,EAAiBlB,EAAQO,eAAiBE,EAAa,IAAM,GAEnEC,EAAQ,GAAGQ,IAAiBH,IAAgBX,IAAmBY,IAG/DD,EAAgBA,EAAcH,QAAQ,wBAAyBZ,EAAQK,oBAEvE,MAAMc,EACFD,GAAkBH,EAAgB,GAAGG,IAAiBH,IAAgBX,IAAmBY,IAAkB,GAE/G,MAAMI,EACFF,GAAkBH,EACZ,GAAGG,IAAiBlB,EAAQC,SAASc,IAAgBX,IAAmBY,IAAgBhB,EAAQE,SAChG,GAEV,IAAImB,EAA2BF,EAAeG,OAASZ,EAAMY,OAE7D,GAA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","suffix","decimals","decimalSeparator","thousandsSeparator","allowDecimal","allowNegative","explicit","isNegative","value","parsedValue","replace","Number","toFixed","integerString","decimalString","splitValue","negativeSymbol","formattedValue","fullyFormattedValue","formattingCharacterCount","length","maxlength","MAX_SAFE_INTEGER","toString","unformattedValue","splitIndex","substring","padStart","formatValue","mask","trim","generateMask","minFormattedLength","getMinimumFormattedLength","optionalValidatingChars","isOptionalValidatingChar","character","includes","knownValidatingChars","isKnownValidatingChar","getStaticFormattingChars","knownChars","join","formattingChars","RegExp","split","Set","isStaticFormattingChar","has","getValidatedChar","char","matcher","toUpperCase","maskArray","currentValueIndex","reduce","acc","getNextNonFormattingCharIndex","validChar","currencyFormats","AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SKK","SLL","SOS","SRD","STN","SVC","SYP","SZL","THB","TJS","TMM","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWD","formatCurrency","currencyCode","processedCurrencyCode","currencyFormat","Object","assign","phoneNumberFormats","AF","AL","DZ","AD","AO","AI","AG","AR","AM","AQ","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BR","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CO","KM","CD","CG","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","TL","EC","EG","SV","GQ","EE","ET","FK","FO","FJ","FI","FR","GF","PF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HK","HN","HT","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KR","KW","KG","LA","LV","LB","LS","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MU","MX","MD","MC","MN","MS","MA","MZ","MM","NA","NP","NL","AN","NC","NZ","NI","NE","NG","MP","NO","OM","PK","PW","PA","PG","PE","PH","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","VC","ST","SA","SN","SC","SL","SG","SK","SI","SB","ZA","ES","LK","SD","SR","SZ","SE","CH","SY","TJ","TZ","TH","TG","TT","TN","TR","TM","TC","UG","UA","AE","GB","UY","UZ","VE","VN","VG","VI","YE","ZM","ZW","AC","ME","PS","RS","TW","CW","US","formatPhoneNumber","isoCode","formatSSN","formatTIN","formatAlphanumeric","formatAlpha","modifier","getNumberFormat","formatOptions","numberFormat","formatParts","match","formatNumeric","formatPercentage","undefined","postalCodeFormats","AS","CX","CC","GG","GS","IM","JE","XK","LR","YT","FM","NF","PY","PM","PN","WS","SM","SO","SJ","YU","WF","formatPostalCode","dateFormats","formatDate","format","formattedValueObject","detectedType","formatCreditCard","detectCreditCardTypeFromValue","creditCardFormatters","leftIcon","unknownFormatter","unknownFn","valueObject","type","leftIconMuted","amexFormatter","amexFn","discoverFormatter","discoverFn","masterCardFormatter","masterCardFn","visaFormatter","visaFn","dinersClubInternationalFormatter","dinersClub","discover","amex","masterCard","visa","unknown","firstInt","parseInt","charAt","secondInt","firstfour","substr","thirdInt","firstthree","firstsix","q2InputCss","Q2InputStyle0","inputTypeMap","text","tel","number","password","search","url","email","currency","phone","ssn","alphanumeric","alpha","numeric","percentage","postal","date","Q2Input","this","guid","createGuid","isMobile","scheduledAfterRender","handleCurrencyKeydown","event","key","inputElement","inputField","textSelectedForDeletion","selectionStart","selectionEnd","handleValueAndCursor","cursorPosition","calculateCursorPositionOnInput","input","emit","clear","setCursorPosition","onClearInput","eventDetail","change","focus","onInputBlur","hasFocus","setMessageHeight","valueOnFocus","onInputClick","shouldCursorStayAtEnd","placeCursorAtEnd","onInputFocus","tagName","push","shouldCursorStartAtEnd","calculateCursorPositionOnFocus","onInputInput","stopPropagation","handleCurrencyDeletion","newFormattedValue","getFormattedValue","target","handleDataInput","validateInput","onInputKeydown","keysThatMoveCursor","preventDefault","onInputPaste","clipboardData","getData","onMutationObserved","checkSlotCount","onRefocusInput","showMessages","onToggleVisibility","hostElement","dispatchEvent","FocusEvent","textHidden","validity","_a","inputRef","_b","valid","invalid","disconnectedCallback","manageClearableResizeObserver","mutationObserver","disconnect","componentWillLoad","isNaN","stringValue","defineProperty","get","handleAriaLabel","clearable","componentDidLoad","pseudo","autofocus","overrideFocus","observer","MutationObserver","observe","childList","componentDidRender","forEach","fn","onHostElementChange","onchange","detail","onHostElementFocus","isEventFromElement","checkValidity","clearValue","setValue","InputEvent","ariaLabelObserver","isSmallThreshold","resizeObserver","ResizeObserver","entry","isSmall","contentRect","width","unobserve","errorsObserver","formatModifierObserver","formatAndUpdateValueFromProp","formattedValueObjectObserver","formatted","hintsObserver","typeObserver","valueObserver","ariaAttributes","ariaOwns","getAriaValueFromProp","ariaHaspopup","ariaExpanded","ariaActivedescendant","canSetSelection","computedType","clearClasses","classes","computedAutocomplete","autocomplete","computedClassForIconLeft","className","computedIconLeft","iconLeft","hasCustomDisplaySlot","querySelector","hasError","Array","isArray","errors","hasInputLeftSlot","hasSlotContent","hasInputRightSlot","inputDescribedBy","inputId","shadowRoot","inputMode","inputModeMap","tin","isMaskedType","maskedTypes","messages","hints","showIconSeparator","hideMessages","String","visibilityToggleAriaLabel","visibilityToggleText","loc","wrapperClasses","classNames","iconRight","valueLength","startingPosition","_c","previousValueLength","hasSelection","getSelection","formattedLength","currentValueLength","defaultPosition","countDOM","showCount","h","class","valueChangedFromProperty","formattingFunctions","formatModifier","inputType","cursorMap","valueBeforeCursor","isPrevCharAlphaNum","test","leftIndex","rightIndex","afterCursorOffset","newCursorOffset","valueAfterCursor","isNextCharAlphaNum","newValue","charactersAfterCursor","newCursorPosition","Math","max","setSelectionRange","nextPaint","inputContainerDOM","tabindex","name","onClick","pseudoInputDOM","standardInputDOM","ariaLabel","label","showVisibilityToggle","badgeValue","size","theme","badgeTheme","showPlaceholder","placeholder","id","role","disabled","onFocus","onBlur","cursorData","difference","newPosition","inputClasses","Fragment","ref","el","min","step","current","optional","autocapitalize","autocorrect","_role","readonly","_preventEntry","onKeyDown","onInput","onPaste","inputmode","pattern","render","labelDOM","messagesDOM"],"sources":["src/components/q2-input/formatting/number.ts","src/components/q2-input/formatting/generic.ts","src/components/q2-input/formatting/currency.ts","src/components/q2-input/formatting/phone.ts","src/components/q2-input/formatting/ssn.ts","src/components/q2-input/formatting/tin.ts","src/components/q2-input/formatting/alphanumeric.ts","src/components/q2-input/formatting/alpha.ts","src/components/q2-input/formatting/numeric.ts","src/components/q2-input/formatting/postal.ts","src/components/q2-input/formatting/date.ts","src/components/q2-input/formatting/credit-card.ts","src/components/q2-input/q2-input.scss?tag=q2-input&encapsulation=shadow","src/components/q2-input/q2-input.tsx"],"sourcesContent":["import { IFormatterValueObject, INumberInputFormatOptions } from '../q2-input-types';\n\nexport default function formatNumber(\n val: string = '',\n options: INumberInputFormatOptions = {\n prefix: '',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: '',\n allowDecimal: false,\n allowNegative: true,\n },\n explicit: boolean = false\n): IFormatterValueObject {\n const isNegative = val[0] === '-';\n\n let value = val;\n\n const allowDecimal = !!options.allowDecimal && !!options.decimals;\n\n if (explicit) {\n const parsedValue = value.replace(/[^\\d.]/g, '');\n value = (parsedValue && Number(parsedValue).toFixed(allowDecimal ? options.decimals : 0)) || '';\n }\n\n value = value.replace(/[^\\d]/g, '');\n\n let { integerString, decimalString } = splitValue(value, allowDecimal, options.decimals);\n\n // define decimalString\n let decimalSeparator = options.decimalSeparator;\n if (!allowDecimal) {\n decimalSeparator = '';\n decimalString = '';\n }\n\n // define negative\n const negativeSymbol = options.allowNegative && isNegative ? '-' : '';\n\n value = `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}`;\n\n // format integerString\n integerString = integerString.replace(/\\B(?=(\\d{3})+(?!\\d))/g, options.thousandsSeparator);\n\n const formattedValue: string =\n negativeSymbol || integerString ? `${negativeSymbol}${integerString}${decimalSeparator}${decimalString}` : '';\n\n const fullyFormattedValue: string =\n negativeSymbol || integerString\n ? `${negativeSymbol}${options.prefix}${integerString}${decimalSeparator}${decimalString}${options.suffix}`\n : '';\n\n let formattingCharacterCount = formattedValue.length - value.length;\n\n if (decimalSeparator) {\n formattingCharacterCount = formattingCharacterCount + options.decimalSeparator.length;\n }\n\n const prefix = options.prefix || options.suffix;\n const maxlength = Number.MAX_SAFE_INTEGER.toString().length + formattingCharacterCount + decimalString.length;\n\n const unformattedValue = `${integerString.replace(/[^0-9]/g, '')}${decimalString}`.replace(/^0+/, '');\n\n return {\n value,\n formattedValue,\n fullyFormattedValue,\n prefix,\n suffix: '',\n formattingCharacterCount,\n maxlength,\n unformattedValue,\n };\n}\n\nfunction splitValue(\n value: string,\n allowDecimal: boolean = false,\n decimals: number\n): { integerString: string; decimalString: string } {\n if (!allowDecimal) {\n return {\n integerString: value,\n decimalString: '',\n };\n }\n\n const splitIndex = value.length - decimals;\n\n let integerString = value.substring(0, splitIndex).padStart(1, '0');\n if (integerString.length > 1 && integerString[0] === '0') {\n integerString = integerString.substring(1);\n }\n\n const decimalString = value.substring(splitIndex).padStart(decimals, '0');\n\n return {\n integerString,\n decimalString,\n };\n}\n","import { IFormatterValueObject } from '../q2-input-types';\n\nexport default function formatValue(\n value: string = '',\n mask: string = '',\n options?: {\n prefix?: string;\n suffix?: string;\n }\n): IFormatterValueObject {\n const prefix = (options && options.prefix) || '';\n const suffix = (options && options.suffix) || '';\n\n if (!value || !mask) {\n const fullyFormattedValue = `${prefix}${value}${suffix}`;\n return {\n value,\n formattedValue: value,\n fullyFormattedValue,\n prefix: prefix.trim() || suffix.trim(),\n formattingCharacterCount: 0,\n unformattedValue: value,\n };\n }\n\n const { unformattedValue, formattedValue, formattingCharacterCount } = generateMask(value, mask);\n\n const fullyFormattedValue = `${prefix}${formattedValue}${suffix}`;\n const maxlength = mask.length;\n const minFormattedLength = getMinimumFormattedLength(mask, prefix, suffix);\n\n return {\n value: unformattedValue,\n formattedValue,\n fullyFormattedValue,\n prefix: prefix.trim() || suffix.trim(),\n formattingCharacterCount,\n maxlength,\n minFormattedLength,\n unformattedValue,\n };\n}\n\nconst optionalValidatingChars = ['?'];\nfunction isOptionalValidatingChar(character: string): boolean {\n return optionalValidatingChars.includes(character);\n}\n\nconst knownValidatingChars = ['#', '@', '*', ...optionalValidatingChars];\nfunction isKnownValidatingChar(character: string): boolean {\n return knownValidatingChars.includes(character);\n}\n\nfunction getStaticFormattingChars(mask: string): Set<string> {\n const knownChars = knownValidatingChars.join('|');\n const formattingChars = mask.replace(new RegExp(`[${knownChars}]`, 'g'), '').split('');\n return new Set(formattingChars);\n}\n\nfunction isStaticFormattingChar(character: string, formattingChars: Set<string>): boolean {\n return formattingChars.has(character);\n}\n\nfunction getValidatedChar(char: string, matcher: string) {\n switch (matcher) {\n case '#':\n char = char.replace(/[^\\d]/g, '');\n break;\n case '@':\n char = char.toUpperCase().replace(/[^A-Z]+/g, ''); // allows only upper case\n break;\n case '*':\n char = char.toUpperCase().replace(/[^\\dA-Z]+/g, '');\n break;\n case '?':\n char = char.replace(/[^\\d]/g, '');\n break;\n default:\n return char;\n }\n return char;\n}\n\nfunction generateMask(value: string, mask: string) {\n const maskArray = mask.split('');\n const formattingChars = getStaticFormattingChars(mask);\n let currentValueIndex: number = 0;\n let formattingCharacterCount: number = 0;\n let unformattedValue: string = '';\n\n const formattedValue = maskArray.reduce((acc: string, character: string) => {\n if (currentValueIndex >= value.length) {\n return acc;\n }\n\n if (isOptionalValidatingChar(character) && isStaticFormattingChar(value[currentValueIndex], formattingChars)) {\n return acc;\n }\n\n if (isKnownValidatingChar(character)) {\n // Step value index if formatting character pushed out of place by user input\n currentValueIndex = getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars);\n\n if (currentValueIndex >= value.length) {\n return acc;\n }\n\n const validChar = getValidatedChar(value[currentValueIndex], character);\n acc += validChar;\n unformattedValue += validChar;\n currentValueIndex++;\n } else {\n // Static formatting characters added directly to formatted string\n acc += character;\n formattingCharacterCount++;\n\n if (character === value[currentValueIndex]) {\n // Continue to walk value if next value at this index matches formatting character\n currentValueIndex++;\n }\n }\n\n return acc;\n }, '');\n\n return {\n unformattedValue,\n formattedValue,\n formattingCharacterCount,\n };\n}\n\nfunction getNextNonFormattingCharIndex(value: string, currentValueIndex: number, formattingChars: Set<string>): number {\n if (isStaticFormattingChar(value[currentValueIndex], formattingChars)) {\n currentValueIndex++;\n return getNextNonFormattingCharIndex(value, currentValueIndex, formattingChars);\n }\n\n return currentValueIndex;\n}\n\nfunction getMinimumFormattedLength(mask: string, prefix: string, suffix: string): number {\n return (\n mask.replace(new RegExp(`[${optionalValidatingChars.join('|')}]`, 'g'), '').length +\n prefix.length +\n suffix.length\n );\n}\n","import formatNumber from './number';\nimport formatValue from './generic';\nimport { IFormatterValueObject, INumberInputFormatOptions } from '../q2-input-types';\n\n// decimal data source: http://www.iso.org/iso/home/standards/currency_codes.htm 09/Nov/2016\nexport const currencyFormats = {\n AED: {\n prefix: '',\n suffix: 'د.إ',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.إ'\n AFN: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n ALL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n AMD: {\n prefix: 'դր.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'դր.9,999.99'\n ANG: {\n prefix: 'ƒ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ƒ9,999.99'\n AOA: {\n prefix: 'Kz',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Kz9,999.99'\n ARS: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n AUD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n AWG: {\n prefix: 'ƒ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ƒ9,999.99'\n AZN: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n BAM: {\n prefix: 'КМ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'КМ9,999.99'\n BBD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BDT: {\n prefix: '৳',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '৳9,999.99'\n BGN: {\n prefix: '৳',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '৳9,999.99'\n BHD: {\n prefix: '',\n suffix: 'ب.د',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ب.د'\n BIF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n BMD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BND: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BOB: {\n prefix: 'Bs.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Bs.9,999.99'\n BRL: {\n prefix: 'R$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'R$9,999.99'\n BSD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n BTN: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n BWP: {\n prefix: 'P',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'P9,999.99'\n BYN: {\n prefix: 'Br',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Br9,999'\n BZD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CAD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CDF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999.99'\n CHF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999.99'\n CLF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 4,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9.999.9999'\n CLP: {\n prefix: '$',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999'\n CNY: {\n prefix: '¥',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¥9,999.99'\n COP: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CRC: {\n prefix: '₡',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₡9,999.99'\n CUC: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CUP: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n CVE: {\n prefix: '$',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999'\n CZK: {\n prefix: 'Kč',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Kč9,999.99'\n DJF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n DKK: {\n prefix: 'kr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999.99'\n DOP: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n DZD: {\n prefix: '',\n suffix: 'د.ج',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.ج'\n EEK: {\n prefix: 'KR',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'KR9,999.99'\n EGP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n ERN: {\n prefix: 'Nfk',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Nfk9,999.99'\n ETB: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n EUR: {\n prefix: '€',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '€9,999.99'\n FJD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n FKP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n GBP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n GEL: {\n prefix: 'ლ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ლ9,999.99'\n GHS: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n GIP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n GMD: {\n prefix: 'D',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'D9,999.99'\n GNF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n GTQ: {\n prefix: 'Q',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Q9,999.99'\n GYD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n HKD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.9'\n HNL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n HRK: {\n prefix: 'kn',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kn9,999.99'\n HTG: {\n prefix: 'G',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'G9,999.99'\n HUF: {\n prefix: 'Ft',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Ft9,999.99'\n IDR: {\n prefix: 'Rs',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Rs9,999.99'\n ILS: {\n prefix: '₪',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₪9,999.99'\n INR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n IQD: {\n prefix: '',\n suffix: 'ع.د',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ع.د'\n IRR: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n ISK: {\n prefix: 'kr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999'\n JMD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n JOD: {\n prefix: '',\n suffix: 'د.ا',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.ا'\n JPY: {\n prefix: '¥',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¥9,999'\n KES: {\n prefix: 'Sh',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999.99'\n KGS: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n KHR: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n KMF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n KPW: {\n prefix: '₩',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₩9,999.99'\n KRW: {\n prefix: '₩',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₩9,999.99'\n KWD: {\n prefix: 'د.ك',\n suffix: '',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999د.ك'\n KYD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n KZT: {\n prefix: '〒',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '〒9,999.99'\n LAK: {\n prefix: '₭',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₭9,999.99'\n LBP: {\n prefix: '',\n suffix: 'ل.ل',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ل.ل9,999.99'\n LKR: {\n prefix: 'Rs',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Rs9,999.99'\n LRD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n LSL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n LTL: {\n prefix: 'Lt',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Lt9,999.99'\n LVL: {\n prefix: 'Ls',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Ls9,999.99'\n LYD: {\n prefix: '',\n suffix: 'ل.د',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ل.د'\n MAD: {\n prefix: '',\n suffix: 'د.م.',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99د.م.'\n MDL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n MGA: {\n prefix: '¤',\n suffix: '',\n decimals: 1,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.9'\n MKD: {\n prefix: 'ден',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ден9,999.99'\n MMK: {\n prefix: 'K',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'K9,999.99'\n MNT: {\n prefix: '₮',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₮9,999.99'\n MOP: {\n prefix: 'P',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'P9,999.99'\n MRU: {\n prefix: 'UM',\n suffix: '',\n decimals: 1,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'UM9,999.9'\n MUR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n MVR: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n MWK: {\n prefix: 'MK',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'MK9,999.99'\n MXN: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n MYR: {\n prefix: 'RM',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'RM9,999.99'\n MZN: {\n prefix: 'MTn',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'MTn9,999.99'\n NAD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n NGN: {\n prefix: '₦',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₦9,999.99'\n NIO: {\n prefix: 'C$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'C$9,999.99'\n NOK: {\n prefix: 'kr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999.99'\n NPR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n NZD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n OMR: {\n prefix: '',\n suffix: 'ر.ع.',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999ر.ع.'\n PAB: {\n prefix: 'B/.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'B/.9,999.99'\n PEN: {\n prefix: 'S/.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'S/.9,999.99'\n PGK: {\n prefix: 'K',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'K9,999.99'\n PHP: {\n prefix: 'p',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'p9,999.99'\n PKR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n PLN: {\n prefix: 'zł',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'zł9,999.99'\n PYG: {\n prefix: '¤',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999'\n QAR: {\n prefix: '',\n suffix: 'ر.ق',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99ر.ق'\n RON: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n RSD: {\n prefix: 'дин.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'дин.9,999.99'\n RUB: {\n prefix: 'руб.',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'руб.9,999.99'\n RWF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n SAR: {\n prefix: '',\n suffix: 'ر.س',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.99ر.س'\n SBD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n SCR: {\n prefix: '₨',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₨9,999.99'\n SDG: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n SEK: {\n prefix: 'kr',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'kr9,999.99'\n SGD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n SHP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n SKK: {\n prefix: 'Sk',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sk9,999.99'\n SLL: {\n prefix: 'Le',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Le9,999.99'\n SOS: {\n prefix: 'Sh',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999.99'\n SRD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n STN: {\n prefix: 'Db',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Db9,999.99'\n SVC: {\n prefix: '₡',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₡9,999.99'\n SYP: {\n prefix: '£',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '£9,999.99'\n SZL: {\n prefix: 'L',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'L9,999.99'\n THB: {\n prefix: '฿',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '฿9,999.99'\n TJS: {\n prefix: 'ЅМ',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ЅМ9,999.99'\n TMM: {\n prefix: 'm',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'm9,999.99'\n TND: {\n prefix: '',\n suffix: 'د.ت',\n decimals: 3,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '9,999.999د.ت'\n TOP: {\n prefix: 'T$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'T$9,999.99'\n TRY: {\n prefix: 'YTL',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'YTL9,999.99'\n TTD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n TWD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n TZS: {\n prefix: 'Sh',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999.99'\n UAH: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n UGX: {\n prefix: 'Sh',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Sh9,999'\n USD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n UYU: {\n prefix: '$',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999'\n UZS: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n VEF: {\n prefix: 'Bs F',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Bs F9,999.99'\n VND: {\n prefix: '₫',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '₫9,999'\n VUV: {\n prefix: 'Vt',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Vt9,999'\n WST: {\n prefix: 'T',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'T9,999.99'\n XAF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n XCD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n XOF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n XPF: {\n prefix: 'Fr',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'Fr9,999'\n YER: {\n prefix: '¤',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '¤9,999.99'\n ZAR: {\n prefix: 'R',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'R9,999.99'\n ZMW: {\n prefix: 'ZK',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // 'ZK9,999.99'\n ZWD: {\n prefix: '$',\n suffix: '',\n decimals: 2,\n decimalSeparator: '.',\n thousandsSeparator: ',',\n }, // '$9,999.99'\n};\n\nexport default function formatCurrency(\n value: string,\n currencyCode: string = 'USD',\n explicit: boolean = false\n): IFormatterValueObject {\n let processedCurrencyCode = currencyCode || '';\n let allowDecimal = true;\n\n if (processedCurrencyCode.includes('-integer')) {\n processedCurrencyCode = processedCurrencyCode.split('-integer')[0];\n allowDecimal = false;\n }\n\n const currencyFormat = currencyFormats[processedCurrencyCode];\n\n if (!currencyFormat) {\n return formatValue(value);\n }\n\n const options: INumberInputFormatOptions = {\n ...currencyFormat,\n allowDecimal: allowDecimal && currencyFormat.decimals > 0,\n allowNegative: false,\n };\n\n return formatNumber(value, options, explicit);\n}\n","import { IFormatterValueObject } from '../q2-input-types';\nimport formatValue from './generic';\n\nexport const phoneNumberFormats = {\n AF: {\n mask: '(##) #######',\n prefix: '+93 ',\n },\n AL: {\n mask: '#######',\n prefix: '+355 ',\n },\n DZ: {\n mask: '(##) ###-###',\n prefix: '+213 ',\n },\n // AS\n AD: {\n mask: '(#) #####',\n prefix: '+376 ',\n },\n AO: {\n mask: '#########',\n prefix: '+244 ',\n },\n AI: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n AG: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n AR: {\n mask: '##########',\n prefix: '+54 ',\n },\n AM: {\n mask: '########',\n prefix: '+375 ',\n },\n AQ: {\n mask: '##-####',\n prefix: '+672 ',\n },\n AW: {\n mask: '###-####',\n prefix: '+297 ',\n },\n AU: {\n mask: '(##) ####-####',\n prefix: '+61 ',\n },\n /* AT: {\n mask:'####?????????',\n prefix: ''\n }, */\n AT: {\n mask: '#############',\n prefix: '+43 ',\n },\n /* AZ: {\n mask:'########?',\n prefix: ''\n }, */\n AZ: {\n mask: '#########',\n prefix: '+994 ',\n },\n BS: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n BH: {\n mask: '####-####',\n prefix: '+973 ',\n },\n /* BD: {\n mask:'#######??',\n prefix: ''\n }, */\n BD: {\n mask: '#########',\n prefix: '+880 ',\n },\n BB: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n BY: {\n mask: '#########',\n prefix: '+375 ',\n },\n BE: {\n mask: '########??',\n prefix: '+32 ',\n },\n BZ: {\n mask: '#######',\n prefix: '+501 ',\n },\n BJ: {\n mask: '(##) ###-###',\n prefix: '+229 ',\n },\n BM: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n BT: {\n mask: '(#) ###-###',\n prefix: '+975 ',\n },\n BO: {\n mask: '(#) ###-####',\n prefix: '+591 ',\n },\n BA: {\n mask: '(##) ##-##-##',\n prefix: '+387 ',\n },\n /* BW: {\n mask:'#######?',\n prefix: ''\n }, */\n BW: {\n mask: '########',\n prefix: '+267 ',\n },\n BR: {\n mask: '(##) ####-####',\n prefix: '+55 ',\n },\n BN: {\n mask: '###-####',\n prefix: '+673 ',\n },\n BG: {\n mask: '#######?',\n prefix: '+359 ',\n },\n BF: {\n mask: '##-##-##-##',\n prefix: '+226 ',\n },\n BI: {\n mask: '####-####',\n prefix: '+257 ',\n },\n KH: {\n mask: '(##) ######',\n prefix: '+855 ',\n },\n CM: {\n mask: '####-####',\n prefix: '+237 ',\n },\n CA: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n CV: {\n mask: '###-####',\n prefix: '+238 ',\n },\n KY: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n CF: {\n mask: '###-###',\n prefix: '+236 ',\n },\n TD: {\n mask: '###-##-##',\n prefix: '+235 ',\n },\n /* CL: {\n mask:'########?',\n prefix: ''\n }, */\n CL: {\n mask: '#########',\n prefix: '+56 ',\n },\n /* CN: {\n mask:'########???',\n prefix: ''\n }, */\n CN: {\n mask: '###########',\n prefix: '+86 ',\n },\n /* CO: {\n mask:'########??',\n prefix: ''\n }, */\n CO: {\n mask: '##########',\n prefix: '57 ',\n },\n KM: {\n mask: '###-####',\n prefix: '+269 ',\n },\n CD: {\n mask: '###-####',\n prefix: '+243 ',\n },\n CG: {\n mask: '###-####',\n prefix: '+242 ',\n },\n // CK\n CR: {\n mask: '####-####',\n prefix: '+506 ',\n },\n CI: {\n mask: '####-####',\n prefix: '+225 ',\n },\n HR: {\n mask: '########?',\n prefix: '+385 ',\n },\n /* CU: {\n mask:'#####?ID:?????',\n prefix: ''\n }, */\n CU: {\n mask: '###########',\n prefix: '+53 ',\n },\n CY: {\n mask: '####-####',\n prefix: '+357 ',\n },\n CZ: {\n mask: '#########',\n prefix: '+420 ',\n },\n DK: {\n mask: '####-####',\n prefix: '+45 ',\n },\n DJ: {\n mask: '##-##-##-##',\n prefix: '+253 ',\n },\n DM: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n DO: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n TL: {\n mask: '###-####',\n prefix: '+670 ',\n },\n EC: {\n mask: '(##) ###-####',\n prefix: '+593 ',\n },\n /* EG: {\n mask:'########??',\n prefix: ''\n }, */\n EG: {\n mask: '##########',\n prefix: '+20 ',\n },\n SV: {\n mask: '####-####',\n prefix: '+503 ',\n },\n GQ: {\n mask: '##-####',\n prefix: '+240 ',\n },\n // ER:\n EE: {\n mask: '#######?',\n prefix: '+372 ',\n },\n ET: {\n mask: '(##) ###-####',\n prefix: '+251 ',\n },\n FK: {\n mask: '#####',\n prefix: '+500 ',\n },\n FO: {\n mask: '######',\n prefix: '+298 ',\n },\n FJ: {\n mask: '###-####',\n prefix: '+679 ',\n },\n /* FI: {\n mask:'#####???????',\n prefix: ''\n }, */\n FI: {\n mask: '############',\n prefix: '+358 ',\n },\n FR: {\n mask: '#########',\n prefix: '+33 ',\n },\n /* GF: {\n mask:'#########?',\n prefix: ''\n }, */\n GF: {\n mask: '##########',\n prefix: '+594 ',\n },\n PF: {\n mask: '######',\n prefix: '+689 ',\n },\n GA: {\n mask: '######?',\n prefix: '+241 ',\n },\n GM: {\n mask: '###-####',\n prefix: '+220 ',\n },\n GE: {\n mask: '########',\n prefix: '+995 ',\n },\n /* DE: {\n mask:'######?????',\n prefix: ''\n }, */\n DE: {\n mask: '###########',\n prefix: '+49 ',\n },\n /* GH: {\n mask:'########?',\n prefix: ''\n }, */\n GH: {\n mask: '#########',\n prefix: '+233 ',\n },\n GI: {\n mask: '####-####',\n prefix: '+350 ',\n },\n GR: {\n mask: '##########',\n prefix: '+30 ',\n },\n GL: {\n mask: '###-###',\n prefix: '+299 ',\n },\n GD: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n GP: {\n mask: '##########',\n prefix: '+590 ',\n },\n GU: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n GT: {\n mask: '####-####',\n prefix: '+502 ',\n },\n GN: {\n mask: '####-####',\n prefix: '+224 ',\n },\n GW: {\n mask: '###-####',\n prefix: '+245 ',\n },\n GY: {\n mask: '(###) ####',\n prefix: '+592 ',\n },\n HK: {\n mask: '####-####',\n prefix: '+852 ',\n },\n HN: {\n mask: '########',\n prefix: '+504 ',\n },\n HT: {\n mask: '####-####',\n prefix: '+509 ',\n },\n HU: {\n mask: '########??',\n prefix: '+36 ',\n },\n /* IS: {\n mask:'#######??',\n prefix: ''\n }, */\n IS: {\n mask: '#########',\n prefix: '+354 ',\n },\n IN: {\n mask: '##########',\n prefix: '+91 ',\n },\n /* ID: {\n mask:'#######???',\n prefix: ''\n }, */\n ID: {\n mask: '#######??????', // allows 7 ~ 13 digits\n prefix: '+62 ',\n },\n IR: {\n mask: '##########',\n prefix: '+98 ',\n },\n /* IQ: {\n mask:'########??',\n prefix: ''\n }, */\n IQ: {\n mask: '##########',\n prefix: '+964 ',\n },\n /* IE: {\n mask:'#######??',\n prefix: ''\n }, */\n IE: {\n mask: '#########',\n prefix: '+353 ',\n },\n /* IL: {\n mask:'########?',\n prefix: ''\n }, */\n IL: {\n mask: '#########',\n prefix: '+972 ',\n },\n /* IT: {\n mask:'######????',\n prefix: ''\n }, */\n IT: {\n mask: '##########',\n prefix: '+39 ',\n },\n JM: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n JP: {\n mask: '#########??',\n prefix: '+81 ',\n },\n /* JO: {\n mask:'#######??',\n prefix: ''\n }, */\n JO: {\n mask: '#########',\n prefix: '+962 ',\n },\n KZ: {\n mask: '(###) ####-###',\n prefix: '+7 ',\n },\n /* KE: {\n mask:'######????',\n prefix: ''\n }, */\n KE: {\n mask: '##########',\n prefix: '+254 ',\n },\n KI: {\n mask: '##-###',\n prefix: '+686 ',\n },\n // kp\n /* KR: {\n mask:'####??????',\n prefix: ''\n }, */\n KR: {\n mask: '##########',\n prefix: '+82 ',\n },\n KW: {\n mask: '####-####',\n prefix: '+965 ',\n },\n KG: {\n mask: '#########',\n prefix: '+996 ',\n },\n LA: {\n mask: '########?',\n prefix: '+856 ',\n },\n LV: {\n mask: '####-####',\n prefix: '+371 ',\n },\n LB: {\n mask: '#######?',\n prefix: '+961 ',\n },\n LS: {\n mask: '##-###-###',\n prefix: '+266 ',\n },\n // LR\n /* LY: {\n mask:'########?',\n prefix: ''\n }, */\n LY: {\n mask: '########?',\n prefix: '+218 ',\n },\n LI: {\n mask: '###-####',\n prefix: '+423 ',\n },\n LT: {\n mask: '########',\n prefix: '+370 ',\n },\n /* LU: {\n mask:'#####??????',\n prefix: '+352 '\n }, */\n LU: {\n mask: '###########',\n prefix: '+352 ',\n },\n MO: {\n mask: '####-####',\n prefix: '+853 ',\n },\n MK: {\n mask: '########',\n prefix: '+389 ',\n },\n MG: {\n mask: '##-##-###-##',\n prefix: '+261 ',\n },\n /* MW: {\n mask:'#######??',\n prefix: '+265 '\n }, */\n MW: {\n mask: '#########',\n prefix: '+265 ',\n },\n /* MY: {\n mask:'#######???',\n prefix: '+60 '\n }, */\n MY: {\n mask: '##########',\n prefix: '+60 ',\n },\n MV: {\n mask: '###-####',\n prefix: '+960 ',\n },\n ML: {\n mask: '####-####',\n prefix: '+223 ',\n },\n MT: {\n mask: '##-##-##-##',\n prefix: '+356 ',\n },\n MH: {\n mask: '###-####',\n prefix: '+692 ',\n },\n MQ: {\n mask: '###-######',\n prefix: '+596 ',\n },\n // MR\n MU: {\n mask: '###-####',\n prefix: '+230 ',\n },\n // YT\n MX: {\n mask: '(###) ###-####',\n prefix: '+52 ',\n },\n // FM\n MD: {\n mask: '########',\n prefix: '+373 ',\n },\n MC: {\n mask: '####-####',\n prefix: '+377 ',\n },\n /* MN: {\n mask:'######?????',\n prefix: '+976 '\n }, */\n MN: {\n mask: '###########',\n prefix: '+976 ',\n },\n MS: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n MA: {\n mask: '#########?', // allows 9 ~ 10 digits\n prefix: '+212 ',\n },\n /* MZ: {\n mask:'########?',\n prefix: '+258 '\n }, */\n MZ: {\n mask: '#########',\n prefix: '+258 ',\n },\n /* MM: {\n mask:'#######?',\n prefix: '+95 '\n }, */\n MM: {\n mask: '########',\n prefix: '+95 ',\n },\n /* NA: {\n mask:'######????',\n prefix: '+264 '\n }, */\n NA: {\n mask: '##########',\n prefix: '+264 ',\n },\n // NR\n /* NP: {\n mask:'########??',\n prefix: '+977 '\n }, */\n NP: {\n mask: '##########',\n prefix: '+977 ',\n },\n NL: {\n mask: '#########',\n prefix: '+31 ',\n },\n /* AN: {\n mask:'#######?',\n prefix: '+599 '\n }, */\n AN: {\n mask: '########',\n prefix: '+599 ',\n },\n NC: {\n mask: '###-###',\n prefix: '+687 ',\n },\n /* NZ: {\n mask:'########??',\n prefix: '+64 '\n }, */\n NZ: {\n mask: '##########',\n prefix: '+64 ',\n },\n NI: {\n mask: '####-####',\n prefix: '+505 ',\n },\n NE: {\n mask: '##-###-###',\n prefix: '+227 ',\n },\n /* NG: {\n mask:'########??',\n prefix: '+234 '\n }, */\n NG: {\n mask: '##########',\n prefix: '+234 ',\n },\n // NU\n MP: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n NO: {\n mask: '####-####',\n prefix: '+47 ',\n },\n OM: {\n mask: '####-####',\n prefix: '+968 ',\n },\n /* PK: {\n mask:'#########?',\n prefix: '+92 '\n }, */\n PK: {\n mask: '##########',\n prefix: '+92 ',\n },\n PW: {\n mask: '###-####',\n prefix: '+680 ',\n },\n /* PA: {\n mask:'#######?',\n prefix: '+507 '\n }, */\n PA: {\n mask: '########',\n prefix: '+507 ',\n },\n /* PG: {\n mask:'#######?',\n prefix: '+675 '\n }, */\n PG: {\n mask: '########',\n prefix: '+675 ',\n },\n // PY\n /* PE: {\n mask:'#######????',\n prefix: '+51 '\n }, */\n PE: {\n mask: '###########',\n prefix: '+51 ',\n },\n /* PH: {\n mask:'########??',\n prefix: '+63 '\n }, */\n PH: {\n mask: '##########',\n prefix: '+63 ',\n },\n PL: {\n mask: '#########',\n prefix: '+48 ',\n },\n PT: {\n mask: '#-####-####',\n prefix: '+351 ',\n },\n PR: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n QA: {\n mask: '###-####',\n prefix: '+974 ',\n },\n RE: {\n mask: '###-###-###',\n prefix: '+262 ',\n },\n RO: {\n mask: '#########',\n prefix: '+40 ',\n },\n RU: {\n mask: '##########',\n prefix: '+7 ',\n },\n RW: {\n mask: '###-###-###',\n prefix: '+250 ',\n },\n SH: {\n mask: '#-###',\n prefix: '+290 ',\n },\n // PM\n KN: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n LC: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n VC: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n // WS\n // SM\n ST: {\n mask: '##-####',\n prefix: '+239 ',\n },\n /* SA: {\n mask:'########?',\n prefix: '+966 '\n }, */\n SA: {\n mask: '#########',\n prefix: '+966 ',\n },\n SN: {\n mask: '##-###-####',\n prefix: '+221 ',\n },\n SC: {\n mask: '###-###',\n prefix: '+248 ',\n },\n SL: {\n mask: '(##) ###-###',\n prefix: '+232 ',\n },\n SG: {\n mask: '####-####',\n prefix: '+65 ',\n },\n SK: {\n mask: '#########',\n prefix: '+421 ',\n },\n SI: {\n mask: '########',\n prefix: '+386 ',\n },\n SB: {\n mask: '##-###',\n prefix: '+677 ',\n },\n // SO\n ZA: {\n mask: '(##) ###-####',\n prefix: '+27 ',\n },\n ES: {\n mask: '###-###-###',\n prefix: '+34 ',\n },\n LK: {\n mask: '(##) ###-####',\n prefix: '+94 ',\n },\n SD: {\n mask: '##-###-####',\n prefix: '+249 ',\n },\n SR: {\n mask: '######?',\n prefix: '+597 ',\n },\n SZ: {\n mask: '###-####',\n prefix: '+268 ',\n },\n /* SE: {\n mask:'######?????',\n prefix: '+46 '\n }, */\n SE: {\n mask: '###########',\n prefix: '+46 ',\n },\n CH: {\n mask: '(##) ###-####',\n prefix: '+41 ',\n },\n /* SY: {\n mask:'########?',\n prefix: '+963 '\n }, */\n SY: {\n mask: '#########',\n prefix: '+963 ',\n },\n TJ: {\n mask: '#########',\n prefix: '+992 ',\n },\n TZ: {\n mask: '#########',\n prefix: '+255 ',\n },\n /* TH: {\n mask:'########?',\n prefix: '+66 '\n }, */\n TH: {\n mask: '#########',\n prefix: '+66 ',\n },\n TG: {\n mask: '###-####',\n prefix: '+228 ',\n },\n // TK\n // TO\n TT: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n TN: {\n mask: '##-###-###',\n prefix: '+216 ',\n },\n TR: {\n mask: '(###) ###-####',\n prefix: '+90 ',\n },\n TM: {\n mask: '########',\n prefix: '+993 ',\n },\n TC: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n // TV\n UG: {\n mask: '#########',\n prefix: '+256 ',\n },\n UA: {\n mask: '(##) ###-####',\n prefix: '+380 ',\n },\n /* AE: {\n mask:'########?',\n prefix: '+971 '\n }, */\n AE: {\n mask: '#########',\n prefix: '+971 ',\n },\n /* GB: {\n mask:'##########???',\n prefix: '+44 '\n }, */\n GB: {\n mask: '#########????',\n prefix: '+44 ',\n },\n UY: {\n mask: '########?',\n prefix: '+598 ',\n },\n UZ: {\n mask: '(##) ###-####',\n prefix: '+998 ',\n },\n // VU\n // VA\n VE: {\n mask: '(###) ###-####',\n prefix: '+58 ',\n },\n VN: {\n mask: '#######????',\n prefix: '+84 ',\n },\n VG: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n VI: {\n mask: '(###) ###-####',\n prefix: '+1 ',\n },\n // WF\n /* YE: {\n mask:'#######??',\n prefix: '+967 '\n }, */\n YE: {\n mask: '#########',\n prefix: '+967 ',\n },\n // YU\n ZM: {\n mask: '#########',\n prefix: '+260 ',\n },\n /* ZW: {\n mask:'####?????',\n prefix: '+263 '\n }, */\n ZW: {\n mask: '#########',\n prefix: '+263 ',\n },\n AC: {\n mask: '####',\n prefix: '+247 ',\n },\n ME: {\n mask: '(##) ###-###?',\n prefix: '+382 ',\n },\n /* PS: {\n mask:'########?',\n prefix: '+970 '\n }, */\n PS: {\n mask: '#########',\n prefix: '+970 ',\n },\n /* RS: {\n mask:'#######??',\n prefix: '+381 '\n }, */\n RS: {\n mask: '#########',\n prefix: '+381 ',\n },\n /* TW: {\n mask:'########?',\n prefix: '+886 '\n }, */\n TW: {\n mask: '#########',\n prefix: '+886 ',\n },\n CW: {\n mask: '#-###-####',\n prefix: '+599 ',\n },\n US: {\n mask: '(###) ###-####',\n prefix: '',\n },\n};\n\nexport default function formatPhoneNumber(value: string, isoCode: string = 'US'): IFormatterValueObject {\n const { mask, prefix } = phoneNumberFormats[isoCode] || phoneNumberFormats.US;\n\n const options = {\n prefix,\n };\n\n const val = value || '';\n // Brazil need edge case handle, mobile: (xx) xxxxx-xxxx, land phone: (xx) xxxx-xxxx\n if (isoCode === 'BR' && val.replace(/[^0-9]/g, '').length === 11) {\n return formatValue(val, '(##) #####-####', options);\n } else {\n return formatValue(val, mask, options);\n }\n}\n","import formatValue from './generic';\n\nexport default function formatSSN(value: string) {\n return formatValue(value, '###-##-####');\n}\n","import formatValue from './generic';\n\nexport default function formatTIN(value: string) {\n return formatValue(value, '##-#######');\n}\n","import formatValue from './generic';\n\nexport default function formatAlphanumeric(value: string) {\n const val = (value || '').replace(/[^\\da-zA-Z]/g, '');\n return formatValue(val);\n}\n","import formatValue from './generic';\n\nexport default function formatAlpha(value: string, modifier?: string) {\n let val = value || '';\n\n if (modifier === 'spaced') {\n val = val.replace(/[^a-zA-Z ]/g, '');\n } else {\n val = val.replace(/[^a-zA-Z]/g, '');\n }\n\n return formatValue(val);\n}\n","import formatNumber from './number';\nimport formatValue from './generic';\nimport { INumberInputFormatOptions } from '../q2-input-types';\n\nfunction getNumberFormat(formatOptions: string): INumberInputFormatOptions | undefined {\n const numberFormat: INumberInputFormatOptions = {\n prefix: '',\n suffix: '',\n decimals: 0,\n decimalSeparator: '.',\n thousandsSeparator: '',\n allowDecimal: false,\n allowNegative: true,\n };\n const formatParts = formatOptions.split('-');\n\n // handle deprecated formats\n if (formatParts[0] === 'delimited') {\n // `delimited` - to be replaced by `integer-delimited`\n numberFormat.thousandsSeparator = ',';\n } else if (formatParts[0].match(/^[0-9]+dec$/)) {\n // `Ndec` - to be replaced by `Ndecimal`\n numberFormat.decimals = Number(formatParts[0].replace('dec', ''));\n numberFormat.allowDecimal = true;\n numberFormat.thousandsSeparator = ',';\n } else {\n // determine number type\n if (formatParts[0].includes('decimal')) {\n numberFormat.decimals = Number(formatParts[0].replace('decimal', ''));\n numberFormat.allowDecimal = true;\n } else if (formatParts[0] !== 'integer') {\n // Ignore any formats that don't start with Ndecimal or integer\n return;\n }\n\n // determine if negative numbers are allowed\n if (formatParts.includes('positive')) {\n numberFormat.allowNegative = false;\n }\n\n // determine if number is delimited\n if (formatParts.includes('delimited')) {\n numberFormat.thousandsSeparator = ',';\n }\n }\n\n return numberFormat;\n}\n\nfunction formatNumeric(value: string = '', modifier: string = '', explicit: boolean = false) {\n const numberFormat = getNumberFormat(modifier);\n\n if (!numberFormat) {\n const val = (value || '').replace(/[^\\d.,-]/g, '');\n return formatValue(val);\n }\n\n return formatNumber(value, numberFormat, explicit);\n}\n\nexport function formatPercentage(value: string = '', modifier: string = '', explicit: boolean = false) {\n const numberFormat = getNumberFormat(modifier);\n\n if (!numberFormat) {\n const val = (value || '').replace(/[^\\d.,-]/g, '');\n return formatValue(val, undefined, { suffix: '%' });\n }\n\n numberFormat.suffix = '%';\n\n return formatNumber(value, numberFormat, explicit);\n}\n\nexport default formatNumeric;\n","import formatValue from './generic';\nimport formatAlphanumeric from './alphanumeric';\n\nconst postalCodeFormats = {\n AF: '####',\n AL: '####',\n DZ: '#####',\n AC: 'ASCN 1ZZ',\n AD: 'AD###', // pre\n AR: '####',\n 'AR+': '@####@@@',\n AI: 'AI-2640',\n AM: '####',\n AS: '#####',\n 'AS+4': '#####-####',\n AU: '####',\n AT: '####',\n AZ: 'AZ ####', // pre\n BH: '###?',\n BD: '####',\n BB: 'BB#####', // pre\n BY: '######',\n BE: '####',\n BM: '@@ **',\n BT: '#####',\n BA: '######',\n BR: '#####',\n 'BR+3': '#####-###',\n VG: 'VG####', // pre\n BN: '@@####',\n BG: '####',\n KH: '#####',\n KY: 'KY#-####', // pre\n CA: '@#@ #@#',\n CL: '###-####',\n CN: '######',\n CX: '####',\n CC: '####',\n CO: '######',\n CR: '#####',\n 'CR+4': '#####-####',\n CV: '####',\n HR: '#####',\n CU: '#####',\n CY: '####',\n CZ: '### ##',\n DK: '####',\n DO: '#####',\n EC: '######',\n SV: '####',\n EG: '#####',\n EE: '#####',\n ET: '####',\n FK: 'FIQQ 1ZZ',\n FO: '###',\n FI: '#####',\n FR: '#####',\n GF: '973##', // pre?\n PF: '987##', // pre?\n GI: 'GX11 1AA',\n GE: '####',\n DE: '#####',\n GR: '### ##',\n GL: '####',\n GP: '971##', // pre?\n GU: '#####',\n 'GU+4': '#####-####',\n GT: '#####',\n GG: 'GY#? #@@',\n GN: '###',\n GS: 'SIQQ 1ZZ',\n GW: '####',\n HT: '####',\n HN: '@@####',\n 'HN-': '#####',\n HU: '####',\n IS: '###',\n IN: '### ###',\n ID: '#####',\n IE: '*** ****',\n IR: '##########',\n IQ: '#####',\n IM: 'IM#? #@@', // pre\n IL: '#######',\n IT: '#####',\n JM: '##',\n JP: '###-####',\n JE: 'JE#? #@@', // pre\n JO: '#####',\n KZ: '######',\n KE: '#####',\n KR: '#####',\n KN: 'KN####',\n XK: '#####',\n KW: '#####',\n KG: '######',\n LA: '#####',\n LV: 'LV-####', // pre\n LB: '####? ????', // also 00000\n LS: '###',\n LR: '####',\n LI: '####',\n LT: '#####', // pre-\n LU: '####',\n MK: '####',\n MG: '###',\n MY: '#####',\n MV: '#####',\n MT: '@@@ ####',\n MH: '#####',\n 'MH+4': '#####-####',\n MU: '#####',\n MQ: '972##', // pre?\n MW: '######',\n YT: '976##', // pre?\n MX: '#####',\n FM: '#####',\n 'FM+4': '#####-####',\n MD: '####', // pre\n MC: '980##', // pre?\n MN: '#####',\n ME: '#####',\n MA: '#####',\n MZ: '####',\n MM: '#####',\n NA: '#####',\n NP: '#####',\n NC: '988##', // pre?\n NZ: '####',\n NI: '#####',\n NE: '####',\n NG: '######',\n NF: '####',\n MP: '#####',\n NO: '####',\n OM: '###',\n PK: '#####',\n PW: '#####',\n 'PW+4': '#####-####',\n PS: '###',\n PA: '####',\n PG: '###',\n PY: '####',\n PE: '#####',\n 'PE+': '####', // pre\n PH: '####',\n PL: '##-###',\n PT: '####',\n 'PT+3': '####-###',\n PR: '#####',\n 'PR+4': '#####-####',\n RE: '974##', // pre?\n PM: '975##',\n PN: 'PCRN 1ZZ',\n RO: '######',\n RU: '######',\n LC: 'LC## ###', // pre\n VC: '####', // pre\n WS: '####', // pre\n SM: '4879#', // pre?\n SA: '#####',\n 'SA+4': '#####-####',\n SN: '#####',\n RS: '#####',\n SG: '######',\n SH: '@@@@ 1ZZ',\n SK: '### ##',\n SI: '####', // pre?\n SO: '@@ #####',\n ZA: '####',\n ES: '#####',\n LK: '#####',\n SD: '#####',\n SZ: '@###',\n SE: '### ##',\n CH: '####',\n SJ: '####',\n TW: '###',\n 'TW+2': '###-##?',\n TJ: '######',\n TZ: '#####',\n TH: '#####',\n TT: '######',\n TN: '####',\n TR: '#####',\n TM: '######',\n UA: '#####',\n UY: '#####',\n VI: '#####',\n 'VI+4': '#####-####',\n UZ: '######',\n VE: '####',\n 'VE-': '####-@',\n VN: '#####?',\n YU: '#####',\n WF: '986##', // pre?\n ZM: '#####',\n US: '#####',\n 'US+4': '#####-####',\n};\nexport default function formatPostalCode(value: string, modifier: string = 'US') {\n const mask = postalCodeFormats[modifier];\n\n if (!mask) {\n return formatAlphanumeric(value);\n }\n\n return formatValue(value, mask);\n}\n","import formatValue from './generic';\n\nconst dateFormats = {\n 'MM/DD/YYYY': '##/##/####',\n 'M/D/YYYY': '#?/#?/####',\n 'MM/DD/YY': '##/##/##',\n 'M/D/YY': '#?/#?/##',\n 'MM/YY': '##/##',\n 'M/YY': '#?/##',\n 'DD/MM/YYYY': '##/##/####',\n 'D/M/YYYY': '#?/#?/####',\n 'DD/MM/YY': '##/##/##',\n 'D/M/YY': '#?/#?/##',\n 'MM-DD-YYYY': '##-##-####',\n 'M-D-YYYY': '#?-#?-####',\n 'MM-DD-YY': '##-##-##',\n 'M-D-YY': '#?-#?-##',\n 'MM-YY': '##-##',\n 'M-YY': '#?-##',\n 'DD-MM-YYYY': '##-##-####',\n 'D-M-YYYY': '#?-#?-####',\n 'DD-MM-YY': '##-##-##',\n 'D-M-YY': '#?-#?-##',\n};\n\nexport default function formatDate(value: string, format: string = 'MM/DD/YYYY') {\n const mask = dateFormats[format?.toUpperCase()] || dateFormats['MM/DD/YYYY'];\n\n const formattedValueObject = formatValue(value, mask);\n\n return {\n ...formattedValueObject,\n value: formattedValueObject.formattedValue,\n };\n}\n","import formatValue from './generic';\nimport { IFormatterValueObject } from '../q2-input-types';\n\ninterface FormattedCreditCardObject extends IFormatterValueObject {\n type: string;\n leftIcon: string;\n leftIconMuted: boolean;\n}\n\ntype Formatter = (value: string) => FormattedCreditCardObject;\n\nfunction format(value: string): FormattedCreditCardObject {\n // have a initial generic mask which then converts to specific mask\n const detectedType = formatCreditCard.detectCreditCardTypeFromValue(value);\n const formattedValueObject = creditCardFormatters[detectedType](value);\n\n if (value.length < 2 && detectedType === 'unknown') {\n formattedValueObject.leftIcon = 'card';\n }\n return formattedValueObject;\n}\n\nconst unknownFormatter: Formatter = function unknownFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'unknown',\n leftIcon: 'card-unknown',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst amexFormatter: Formatter = function amexFn(value) {\n const valueObject = formatValue(value, '#### ###### #####');\n\n return {\n ...valueObject,\n type: 'amex',\n leftIcon: 'card-amex-color',\n leftIconMuted: value.length < 15,\n };\n};\n\nconst discoverFormatter: Formatter = function discoverFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'discover',\n leftIcon: 'card-discover-color',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst masterCardFormatter: Formatter = function masterCardFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'masterCard',\n leftIcon: 'card-mastercard-color',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst visaFormatter: Formatter = function visaFn(value) {\n const valueObject = formatValue(value, '#### #### #### ####');\n\n return {\n ...valueObject,\n type: 'visa',\n leftIcon: 'card-visa-color',\n leftIconMuted: value.length < 16,\n };\n};\n\nconst dinersClubInternationalFormatter: Formatter = function dinersClub(value) {\n const valueObject = formatValue(value, '#### ###### ####');\n\n return {\n ...valueObject,\n type: 'dinersClub',\n leftIcon: 'card-dinersclub-color',\n leftIconMuted: value.length < 14,\n };\n};\n\nconst creditCardFormatters = {\n discover: discoverFormatter,\n amex: amexFormatter,\n masterCard: masterCardFormatter,\n visa: visaFormatter,\n dinersClub: dinersClubInternationalFormatter,\n unknown: unknownFormatter,\n};\n\n/* tslint:disable:cyclomatic-complexity */\nfunction detectCreditCardTypeFromValue(value: string): string {\n // use value and some algorithm from the internet to detect and return card type based on string\n // return string 'unknown' if algorithm cannot detect or returns a type that is not one of our 5 supported types\n const firstInt = parseInt(value.charAt(0));\n const secondInt = parseInt(value.charAt(1));\n\n switch (firstInt) {\n case 2:\n if (secondInt > 1 && secondInt < 8) {\n if (value.length >= 4) {\n const firstfour = parseInt(value.substr(0, 4));\n if (firstfour >= 2221 && firstfour < 2721) {\n return 'masterCard';\n }\n } else {\n return 'masterCard';\n }\n }\n break;\n case 3:\n if (secondInt === 4 || secondInt === 7) {\n return 'amex';\n }\n if (secondInt === 0) {\n if (value.length > 2) {\n const thirdInt = parseInt(value.charAt(2));\n if (thirdInt < 6 || thirdInt === 9) {\n return 'dinersClub';\n }\n } else {\n return 'dinersClub';\n }\n }\n if (secondInt === 6 || secondInt === 8 || secondInt === 9) {\n return 'dinersClub';\n }\n break;\n case 4:\n return 'visa';\n case 5:\n if (secondInt > 0 && secondInt < 6) {\n return 'masterCard';\n }\n break;\n case 6:\n if (secondInt === 0) {\n if (value.length > 3) {\n const firstfour = value.substr(0, 4);\n if (firstfour === '6011') {\n return 'discover';\n }\n } else {\n return 'discover';\n }\n }\n if (secondInt === 4) {\n if (value.length > 2) {\n const firstthree = parseInt(value.substr(0, 3));\n if (firstthree > 643) {\n return 'discover';\n }\n } else {\n return 'discover';\n }\n }\n if (secondInt === 5) {\n return 'discover';\n }\n if (secondInt === 2) {\n if (value.length > 5) {\n const firstsix = parseInt(value.substr(0, 6));\n if (firstsix >= 622126 && firstsix <= 622925) {\n return 'discover';\n }\n } else {\n return 'discover';\n }\n }\n break;\n default:\n return 'unknown';\n }\n return 'unknown';\n}\n/* tslint:enable:cyclomatic-complexity */\n\nconst formatCreditCard = {\n detectCreditCardTypeFromValue,\n format,\n amexFormatter,\n dinersClubInternationalFormatter,\n discoverFormatter,\n masterCardFormatter,\n visaFormatter,\n unknownFormatter,\n};\n\nexport default formatCreditCard;\n","@import '../../styles/host';\n@import '../../styles/functions';\n\n:host {\n --comp-default-input-margin: #{var-list(var-prefixer(input-margin-top), --app-scale-6x, 30px) 0\n var-list(var-prefixer(input-margin-bottom), --app-scale-6x, 30px)};\n display: block;\n margin: var-list(--tct-input-margin, --comp-default-input-margin);\n font-size: var-list(var-prefixer(input-font-size), --app-font-size, inherit);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.field-container,\n.input-container {\n position: relative;\n}\n.field-container {\n --comp-input-tween: #{var-list(var-prefixer(input-tween), --tct-tween-2, --app-tween-2, unquote('0.4s ease'))};\n\n &.is-small {\n .btn-clear {\n --tct-btn-icon-width: 20px;\n --tct-icon-size: 17px;\n }\n }\n}\n\nlabel {\n --comp-label-padding: #{var-list(\n --tct-input-label-padding,\n unquote(\n '0 #{var-list(var-prefixer(input-label-padding-right), 0)} 0 #{var-list(var-prefixer(input-label-padding-left), 0)}'\n )\n )};\n display: block;\n padding: var(--comp-label-padding);\n color: var-list(var-prefixer(input-label-font-color), inherit);\n font-size: var-list(var-prefixer(input-label-font-size), inherit);\n font-weight: var-list(var-prefixer(input-label-font-weight), 600);\n text-transform: var-list(var-prefixer(input-label-text-transform), none);\n letter-spacing: var-list(var-prefixer(input-label-letter-spacing), normal);\n transition: color var(--comp-input-tween);\n}\n\n.optional-tag {\n --comp-label-optional-margin: #{var-list(\n --tct-input-label-optional-margin,\n unquote(\n '0 0 0 #{var-list(var-prefixer(input-label-optional-margin-left), --tct-scale-1, --app-scale-1x, 5px)}'\n )\n )};\n margin: var(--comp-label-optional-margin);\n color: var-list(\n var-prefixer(input-label-optional-font-color),\n --t-textA,\n --t-a11y-gray-color,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(input-label-optional-font-size), --app-font-size-small, 12px);\n font-weight: var-list(var-prefixer(input-label-optional-font-weight), 400);\n}\n\n.count-tag {\n color: var-list(--tct-input-count-font-color, --t-textA, --t-a11y-gray-color, rgba(77, 77, 77, 0.77));\n font-size: var-list(--tct-input-count-font-size, --app-font-size-small, 12px);\n font-weight: var-list(--tct-input-count-font-weight, 400);\n text-align: right;\n width: var(--tct-input-count-width, auto);\n}\n\n.label-wrapper {\n --comp-label-margin: #{var-list(\n --tct-input-label-margin,\n unquote(\n '#{var-list(var-prefixer(input-label-margin-top), 0)} 0 #{var-list(var-prefixer(input-label-margin-bottom), --tct-scale-1, --app-scale-1x, 5px)}'\n )\n )};\n display: flex;\n gap: var-list(--tct-input-label-gap, --app-scale-2x, 10px);\n justify-content: space-between;\n align-items: end;\n margin: var(--comp-label-margin);\n line-height: var-list(var-prefixer(input-label-line-height), inherit);\n\n &:has(label.sr) {\n margin: 0;\n }\n}\n\n.input-container {\n --comp-input-background: #{var-list(--tct-input-background, var-prefixer(input-bg), --t-gray-14, #fcfcfd)};\n --comp-input-horizontal-gap: #{var-list(var-prefixer(input-horizontal-gap), 0)};\n --comp-input-border-top-left-radius: #{var-list(\n var-prefixer(input-border-top-left-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-top-right-radius: #{var-list(\n var-prefixer(input-border-top-right-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-bottom-right-radius: #{var-list(\n var-prefixer(input-border-bottom-right-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-bottom-left-radius: #{var-list(\n var-prefixer(input-border-bottom-left-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 4px\n )};\n --comp-input-border-radius: var(--comp-input-border-top-left-radius) var(--comp-input-border-top-right-radius)\n var(--comp-input-border-bottom-right-radius) var(--comp-input-border-bottom-left-radius);\n --comp-input-border-width: var(--tct-input-border-top-width, 1px) var(--tct-input-border-right-width, 1px)\n var(--tct-input-border-bottom-width, 1px) var(--tct-input-border-left-width, 1px);\n --comp-input-border-color: #{var-list(var-prefixer(input-border-color), --t-a11y-gray-color-AA, #404040)};\n --comp-input-prefix-clearance: calc(3 * var(--tct-input-prefix-font-size, 14px) + var(--tct-scale-1, 5px));\n --comp-input-icon-clearance: 34px;\n --comp-input-min-height: #{var-list(var-prefixer(input-min-height), 44px)};\n --comp-input-max-height: #{var-list(var-prefixer(input-max-height))};\n\n --comp-input-hover-ring-color: #{var-list(var-prefixer(input-hover-ring-color))};\n --comp-input-hover-ring: #{0 0 0 2px var(--t-base), 0 0 0 4px var(--comp-input-hover-ring-color),\n var-list(var-prefixer(input-hover-box-shadow), unquote('0 0 transparent'))};\n\n background: var(--comp-input-background);\n display: flex;\n align-items: center;\n gap: var-list(--tct-input-container-gap, --app-scale-2x, 10px);\n padding-inline: var-list(--tct-input-container-padding-inline);\n border-width: var(--comp-input-border-width);\n border-style: solid;\n border-color: var(--comp-input-border-color);\n border-radius: var(--comp-input-border-radius);\n box-shadow: var-list(var-prefixer(input-box-shadow), none);\n transition:\n border-width var(--comp-input-tween),\n border-color var(--comp-input-tween),\n box-shadow var(--comp-input-tween);\n\n :host([disabled]:not([disabled='false'])) & {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(input-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n }\n\n .has-error & {\n border-color: var-list(--tct-input-error-border-color, --const-stoplight-alert, #d20a0a);\n background: var-list(--tct-input-error-background, --comp-input-background);\n box-shadow: var-list(--tct-input-error-box-shadow, --comp-input-hover-ring);\n }\n\n &:hover {\n border-color: var-list(--tct-input-hover-border-color, --comp-input-border-color);\n background: var-list(--tct-input-hover-background, --comp-input-background);\n box-shadow: var-list(--tct-input-hover-box-shadow, --comp-input-hover-ring);\n\n .has-error & {\n border-color: var-list(\n --tct-input-error-hover-border-color,\n --tct-input-error-border-color,\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(\n --tct-input-error-hover-background,\n --tct-input-error-background,\n --comp-input-background\n );\n box-shadow: var-list(\n --tct-input-error-hover-box-shadow,\n --tct-input-error-box-shadow,\n --comp-input-hover-ring\n );\n }\n }\n\n .has-focus & {\n border-color: var-list(var-prefixer(input-focus-border-color), --comp-input-border-color);\n background: var-list(--tct-input-focus-background, --comp-input-background);\n box-shadow: var-list(--tct-input-focus-box-shadow, --const-double-focus-ring);\n }\n\n .has-focus.has-error &,\n .has-focus.has-error &:hover {\n border-color: var-list(\n --tct-input-error-focus-border-color,\n --tct-input-error-border-color,\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(--tct-input-error-focus-background, --tct-input-error-background, --comp-input-background);\n box-shadow: var-list(\n --tct-input-error-focus-box-shadow,\n --tct-input-error-box-shadow,\n --const-double-focus-ring\n );\n }\n}\n\n.input-field {\n flex: 1;\n border: 0;\n -webkit-appearance: none;\n appearance: none;\n box-sizing: border-box;\n min-height: var(--comp-input-min-height);\n max-height: var(--comp-input-max-height);\n overflow-y: hidden;\n height: var-list(var-prefixer(input-height), 44px);\n width: 100%;\n padding: var(--tct-input-padding, 0);\n background: transparent;\n color: var-list(var-prefixer(input-font-color), --t-text, inherit);\n display: inline-block;\n text-align: var(--tct-input-align, 'start');\n font-weight: var-list(var-prefixer(input-font-weight), 400);\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n /* To remove up/down arrow in number field for webkit based browser */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* For Firefox */\n &[type='number'] {\n -moz-appearance: textfield;\n }\n\n &::-ms-clear {\n display: none;\n }\n\n &[type='search'] {\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n display: none;\n }\n }\n\n &[disabled]:not([disabled='false']) {\n cursor: not-allowed;\n }\n\n .right-aligned & {\n text-align: right;\n }\n\n &:is(input) {\n flex: 1;\n }\n\n &:is(button) {\n display: inline-flex;\n align-items: center;\n\n .has-custom-display & {\n height: auto;\n padding: 0;\n }\n\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n }\n }\n}\n\n.custom-display-container {\n max-width: 100%;\n\n .has-custom-display & {\n --comp-default-padding: var(--app-scale-2x, 10px) var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);\n padding: var-list(var-prefixer(input-padding), --comp-default-padding);\n width: 100%;\n }\n}\n\n.input-field::placeholder,\n.placeholder-text {\n color: var-list(var-prefixer(input-placeholder-font-color), --t-textA, --app-gray-d1, rgba(77, 77, 77, 0.77));\n}\n\n.pseudo-input-container {\n min-width: 0;\n flex: 1;\n}\n\n.input-icons-container-left,\n.input-icons-container-right {\n --tct-btn-icon-hover-background: var(--tct-input-btn-hover-background);\n --tct-btn-hover-background: var(--tct-input-btn-hover-background);\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--comp-input-horizontal-gap);\n\n > div:not(.vertical-separator) {\n min-width: var-list(--tct-input-icon-container-icon-min-width, 44px);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var-list(--tct-input-icon-container-font-size, inherit);\n }\n\n &:empty {\n display: var(--tct-input-icon-container-empty-display, block);\n }\n}\n\n.input-icons-container-left {\n padding-left: var(--comp-input-horizontal-gap);\n}\n\n.input-icons-container-right {\n padding-right: var(--comp-input-horizontal-gap);\n --comp-visibility-toggle-padding: 0px #{var-list(--app-scale-2x, 10px)};\n\n .btn-visibility-toggle {\n --tct-btn-height: var(--comp-input-min-height);\n --tct-btn-padding-inline: #{var-list(--tct-input-visibility-toggle-padding, --app-scale-2x, 10px)};\n --tct-btn-font-weight: #{var-list(--tct-input-visibility-toggle-font-weight, 400)};\n\n color: var-list(--tct-input-visibility-toggle-font-color, --t-primary, #0079c1);\n font-size: var-list(--tct-input-visibility-toggle-font-size, --app-font-size-small, 12px);\n }\n}\n\nq2-icon {\n margin-top: calc(#{var-list(var-prefixer(input-border-top-width), 1px)} / 2);\n margin-bottom: calc(#{var-list(var-prefixer(input-border-bottom-width), 1px)} / 2);\n pointer-events: none;\n color: var-list(var-prefixer(input-icon-stroke-primary), --t-a11y-gray-color, --t-textA, --app-gray, #747474);\n --tct-icon-stroke-primary: #{var-list(\n var-prefixer(input-icon-stroke-primary),\n --t-a11y-gray-color,\n --t-textA,\n --app-gray,\n #747474\n )};\n}\n\n.icon-left-muted {\n opacity: 0.5;\n}\n\n.input-prefix,\n.input-suffix {\n min-height: var(--comp-input-min-height);\n max-height: var(--comp-input-max-height);\n height: var-list(var-prefixer(input-height), 44px);\n font-size: var-list(var-prefixer(input-prefix-font-size), inherit);\n color: var-list(var-prefixer(input-prefix-font-color), inherit);\n background: var-list(\n --tct-input-prefix-background,\n var-prefixer(input-prefix-bg),\n --tct-input-background,\n var-prefixer(input-bg),\n var-prefixer(gray-14),\n #f2f2f2\n );\n transition:\n color var(--comp-input-tween),\n background var(--comp-input-tween);\n}\n\n.input-prefix {\n border-top-left-radius: calc(\n var(--comp-input-border-top-left-radius) - #{var-list(var-prefixer(input-border-top-width), 1px)} - #{var-list(\n var-prefixer(input-border-left-width),\n 1px\n )}\n );\n border-bottom-left-radius: calc(\n var(--comp-input-border-bottom-left-radius) - #{var-list(var-prefixer(input-border-bottom-width), 1px)} - #{var-list(\n var-prefixer(input-border-left-width),\n 1px\n )}\n );\n pointer-events: none; /* used to allow iOS voiceover to display keyboard in input TCT-1194 */\n}\n\n.input-suffix {\n border-top-right-radius: calc(\n var(--comp-input-border-top-right-radius) - #{var-list(var-prefixer(input-border-top-width), 1px)} - #{var-list(\n var-prefixer(input-border-right-width),\n 1px\n )}\n );\n border-bottom-right-radius: calc(\n var(--comp-input-border-bottom-right-radius) - #{var-list(var-prefixer(input-border-bottom-width), 1px)} - #{var-list(\n var-prefixer(input-border-right-width),\n 1px\n )}\n );\n}\n\n.icon-error {\n color: var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n --tct-icon-stroke-primary: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n}\n\n.messages-container {\n height: 0px;\n overflow: hidden;\n background: var-list(\n --tct-message-background,\n var-prefixer(message-bg),\n var-prefixer(gray-14),\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n box-shadow: var-list(\n var-prefixer(input-message-box-shadow),\n --tct-box-shadow-1,\n --app-shadow-1,\n unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\")\n );\n transition: height var-list(var-prefixer(input-messages-tween), --tct-tween-1, --app-tween-1, unquote('0.2s ease'));\n margin-top: var-list(--tct-input-messages-margin-top, 2px);\n z-index: var-list(--tct-input-messages-z-index, 5);\n position: absolute;\n width: 100%;\n color: var-list(var-prefixer(input-messages-font-color), inherit);\n\n // Sync up border radius with q2-message\n border-radius: var(--tct-message-border-radius, inherit);\n}\n\n.has-error label {\n color: var-list(var-prefixer(input-error-label-font-color), var-prefixer(input-label-font-color), inherit);\n}\n\n.has-error:not(.has-focus) .input-prefix,\n.has-error:not(.has-focus) .input-suffix {\n color: var-list(var-prefixer(input-error-prefix-font-color), inherit);\n background: var-list(\n --tct-input-error-prefix-background,\n var-prefixer(input-error-prefix-bg),\n --tct-input-background,\n var-prefixer(input-bg),\n var-prefixer(gray-14),\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n}\n\n.icon-left {\n width: 26px;\n height: 26px;\n}\n\n.vertical-separator {\n height: calc(var(--comp-input-min-height) - 2px);\n border-right-width: var(--tct-input-prefix-border-width, 1px);\n border-right-style: solid;\n border-right-color: var-list(\n var-prefixer(input-prefix-border-color),\n var-prefixer(input-border-color),\n --t-a11y-gray-color-AA,\n #404040\n );\n}\n","import {\n Component,\n Prop,\n Element,\n State,\n Event,\n EventEmitter,\n h,\n Watch,\n Listen,\n Fragment,\n Method,\n} from '@stencil/core';\nimport {\n createGuid,\n getAriaValueFromProp,\n labelDOM,\n loc,\n messagesDOM,\n setMessageHeight,\n handleAriaLabel,\n overrideFocus,\n isEventFromElement,\n isMobile,\n hasSlotContent,\n nextPaint,\n} from 'src/utils';\nimport { IFormatterValueObject, ICursorData, IEventDetail } from './q2-input-types';\nimport formatCurrency from './formatting/currency';\nimport formatPhoneNumber from './formatting/phone';\nimport formatSSN from './formatting/ssn';\nimport formatTIN from './formatting/tin';\nimport formatAlphanumeric from './formatting/alphanumeric';\nimport formatAlpha from './formatting/alpha';\nimport formatNumeric, { formatPercentage } from './formatting/numeric';\nimport formatPostalCode from './formatting/postal';\nimport formatDate from './formatting/date';\nimport formatCreditCard from './formatting/credit-card';\nimport { Q2Icon } from '../q2-icon/q2-icon';\nimport { Q2Badge } from '../q2-badge/q2-badge';\n\nconst inputTypeMap = {\n text: 'text',\n tel: 'tel',\n number: 'number',\n password: 'text',\n search: 'search',\n url: 'url',\n email: 'email',\n currency: 'text',\n phone: 'tel',\n ssn: 'text',\n alphanumeric: 'text',\n alpha: 'text',\n numeric: 'text',\n percentage: 'text',\n postal: 'text',\n date: 'text',\n 'credit-card': 'text',\n};\n\nexport type InputType = keyof typeof inputTypeMap;\n\n@Component({ tag: 'q2-input', shadow: true, styleUrl: 'q2-input.scss' })\nexport class Q2Input {\n // #region Own Properties\n\n guid = createGuid();\n inputRef: HTMLInputElement;\n isMobile: boolean = isMobile();\n mutationObserver: MutationObserver;\n resizeObserver: ResizeObserver;\n scheduledAfterRender: (() => void)[] = [];\n textSelectedForDeletion: boolean;\n valueOnFocus: string;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n checkSlotCount: number = 0;\n\n @State()\n formattedValueObject: IFormatterValueObject;\n\n @State()\n hasFocus: boolean;\n\n @State()\n isSmall: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Sets readonly to true on the input without adding the \"read only\" label.\n *\n * Can be used to prevent user input while still presenting the necessary information for assistive technology.\n * @private\n */\n @Prop({ mutable: true })\n _preventEntry: boolean = undefined;\n\n /**\n * Allows for correct semantics of q2-input element when aria-expanded.\n * @private\n * Defaults to undefined\n * Will assign role to combobox when used inside q2-select and q2-calendar.\n */\n @Prop({ mutable: true })\n _role: 'combobox' | undefined = undefined;\n\n @Prop()\n ariaActivedescendant: string;\n\n @Prop()\n ariaControls: string;\n\n @Prop()\n ariaExpanded: string;\n\n @Prop()\n ariaHaspopup: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n @Prop()\n ariaOwns: string;\n\n /**\n * The `autocapitalize` attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n * @info\n * This attribute only affects the behavior of input mechanisms like virtual keyboards on mobile devices and voice input.\n */\n @Prop({ reflect: true })\n autocapitalize: string;\n\n /**\n * The HTML autocomplete attribute lets web developers specify what permission (if any) the user agent has to provide automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n *\n * [See MDN for a list of supported values](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values).\n */\n @Prop({ reflect: true })\n autocomplete: string;\n\n /**\n * A string that indicates whether or not to activate automatic correction while the user is editing this field.\n * @warning\n * This is currently only supported in Safari.\n */\n @Prop({ reflect: true })\n autocorrect: 'on' | 'off';\n\n /**\n * Autofocus is enabled when the property is added to an element. To disable, remove attribute or set it to false.\n * If applied to multiple elements, the first one will receive focus.\n */\n @Prop({ reflect: true })\n autofocus: boolean;\n\n /** The color of the badge when in the active state. */\n @Prop({ reflect: true })\n badgeTheme: Q2Badge['theme'];\n\n /** Displays a `q2-badge` element on the right side of the input. */\n @Prop({ reflect: true })\n badgeValue: string;\n\n /** Renders an icon button when the field is non-empty. Pressing the button clears all input from the field. */\n @Prop({ reflect: true })\n clearable: boolean;\n\n /**\n * If provided a value, it sets the `aria-current` attribute on the inner input.\n * [See MDN for more information on aria-current](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n @Prop()\n current: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';\n\n /** Indicates the field cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /**\n * Each item in the `errors` array will appear below the input field when the field is focused.\n * @localizable\n */\n @Prop()\n errors: string[];\n\n /**\n * Defines the field's expected input format, and automatically masks user input to conform.\n * Specific types support different modifier options. See the section on Format Modifiers for all available options.\n */\n @Prop({ reflect: true })\n formatModifier: string;\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * When `true` and the input field has an active validation error, the field shows the error state without displaying associated error messages below the field (from the errors array above).\n * Primarily used for dropdown selects and date pickers whose controls appear below the input field (where the error messages, if displayed, would also appear).\n */\n @Prop({ reflect: true })\n hideMessages: boolean;\n\n /**\n * Each item in the `hints` array will appear below the input field when the field is focused.\n * @info\n * The `errors` array takes precedence over the `hints` array. If an input field has both hints and errors, only the errors will display.\n * Once all errors are resolved, the hints display the next time the field is focused.\n * @localizable\n */\n @Prop()\n hints: string[];\n\n /** Shows a left-aligned [q2-icon](https://tecton.q2developer.com/design-system/q2-icon/) within the field. */\n @Prop({ reflect: true })\n iconLeft: Q2Icon['type'];\n\n /** Shows a right-aligned [q2-icon](https://tecton.q2developer.com/design-system/q2-icon/) within the field. */\n @Prop({ reflect: true })\n iconRight: Q2Icon['type'];\n\n /**\n * The label that appears above the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * When present, it does not allow a value greater than `max` when the user uses the Up/Down arrow keys to change the value.\n * @info\n * Only applicable when `type=\"number\"`.\n */\n @Prop({ reflect: true })\n max: number;\n\n /**\n * Defines the maximum allowed input length in characters. Formatting characters (e.g. `.`, `-`, etc) are included in the `maxlength` comparison.\n * Make sure you account for them when setting the `maxlength` value. Input types that use masks have their own inherent `maxlength`.\n */\n @Prop({ reflect: true, mutable: true })\n maxlength: number;\n\n /**\n * When present, it does not allow a value less than the `min` when the user uses the Up/Down arrow keys to change the value.\n * @info\n * Only applicable when `type=\"number\"`.\n */\n @Prop({ reflect: true })\n min: number;\n\n /** Appends \"(optional)\" to the field label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /**\n * The pattern string of the input field, regular expression string is expected.\n * This allows us to check the validity user's input.\n * For instance,\n * &lt;q2-input label=\"My input\" pattern=\"[a-zA-Z0-9]{3,5}\" id=\"myInput\"&gt;\n *\n * - Allows only 3~5 alphanumeric letters\n *\n * In Javascript, you can check the validity object in your q2-input\n * Type \"abcdefgh\", then access the validity object\n * @snippet\n * const myInput = document.querySelector('#myInput');\n * console.log(myInput.validity);\n */\n @Prop({ reflect: true, mutable: true })\n pattern: string;\n\n /**\n * Text that appears within the field when it is blurred and empty.\n * Placeholder text disappears when the user focuses on the field and provides input.\n * @info\n * Primarily used for rare cases in which a visible form label is not expected (e.g., search fields).\n * @localizable\n */\n @Prop({ reflect: true })\n placeholder: string;\n\n /** Component will display as a clickable `<button>` styled to be identical to the default `<input>` field. */\n @Prop({ reflect: true })\n pseudo: boolean;\n\n /**\n * Appends \"(read only)\" to the field label, and field becomes unusable, but remains focusable.\n * Takes priority over `optional` if both are `true`.\n */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /**\n * Indicates the element's intended purpose to assistive technology.\n * @deprecated\n */\n @Prop()\n role: string;\n\n /**\n * Shows a character counter above the input field to track the number of characters currently in the field.\n * If `maxlength` is set, `showCount` displays the number of characters in relation the `maxlength` value.\n */\n @Prop({ reflect: true })\n showCount: boolean;\n\n /**\n * Displays a toggle button at the end of the input field which shows or hides the actual value.\n * @info\n * Only applicable when `type` is `text`, `password`, or `ssn`.\n */\n @Prop({ reflect: true })\n showVisibilityToggle: boolean = false;\n\n /**\n * When present, it jumps the value in incremens of `step` when the user uses the Up/Down arrow keys to change the value.\n * @info\n * Only applicable when `type=\"number\"`.\n */\n @Prop({ reflect: true })\n step: number;\n\n /**\n * Controls visibility of the value when the type is `text`, `password`, or `ssn`.\n * When the input type is `password`, it will default to `true`, hiding the text.\n */\n @Prop({ reflect: true, mutable: true })\n textHidden: boolean;\n\n /** Specifies the field's expeted [input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types), and provides the optimal keyboard on mobile devices. */\n @Prop({ reflect: true })\n type: InputType = 'text';\n\n @Prop({ reflect: true, mutable: true })\n validity: ValidityState;\n\n /**\n * The value of the input field.\n * @info\n * The visible value of formatted input fields may not match the element's `value` property.\n * When setting an input's value programmatically (e.g. pre-populating a form), ensure that the supplied value is in a format that can be handled by its consuming logic.\n * `q2-input` does not change its own `value` outside of its default change event handler.\n *\n * In `q2-input` where `type=\"currency\"`\n * - element.value = 1234.56\n * - visible value: $1,234.56\n *\n */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the field loses focus after the value has been changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<IEventDetail>;\n\n /**\n * Emitted when the field value is cleared.\n *\n * Requires the `clearable` prop to be set to `true`.\n */\n @Event()\n clear: EventEmitter<undefined>;\n\n /**\n * Emitted when the field value is formatted.\n */\n @Event()\n formatted: EventEmitter<IFormatterValueObject>;\n\n /**\n * Emitted when the field value is updated.\n * @legacyEvent\n */\n @Event()\n input: EventEmitter<IEventDetail>;\n\n /**\n * Emitted when the validation is updated.\n * @legacyEvent\n */\n @Event()\n invalid: EventEmitter<IEventDetail>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.manageClearableResizeObserver();\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n Object.defineProperty(this.hostElement, 'formattedValue', {\n get: () => this.formattedValueObject?.formattedValue ?? '',\n });\n\n handleAriaLabel(this);\n if (this.textHidden === undefined) {\n this.textHidden = this.type === 'password';\n }\n\n this.manageClearableResizeObserver(this.clearable);\n }\n\n componentDidLoad() {\n if (!this.pseudo) {\n this.inputField.value = this.formattedValueObject.formattedValue;\n }\n\n if (this.autofocus === true) {\n this.inputField.focus();\n }\n\n overrideFocus(this.hostElement);\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n }\n\n componentDidRender() {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n event.stopPropagation();\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.inputField.focus();\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates firing checkValidity on `<input>`, emits `invalid` event if validation failed.\n */\n @Method()\n checkValidity() {\n this.inputRef.checkValidity();\n this.validateInput();\n }\n\n /**\n * Emulates clicking the clear button when the input is clearable.\n *\n * @warning\n * Only applicable when the input is clearable.\n *\n * @testOnly\n */\n @Method()\n clearValue() {\n if (!this.clearable) return;\n this.onClearInput();\n }\n\n /**\n * Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.\n *\n * This method leaves the focus on the `<input>` and as a result does not trigger the `change` event. If you want\n * to trigger the` change` event, move the focus to another element after calling this method.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n const { inputField } = this;\n inputField.focus();\n inputField.dispatchEvent(new FocusEvent('focus'));\n inputField.value = value;\n inputField.dispatchEvent(new InputEvent('input'));\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n @Watch('clearable')\n manageClearableResizeObserver(clearable?: boolean) {\n const isSmallThreshold = 190;\n if (clearable) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(([entry]) => {\n this.isSmall = isSmallThreshold > entry.contentRect.width;\n });\n this.resizeObserver.observe(this.hostElement);\n } else {\n this.isSmall = false;\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n }\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('formatModifier')\n formatModifierObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('formattedValueObject')\n formattedValueObjectObserver() {\n this.formatted.emit(this.formattedValueObject);\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('type')\n typeObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('value')\n valueObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n // #endregion\n // #region Local Methods\n\n get ariaAttributes() {\n return {\n ariaOwns: getAriaValueFromProp(this.ariaOwns),\n ariaHaspopup: getAriaValueFromProp(this.ariaHaspopup, [\n 'true',\n 'false',\n 'menu',\n 'listbox',\n 'tree',\n 'grid',\n 'dialog',\n ]),\n ariaExpanded: getAriaValueFromProp(this.ariaExpanded, ['true', 'false']),\n ariaActivedescendant: getAriaValueFromProp(this.ariaActivedescendant),\n };\n }\n\n get canSetSelection(): boolean {\n // email and number type don't support setSelectionRange\n return !['email', 'number'].includes(this.computedType);\n }\n\n get clearClasses() {\n const classes = ['btn-clear'];\n if (!this.clearable || !(this.inputField?.value || this.value)) {\n classes.push('hidden');\n }\n return classes;\n }\n\n get computedAutocomplete() {\n // force off for currency type\n if (this.type === 'currency') return 'transaction-amount';\n return this.autocomplete || 'off';\n }\n\n get computedClassForIconLeft(): string | undefined {\n let className = 'icon-left';\n if (this.formattedValueObject.leftIconMuted) {\n className += ' icon-left-muted';\n }\n return className;\n }\n\n get computedIconLeft(): string | undefined {\n if (this.formattedValueObject.prefix) {\n return;\n }\n\n if (this.type === 'search') {\n return 'search';\n }\n\n if (this.formattedValueObject.leftIcon) {\n return this.formattedValueObject.leftIcon;\n }\n\n return this.iconLeft;\n }\n\n get computedType() {\n if (['password', 'text', 'ssn'].includes(this.type) && this.textHidden) {\n return 'password';\n } else {\n return (this.type && inputTypeMap[this.type]) || 'text';\n }\n }\n\n get hasCustomDisplaySlot() {\n return !!this.hostElement.querySelector('[slot=custom-display]');\n }\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get hasInputLeftSlot() {\n return hasSlotContent(this.hostElement, 'input-left');\n }\n\n get hasInputRightSlot() {\n return hasSlotContent(this.hostElement, 'input-right');\n }\n\n get inputDescribedBy() {\n return this.showMessages ? `${this.inputId}-description` : undefined;\n }\n\n get inputField() {\n return this.hostElement.shadowRoot.querySelector<HTMLInputElement>('.input-field');\n }\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get inputMode() {\n const inputModeMap = {\n currency: 'numeric',\n ssn: 'numeric',\n tin: 'numeric',\n numeric: 'decimal',\n percentage: 'decimal',\n postal: 'numeric',\n date: 'numeric',\n 'credit-card': 'numeric',\n };\n\n return (this.type && inputModeMap[this.type]) || undefined;\n }\n\n get isMaskedType(): boolean {\n const maskedTypes: string[] = [\n 'currency',\n 'phone',\n 'ssn',\n 'tin',\n 'alphanumeric',\n 'alpha',\n 'numeric',\n 'percentage',\n 'postal',\n 'date',\n 'credit-card',\n ];\n\n return maskedTypes.includes(this.type);\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get shouldCursorStartAtEnd() {\n return this.type === 'currency';\n }\n\n get shouldCursorStayAtEnd() {\n return this.isMobile && this.type === 'currency';\n }\n\n get showIconSeparator(): boolean {\n return this.type === 'credit-card' || !!this.formattedValueObject.prefix;\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n get stringValue(): string {\n return (this.value && String(this.value)) || '';\n }\n\n get visibilityToggleAriaLabel(): string {\n return `tecton.element.input.toggleAriaLabel.${this.textHidden ? 'show' : 'hide'}`;\n }\n\n get visibilityToggleText(): string {\n return loc(`tecton.element.input.toggle.${this.textHidden ? 'show' : 'hide'}`);\n }\n\n get wrapperClasses() {\n const classNames = ['field-container'];\n if (this.hasError) classNames.push('has-error');\n if (!!this.value) classNames.push('has-value');\n if (this.clearable && !!this.value) classNames.push('has-clear');\n if (this.hasFocus) classNames.push('has-focus');\n if (this.isSmall) classNames.push('is-small');\n if (this.formattedValueObject.prefix) classNames.push('has-prefix');\n if (this.computedIconLeft) classNames.push('has-icon-left');\n if (this.showIconSeparator) classNames.push('has-icon-separator');\n if (this.formattedValueObject.suffix) classNames.push('has-suffix');\n if (!this.formattedValueObject.suffix && this.iconRight) classNames.push('has-icon-right');\n if (this.type === 'currency') classNames.push('right-aligned');\n else classNames.push('left-aligned');\n if (this.hasCustomDisplaySlot) classNames.push('has-custom-display');\n\n return classNames.join(' ');\n }\n\n calculateCursorPositionOnFocus(): ICursorData {\n const { inputField } = this;\n const valueLength = inputField?.value?.length ?? 0;\n const startingPosition = inputField?.selectionStart ?? valueLength;\n\n return {\n startingPosition,\n valueLength,\n previousValueLength: valueLength,\n hasSelection: getSelection().toString().length > 0,\n };\n }\n\n calculateCursorPositionOnInput(): ICursorData {\n const input = this.inputField;\n const formattedLength = this.formattedValueObject.formattedValue.length;\n const currentValueLength = input.value.length;\n const defaultPosition = this.type === 'currency' ? formattedLength : 0;\n return {\n startingPosition: (input && input.selectionStart) || defaultPosition,\n valueLength: formattedLength,\n previousValueLength: input && currentValueLength,\n hasSelection: false,\n };\n }\n\n countDOM() {\n if (!this.showCount) return;\n const { maxlength, formattedValueObject } = this;\n\n return (\n <div class=\"count-tag\">\n {formattedValueObject.unformattedValue.length}\n {maxlength && `/${maxlength}`}\n </div>\n );\n }\n\n formatAndUpdateValueFromProp() {\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n if (!this.pseudo) {\n const setValue = () => {\n this.inputField.value = this.formattedValueObject.formattedValue;\n };\n\n this.inputField ? setValue() : this.scheduledAfterRender.push(() => setValue());\n }\n }\n\n getFormattedValue(value: string, valueChangedFromProperty: boolean): IFormatterValueObject {\n const formattingFunctions = {\n currency: formatCurrency,\n phone: formatPhoneNumber,\n ssn: formatSSN,\n tin: formatTIN,\n alphanumeric: formatAlphanumeric,\n alpha: formatAlpha,\n numeric: formatNumeric,\n percentage: formatPercentage,\n postal: formatPostalCode,\n date: formatDate,\n 'credit-card': formatCreditCard.format,\n };\n\n if (formattingFunctions[this.type]) {\n return formattingFunctions[this.type](value, this.formatModifier, valueChangedFromProperty);\n }\n\n return {\n value,\n formattedValue: value,\n fullyFormattedValue: value,\n formattingCharacterCount: 0,\n unformattedValue: value,\n };\n }\n\n handleCurrencyDeletion(event: InputEvent) {\n // Don't do anything if text was selected for deletion\n if (this.textSelectedForDeletion) {\n this.textSelectedForDeletion = false;\n return;\n }\n // We only care about \"Backspace\" and \"Delete\" events\n if (event.inputType !== 'deleteContentBackward' && event.inputType !== 'deleteContentForward') return;\n\n const input = event.target as HTMLInputElement;\n const cursorPosition = input.selectionStart;\n const { formattedValue } = this.formattedValueObject;\n\n if (cursorPosition === null) return;\n\n let cursorMap;\n switch (event.inputType) {\n case 'deleteContentBackward':\n const valueBeforeCursor = formattedValue.substring(0, cursorPosition + 1);\n const isPrevCharAlphaNum = /[a-zA-Z0-9]$/.test(valueBeforeCursor);\n cursorMap = {\n leftIndex: isPrevCharAlphaNum ? cursorPosition : cursorPosition - 1,\n rightIndex: isPrevCharAlphaNum ? cursorPosition + 1 : cursorPosition,\n afterCursorOffset: 0,\n newCursorOffset: 1,\n };\n break;\n case 'deleteContentForward':\n const valueAfterCursor = formattedValue.substring(cursorPosition);\n const isNextCharAlphaNum = /^[a-zA-Z0-9]/.test(valueAfterCursor);\n cursorMap = {\n leftIndex: isNextCharAlphaNum ? cursorPosition : cursorPosition + 1,\n rightIndex: isNextCharAlphaNum ? cursorPosition + 1 : cursorPosition + 2,\n afterCursorOffset: 1,\n newCursorOffset: 0,\n };\n break;\n default:\n return;\n }\n\n // Ensure the cursor doesn't move with a newly formatted value\n const newValue = [\n formattedValue.substring(0, cursorMap.leftIndex),\n formattedValue.substring(cursorMap.rightIndex),\n ].join('');\n const charactersAfterCursor = formattedValue.length - cursorPosition - cursorMap.afterCursorOffset;\n const newFormattedValue = this.getFormattedValue(newValue, false).formattedValue;\n const newCursorPosition = Math.max(\n newFormattedValue.length - charactersAfterCursor + cursorMap.newCursorOffset,\n 0\n );\n\n input.value = newFormattedValue;\n input.setSelectionRange(newCursorPosition, newCursorPosition);\n\n // This handles a runtime issue when a character is deleted from the beginning of the input\n if (newCursorPosition === 0) {\n nextPaint(() => input.setSelectionRange(newCursorPosition, newCursorPosition));\n }\n }\n\n /**\n * Sets textSelectedForDeletion to true if the user has selected text for deletion\n * This is used to prevent other logic from running when text is deleted\n */\n handleCurrencyKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Backspace' && event.key !== 'Delete') return;\n const inputElement = this.inputField;\n this.textSelectedForDeletion = inputElement.selectionStart !== inputElement.selectionEnd;\n };\n\n handleDataInput(newFormattedValue: IFormatterValueObject) {\n if (\n this.maxlength === undefined ||\n newFormattedValue.unformattedValue.length <= this.maxlength ||\n newFormattedValue.unformattedValue.length <= this.formattedValueObject.unformattedValue.length\n ) {\n this.formattedValueObject = newFormattedValue;\n } else if (this.maxlength) {\n newFormattedValue = this.getFormattedValue(\n newFormattedValue.unformattedValue.substring(0, this.maxlength),\n false\n );\n this.formattedValueObject = newFormattedValue;\n }\n this.handleValueAndCursor();\n }\n\n handleValueAndCursor = () => {\n // ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position\n const cursorPosition = this.calculateCursorPositionOnInput();\n // when type=number: returns only valid decimal on input event, should not update itself (e.g. typing \"1.\" )\n if (this.type !== 'number') this.inputField.value = this.formattedValueObject.formattedValue;\n this.input.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n if (!this.formattedValueObject.value) {\n this.clear.emit();\n }\n this.setCursorPosition(cursorPosition);\n };\n\n /* tslint:disable:cyclomatic-complexity */\n inputContainerDOM() {\n const { hasInputLeftSlot, hasInputRightSlot } = this;\n return (\n <div\n class=\"input-container\"\n tabindex={-1}\n test-id=\"inputContainer\"\n >\n <div class=\"input-icons-container-left\">\n {this.formattedValueObject.prefix && (\n <div class=\"input-prefix\">{this.formattedValueObject.prefix}</div>\n )}\n {this.computedIconLeft && (\n <div>\n <q2-icon\n type={this.computedIconLeft}\n class={this.computedClassForIconLeft}\n />\n </div>\n )}\n {hasInputLeftSlot && <slot name=\"input-left\" />}\n {this.showIconSeparator && <div class=\"vertical-separator\" />}\n {this.hasError && this.type === 'currency' && (\n <div\n test-id=\"divIconError\"\n onClick={this.onRefocusInput}\n >\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n </div>\n {this.pseudo ? this.pseudoInputDOM() : this.standardInputDOM()}\n <div class=\"input-icons-container-right\">\n <q2-btn\n class={this.clearClasses.join(' ')}\n ariaLabel={loc('tecton.element.input.clear', [this.label])}\n test-id=\"clearButton\"\n onClick={this.onClearInput}\n >\n <q2-icon\n type=\"close\"\n class=\"icon-clear\"\n />\n </q2-btn>\n {['password', 'text', 'ssn', 'tin'].includes(this.type) && this.showVisibilityToggle && (\n <q2-btn\n class=\"btn-visibility-toggle\"\n test-id=\"toggleVisibilityButton\"\n onClick={this.onToggleVisibility}\n label={loc(this.visibilityToggleAriaLabel, { label: this.label })}\n hide-label={true}\n >\n {this.visibilityToggleText}\n </q2-btn>\n )}\n {this.formattedValueObject.suffix && (\n <span class=\"input-suffix\">{this.formattedValueObject.suffix}</span>\n )}\n {this.badgeValue && (\n <q2-badge\n size=\"large\"\n theme={this.badgeTheme}\n >\n {this.badgeValue}\n </q2-badge>\n )}\n {this.hasError && this.type !== 'currency' && (\n <div\n test-id=\"divIconError\"\n onClick={this.onRefocusInput}\n >\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n {this.iconRight && !this.formattedValueObject.suffix && (\n <div>\n <q2-icon\n type={this.iconRight}\n class=\"icon-right\"\n />\n </div>\n )}\n {hasInputRightSlot && <slot name=\"input-right\" />}\n </div>\n </div>\n );\n }\n\n onClearInput = () => {\n const eventDetail = {\n value: '',\n formattedValue: '',\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n };\n this.input.emit(eventDetail);\n this.change.emit(eventDetail);\n this.clear.emit();\n this.inputField.focus();\n };\n\n onInputBlur = () => {\n this.hasFocus = false;\n setMessageHeight(this);\n if (this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onInputClick = () => {\n if (this.shouldCursorStayAtEnd) this.placeCursorAtEnd();\n };\n\n onInputFocus = () => {\n if (this.inputField.tagName === 'INPUT') {\n this.scheduledAfterRender.push(() =>\n this.shouldCursorStartAtEnd\n ? this.placeCursorAtEnd()\n : this.setCursorPosition(this.calculateCursorPositionOnFocus())\n );\n }\n this.hasFocus = true;\n setMessageHeight(this);\n this.valueOnFocus = this.value;\n };\n\n onInputInput = (event: InputEvent) => {\n event.stopPropagation();\n if (this.type === 'currency') this.handleCurrencyDeletion(event);\n const newFormattedValue = this.getFormattedValue((event.target as HTMLInputElement).value, false);\n this.handleDataInput(newFormattedValue);\n this.validateInput();\n };\n\n onInputKeydown = (event: KeyboardEvent) => {\n const keysThatMoveCursor = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];\n const { key } = event;\n\n if (this.type === 'currency') this.handleCurrencyKeydown(event);\n if (this.shouldCursorStayAtEnd && keysThatMoveCursor.includes(key)) event.preventDefault();\n if (key === 'Enter' && this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onInputPaste = (event: ClipboardEvent) => {\n if (this.type === 'currency') {\n const clipboardData = event.clipboardData.getData('text');\n const newFormattedValue = this.getFormattedValue(clipboardData, true);\n event.preventDefault();\n this.handleDataInput(newFormattedValue);\n }\n };\n\n onMutationObserved = () => {\n // Updating checkSlotCount to force re-render when slot content changes\n this.checkSlotCount = this.checkSlotCount + 1;\n };\n\n onRefocusInput = () => {\n if (this.showMessages) {\n this.inputField.focus();\n setMessageHeight(this);\n }\n };\n\n onToggleVisibility = () => {\n this.hostElement.dispatchEvent(new FocusEvent('focus'));\n this.textHidden = !this.textHidden;\n };\n\n placeCursorAtEnd() {\n const { inputField } = this;\n inputField.selectionStart = inputField.selectionEnd = inputField.value.length;\n }\n\n /* tslint:enable:cyclomatic-complexity */\n\n pseudoInputDOM() {\n const showPlaceholder = !this.value && !!this.placeholder;\n const { ariaOwns, ariaHaspopup, ariaExpanded, ariaActivedescendant } = this.ariaAttributes;\n\n return (\n <div class=\"pseudo-input-container\">\n <button\n class=\"input-field\"\n type=\"button\"\n id={this.inputId}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-owns={ariaOwns}\n aria-haspopup={ariaHaspopup}\n aria-expanded={ariaExpanded}\n aria-activedescendant={ariaActivedescendant}\n role={(this.role && `${this.role}`) || 'textbox'}\n disabled={!!this.disabled}\n test-id=\"q2InputInnerClearButton\"\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n >\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\">\n <span class={showPlaceholder ? 'placeholder-text' : ''}>\n {showPlaceholder ? this.placeholder : this.value}\n </span>\n </slot>\n </div>\n </button>\n </div>\n );\n }\n\n setCursorPosition(cursorData: ICursorData) {\n if (this.canSetSelection && !cursorData.hasSelection) {\n const input = this.inputField;\n const { valueLength, previousValueLength, startingPosition } = cursorData;\n\n if (this.type === 'currency') {\n if (previousValueLength - valueLength === 1) {\n input.setSelectionRange(startingPosition - 1, startingPosition - 1);\n } else {\n const difference = previousValueLength - valueLength;\n input.setSelectionRange(startingPosition - difference, startingPosition - difference);\n }\n }\n\n if (this.type !== 'currency') {\n const difference = valueLength - previousValueLength;\n // Never allow the cursor to move in reverse\n const newPosition = startingPosition + (difference > 0 ? difference : 0);\n input.setSelectionRange(newPosition, newPosition);\n }\n }\n }\n\n /* tslint:enable:cyclomatic-complexity */\n\n /* tslint:disable:cyclomatic-complexity */\n standardInputDOM() {\n const { hasCustomDisplaySlot } = this;\n const inputClasses = ['input-field'];\n const { ariaOwns, ariaHaspopup, ariaExpanded, ariaActivedescendant } = this.ariaAttributes;\n if (hasCustomDisplaySlot) inputClasses.push('sr');\n return (\n <Fragment>\n {hasCustomDisplaySlot && (\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\"></slot>\n </div>\n )}\n <input\n ref={el => (this.inputRef = el)}\n class={inputClasses.join(' ')}\n id={this.inputId}\n type={this.computedType}\n size={this.formattedValueObject.prefix ? 10 : undefined}\n max={this.max}\n min={this.min}\n step={this.step}\n aria-current={this.current || undefined}\n aria-describedby={this.inputDescribedBy}\n aria-required={`${!this.optional}`}\n aria-invalid={`${this.hasError}`}\n aria-owns={ariaOwns}\n aria-haspopup={ariaHaspopup}\n aria-expanded={ariaExpanded}\n aria-activedescendant={ariaActivedescendant}\n autocomplete={this.computedAutocomplete}\n autocapitalize={this.autocapitalize}\n autocorrect={this.autocorrect === 'on' ? 'on' : 'off'}\n autofocus={this.autofocus}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n role={this._role}\n test-id=\"inputField\"\n readonly={this.readonly || this._preventEntry}\n disabled={!!this.disabled}\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n onClick={this.onInputClick}\n onKeyDown={this.onInputKeydown}\n onInput={this.onInputInput}\n onPaste={this.onInputPaste}\n inputmode={this.inputMode}\n pattern={this.pattern || undefined}\n />\n </Fragment>\n );\n }\n\n validateInput = () => {\n this.validity = this.inputRef?.validity;\n if (this.validity?.valid === false) {\n this.invalid.emit();\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n <div class=\"label-wrapper\">\n {labelDOM(this)}\n {this.countDOM()}\n </div>\n {this.inputContainerDOM()}\n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