@zonos/elements 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/dist/cjs/{TaxId-Q6aDqqWv.js → TaxId-ChhNwG04.js} +36 -0
  2. package/dist/cjs/{cart-B6Aty-21.js → cart-CiXlehwQ.js} +88 -52
  3. package/dist/cjs/{collect-DnrvaXUI.js → collect-Drr8fY-q.js} +3 -3
  4. package/dist/cjs/{debounce-Cd2emZPn.js → debounce-BhgA8_3W.js} +2 -2
  5. package/dist/cjs/{debounce-vY0QYT6o.js → debounce-DRPMxNew.js} +1 -1
  6. package/dist/cjs/{getBorderRadius-CyYZw4qq.js → getBorderRadius-CJ_95w3o.js} +1 -1
  7. package/dist/cjs/{getMissingRequiredShippingFields-D03ICqss.js → getMissingRequiredShippingFields-DI6qF1z3.js} +1 -1
  8. package/dist/cjs/{hasInclusivePrice-CPCoVeU3.js → hasInclusivePrice-84KS94yH.js} +1 -1
  9. package/dist/cjs/index.cjs.js +19 -8
  10. package/dist/cjs/{invoice-Cj8W7NW0.js → invoice-5hVfSXpb.js} +3 -3
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{localization-BzNeXeDe.js → localization-B2mjW0Xa.js} +701 -41
  13. package/dist/cjs/{paypal-CuKshRmZ.js → paypal-pd8Nz_R_.js} +4 -4
  14. package/dist/cjs/{placeTestOrder-7czjwkjm.js → placeTestOrder-DrI8rD9o.js} +2 -2
  15. package/dist/cjs/{renderCheckoutCurrency-BH8t2b2x.js → renderCheckoutCurrency-u5q8YdUb.js} +2 -2
  16. package/dist/cjs/shouldRenderShortAddressCodeInput-gpu_bMfp.js +21 -0
  17. package/dist/cjs/{shouldShowLanguageSelect-yAbtCmd8.js → shouldShowLanguageSelect-gBg4KeTQ.js} +1 -1
  18. package/dist/cjs/{submitGtag-D79e8u6s.js → submitGtag-Rc-S3PnH.js} +1 -1
  19. package/dist/cjs/{throttle-zSVRQLC0.js → taxIdFields-BrIaPTcd.js} +57 -2
  20. package/dist/cjs/taxIdRules-BBj8kQxJ.js +58 -0
  21. package/dist/cjs/{updateCheckoutSessionAttributes-jMtfOL2m.js → updateCheckoutSessionAttributes-d0IKpwW8.js} +1 -1
  22. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +25 -30
  23. package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-address_4.cjs.entry.js +27 -30
  25. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +7 -6
  26. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  27. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
  29. package/dist/cjs/zonos-card_5.cjs.entry.js +8 -7
  30. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +83 -78
  31. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-checkout.cjs.entry.js +11 -10
  33. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  34. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -5
  35. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +12 -11
  36. package/dist/cjs/zonos-collect.cjs.entry.js +9 -8
  37. package/dist/cjs/zonos-controller.cjs.entry.js +7 -6
  38. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  40. package/dist/cjs/zonos-elements.cjs.js +1 -1
  41. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
  42. package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
  43. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  44. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -7
  45. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +12 -11
  46. package/dist/cjs/zonos-invoice.cjs.entry.js +9 -8
  47. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  48. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  49. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +7 -6
  50. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  51. package/dist/cjs/zonos-stripe-input.cjs.entry.js +2 -2
  52. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  53. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  54. package/dist/cjs/{zonosStore-Bx9jK82G.js → zonosStore-CDV83QyK.js} +2 -0
  55. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
  56. package/dist/collection/components/store/checkout/stripe.js +10 -12
  57. package/dist/collection/components/store/translationStore/strings.arabic.js +35 -2
  58. package/dist/collection/components/store/translationStore/strings.base.js +35 -2
  59. package/dist/collection/components/store/translationStore/strings.chinese.js +35 -2
  60. package/dist/collection/components/store/translationStore/strings.danish.js +35 -2
  61. package/dist/collection/components/store/translationStore/strings.dutch.js +35 -2
  62. package/dist/collection/components/store/translationStore/strings.french.js +35 -2
  63. package/dist/collection/components/store/translationStore/strings.german.js +35 -2
  64. package/dist/collection/components/store/translationStore/strings.hebrew.js +35 -2
  65. package/dist/collection/components/store/translationStore/strings.indonesian.js +35 -2
  66. package/dist/collection/components/store/translationStore/strings.italian.js +35 -2
  67. package/dist/collection/components/store/translationStore/strings.japanese.js +35 -2
  68. package/dist/collection/components/store/translationStore/strings.korean.js +35 -2
  69. package/dist/collection/components/store/translationStore/strings.norwegian.js +35 -2
  70. package/dist/collection/components/store/translationStore/strings.polish.js +35 -2
  71. package/dist/collection/components/store/translationStore/strings.portuguese.js +35 -2
  72. package/dist/collection/components/store/translationStore/strings.russian.js +35 -2
  73. package/dist/collection/components/store/translationStore/strings.spanish.js +35 -2
  74. package/dist/collection/components/store/translationStore/strings.swedish.js +35 -2
  75. package/dist/collection/components/store/translationStore/strings.turkish.js +35 -2
  76. package/dist/collection/components/store/translationStore/strings.vietnamese.js +35 -2
  77. package/dist/collection/components/store/zonosStore.js +2 -1
  78. package/dist/collection/components/stripe/zonos-address/zonos-address.css +5 -0
  79. package/dist/collection/components/stripe/zonos-address/zonos-address.js +37 -22
  80. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +5 -0
  81. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +34 -21
  82. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +24 -35
  83. package/dist/collection/components/utils/checkout/getCheckoutTaxIdPayload.js +16 -0
  84. package/dist/collection/components/utils/checkout/getTaxIdFieldState.js +26 -0
  85. package/dist/collection/components/utils/checkout/resolveTaxIdSelection.js +23 -0
  86. package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +7 -11
  87. package/dist/collection/components/utils/checkout/taxIdFields.js +29 -0
  88. package/dist/collection/components/utils/taxId/taxIdRules.js +44 -0
  89. package/dist/collection/components/utils/taxIdValidationResult.js +57 -58
  90. package/dist/collection/index.js +1 -0
  91. package/dist/collection/types/checkout/TaxId.js +31 -0
  92. package/dist/esm/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +32 -1
  93. package/dist/esm/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +88 -53
  94. package/dist/esm/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +3 -3
  95. package/dist/esm/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +1 -1
  96. package/dist/esm/{debounce-CrmpwbEE.js → debounce-DWqMT4lo.js} +2 -2
  97. package/dist/esm/{getBorderRadius-DYfkeXdx.js → getBorderRadius-BiGd45jw.js} +1 -1
  98. package/dist/esm/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +1 -1
  99. package/dist/esm/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
  100. package/dist/esm/index.js +9 -8
  101. package/dist/esm/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +3 -3
  102. package/dist/esm/loader.js +1 -1
  103. package/dist/esm/{localization-BIh-4pc_.js → localization-DHM91diu.js} +701 -41
  104. package/dist/esm/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +4 -4
  105. package/dist/esm/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +2 -2
  106. package/dist/esm/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
  107. package/dist/esm/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +19 -0
  108. package/dist/esm/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
  109. package/dist/esm/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
  110. package/dist/esm/taxIdFields-ByEYfsO5.js +139 -0
  111. package/dist/esm/taxIdRules-xYlx7ZXW.js +47 -0
  112. package/dist/esm/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
  113. package/dist/esm/zonos-address-completion-dialog_7.entry.js +23 -28
  114. package/dist/esm/zonos-address-display_2.entry.js +3 -3
  115. package/dist/esm/zonos-address_4.entry.js +25 -28
  116. package/dist/esm/zonos-airwallex-payment.entry.js +7 -6
  117. package/dist/esm/zonos-badge.entry.js +1 -1
  118. package/dist/esm/zonos-banner.entry.js +1 -1
  119. package/dist/esm/zonos-button_3.entry.js +2 -2
  120. package/dist/esm/zonos-card_5.entry.js +8 -7
  121. package/dist/esm/zonos-cart-items_12.entry.js +82 -77
  122. package/dist/esm/zonos-checkbox_2.entry.js +2 -2
  123. package/dist/esm/zonos-checkout.entry.js +11 -10
  124. package/dist/esm/zonos-collapse.entry.js +1 -1
  125. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -5
  126. package/dist/esm/zonos-collect-finish_6.entry.js +12 -11
  127. package/dist/esm/zonos-collect.entry.js +9 -8
  128. package/dist/esm/zonos-controller.entry.js +7 -6
  129. package/dist/esm/zonos-country-flag.entry.js +2 -2
  130. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  131. package/dist/esm/zonos-elements.js +1 -1
  132. package/dist/esm/zonos-hello-dialog.entry.js +4 -4
  133. package/dist/esm/zonos-hello.entry.js +4 -4
  134. package/dist/esm/zonos-input.entry.js +2 -2
  135. package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -7
  136. package/dist/esm/zonos-invoice-finish_5.entry.js +12 -11
  137. package/dist/esm/zonos-invoice.entry.js +9 -8
  138. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  139. package/dist/esm/zonos-logo.entry.js +1 -1
  140. package/dist/esm/zonos-policy-consent_2.entry.js +7 -6
  141. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  142. package/dist/esm/zonos-stripe-input.entry.js +2 -2
  143. package/dist/esm/zonos-text.entry.js +1 -1
  144. package/dist/esm/zonos-v-stack.entry.js +1 -1
  145. package/dist/esm/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +2 -1
  146. package/dist/esm-es5/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +2 -1
  147. package/dist/esm-es5/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +64 -53
  148. package/dist/esm-es5/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +1 -1
  149. package/dist/esm-es5/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +7 -7
  150. package/dist/esm-es5/debounce-DWqMT4lo.js +1 -0
  151. package/dist/esm-es5/getBorderRadius-BiGd45jw.js +8 -0
  152. package/dist/esm-es5/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +3 -3
  153. package/dist/esm-es5/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
  154. package/dist/esm-es5/index.js +11 -11
  155. package/dist/esm-es5/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +1 -1
  156. package/dist/esm-es5/loader.js +1 -1
  157. package/dist/esm-es5/localization-DHM91diu.js +348 -0
  158. package/dist/esm-es5/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +1 -1
  159. package/dist/esm-es5/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +1 -1
  160. package/dist/esm-es5/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
  161. package/dist/esm-es5/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +8 -0
  162. package/dist/esm-es5/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
  163. package/dist/esm-es5/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
  164. package/dist/esm-es5/taxIdFields-ByEYfsO5.js +46 -0
  165. package/dist/esm-es5/taxIdRules-xYlx7ZXW.js +6 -0
  166. package/dist/esm-es5/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
  167. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +253 -254
  168. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  169. package/dist/esm-es5/zonos-address_4.entry.js +8 -9
  170. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  171. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  172. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  173. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  174. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  175. package/dist/esm-es5/zonos-cart-items_12.entry.js +19 -18
  176. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  177. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  178. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  179. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  180. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  181. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  182. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  183. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  184. package/dist/esm-es5/zonos-country-select_4.entry.js +2 -2
  185. package/dist/esm-es5/zonos-elements.js +1 -1
  186. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  187. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  188. package/dist/esm-es5/zonos-input.entry.js +1 -1
  189. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
  190. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  191. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  192. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  193. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  194. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  195. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  196. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  197. package/dist/esm-es5/zonos-text.entry.js +1 -1
  198. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  199. package/dist/esm-es5/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +1 -1
  200. package/dist/scripts/index.d.ts +97 -1
  201. package/dist/scripts/index.js +1 -1
  202. package/dist/scripts/loadZonos.js +1 -1
  203. package/dist/scripts/zonos.js +1 -1
  204. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
  205. package/dist/types/components/store/checkout/stripe.d.ts +9 -0
  206. package/dist/types/components/store/translationStore/strings.arabic.d.ts +34 -1
  207. package/dist/types/components/store/translationStore/strings.base.d.ts +34 -1
  208. package/dist/types/components/store/translationStore/strings.chinese.d.ts +34 -1
  209. package/dist/types/components/store/translationStore/strings.danish.d.ts +34 -1
  210. package/dist/types/components/store/translationStore/strings.dutch.d.ts +34 -1
  211. package/dist/types/components/store/translationStore/strings.french.d.ts +34 -1
  212. package/dist/types/components/store/translationStore/strings.german.d.ts +34 -1
  213. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +34 -1
  214. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +34 -1
  215. package/dist/types/components/store/translationStore/strings.italian.d.ts +34 -1
  216. package/dist/types/components/store/translationStore/strings.japanese.d.ts +34 -1
  217. package/dist/types/components/store/translationStore/strings.korean.d.ts +34 -1
  218. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +34 -1
  219. package/dist/types/components/store/translationStore/strings.polish.d.ts +34 -1
  220. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +34 -1
  221. package/dist/types/components/store/translationStore/strings.russian.d.ts +34 -1
  222. package/dist/types/components/store/translationStore/strings.spanish.d.ts +34 -1
  223. package/dist/types/components/store/translationStore/strings.swedish.d.ts +34 -1
  224. package/dist/types/components/store/translationStore/strings.turkish.d.ts +34 -1
  225. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +34 -1
  226. package/dist/types/components/store/zonosStore.d.ts +2 -1
  227. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -1
  228. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +4 -1
  229. package/dist/types/components/utils/checkout/getCheckoutTaxIdPayload.d.ts +6 -0
  230. package/dist/types/components/utils/checkout/getTaxIdFieldState.d.ts +18 -0
  231. package/dist/types/components/utils/checkout/resolveTaxIdSelection.d.ts +12 -0
  232. package/dist/types/components/utils/checkout/shouldRenderTaxIdInput.d.ts +2 -1
  233. package/dist/types/components/utils/checkout/taxIdFields.d.ts +11 -0
  234. package/dist/types/components/utils/taxId/taxIdRules.d.ts +37 -0
  235. package/dist/types/components/utils/taxIdValidationResult.d.ts +8 -2
  236. package/dist/types/components.d.ts +22 -0
  237. package/dist/types/index.d.ts +1 -0
  238. package/dist/types/types/checkout/TaxId.d.ts +45 -0
  239. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +11 -0
  240. package/dist/types/types/checkout/api/CreateParty.d.ts +2 -0
  241. package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
  242. package/dist/zonos-elements/index.esm.js +1 -1
  243. package/dist/zonos-elements/{p-7bd99479.system.entry.js → p-064d8829.system.entry.js} +26 -26
  244. package/dist/zonos-elements/p-107f287b.entry.js +1 -0
  245. package/dist/zonos-elements/{p-51400242.system.entry.js → p-1199baef.system.entry.js} +3 -3
  246. package/dist/zonos-elements/p-12b24ebb.entry.js +1 -0
  247. package/dist/zonos-elements/{p-9c33f7ed.system.entry.js → p-189cc594.system.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-d3d0656a.entry.js → p-1a5acbcd.entry.js} +1 -1
  249. package/dist/zonos-elements/{p-11defdca.system.entry.js → p-1cc42a98.system.entry.js} +18 -18
  250. package/dist/zonos-elements/p-1e6db427.entry.js +1 -0
  251. package/dist/zonos-elements/{p-d82fd8a9.system.entry.js → p-1fda4aec.system.entry.js} +116 -115
  252. package/dist/zonos-elements/{p-756d303f.system.entry.js → p-20eb00de.system.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-5967a1c1.system.entry.js → p-216a908d.system.entry.js} +5 -5
  254. package/dist/zonos-elements/p-25eb99d4.entry.js +1 -0
  255. package/dist/zonos-elements/{p-23352709.system.entry.js → p-2b63865a.system.entry.js} +4 -4
  256. package/dist/zonos-elements/{p-6db7c0b1.system.entry.js → p-2ca826b9.system.entry.js} +2 -2
  257. package/dist/zonos-elements/{p-6c41b00c.entry.js → p-2d513aa3.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-c961caaf.entry.js → p-3e705c9b.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-acd50b0b.entry.js → p-4612facd.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-5b80aff2.system.entry.js → p-46a839d2.system.entry.js} +24 -24
  261. package/dist/zonos-elements/p-46b9f0cf.entry.js +1 -0
  262. package/dist/zonos-elements/{p-244e0302.system.entry.js → p-4715045c.system.entry.js} +1 -1
  263. package/dist/zonos-elements/{p-d168023b.entry.js → p-4917b74d.entry.js} +1 -1
  264. package/dist/zonos-elements/{p-0b81f8b9.system.entry.js → p-53eac12f.system.entry.js} +14 -14
  265. package/dist/zonos-elements/{p-17c7ea4a.system.entry.js → p-55813e9f.system.entry.js} +3 -3
  266. package/dist/zonos-elements/{p-06030d3b.system.entry.js → p-5585db86.system.entry.js} +45 -45
  267. package/dist/zonos-elements/p-59fc32af.entry.js +1 -0
  268. package/dist/zonos-elements/{p-193d9722.entry.js → p-61312d5b.entry.js} +1 -1
  269. package/dist/zonos-elements/p-636b71d4.entry.js +1 -0
  270. package/dist/zonos-elements/{p-155ed3d3.system.entry.js → p-6410fa11.system.entry.js} +24 -24
  271. package/dist/zonos-elements/{p-0fca452b.entry.js → p-65817880.entry.js} +1 -1
  272. package/dist/zonos-elements/p-678b9214.entry.js +1 -0
  273. package/dist/zonos-elements/p-6e691736.entry.js +1 -0
  274. package/dist/zonos-elements/p-6vSUiBfr.system.js +348 -0
  275. package/dist/zonos-elements/p-74659d88.entry.js +1 -0
  276. package/dist/zonos-elements/p-7dc7f328.entry.js +1 -0
  277. package/dist/zonos-elements/{p-55916c90.entry.js → p-7f1bea9b.entry.js} +1 -1
  278. package/dist/zonos-elements/{p-1c150f26.entry.js → p-821e413a.entry.js} +1 -1
  279. package/dist/zonos-elements/{p-c403f004.system.entry.js → p-82e45d0c.system.entry.js} +1 -1
  280. package/dist/zonos-elements/p-84e76348.entry.js +1 -0
  281. package/dist/zonos-elements/{p-1409de3b.system.entry.js → p-88e20e99.system.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-195f6e38.system.entry.js → p-89a3c4db.system.entry.js} +1 -1
  283. package/dist/zonos-elements/{p-4679f0ec.entry.js → p-8f9d8795.entry.js} +1 -1
  284. package/dist/zonos-elements/p-8fa6cfff.entry.js +1 -0
  285. package/dist/zonos-elements/{p-92fe9a1f.system.entry.js → p-902cca23.system.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-0a4a7742.system.entry.js → p-93860183.system.entry.js} +1 -1
  287. package/dist/zonos-elements/{p-69c3e367.system.entry.js → p-941a95a1.system.entry.js} +10 -10
  288. package/dist/zonos-elements/{p-b5882fbb.system.entry.js → p-9449b4f4.system.entry.js} +1 -1
  289. package/dist/zonos-elements/{p-6abec43f.system.entry.js → p-960070d0.system.entry.js} +3 -3
  290. package/dist/zonos-elements/{p-1bac5ac1.system.entry.js → p-990fcf81.system.entry.js} +1 -1
  291. package/dist/zonos-elements/p-BD-9rD53.js +1 -0
  292. package/dist/zonos-elements/p-BMPYH-LT.js +1 -0
  293. package/dist/zonos-elements/{p-DI2vXnXc.system.js → p-BrQ8n8NS.system.js} +3 -3
  294. package/dist/zonos-elements/p-Bu9WCfUC.system.js +2 -2
  295. package/dist/zonos-elements/{p-CUaf1cEg.js → p-C70h5mKA.js} +1 -1
  296. package/dist/zonos-elements/{p-B4Ufchqh.system.js → p-C9XLkmmb.system.js} +3 -3
  297. package/dist/zonos-elements/{p-CZD8WvyY.system.js → p-CBUz18kA.system.js} +1 -1
  298. package/dist/zonos-elements/{p-kaOxUR9u.system.js → p-CGNVm52g.system.js} +6 -6
  299. package/dist/zonos-elements/p-CHKKvuiz.js +1 -0
  300. package/dist/zonos-elements/{p-0mGRBGcf.js → p-CMo3ZweU.js} +1 -1
  301. package/dist/zonos-elements/p-CTiqplrr.js +1 -0
  302. package/dist/zonos-elements/p-CYxMfUL7.system.js +1 -0
  303. package/dist/zonos-elements/{p-D4MevhAL.system.js → p-CbhN65lj.system.js} +3 -3
  304. package/dist/zonos-elements/p-Ch1w0Lr7.js +1 -0
  305. package/dist/zonos-elements/{p-W82paT5F.js → p-CqB9AfBf.js} +1 -1
  306. package/dist/zonos-elements/p-CzKlS3E-.system.js +6 -0
  307. package/dist/zonos-elements/p-D1SmY_fZ.js +1 -0
  308. package/dist/zonos-elements/{p-sz4L-ZnB.js → p-D1e9zNDA.js} +1 -1
  309. package/dist/zonos-elements/{p-c9QtIdJX.js → p-D6xXnsM_.js} +1 -1
  310. package/dist/zonos-elements/{p-8PPEbm_0.system.js → p-DIab60nK.system.js} +12 -12
  311. package/dist/zonos-elements/{p-Cye-evFK.js → p-DMIgN_sT.js} +1 -1
  312. package/dist/zonos-elements/{p-CXxvn4GX.system.js → p-DQrMfUzi.system.js} +41 -41
  313. package/dist/zonos-elements/{p-BuU_p5DP.system.js → p-DTgUqgwV.system.js} +2 -2
  314. package/dist/zonos-elements/p-DW7I0zOF.js +1 -0
  315. package/dist/zonos-elements/p-DZdkJHK9.system.js +7 -0
  316. package/dist/zonos-elements/{p-XqkqjeNV.system.js → p-DgUrB-1a.system.js} +1 -1
  317. package/dist/zonos-elements/p-DiMEP3mh.js +1 -0
  318. package/dist/zonos-elements/p-DprOoI2W.system.js +528 -0
  319. package/dist/zonos-elements/{p-7abqRc9V.js → p-DpwmHU8R.js} +2 -2
  320. package/dist/zonos-elements/p-DqVePqqx.system.js +8 -0
  321. package/dist/zonos-elements/{p-Cby4EkFu.system.js → p-DsBuZ6ob.system.js} +2 -1
  322. package/dist/zonos-elements/{p-XDxdMlQl.system.js → p-Dtu_Japy.system.js} +39 -39
  323. package/dist/zonos-elements/p-Dwg61Ft_.js +1 -0
  324. package/dist/zonos-elements/p-U33isUJG.js +1 -0
  325. package/dist/zonos-elements/{p-Be3Hpms1.system.js → p-XoQH3S7Z.system.js} +1 -1
  326. package/dist/zonos-elements/{p-474e8a92.system.entry.js → p-a1022808.system.entry.js} +1 -1
  327. package/dist/zonos-elements/{p-83aa1c8c.entry.js → p-ad04bba2.entry.js} +1 -1
  328. package/dist/zonos-elements/{p-a938c174.entry.js → p-b51010b9.entry.js} +1 -1
  329. package/dist/zonos-elements/{p-dfc87b10.system.entry.js → p-c33b8f6a.system.entry.js} +1 -1
  330. package/dist/zonos-elements/{p-a40fd99b.system.entry.js → p-cccaad60.system.entry.js} +39 -40
  331. package/dist/zonos-elements/p-d3345b2c.entry.js +1 -0
  332. package/dist/zonos-elements/{p-249c1ee1.system.entry.js → p-d8f375da.system.entry.js} +3 -3
  333. package/dist/zonos-elements/{p-2603dce0.entry.js → p-e216cc8c.entry.js} +1 -1
  334. package/dist/zonos-elements/{p-b79036fc.entry.js → p-e7fdb2c9.entry.js} +1 -1
  335. package/dist/zonos-elements/p-ebe157b5.entry.js +1 -0
  336. package/dist/zonos-elements/p-ef5344ea.entry.js +1 -0
  337. package/dist/zonos-elements/{p-7f031592.system.entry.js → p-f3d9a380.system.entry.js} +73 -73
  338. package/dist/zonos-elements/{p-31043c2e.system.entry.js → p-f5f95990.system.entry.js} +296 -297
  339. package/dist/zonos-elements/p-fda89981.system.entry.js +13 -0
  340. package/dist/zonos-elements/{p-d4d2b39e.entry.js → p-fddf3556.entry.js} +1 -1
  341. package/dist/zonos-elements/p-iAIzUA4k.js +1 -0
  342. package/dist/zonos-elements/{p-BpDCLBwW.js → p-n5PZKz1k.js} +1 -1
  343. package/dist/zonos-elements/{p-DoEHepOc.system.js → p-ojtNq-r5.system.js} +1 -1
  344. package/dist/zonos-elements/{p-C_z9WL8a.js → p-r-YGHhLa.js} +1 -1
  345. package/dist/zonos-elements/{p-CBx5nYet.system.js → p-vTIygnHq.system.js} +1 -1
  346. package/dist/zonos-elements/{p-DQZncB2d.system.js → p-zsTASoh2.system.js} +3 -3
  347. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  348. package/package.json +1 -1
  349. package/dist/cjs/shouldRenderTaxIdInput-TxekHCp7.js +0 -43
  350. package/dist/esm/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -40
  351. package/dist/esm/throttle-Cvlvb-dm.js +0 -85
  352. package/dist/esm-es5/debounce-CrmpwbEE.js +0 -1
  353. package/dist/esm-es5/getBorderRadius-DYfkeXdx.js +0 -8
  354. package/dist/esm-es5/localization-BIh-4pc_.js +0 -348
  355. package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -17
  356. package/dist/esm-es5/throttle-Cvlvb-dm.js +0 -46
  357. package/dist/zonos-elements/p-06fe2939.entry.js +0 -1
  358. package/dist/zonos-elements/p-24f3c547.entry.js +0 -1
  359. package/dist/zonos-elements/p-30b3c9d3.entry.js +0 -1
  360. package/dist/zonos-elements/p-39ee1558.entry.js +0 -1
  361. package/dist/zonos-elements/p-3a2da031.entry.js +0 -1
  362. package/dist/zonos-elements/p-4806b264.system.entry.js +0 -13
  363. package/dist/zonos-elements/p-5873ab8e.entry.js +0 -1
  364. package/dist/zonos-elements/p-725e29bb.entry.js +0 -1
  365. package/dist/zonos-elements/p-BGktDPwA.system.js +0 -1
  366. package/dist/zonos-elements/p-Bi-s0fp_.system.js +0 -17
  367. package/dist/zonos-elements/p-CEK_Wk6v.system.js +0 -7
  368. package/dist/zonos-elements/p-CFbfEmjN.js +0 -1
  369. package/dist/zonos-elements/p-CcJF6xhQ.js +0 -1
  370. package/dist/zonos-elements/p-Cxuiqv1I.js +0 -1
  371. package/dist/zonos-elements/p-D-bZg-Pc.js +0 -1
  372. package/dist/zonos-elements/p-DOD2I44l.system.js +0 -348
  373. package/dist/zonos-elements/p-DS-qw_qc.system.js +0 -517
  374. package/dist/zonos-elements/p-DZ2mevDK.js +0 -1
  375. package/dist/zonos-elements/p-DnjGkbEy.js +0 -1
  376. package/dist/zonos-elements/p-FRWZayxL.js +0 -1
  377. package/dist/zonos-elements/p-Mrz_lnC1.js +0 -1
  378. package/dist/zonos-elements/p-ad9ff14c.entry.js +0 -1
  379. package/dist/zonos-elements/p-bb3546c0.entry.js +0 -1
  380. package/dist/zonos-elements/p-c1cbfdba.entry.js +0 -1
  381. package/dist/zonos-elements/p-c47ce656.entry.js +0 -1
  382. package/dist/zonos-elements/p-c9d5d8f1.entry.js +0 -1
  383. package/dist/zonos-elements/p-clDfq9AL.js +0 -1
  384. package/dist/zonos-elements/p-d74bc3e8.entry.js +0 -1
  385. package/dist/zonos-elements/p-d8b312e5.entry.js +0 -1
  386. package/dist/zonos-elements/p-db87b0dd.entry.js +0 -1
  387. package/dist/zonos-elements/p-defc2d18.entry.js +0 -1
  388. package/dist/zonos-elements/p-rVp8hgWw.js +0 -1
@@ -1,10 +1,10 @@
1
- import { z as zonosStore, c as createStore } from './zonosStore-msUlqmSD.js';
2
- import { x as cartStoreNextStep, j as cartStoreClearCheckoutInterval, t as trackConversionEvent, y as isPolicyConsentRequired, G as policyConsentStore, C as validateCheckoutSession, b as stripeStore, d as cartStore, n as stripeStoreHandleInventoryCheck, A as storeCreditStoreApplyCredit, T as stripeStoreRecordPolicyConsent, B as storeCreditStoreCoversFullAmount, D as storeCreditStoreCreateOrder, K as storeCreditStoreGetEffectiveAmount } from './cart-BoQp8Ema.js';
3
- import { s as storageStore, t as translate } from './localization-BIh-4pc_.js';
1
+ import { z as zonosStore, c as createStore } from './zonosStore-BXP9FvIt.js';
2
+ import { x as cartStoreNextStep, j as cartStoreClearCheckoutInterval, t as trackConversionEvent, y as isPolicyConsentRequired, G as policyConsentStore, C as validateCheckoutSession, b as stripeStore, d as cartStore, n as stripeStoreHandleInventoryCheck, A as storeCreditStoreApplyCredit, T as stripeStoreRecordPolicyConsent, B as storeCreditStoreCoversFullAmount, D as storeCreditStoreCreateOrder, K as storeCreditStoreGetEffectiveAmount } from './cart-DmJkjiDE.js';
3
+ import { s as storageStore, t as translate } from './localization-DHM91diu.js';
4
4
  import { h as handleFetch, g as getIsTestMode, l as logError, j as jsonParse } from './handleFetch-D5GYDF-O.js';
5
5
  import { i as isContrastColor } from './isContrastColor-CWLU13s9.js';
6
6
  import { l as log } from './VarianceTest-BJmZPrZl.js';
7
- import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-df9AQ2zL.js';
7
+ import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-BEFrutel.js';
8
8
 
9
9
  /*!
10
10
  * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
@@ -1,5 +1,5 @@
1
- import { d as cartStore } from './cart-BoQp8Ema.js';
2
- import { s as storageStore } from './localization-BIh-4pc_.js';
1
+ import { d as cartStore } from './cart-DmJkjiDE.js';
2
+ import { s as storageStore } from './localization-DHM91diu.js';
3
3
  import { l as logError, h as handleFetch } from './handleFetch-D5GYDF-O.js';
4
4
 
5
5
  const placeTestOrder = async () => {
@@ -1,5 +1,5 @@
1
- import { d as cartStore } from './cart-BoQp8Ema.js';
2
- import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-BIh-4pc_.js';
1
+ import { d as cartStore } from './cart-DmJkjiDE.js';
2
+ import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-DHM91diu.js';
3
3
 
4
4
  const getDisplayCurrency = () => {
5
5
  var _a, _b;
@@ -0,0 +1,19 @@
1
+ import { c as countryRequireShortAddressCode } from './ShortAddressCode-nJ6oI8-n.js';
2
+
3
+ const isInShortAddressCodeCountry = (countryCode) => {
4
+ return countryRequireShortAddressCode.includes(countryCode);
5
+ };
6
+ /**
7
+ * Checks if the short address code input should be rendered based on the country code.
8
+ */
9
+ const shouldRenderShortAddressCodeInput = ({ countryCode, }) => {
10
+ // If country require short address code, show the input
11
+ const isCountryRequireShortAddressCode = isInShortAddressCodeCountry(countryCode);
12
+ if (isCountryRequireShortAddressCode) {
13
+ return true;
14
+ }
15
+ // If country doesn't require short address code, no need to show the input
16
+ return false;
17
+ };
18
+
19
+ export { shouldRenderShortAddressCodeInput as s };
@@ -1,4 +1,4 @@
1
- import { A as getSupportedLanguages } from './localization-BIh-4pc_.js';
1
+ import { A as getSupportedLanguages } from './localization-DHM91diu.js';
2
2
 
3
3
  /**
4
4
  * Whether to offer the language selector. Hidden when the merchant has narrowed
@@ -1,4 +1,4 @@
1
- import { z as zonosStore } from './zonosStore-msUlqmSD.js';
1
+ import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
2
2
  import { g as getIsTestMode } from './handleFetch-D5GYDF-O.js';
3
3
  import { l as log } from './VarianceTest-BJmZPrZl.js';
4
4
 
@@ -0,0 +1,139 @@
1
+ import { r as requireIsObject, f as getDefaultExportFromCjs } from './zonosStore-BXP9FvIt.js';
2
+ import { r as requireDebounce } from './debounce-DHj2iHA1.js';
3
+ import { h } from './index-_lt63o7c.js';
4
+ import { V as resolveTaxIdSelection, b as stripeStore } from './cart-DmJkjiDE.js';
5
+ import { t as translate } from './localization-DHM91diu.js';
6
+ import { t as taxIdLabelForCheckout, d as isCheckoutTaxIdTypeValue } from './taxIdRules-xYlx7ZXW.js';
7
+
8
+ var throttle_1;
9
+ var hasRequiredThrottle;
10
+
11
+ function requireThrottle () {
12
+ if (hasRequiredThrottle) return throttle_1;
13
+ hasRequiredThrottle = 1;
14
+ var debounce = requireDebounce(),
15
+ isObject = requireIsObject();
16
+
17
+ /** Error message constants. */
18
+ var FUNC_ERROR_TEXT = 'Expected a function';
19
+
20
+ /**
21
+ * Creates a throttled function that only invokes `func` at most once per
22
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
23
+ * method to cancel delayed `func` invocations and a `flush` method to
24
+ * immediately invoke them. Provide `options` to indicate whether `func`
25
+ * should be invoked on the leading and/or trailing edge of the `wait`
26
+ * timeout. The `func` is invoked with the last arguments provided to the
27
+ * throttled function. Subsequent calls to the throttled function return the
28
+ * result of the last `func` invocation.
29
+ *
30
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
31
+ * invoked on the trailing edge of the timeout only if the throttled function
32
+ * is invoked more than once during the `wait` timeout.
33
+ *
34
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
35
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
36
+ *
37
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
38
+ * for details over the differences between `_.throttle` and `_.debounce`.
39
+ *
40
+ * @static
41
+ * @memberOf _
42
+ * @since 0.1.0
43
+ * @category Function
44
+ * @param {Function} func The function to throttle.
45
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
46
+ * @param {Object} [options={}] The options object.
47
+ * @param {boolean} [options.leading=true]
48
+ * Specify invoking on the leading edge of the timeout.
49
+ * @param {boolean} [options.trailing=true]
50
+ * Specify invoking on the trailing edge of the timeout.
51
+ * @returns {Function} Returns the new throttled function.
52
+ * @example
53
+ *
54
+ * // Avoid excessively updating the position while scrolling.
55
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
56
+ *
57
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
58
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
59
+ * jQuery(element).on('click', throttled);
60
+ *
61
+ * // Cancel the trailing throttled invocation.
62
+ * jQuery(window).on('popstate', throttled.cancel);
63
+ */
64
+ function throttle(func, wait, options) {
65
+ var leading = true,
66
+ trailing = true;
67
+
68
+ if (typeof func != 'function') {
69
+ throw new TypeError(FUNC_ERROR_TEXT);
70
+ }
71
+ if (isObject(options)) {
72
+ leading = 'leading' in options ? !!options.leading : leading;
73
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
74
+ }
75
+ return debounce(func, wait, {
76
+ 'leading': leading,
77
+ 'maxWait': wait,
78
+ 'trailing': trailing
79
+ });
80
+ }
81
+
82
+ throttle_1 = throttle;
83
+ return throttle_1;
84
+ }
85
+
86
+ var throttleExports = requireThrottle();
87
+ var throttle = /*@__PURE__*/getDefaultExportFromCjs(throttleExports);
88
+
89
+ const getTaxIdFieldState = ({ companyName, countryCode, errorField, errorMessage, shouldRequirePeruTaxId, taxIdType, }) => {
90
+ var _a, _b;
91
+ const { rendered, selectedType, send, typeOptions } = resolveTaxIdSelection({
92
+ companyName,
93
+ countryCode,
94
+ shouldRequirePeruTaxId,
95
+ taxIdType,
96
+ });
97
+ if (!rendered) {
98
+ return null;
99
+ }
100
+ const singleTypeLabel = typeOptions
101
+ ? null
102
+ : taxIdLabelForCheckout(countryCode);
103
+ return {
104
+ inputLabel: (_a = selectedType === null || selectedType === void 0 ? void 0 : selectedType.label) !== null && _a !== void 0 ? _a : singleTypeLabel === null || singleTypeLabel === void 0 ? void 0 : singleTypeLabel.friendlyName,
105
+ inputPlaceholder: (_b = selectedType === null || selectedType === void 0 ? void 0 : selectedType.placeholder) !== null && _b !== void 0 ? _b : singleTypeLabel === null || singleTypeLabel === void 0 ? void 0 : singleTypeLabel.placeholder,
106
+ selectedValue: (selectedType === null || selectedType === void 0 ? void 0 : selectedType.value) || '',
107
+ showValueInput: send,
108
+ typeError: errorField === 'type' ? errorMessage : '',
109
+ typeOptions,
110
+ valueError: errorField === 'value' ? errorMessage : '',
111
+ };
112
+ };
113
+
114
+ const renderTaxIdFields = ({ companyName, countryCode, errorField, errorMessage, onTaxIdChange, shouldRequirePeruTaxId, taxId, taxIdType, }) => {
115
+ const state = getTaxIdFieldState({
116
+ companyName,
117
+ countryCode,
118
+ errorField,
119
+ errorMessage,
120
+ shouldRequirePeruTaxId,
121
+ taxIdType,
122
+ });
123
+ if (!state) {
124
+ return null;
125
+ }
126
+ return (h("div", { class: "zonos--tax-id-input" }, state.typeOptions && (h("zonos-stripe-select", { error: state.typeError, isError: !!state.typeError, onSelectChange: (event) => {
127
+ if (isCheckoutTaxIdTypeValue(event.detail)) {
128
+ stripeStore.taxIdType = event.detail;
129
+ }
130
+ }, options: state.typeOptions.map(option => ({
131
+ label: translate(option.label),
132
+ value: option.value,
133
+ })), selectLabel: translate('Tax id type'), selectedValue: state.selectedValue, value: state.selectedValue })), state.showValueInput && (h("zonos-stripe-input", { error: state.valueError, inputLabel: state.inputLabel ? translate(state.inputLabel) : '', inputPlaceholder: state.inputPlaceholder || '', inputValue: taxId, isError: !!state.valueError, onInputChange: (event) => {
134
+ stripeStore.taxId = event.detail;
135
+ onTaxIdChange === null || onTaxIdChange === void 0 ? void 0 : onTaxIdChange(event.detail);
136
+ } }))));
137
+ };
138
+
139
+ export { renderTaxIdFields as r, throttle as t };
@@ -0,0 +1,47 @@
1
+ import { t as taxIdTypeOptions, p as peruTaxIdDigitLength, a as checkoutTaxIdTypeValues, i as isCountryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-DMIgN_sT.js';
2
+
3
+ const stripTaxIdSeparators = (taxId) => taxId.replace(/[\s-]/g, '');
4
+ const rfcRegex = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/;
5
+ const curpRegex = /^[A-Z]{4}[0-9]{6}[HMX][A-Z]{5}[A-Z0-9][0-9]$/;
6
+ const isMexicoTaxIdType = (taxIdType) => taxIdTypeOptions.MX.some(option => option.value === taxIdType);
7
+ const isPeruTaxIdType = (taxIdType) => taxIdTypeOptions.PE.some(option => option.value === taxIdType);
8
+ const isCheckoutTaxIdTypeValue = (taxIdType) => checkoutTaxIdTypeValues.some(value => value === taxIdType);
9
+ /** 8 digits are a DNI, 9 a carné, 11 an RUC. Anything else is not a Peru tax id. */
10
+ const peruTaxIdTypeFromValue = (taxId) => {
11
+ const digits = stripTaxIdSeparators(taxId);
12
+ if (!/^\d+$/.test(digits)) {
13
+ return null;
14
+ }
15
+ if (digits.length === peruTaxIdDigitLength.DNI) {
16
+ return 'DNI';
17
+ }
18
+ if (digits.length === peruTaxIdDigitLength.CE) {
19
+ return 'CE';
20
+ }
21
+ if (digits.length === peruTaxIdDigitLength.RUC) {
22
+ return 'RUC';
23
+ }
24
+ return null;
25
+ };
26
+ const isPeruTaxIdActive = ({ countryCode, shouldRequirePeruTaxId, }) => shouldRequirePeruTaxId && countryCode === 'PE';
27
+ /**
28
+ * Peru stays off `countryRequireTaxId`. The API flag decides which stores see it.
29
+ * Mexico and Peru pick the kind from a dropdown instead of a regex.
30
+ */
31
+ const taxIdTypeOptionsForCheckout = ({ countryCode, shouldRequirePeruTaxId, }) => {
32
+ if (isPeruTaxIdActive({ countryCode, shouldRequirePeruTaxId })) {
33
+ return taxIdTypeOptions.PE;
34
+ }
35
+ if (countryCode === 'MX') {
36
+ return taxIdTypeOptions.MX;
37
+ }
38
+ return null;
39
+ };
40
+ const taxIdLabelForCheckout = (countryCode) => {
41
+ if (isCountryRequireTaxId(countryCode)) {
42
+ return shipToTaxIdLabels[countryCode];
43
+ }
44
+ return null;
45
+ };
46
+
47
+ export { isPeruTaxIdType as a, isPeruTaxIdActive as b, curpRegex as c, isCheckoutTaxIdTypeValue as d, taxIdTypeOptionsForCheckout as e, isMexicoTaxIdType as i, peruTaxIdTypeFromValue as p, rfcRegex as r, stripTaxIdSeparators as s, taxIdLabelForCheckout as t };
@@ -1,4 +1,4 @@
1
- import { d as debounce } from './debounce-CrmpwbEE.js';
1
+ import { d as debounce } from './debounce-DWqMT4lo.js';
2
2
  import { h as handleFetch, l as logError } from './handleFetch-D5GYDF-O.js';
3
3
 
4
4
  const attributesToUpdate = {};
@@ -1,20 +1,21 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { t as translate, s as storageStore, z as storageStoreOnChange, l as localizationStore } from './localization-BIh-4pc_.js';
3
- import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
4
- import { M as MIN_POSTAL_CODE_LENGTH } from './getMissingRequiredShippingFields-Ks6_tpjn.js';
2
+ import { t as translate, s as storageStore, z as storageStoreOnChange, l as localizationStore } from './localization-DHM91diu.js';
3
+ import { z as zonosStore, e as getShouldRequirePeruTaxId, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
4
+ import { M as MIN_POSTAL_CODE_LENGTH } from './getMissingRequiredShippingFields-DljgpDZe.js';
5
5
  import { c as classes } from './classes-BJHSB96f.js';
6
- import { U as extractName, b as stripeStore, w as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-BoQp8Ema.js';
6
+ import { U as extractName, b as stripeStore, w as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-DmJkjiDE.js';
7
7
  import { R as RemoveIcon$1 } from './RemoveIcon-C2QMVeWW.js';
8
8
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
9
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
10
- import { t as throttle } from './throttle-Cvlvb-dm.js';
9
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
10
+ import { t as throttle, r as renderTaxIdFields } from './taxIdFields-ByEYfsO5.js';
11
11
  import { i as isCheckoutMobile } from './handleFetch-D5GYDF-O.js';
12
- import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-CKyZ6Zni.js';
12
+ import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
13
13
  import { l as log } from './VarianceTest-BJmZPrZl.js';
14
- import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-Cye-evFK.js';
15
14
  import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-DJIdCwJ5.js';
16
15
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
17
- import './debounce-BR3PaG8X.js';
16
+ import './taxIdRules-xYlx7ZXW.js';
17
+ import './TaxId-DMIgN_sT.js';
18
+ import './debounce-DHj2iHA1.js';
18
19
  import './ShortAddressCode-nJ6oI8-n.js';
19
20
 
20
21
  const zonosAddressCompletionDialogCss = () => `:host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:24px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-bottom:5px;gap:20px;-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--selected-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--completion-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--completion-name-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--completion-name-row zonos-input{-ms-flex:1;flex:1}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--completion-name-row{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--submit-btn{-ms-flex-order:1;order:1}`;
@@ -532,7 +533,7 @@ const mergeAddress = ({ addresses, delimiter = ' ', }) => {
532
533
  return Array.from(addressSet).join(delimiter);
533
534
  };
534
535
 
535
- const zonosCustomAddressCss = () => `.sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}`;
536
+ const zonosCustomAddressCss = () => `.sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}`;
536
537
 
537
538
  var __rest = (undefined && undefined.__rest) || function (s, e) {
538
539
  var t = {};
@@ -556,6 +557,10 @@ const ZonosAddress = class {
556
557
  * Default address for stripe
557
558
  */
558
559
  this.defaultAddress = [];
560
+ /**
561
+ * Which tax id control the error belongs on. Empty when there is no error.
562
+ */
563
+ this.taxIdErrorField = '';
559
564
  /**
560
565
  * Error message for tax id input
561
566
  */
@@ -882,9 +887,6 @@ const ZonosAddress = class {
882
887
  const hasErrors = line1 || postalCode || state || city || firstName || lastName || phone;
883
888
  return !hasErrors;
884
889
  }
885
- isInTaxIdCountry(countryCode) {
886
- return countryRequireTaxId.includes(countryCode);
887
- }
888
890
  /**
889
891
  * Render tax id input based on ship to country code
890
892
  */
@@ -899,22 +901,15 @@ const ZonosAddress = class {
899
901
  if (!countryCode) {
900
902
  return null;
901
903
  }
902
- // This just to type guard the countryCode, if it's able to get to this point it should already be in country that has tax id input
903
- if (!this.isInTaxIdCountry(countryCode)) {
904
- return null;
905
- }
906
- const taxIdInputRendered = shouldRenderTaxIdInput({
904
+ return renderTaxIdFields({
907
905
  companyName: stripeStore.companyName,
908
906
  countryCode,
907
+ errorField: this.taxIdErrorField,
908
+ errorMessage: this.taxIdErrorMessage,
909
+ shouldRequirePeruTaxId: getShouldRequirePeruTaxId(),
910
+ taxId: stripeStore.taxId || '',
911
+ taxIdType: stripeStore.taxIdType,
909
912
  });
910
- // Don't render tax id input if the country doesn't require tax id
911
- if (!taxIdInputRendered) {
912
- return null;
913
- }
914
- const taxIdInputInfo = shipToTaxIdLabels[countryCode];
915
- return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
916
- stripeStore.taxId = event.detail;
917
- } })));
918
913
  }
919
914
  /**
920
915
  * Render short address code input based on ship to country code
@@ -1451,10 +1446,10 @@ const ZonosAddress = class {
1451
1446
  this.country = localizationStore.selectedCountryCode;
1452
1447
  }
1453
1448
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
1454
- return (h(Host, { key: '9d178094ee341623633d1e3822bd79f254a27e51', class: classes([
1449
+ return (h(Host, { key: 'd3bb2635d41dd74ba52ff37034f348fc0a763366', class: classes([
1455
1450
  'zonos--address zonos--elements',
1456
1451
  `zonos--${this.type}-address`,
1457
- ]) }, h("zonos-text", { key: 'c36b4ce9b63cce95664894fd8929ffe15807a22a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: '661eab7074f99b6dca52d5f7f546cfbd29322fbf', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
1452
+ ]) }, h("zonos-text", { key: '7d3f67988eac13616f3470f46f05060e194c2df7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: '1bd63bd015542ec3302f087bcbf3d9549f342c25', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
1458
1453
  }
1459
1454
  get el() { return getElement(this); }
1460
1455
  static get watchers() { return {
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, a as Host, d as createEvent } from './index-_lt63o7c.js';
2
- import { t as translate, l as localizationStore } from './localization-BIh-4pc_.js';
2
+ import { t as translate, l as localizationStore } from './localization-DHM91diu.js';
3
3
  import { i as isTextContainsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
4
- import { a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
4
+ import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
5
5
  import { c as classes } from './classes-BJHSB96f.js';
6
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
6
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
7
7
  import './handleFetch-D5GYDF-O.js';
8
8
  import './VarianceTest-BJmZPrZl.js';
9
9
 
@@ -1,15 +1,16 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { t as throttle } from './throttle-Cvlvb-dm.js';
3
- import { U as extractName, w as stripeStorePrefetchLandedCost, b as stripeStore, t as trackConversionEvent, J as stripeStoreOnChange, d as cartStore } from './cart-BoQp8Ema.js';
4
- import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-BIh-4pc_.js';
5
- import { z as zonosStore, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
2
+ import { t as throttle, r as renderTaxIdFields } from './taxIdFields-ByEYfsO5.js';
3
+ import { U as extractName, w as stripeStorePrefetchLandedCost, b as stripeStore, t as trackConversionEvent, J as stripeStoreOnChange, d as cartStore } from './cart-DmJkjiDE.js';
4
+ import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-DHM91diu.js';
5
+ import { e as getShouldRequirePeruTaxId, z as zonosStore, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
6
6
  import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-D5GYDF-O.js';
7
- import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-CKyZ6Zni.js';
7
+ import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
8
8
  import { c as classes } from './classes-BJHSB96f.js';
9
9
  import { l as log } from './VarianceTest-BJmZPrZl.js';
10
- import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-Cye-evFK.js';
11
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
12
- import './debounce-BR3PaG8X.js';
10
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
11
+ import './debounce-DHj2iHA1.js';
12
+ import './taxIdRules-xYlx7ZXW.js';
13
+ import './TaxId-DMIgN_sT.js';
13
14
  import './isDarkColor-YdrG78th.js';
14
15
  import './ShortAddressCode-nJ6oI8-n.js';
15
16
 
@@ -70,7 +71,7 @@ const buildAddressContacts = ({ currentEvent, defaultAddress, }) => {
70
71
  return [currentContact, ...defaultAddress];
71
72
  };
72
73
 
73
- const zonosAddressCss = () => `.sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}`;
74
+ const zonosAddressCss = () => `.sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}`;
74
75
 
75
76
  const ZonosAddress = class {
76
77
  constructor(hostRef) {
@@ -86,6 +87,10 @@ const ZonosAddress = class {
86
87
  * Default address for stripe
87
88
  */
88
89
  this.defaultAddress = [];
90
+ /**
91
+ * Which tax id control the error belongs on. Empty when there is no error.
92
+ */
93
+ this.taxIdErrorField = '';
89
94
  /**
90
95
  * Error message for tax id input
91
96
  */
@@ -294,9 +299,6 @@ const ZonosAddress = class {
294
299
  }
295
300
  void this.watchInitStripe();
296
301
  }
297
- isInTaxIdCountry(countryCode) {
298
- return countryRequireTaxId.includes(countryCode);
299
- }
300
302
  /**
301
303
  * Render tax id input based on ship to country code
302
304
  */
@@ -311,23 +313,18 @@ const ZonosAddress = class {
311
313
  if (!countryCode) {
312
314
  return null;
313
315
  }
314
- // This just to type guard the countryCode, if it's able to get to this point it should already be in country that has tax id input
315
- if (!this.isInTaxIdCountry(countryCode)) {
316
- return null;
317
- }
318
- const taxIdInputRendered = shouldRenderTaxIdInput({
316
+ return renderTaxIdFields({
319
317
  companyName: stripeStore.companyName,
320
318
  countryCode,
319
+ errorField: this.taxIdErrorField,
320
+ errorMessage: this.taxIdErrorMessage,
321
+ onTaxIdChange: value => {
322
+ this.taxIdChanged.emit(value);
323
+ },
324
+ shouldRequirePeruTaxId: getShouldRequirePeruTaxId(),
325
+ taxId: stripeStore.taxId || '',
326
+ taxIdType: stripeStore.taxIdType,
321
327
  });
322
- // Don't render tax id input if the country doesn't require tax id
323
- if (!taxIdInputRendered) {
324
- return null;
325
- }
326
- const taxIdInputInfo = shipToTaxIdLabels[countryCode];
327
- return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
328
- stripeStore.taxId = event.detail;
329
- this.taxIdChanged.emit(event.detail);
330
- } }), this.taxIdErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.taxIdErrorMessage))));
331
328
  }
332
329
  /**
333
330
  * Render short address code input based on ship to country code
@@ -414,11 +411,11 @@ const ZonosAddress = class {
414
411
  this.isAddressFilled = true;
415
412
  }
416
413
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
417
- return (h(Host, { key: '302dafde973c4bf2d847640d8f0e064d88f350f8', class: classes([
414
+ return (h(Host, { key: 'bbf12ad9213fbbbaf6c14ecb0cb7acb0679f3d6e', class: classes([
418
415
  'zonos--address',
419
416
  'zonos--elements',
420
417
  `zonos--${this.type}-address`,
421
- ]) }, this.titleText && (h("zonos-text", { key: '706204604ad32eed710e38adbe8133b3384044eb', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '0edc4c5d6c3ff965be6edbf680acaed892c71a16', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: '6aa6e4e86a76f1081c5af1f2b5f3282dfd91f3c5', class: "zonos--address-component" })));
418
+ ]) }, this.titleText && (h("zonos-text", { key: 'a81550755a359e1a9c46acc99eef7749959187ee', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: 'bdba9c19992622bcf0354366080b1932c0e28bb2', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: 'b376efea8ef5d57f525be9b6eed3f98c67b2834e', class: "zonos--address-component" })));
422
419
  }
423
420
  get el() { return getElement(this); }
424
421
  static get watchers() { return {
@@ -1,13 +1,14 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-Eo4gtyql.js';
3
- import { d as cartStore } from './cart-BoQp8Ema.js';
4
- import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-BIh-4pc_.js';
5
- import { z as zonosStore } from './zonosStore-msUlqmSD.js';
2
+ import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-BV5GTPmh.js';
3
+ import { d as cartStore } from './cart-DmJkjiDE.js';
4
+ import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-DHM91diu.js';
5
+ import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
6
6
  import { l as log } from './VarianceTest-BJmZPrZl.js';
7
7
  import { l as logError } from './handleFetch-D5GYDF-O.js';
8
+ import './taxIdRules-xYlx7ZXW.js';
9
+ import './TaxId-DMIgN_sT.js';
8
10
  import './isDarkColor-YdrG78th.js';
9
- import './getBorderRadius-DYfkeXdx.js';
10
- import './TaxId-Cye-evFK.js';
11
+ import './getBorderRadius-BiGd45jw.js';
11
12
 
12
13
  const zonosAirwallexPaymentCss = () => `.sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}`;
13
14
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
2
- import { a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
2
+ import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
3
3
  import { c as classes } from './classes-BJHSB96f.js';
4
4
  import './VarianceTest-BJmZPrZl.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
2
- import { a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
2
+ import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
3
3
  import { c as classes } from './classes-BJHSB96f.js';
4
4
  import './VarianceTest-BJmZPrZl.js';
5
5
 
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
2
+ import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
3
3
  import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-DJIdCwJ5.js';
4
4
  import { c as classes } from './classes-BJHSB96f.js';
5
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
5
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
6
6
  import { i as isColorVariable } from './isColorVariable-DXXUq2Lv.js';
7
7
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
8
8
  import { s as styles } from './styles-BTIeCf3T.js';
@@ -1,16 +1,17 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement, d as createEvent } from './index-_lt63o7c.js';
2
- import { a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
2
+ import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
3
3
  import { c as classes } from './classes-BJHSB96f.js';
4
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
5
- import { b as stripeStore, t as trackConversionEvent } from './cart-BoQp8Ema.js';
6
- import { s as storageStore } from './localization-BIh-4pc_.js';
4
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
5
+ import { b as stripeStore, t as trackConversionEvent } from './cart-DmJkjiDE.js';
6
+ import { s as storageStore } from './localization-DHM91diu.js';
7
7
  import { l as logError } from './handleFetch-D5GYDF-O.js';
8
- import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-DNfvnuUU.js';
8
+ import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-BfW5aLJw.js';
9
9
  import { l as log } from './VarianceTest-BJmZPrZl.js';
10
+ import './taxIdRules-xYlx7ZXW.js';
11
+ import './TaxId-DMIgN_sT.js';
10
12
  import './isDarkColor-YdrG78th.js';
11
- import './TaxId-Cye-evFK.js';
12
13
  import './isContrastColor-CWLU13s9.js';
13
- import './submitGtag-df9AQ2zL.js';
14
+ import './submitGtag-BEFrutel.js';
14
15
 
15
16
  const zonosCardCss = () => `:host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}`;
16
17