@zonos/elements 1.4.2 → 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 (403) 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 +148 -80
  31. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-checkout.cjs.entry.js +31 -20
  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-cart-items/zonos-cart-items.css +10 -0
  56. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +6 -2
  57. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -10
  58. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
  59. package/dist/collection/components/store/checkout/stripe.js +10 -12
  60. package/dist/collection/components/store/translationStore/strings.arabic.js +35 -2
  61. package/dist/collection/components/store/translationStore/strings.base.js +35 -2
  62. package/dist/collection/components/store/translationStore/strings.chinese.js +35 -2
  63. package/dist/collection/components/store/translationStore/strings.danish.js +35 -2
  64. package/dist/collection/components/store/translationStore/strings.dutch.js +35 -2
  65. package/dist/collection/components/store/translationStore/strings.french.js +35 -2
  66. package/dist/collection/components/store/translationStore/strings.german.js +35 -2
  67. package/dist/collection/components/store/translationStore/strings.hebrew.js +35 -2
  68. package/dist/collection/components/store/translationStore/strings.indonesian.js +35 -2
  69. package/dist/collection/components/store/translationStore/strings.italian.js +35 -2
  70. package/dist/collection/components/store/translationStore/strings.japanese.js +35 -2
  71. package/dist/collection/components/store/translationStore/strings.korean.js +35 -2
  72. package/dist/collection/components/store/translationStore/strings.norwegian.js +35 -2
  73. package/dist/collection/components/store/translationStore/strings.polish.js +35 -2
  74. package/dist/collection/components/store/translationStore/strings.portuguese.js +35 -2
  75. package/dist/collection/components/store/translationStore/strings.russian.js +35 -2
  76. package/dist/collection/components/store/translationStore/strings.spanish.js +35 -2
  77. package/dist/collection/components/store/translationStore/strings.swedish.js +35 -2
  78. package/dist/collection/components/store/translationStore/strings.turkish.js +35 -2
  79. package/dist/collection/components/store/translationStore/strings.vietnamese.js +35 -2
  80. package/dist/collection/components/store/zonosStore.js +2 -1
  81. package/dist/collection/components/stripe/zonos-address/zonos-address.css +5 -0
  82. package/dist/collection/components/stripe/zonos-address/zonos-address.js +37 -22
  83. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +5 -0
  84. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +34 -21
  85. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +24 -35
  86. package/dist/collection/components/utils/checkout/getCheckoutTaxIdPayload.js +16 -0
  87. package/dist/collection/components/utils/checkout/getTaxIdFieldState.js +26 -0
  88. package/dist/collection/components/utils/checkout/isHostedVsNativeTestAllowed.js +13 -0
  89. package/dist/collection/components/utils/checkout/itemCustomization.js +53 -0
  90. package/dist/collection/components/utils/checkout/parseItemCustomizations.js +6 -0
  91. package/dist/collection/components/utils/checkout/resolveTaxIdSelection.js +23 -0
  92. package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +7 -11
  93. package/dist/collection/components/utils/checkout/taxIdFields.js +29 -0
  94. package/dist/collection/components/utils/taxId/taxIdRules.js +44 -0
  95. package/dist/collection/components/utils/taxIdValidationResult.js +57 -58
  96. package/dist/collection/index.js +1 -0
  97. package/dist/collection/types/checkout/TaxId.js +31 -0
  98. package/dist/collection/types/checkout/itemCustomization.js +1 -0
  99. package/dist/collection/types/index.js +1 -0
  100. package/dist/esm/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +32 -1
  101. package/dist/esm/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +88 -53
  102. package/dist/esm/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +3 -3
  103. package/dist/esm/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +1 -1
  104. package/dist/esm/{debounce-CrmpwbEE.js → debounce-DWqMT4lo.js} +2 -2
  105. package/dist/esm/{getBorderRadius-DYfkeXdx.js → getBorderRadius-BiGd45jw.js} +1 -1
  106. package/dist/esm/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +1 -1
  107. package/dist/esm/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
  108. package/dist/esm/index.js +9 -8
  109. package/dist/esm/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +3 -3
  110. package/dist/esm/loader.js +1 -1
  111. package/dist/esm/{localization-BIh-4pc_.js → localization-DHM91diu.js} +701 -41
  112. package/dist/esm/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +4 -4
  113. package/dist/esm/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +2 -2
  114. package/dist/esm/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
  115. package/dist/esm/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +19 -0
  116. package/dist/esm/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
  117. package/dist/esm/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
  118. package/dist/esm/taxIdFields-ByEYfsO5.js +139 -0
  119. package/dist/esm/taxIdRules-xYlx7ZXW.js +47 -0
  120. package/dist/esm/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
  121. package/dist/esm/zonos-address-completion-dialog_7.entry.js +23 -28
  122. package/dist/esm/zonos-address-display_2.entry.js +3 -3
  123. package/dist/esm/zonos-address_4.entry.js +25 -28
  124. package/dist/esm/zonos-airwallex-payment.entry.js +7 -6
  125. package/dist/esm/zonos-badge.entry.js +1 -1
  126. package/dist/esm/zonos-banner.entry.js +1 -1
  127. package/dist/esm/zonos-button_3.entry.js +2 -2
  128. package/dist/esm/zonos-card_5.entry.js +8 -7
  129. package/dist/esm/zonos-cart-items_12.entry.js +147 -79
  130. package/dist/esm/zonos-checkbox_2.entry.js +2 -2
  131. package/dist/esm/zonos-checkout.entry.js +31 -20
  132. package/dist/esm/zonos-collapse.entry.js +1 -1
  133. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -5
  134. package/dist/esm/zonos-collect-finish_6.entry.js +12 -11
  135. package/dist/esm/zonos-collect.entry.js +9 -8
  136. package/dist/esm/zonos-controller.entry.js +7 -6
  137. package/dist/esm/zonos-country-flag.entry.js +2 -2
  138. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  139. package/dist/esm/zonos-elements.js +1 -1
  140. package/dist/esm/zonos-hello-dialog.entry.js +4 -4
  141. package/dist/esm/zonos-hello.entry.js +4 -4
  142. package/dist/esm/zonos-input.entry.js +2 -2
  143. package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -7
  144. package/dist/esm/zonos-invoice-finish_5.entry.js +12 -11
  145. package/dist/esm/zonos-invoice.entry.js +9 -8
  146. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  147. package/dist/esm/zonos-logo.entry.js +1 -1
  148. package/dist/esm/zonos-policy-consent_2.entry.js +7 -6
  149. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  150. package/dist/esm/zonos-stripe-input.entry.js +2 -2
  151. package/dist/esm/zonos-text.entry.js +1 -1
  152. package/dist/esm/zonos-v-stack.entry.js +1 -1
  153. package/dist/esm/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +2 -1
  154. package/dist/esm-es5/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +2 -1
  155. package/dist/esm-es5/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +64 -53
  156. package/dist/esm-es5/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +1 -1
  157. package/dist/esm-es5/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +7 -7
  158. package/dist/esm-es5/debounce-DWqMT4lo.js +1 -0
  159. package/dist/esm-es5/getBorderRadius-BiGd45jw.js +8 -0
  160. package/dist/esm-es5/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +3 -3
  161. package/dist/esm-es5/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
  162. package/dist/esm-es5/index.js +11 -11
  163. package/dist/esm-es5/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +1 -1
  164. package/dist/esm-es5/loader.js +1 -1
  165. package/dist/esm-es5/localization-DHM91diu.js +348 -0
  166. package/dist/esm-es5/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +1 -1
  167. package/dist/esm-es5/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +1 -1
  168. package/dist/esm-es5/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
  169. package/dist/esm-es5/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +8 -0
  170. package/dist/esm-es5/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
  171. package/dist/esm-es5/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
  172. package/dist/esm-es5/taxIdFields-ByEYfsO5.js +46 -0
  173. package/dist/esm-es5/taxIdRules-xYlx7ZXW.js +6 -0
  174. package/dist/esm-es5/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
  175. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +253 -254
  176. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  177. package/dist/esm-es5/zonos-address_4.entry.js +8 -9
  178. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  179. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  180. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  181. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  182. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  183. package/dist/esm-es5/zonos-cart-items_12.entry.js +40 -26
  184. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  185. package/dist/esm-es5/zonos-checkout.entry.js +7 -7
  186. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  187. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  188. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  189. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  190. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  191. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  192. package/dist/esm-es5/zonos-country-select_4.entry.js +2 -2
  193. package/dist/esm-es5/zonos-elements.js +1 -1
  194. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  195. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  196. package/dist/esm-es5/zonos-input.entry.js +1 -1
  197. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
  198. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  199. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  200. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  201. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  202. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  203. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  204. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  205. package/dist/esm-es5/zonos-text.entry.js +1 -1
  206. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  207. package/dist/esm-es5/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +1 -1
  208. package/dist/scripts/index.d.ts +97 -1
  209. package/dist/scripts/index.js +1 -1
  210. package/dist/scripts/loadZonos.js +1 -1
  211. package/dist/scripts/zonos.js +1 -1
  212. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
  213. package/dist/types/components/store/checkout/stripe.d.ts +9 -0
  214. package/dist/types/components/store/translationStore/strings.arabic.d.ts +34 -1
  215. package/dist/types/components/store/translationStore/strings.base.d.ts +34 -1
  216. package/dist/types/components/store/translationStore/strings.chinese.d.ts +34 -1
  217. package/dist/types/components/store/translationStore/strings.danish.d.ts +34 -1
  218. package/dist/types/components/store/translationStore/strings.dutch.d.ts +34 -1
  219. package/dist/types/components/store/translationStore/strings.french.d.ts +34 -1
  220. package/dist/types/components/store/translationStore/strings.german.d.ts +34 -1
  221. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +34 -1
  222. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +34 -1
  223. package/dist/types/components/store/translationStore/strings.italian.d.ts +34 -1
  224. package/dist/types/components/store/translationStore/strings.japanese.d.ts +34 -1
  225. package/dist/types/components/store/translationStore/strings.korean.d.ts +34 -1
  226. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +34 -1
  227. package/dist/types/components/store/translationStore/strings.polish.d.ts +34 -1
  228. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +34 -1
  229. package/dist/types/components/store/translationStore/strings.russian.d.ts +34 -1
  230. package/dist/types/components/store/translationStore/strings.spanish.d.ts +34 -1
  231. package/dist/types/components/store/translationStore/strings.swedish.d.ts +34 -1
  232. package/dist/types/components/store/translationStore/strings.turkish.d.ts +34 -1
  233. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +34 -1
  234. package/dist/types/components/store/zonosStore.d.ts +2 -1
  235. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -1
  236. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +4 -1
  237. package/dist/types/components/utils/checkout/getCheckoutTaxIdPayload.d.ts +6 -0
  238. package/dist/types/components/utils/checkout/getTaxIdFieldState.d.ts +18 -0
  239. package/dist/types/components/utils/checkout/isHostedVsNativeTestAllowed.d.ts +11 -0
  240. package/dist/types/components/utils/checkout/itemCustomization.d.ts +23 -0
  241. package/dist/types/components/utils/checkout/parseItemCustomizations.d.ts +7 -0
  242. package/dist/types/components/utils/checkout/resolveTaxIdSelection.d.ts +12 -0
  243. package/dist/types/components/utils/checkout/shouldRenderTaxIdInput.d.ts +2 -1
  244. package/dist/types/components/utils/checkout/taxIdFields.d.ts +11 -0
  245. package/dist/types/components/utils/taxId/taxIdRules.d.ts +37 -0
  246. package/dist/types/components/utils/taxIdValidationResult.d.ts +8 -2
  247. package/dist/types/components.d.ts +22 -0
  248. package/dist/types/index.d.ts +1 -0
  249. package/dist/types/types/checkout/TaxId.d.ts +45 -0
  250. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +11 -0
  251. package/dist/types/types/checkout/api/CreateParty.d.ts +2 -0
  252. package/dist/types/types/checkout/itemCustomization.d.ts +4 -0
  253. package/dist/types/types/index.d.ts +1 -0
  254. package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
  255. package/dist/zonos-elements/index.esm.js +1 -1
  256. package/dist/zonos-elements/{p-7bd99479.system.entry.js → p-064d8829.system.entry.js} +26 -26
  257. package/dist/zonos-elements/p-107f287b.entry.js +1 -0
  258. package/dist/zonos-elements/{p-51400242.system.entry.js → p-1199baef.system.entry.js} +3 -3
  259. package/dist/zonos-elements/p-12b24ebb.entry.js +1 -0
  260. package/dist/zonos-elements/{p-9c33f7ed.system.entry.js → p-189cc594.system.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-d3d0656a.entry.js → p-1a5acbcd.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-11defdca.system.entry.js → p-1cc42a98.system.entry.js} +18 -18
  263. package/dist/zonos-elements/p-1e6db427.entry.js +1 -0
  264. package/dist/zonos-elements/{p-5016d71b.system.entry.js → p-1fda4aec.system.entry.js} +132 -117
  265. package/dist/zonos-elements/{p-756d303f.system.entry.js → p-20eb00de.system.entry.js} +1 -1
  266. package/dist/zonos-elements/{p-5967a1c1.system.entry.js → p-216a908d.system.entry.js} +5 -5
  267. package/dist/zonos-elements/p-25eb99d4.entry.js +1 -0
  268. package/dist/zonos-elements/{p-23352709.system.entry.js → p-2b63865a.system.entry.js} +4 -4
  269. package/dist/zonos-elements/{p-6db7c0b1.system.entry.js → p-2ca826b9.system.entry.js} +2 -2
  270. package/dist/zonos-elements/{p-6c41b00c.entry.js → p-2d513aa3.entry.js} +1 -1
  271. package/dist/zonos-elements/{p-c961caaf.entry.js → p-3e705c9b.entry.js} +1 -1
  272. package/dist/zonos-elements/{p-acd50b0b.entry.js → p-4612facd.entry.js} +1 -1
  273. package/dist/zonos-elements/{p-5b80aff2.system.entry.js → p-46a839d2.system.entry.js} +24 -24
  274. package/dist/zonos-elements/p-46b9f0cf.entry.js +1 -0
  275. package/dist/zonos-elements/{p-244e0302.system.entry.js → p-4715045c.system.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-d168023b.entry.js → p-4917b74d.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-0b81f8b9.system.entry.js → p-53eac12f.system.entry.js} +14 -14
  278. package/dist/zonos-elements/{p-17c7ea4a.system.entry.js → p-55813e9f.system.entry.js} +3 -3
  279. package/dist/zonos-elements/{p-06030d3b.system.entry.js → p-5585db86.system.entry.js} +45 -45
  280. package/dist/zonos-elements/p-59fc32af.entry.js +1 -0
  281. package/dist/zonos-elements/{p-193d9722.entry.js → p-61312d5b.entry.js} +1 -1
  282. package/dist/zonos-elements/p-636b71d4.entry.js +1 -0
  283. package/dist/zonos-elements/{p-155ed3d3.system.entry.js → p-6410fa11.system.entry.js} +24 -24
  284. package/dist/zonos-elements/{p-0fca452b.entry.js → p-65817880.entry.js} +1 -1
  285. package/dist/zonos-elements/p-678b9214.entry.js +1 -0
  286. package/dist/zonos-elements/p-6e691736.entry.js +1 -0
  287. package/dist/zonos-elements/p-6vSUiBfr.system.js +348 -0
  288. package/dist/zonos-elements/p-74659d88.entry.js +1 -0
  289. package/dist/zonos-elements/p-7dc7f328.entry.js +1 -0
  290. package/dist/zonos-elements/{p-55916c90.entry.js → p-7f1bea9b.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-1c150f26.entry.js → p-821e413a.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-c403f004.system.entry.js → p-82e45d0c.system.entry.js} +1 -1
  293. package/dist/zonos-elements/p-84e76348.entry.js +1 -0
  294. package/dist/zonos-elements/{p-1409de3b.system.entry.js → p-88e20e99.system.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-195f6e38.system.entry.js → p-89a3c4db.system.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-4679f0ec.entry.js → p-8f9d8795.entry.js} +1 -1
  297. package/dist/zonos-elements/p-8fa6cfff.entry.js +1 -0
  298. package/dist/zonos-elements/{p-92fe9a1f.system.entry.js → p-902cca23.system.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-0a4a7742.system.entry.js → p-93860183.system.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-69c3e367.system.entry.js → p-941a95a1.system.entry.js} +10 -10
  301. package/dist/zonos-elements/{p-b5882fbb.system.entry.js → p-9449b4f4.system.entry.js} +1 -1
  302. package/dist/zonos-elements/{p-6abec43f.system.entry.js → p-960070d0.system.entry.js} +3 -3
  303. package/dist/zonos-elements/{p-1bac5ac1.system.entry.js → p-990fcf81.system.entry.js} +1 -1
  304. package/dist/zonos-elements/p-BD-9rD53.js +1 -0
  305. package/dist/zonos-elements/p-BMPYH-LT.js +1 -0
  306. package/dist/zonos-elements/{p-DI2vXnXc.system.js → p-BrQ8n8NS.system.js} +3 -3
  307. package/dist/zonos-elements/p-Bu9WCfUC.system.js +2 -2
  308. package/dist/zonos-elements/{p-CUaf1cEg.js → p-C70h5mKA.js} +1 -1
  309. package/dist/zonos-elements/{p-B4Ufchqh.system.js → p-C9XLkmmb.system.js} +3 -3
  310. package/dist/zonos-elements/{p-CZD8WvyY.system.js → p-CBUz18kA.system.js} +1 -1
  311. package/dist/zonos-elements/{p-kaOxUR9u.system.js → p-CGNVm52g.system.js} +6 -6
  312. package/dist/zonos-elements/p-CHKKvuiz.js +1 -0
  313. package/dist/zonos-elements/{p-0mGRBGcf.js → p-CMo3ZweU.js} +1 -1
  314. package/dist/zonos-elements/p-CTiqplrr.js +1 -0
  315. package/dist/zonos-elements/p-CYxMfUL7.system.js +1 -0
  316. package/dist/zonos-elements/{p-D4MevhAL.system.js → p-CbhN65lj.system.js} +3 -3
  317. package/dist/zonos-elements/p-Ch1w0Lr7.js +1 -0
  318. package/dist/zonos-elements/{p-W82paT5F.js → p-CqB9AfBf.js} +1 -1
  319. package/dist/zonos-elements/p-CzKlS3E-.system.js +6 -0
  320. package/dist/zonos-elements/p-D1SmY_fZ.js +1 -0
  321. package/dist/zonos-elements/{p-sz4L-ZnB.js → p-D1e9zNDA.js} +1 -1
  322. package/dist/zonos-elements/{p-c9QtIdJX.js → p-D6xXnsM_.js} +1 -1
  323. package/dist/zonos-elements/{p-8PPEbm_0.system.js → p-DIab60nK.system.js} +12 -12
  324. package/dist/zonos-elements/{p-Cye-evFK.js → p-DMIgN_sT.js} +1 -1
  325. package/dist/zonos-elements/{p-DCS8qcL6.system.js → p-DQrMfUzi.system.js} +41 -41
  326. package/dist/zonos-elements/{p-BuU_p5DP.system.js → p-DTgUqgwV.system.js} +2 -2
  327. package/dist/zonos-elements/p-DW7I0zOF.js +1 -0
  328. package/dist/zonos-elements/p-DZdkJHK9.system.js +7 -0
  329. package/dist/zonos-elements/{p-XqkqjeNV.system.js → p-DgUrB-1a.system.js} +1 -1
  330. package/dist/zonos-elements/p-DiMEP3mh.js +1 -0
  331. package/dist/zonos-elements/p-DprOoI2W.system.js +528 -0
  332. package/dist/zonos-elements/{p-7abqRc9V.js → p-DpwmHU8R.js} +2 -2
  333. package/dist/zonos-elements/p-DqVePqqx.system.js +8 -0
  334. package/dist/zonos-elements/{p-Cby4EkFu.system.js → p-DsBuZ6ob.system.js} +2 -1
  335. package/dist/zonos-elements/{p-XDxdMlQl.system.js → p-Dtu_Japy.system.js} +39 -39
  336. package/dist/zonos-elements/p-Dwg61Ft_.js +1 -0
  337. package/dist/zonos-elements/p-U33isUJG.js +1 -0
  338. package/dist/zonos-elements/{p-Be3Hpms1.system.js → p-XoQH3S7Z.system.js} +1 -1
  339. package/dist/zonos-elements/{p-474e8a92.system.entry.js → p-a1022808.system.entry.js} +1 -1
  340. package/dist/zonos-elements/{p-83aa1c8c.entry.js → p-ad04bba2.entry.js} +1 -1
  341. package/dist/zonos-elements/{p-a938c174.entry.js → p-b51010b9.entry.js} +1 -1
  342. package/dist/zonos-elements/{p-dfc87b10.system.entry.js → p-c33b8f6a.system.entry.js} +1 -1
  343. package/dist/zonos-elements/{p-a40fd99b.system.entry.js → p-cccaad60.system.entry.js} +39 -40
  344. package/dist/zonos-elements/p-d3345b2c.entry.js +1 -0
  345. package/dist/zonos-elements/{p-249c1ee1.system.entry.js → p-d8f375da.system.entry.js} +3 -3
  346. package/dist/zonos-elements/{p-2603dce0.entry.js → p-e216cc8c.entry.js} +1 -1
  347. package/dist/zonos-elements/{p-b79036fc.entry.js → p-e7fdb2c9.entry.js} +1 -1
  348. package/dist/zonos-elements/p-ebe157b5.entry.js +1 -0
  349. package/dist/zonos-elements/p-ef5344ea.entry.js +1 -0
  350. package/dist/zonos-elements/{p-be1237fc.system.entry.js → p-f3d9a380.system.entry.js} +97 -97
  351. package/dist/zonos-elements/{p-31043c2e.system.entry.js → p-f5f95990.system.entry.js} +296 -297
  352. package/dist/zonos-elements/p-fda89981.system.entry.js +13 -0
  353. package/dist/zonos-elements/{p-d4d2b39e.entry.js → p-fddf3556.entry.js} +1 -1
  354. package/dist/zonos-elements/p-iAIzUA4k.js +1 -0
  355. package/dist/zonos-elements/{p-BpDCLBwW.js → p-n5PZKz1k.js} +1 -1
  356. package/dist/zonos-elements/{p-DoEHepOc.system.js → p-ojtNq-r5.system.js} +1 -1
  357. package/dist/zonos-elements/{p-C_z9WL8a.js → p-r-YGHhLa.js} +1 -1
  358. package/dist/zonos-elements/{p-CBx5nYet.system.js → p-vTIygnHq.system.js} +1 -1
  359. package/dist/zonos-elements/{p-DQZncB2d.system.js → p-zsTASoh2.system.js} +3 -3
  360. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  361. package/item-customization.d.ts +25 -0
  362. package/item-customization.js +52 -0
  363. package/package.json +7 -4
  364. package/dist/cjs/shouldRenderTaxIdInput-TxekHCp7.js +0 -43
  365. package/dist/esm/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -40
  366. package/dist/esm/throttle-Cvlvb-dm.js +0 -85
  367. package/dist/esm-es5/debounce-CrmpwbEE.js +0 -1
  368. package/dist/esm-es5/getBorderRadius-DYfkeXdx.js +0 -8
  369. package/dist/esm-es5/localization-BIh-4pc_.js +0 -348
  370. package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -17
  371. package/dist/esm-es5/throttle-Cvlvb-dm.js +0 -46
  372. package/dist/zonos-elements/p-0457f579.entry.js +0 -1
  373. package/dist/zonos-elements/p-06fe2939.entry.js +0 -1
  374. package/dist/zonos-elements/p-24f3c547.entry.js +0 -1
  375. package/dist/zonos-elements/p-34656e6c.entry.js +0 -1
  376. package/dist/zonos-elements/p-39ee1558.entry.js +0 -1
  377. package/dist/zonos-elements/p-3a2da031.entry.js +0 -1
  378. package/dist/zonos-elements/p-4806b264.system.entry.js +0 -13
  379. package/dist/zonos-elements/p-725e29bb.entry.js +0 -1
  380. package/dist/zonos-elements/p-BGktDPwA.system.js +0 -1
  381. package/dist/zonos-elements/p-Bi-s0fp_.system.js +0 -17
  382. package/dist/zonos-elements/p-CEK_Wk6v.system.js +0 -7
  383. package/dist/zonos-elements/p-CFbfEmjN.js +0 -1
  384. package/dist/zonos-elements/p-CcJF6xhQ.js +0 -1
  385. package/dist/zonos-elements/p-Cxuiqv1I.js +0 -1
  386. package/dist/zonos-elements/p-D-bZg-Pc.js +0 -1
  387. package/dist/zonos-elements/p-DOD2I44l.system.js +0 -348
  388. package/dist/zonos-elements/p-DS-qw_qc.system.js +0 -517
  389. package/dist/zonos-elements/p-DZ2mevDK.js +0 -1
  390. package/dist/zonos-elements/p-DnjGkbEy.js +0 -1
  391. package/dist/zonos-elements/p-FRWZayxL.js +0 -1
  392. package/dist/zonos-elements/p-Mrz_lnC1.js +0 -1
  393. package/dist/zonos-elements/p-ad9ff14c.entry.js +0 -1
  394. package/dist/zonos-elements/p-bb3546c0.entry.js +0 -1
  395. package/dist/zonos-elements/p-c1cbfdba.entry.js +0 -1
  396. package/dist/zonos-elements/p-c47ce656.entry.js +0 -1
  397. package/dist/zonos-elements/p-c9d5d8f1.entry.js +0 -1
  398. package/dist/zonos-elements/p-clDfq9AL.js +0 -1
  399. package/dist/zonos-elements/p-d74bc3e8.entry.js +0 -1
  400. package/dist/zonos-elements/p-d8b312e5.entry.js +0 -1
  401. package/dist/zonos-elements/p-db87b0dd.entry.js +0 -1
  402. package/dist/zonos-elements/p-defc2d18.entry.js +0 -1
  403. package/dist/zonos-elements/p-rVp8hgWw.js +0 -1
@@ -1,34 +1,95 @@
1
1
  import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-_lt63o7c.js';
2
- import { d as cartStore, L as cartStoreHasOneEligibleItem, M as isEuDapRemittance, m as cartStoreIsOrderModificationPaymentOnlySession, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, b as stripeStore, H as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, R as storeCreditStore, S as storeCreditStoreReset, B as storeCreditStoreCoversFullAmount, y as isPolicyConsentRequired, G as policyConsentStore, T as stripeStoreRecordPolicyConsent, x as cartStoreNextStep, U as extractName, V as stripeStoreTranslateAddressToLatin, I as cartStoreOnChange, W as getCountryField, X as stripeStoreAsyncAddressUpdate, Y as cartStoreUpdateSelectedShippingOption, Z as cartStoreGetShippingTransitInfo, _ as cartStoreGetMethod, $ as sortServiceLevelOptionsByAmount } from './cart-BoQp8Ema.js';
3
- import { t as translate, l as localizationStore, s as storageStore, k as languages, w as getExchangeRate, x as numberFormat, h as localizationStoreOnChange } from './localization-BIh-4pc_.js';
4
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-C2Tw73uR.js';
2
+ import { d as cartStore, L as cartStoreHasOneEligibleItem, M as isEuDapRemittance, m as cartStoreIsOrderModificationPaymentOnlySession, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, b as stripeStore, H as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, R as storeCreditStore, S as storeCreditStoreReset, B as storeCreditStoreCoversFullAmount, y as isPolicyConsentRequired, G as policyConsentStore, T as stripeStoreRecordPolicyConsent, x as cartStoreNextStep, U as extractName, V as resolveTaxIdSelection, W as stripeStoreTranslateAddressToLatin, I as cartStoreOnChange, X as getCountryField, Y as stripeStoreAsyncAddressUpdate, Z as cartStoreUpdateSelectedShippingOption, _ as cartStoreGetShippingTransitInfo, $ as cartStoreGetMethod, a0 as sortServiceLevelOptionsByAmount } from './cart-DmJkjiDE.js';
3
+ import { t as translate, l as localizationStore, s as storageStore, k as languages, w as getExchangeRate, x as numberFormat, h as localizationStoreOnChange } from './localization-DHM91diu.js';
4
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-B31ZNkUv.js';
5
5
  import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.js';
6
6
  import { c as classes } from './classes-BJHSB96f.js';
7
- import { z as zonosStore, c as createStore, d as zonosStoreOnChange, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
8
- import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-CbEfIhI5.js';
7
+ import { z as zonosStore, c as createStore, d as zonosStoreOnChange, g as getZonosStoreTheme, e as getShouldRequirePeruTaxId, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
8
+ import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-DhGXpH2D.js';
9
9
  import { i as isSameHostCheckoutLink } from './isSameHostCheckoutLink-BxAHnL5J.js';
10
- import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-DNfvnuUU.js';
10
+ import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-BfW5aLJw.js';
11
11
  import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode, l as logError } from './handleFetch-D5GYDF-O.js';
12
12
  import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
13
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
13
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
14
14
  import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
15
- import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CCD7gpSY.js';
16
- import { p as placeTestOrder } from './placeTestOrder-CQaMKFOg.js';
15
+ import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-DwSfSHar.js';
16
+ import { p as placeTestOrder } from './placeTestOrder-CyWUFhxD.js';
17
17
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
18
18
  import { g as getContrastColor } from './getContrastColor-CfCPlW9U.js';
19
19
  import { i as isColorVariable } from './isColorVariable-DXXUq2Lv.js';
20
- import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-4Jq6V4pO.js';
21
- import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-Ks6_tpjn.js';
20
+ import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-B0bQH0uw.js';
21
+ import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-DljgpDZe.js';
22
22
  import { c as containsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
23
- import { s as shouldRenderShortAddressCodeInput, a as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-CKyZ6Zni.js';
24
- import { e as euCountryCodes } from './TaxId-Cye-evFK.js';
23
+ import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
24
+ import { b as isPeruTaxIdActive, a as isPeruTaxIdType, s as stripTaxIdSeparators, p as peruTaxIdTypeFromValue, r as rfcRegex, c as curpRegex } from './taxIdRules-xYlx7ZXW.js';
25
+ import { b as peruTaxIdFormatError, e as euCountryCodes } from './TaxId-DMIgN_sT.js';
25
26
  import './isContrastColor-CWLU13s9.js';
26
- import './submitGtag-df9AQ2zL.js';
27
- import './debounce-CrmpwbEE.js';
28
- import './debounce-BR3PaG8X.js';
27
+ import './submitGtag-BEFrutel.js';
28
+ import './debounce-DWqMT4lo.js';
29
+ import './debounce-DHj2iHA1.js';
29
30
  import './ShortAddressCode-nJ6oI8-n.js';
30
31
 
31
- const zonosCartItemsCss = () => `: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--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}`;
32
+ /**
33
+ * Import-free so `scripts/buildItemCustomization.mjs` can emit one module.
34
+ * demo-app imports the generated `item-customization.js`, not this file.
35
+ */
36
+ const ITEM_CUSTOMIZATION_ATTRIBUTE_KEY = 'itemCustomization';
37
+ const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
38
+ /** Drops an empty name, a non-string value, and the unselected value "0". */
39
+ const readDisplayableItemCustomization = (value) => {
40
+ if (!isRecord(value)) {
41
+ return null;
42
+ }
43
+ const { name } = value;
44
+ if (typeof name !== 'string' || name === '') {
45
+ return null;
46
+ }
47
+ const choiceValue = value.value;
48
+ if (typeof choiceValue !== 'string' || choiceValue === '0') {
49
+ return null;
50
+ }
51
+ return {
52
+ name,
53
+ value: choiceValue,
54
+ };
55
+ };
56
+ const parseJson = (value) => {
57
+ try {
58
+ // The generated package entry cannot import the shared jsonParse helper.
59
+ // eslint-disable-next-line no-restricted-syntax
60
+ return JSON.parse(value);
61
+ }
62
+ catch (_a) {
63
+ return null;
64
+ }
65
+ };
66
+ /** Selected customization entries, with the original object for extra ids. */
67
+ const readItemCustomizationEntries = (attributes) => {
68
+ var _a;
69
+ const rawValue = (_a = attributes === null || attributes === void 0 ? void 0 : attributes.find(attribute => (attribute === null || attribute === void 0 ? void 0 : attribute.key) === ITEM_CUSTOMIZATION_ATTRIBUTE_KEY)) === null || _a === void 0 ? void 0 : _a.value;
70
+ if (!rawValue) {
71
+ return [];
72
+ }
73
+ const parsed = parseJson(rawValue);
74
+ if (!Array.isArray(parsed)) {
75
+ return [];
76
+ }
77
+ return parsed.flatMap(entry => {
78
+ const choice = readDisplayableItemCustomization(entry);
79
+ if (!choice || !isRecord(entry)) {
80
+ return [];
81
+ }
82
+ return [{ choice, raw: entry }];
83
+ });
84
+ };
85
+
86
+ /**
87
+ * Reads a cart row's `itemCustomization` attribute into display pairs.
88
+ * Unreadable data is an empty list.
89
+ */
90
+ const parseItemCustomizations = (attributes) => readItemCustomizationEntries(attributes).map(entry => entry.choice);
91
+
92
+ const zonosCartItemsCss = () => `: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--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-choices{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:4px;min-width:0}:host .zonos--cart-item-name .zonos--cart-item-choices zonos-text{overflow-wrap:break-word;white-space:normal}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}`;
32
93
 
33
94
  const ZonosCartItems = class {
34
95
  constructor(hostRef) {
@@ -38,15 +99,18 @@ const ZonosCartItems = class {
38
99
  render() {
39
100
  const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');
40
101
  const nonRestrictedItems = cartStore.items.filter(item => !item.isRestricted);
41
- return (h(Host, { key: '2f81af1b6315853352a29bacaa230d782e76115a', class: "zonos--cart-items zonos--elements" }, h("table", { key: '7fe64f09729e0791605cdd8e66d7230ab162c7cf', class: "zonos--cart-table" }, h("tbody", { key: '49c17b5c7c68bfd41b2d8fabbbf4c3c764faba33' }, nonRestrictedItems.map(item => {
102
+ return (h(Host, { key: 'eeb10f76fbab43d256e6130fe2ab88a33c1598aa', class: "zonos--cart-items zonos--elements" }, h("table", { key: '61ae44a57c1386f5ca6afb17c388ae9fcf29d8a1', class: "zonos--cart-table" }, h("tbody", { key: '8471ae46186543cee754685e0182c4057d982967' }, nonRestrictedItems.map(item => {
42
103
  const itemImg = item.imageUrl;
43
104
  const cleanedItemNames = cleanHtmlMarkdown(item.name);
105
+ const choices = parseItemCustomizations(item.attributes);
44
106
  const amount = item.amount * item.quantity;
45
107
  return (h("tr", { class: "zonos--cart-item" }, h("td", { class: "zonos--column zonos--cart-item-image" }, itemImg && !this.errorImages.includes(itemImg) ? (h("img", { alt: item.name, onError: () => {
46
108
  this.errorImages = [...this.errorImages, itemImg];
47
109
  }, src: item.imageUrl, style: {
48
110
  'min-width': '40px',
49
- }, width: 40 })) : (h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("div", null, cleanedItemNames.map(name => (h("zonos-text", { type: "label" }, name)))), h("zonos-text", { textColor: "gray-600", type: "caption" }, translate('Quantity'), ": ", item.quantity)), h("td", { class: "zonos--column zonos--cart-item-price" }, h("zonos-text", { type: "semiBoldLabel", weight: 600 }, renderCheckoutCurrency({
111
+ }, width: 40 })) : (h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("div", null, cleanedItemNames.map(name => (h("zonos-text", { type: "label" }, name)))), choices.length > 0 && (h("div", { class: "zonos--cart-item-choices" }, choices.map(choice => (h("zonos-text", { textColor: "gray-600", type: "caption" }, choice.value === ''
112
+ ? choice.name
113
+ : `${choice.name}: ${choice.value}`))))), h("zonos-text", { textColor: "gray-600", type: "caption" }, translate('Quantity'), ": ", item.quantity)), h("td", { class: "zonos--column zonos--cart-item-price" }, h("zonos-text", { type: "semiBoldLabel", weight: 600 }, renderCheckoutCurrency({
50
114
  amount,
51
115
  isForeign: false,
52
116
  })))));
@@ -1724,88 +1788,85 @@ const isTaxIdRequired = (shippingCountry) => {
1724
1788
  ];
1725
1789
  return requireTaxIdCountry.includes(shippingCountry);
1726
1790
  };
1727
- const taxIdValidationResult = ({ companyName, shippingCountry, taxId, }) => {
1728
- // Check to see if we are required to collect tax id for the shipping country or not
1729
- const isTaxIdInputRendered = shouldRenderTaxIdInput({
1791
+ const invalid = (error, field) => ({
1792
+ error,
1793
+ field,
1794
+ valid: false,
1795
+ });
1796
+ const valid = () => ({
1797
+ error: null,
1798
+ field: null,
1799
+ valid: true,
1800
+ });
1801
+ const taxIdValidationResult = ({ companyName, shippingCountry, shouldRequirePeruTaxId, taxId, taxIdType, }) => {
1802
+ const { rendered, selectedType, typeOptions } = resolveTaxIdSelection({
1730
1803
  companyName,
1731
1804
  countryCode: shippingCountry,
1805
+ shouldRequirePeruTaxId,
1806
+ taxIdType,
1732
1807
  });
1733
1808
  // If the tax id input is not even rendered, no need to validate anything and allow to proceed. Validate when tax id input is not even rendered would prevent the user from checking out
1734
- if (!isTaxIdInputRendered) {
1735
- return {
1736
- error: null,
1737
- valid: true,
1738
- };
1809
+ if (!rendered) {
1810
+ return valid();
1811
+ }
1812
+ // The number field is hidden until a type is chosen.
1813
+ if (typeOptions && !selectedType) {
1814
+ return invalid('Tax id type is required', 'type');
1815
+ }
1816
+ // Spaces and hyphens count as blank only. The original text is left unchanged.
1817
+ if (isPeruTaxIdActive({
1818
+ countryCode: shippingCountry,
1819
+ shouldRequirePeruTaxId,
1820
+ }) &&
1821
+ selectedType &&
1822
+ isPeruTaxIdType(selectedType.value)) {
1823
+ if (!stripTaxIdSeparators(taxId)) {
1824
+ return invalid('Tax id is required', 'value');
1825
+ }
1826
+ if (peruTaxIdTypeFromValue(taxId) !== selectedType.value) {
1827
+ return invalid(peruTaxIdFormatError[selectedType.value], 'value');
1828
+ }
1829
+ return valid();
1739
1830
  }
1740
1831
  // Cache the result of isTaxIdRequired for reuse
1741
1832
  const taxIdRequired = isTaxIdRequired(shippingCountry);
1742
1833
  if (!taxIdRequired) {
1743
1834
  // If the shipping country does not require a tax id, the validation immediately returns valid
1744
- return {
1745
- error: null,
1746
- valid: true,
1747
- };
1835
+ return valid();
1748
1836
  }
1749
1837
  // For all EU countries, tax id is not required if company name is not filled (not business address)
1750
1838
  if (euCountryCodes.includes(shippingCountry)) {
1751
1839
  if (!companyName.trim()) {
1752
- return {
1753
- error: null,
1754
- valid: true,
1755
- };
1840
+ return valid();
1756
1841
  }
1757
1842
  if (!taxId) {
1758
- return {
1759
- error: 'Tax id is required',
1760
- valid: false,
1761
- };
1843
+ return invalid('Tax id is required', 'value');
1762
1844
  }
1763
- return {
1764
- error: null,
1765
- valid: true,
1766
- };
1845
+ return valid();
1767
1846
  }
1768
1847
  if (!taxId) {
1769
- return {
1770
- error: 'Tax id is required',
1771
- valid: false,
1772
- };
1848
+ return invalid('Tax id is required', 'value');
1773
1849
  }
1774
1850
  if (shippingCountry === 'AR') {
1775
- const isValid = /^[0-9]{2}-?[0-9]{8}-?[0-9]$/.test(taxId);
1776
- if (!isValid) {
1777
- return {
1778
- error: 'Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).',
1779
- valid: false,
1780
- };
1851
+ const isValidAr = /^[0-9]{2}-?[0-9]{8}-?[0-9]$/.test(taxId);
1852
+ if (!isValidAr) {
1853
+ return invalid('Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).', 'value');
1781
1854
  }
1782
- return {
1783
- error: null,
1784
- valid: true,
1785
- };
1855
+ return valid();
1786
1856
  }
1787
- // validate tax id for mexico;
1788
- if (shippingCountry === 'MX') {
1789
- // RFC: 3-4 letters + 6 digit date + 3 character homoclave (12-13 total)
1790
- const isValidRfc = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(taxId);
1791
- // CURP: 4 letters + 6 digit date + gender (H/M/X) + 5 letters + alphanumeric + digit (18 total)
1792
- const isValidCurp = /^[A-Z]{4}[0-9]{6}[HMX][A-Z]{5}[A-Z0-9][0-9]$/.test(taxId);
1793
- if (!isValidRfc && !isValidCurp) {
1794
- return {
1795
- error: 'Invalid RFC or CURP format. Must be a 12–13 character RFC or an 18 character CURP, uppercase letters and numbers only.',
1796
- valid: false,
1797
- };
1857
+ // validate tax id for mexico against the type the shopper selected
1858
+ if (shippingCountry === 'MX' && selectedType) {
1859
+ const isRfc = selectedType.value === 'RFC';
1860
+ const isValidMx = isRfc ? rfcRegex.test(taxId) : curpRegex.test(taxId);
1861
+ if (!isValidMx) {
1862
+ return invalid(isRfc
1863
+ ? 'Invalid RFC format. Must be 12–13 uppercase letters and numbers.'
1864
+ : 'Invalid CURP format. Must be 18 uppercase letters and numbers.', 'value');
1798
1865
  }
1799
- return {
1800
- error: null,
1801
- valid: true,
1802
- };
1866
+ return valid();
1803
1867
  }
1804
1868
  // Other countries doesn't need to validate tax id in the right format
1805
- return {
1806
- error: null,
1807
- valid: true,
1808
- };
1869
+ return valid();
1809
1870
  };
1810
1871
 
1811
1872
  const zonosCustomerInfoCss = () => `.sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-4px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}.mobile.mobile.sc-zonos-customer-info-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{-ms-scroll-chaining:chained;overscroll-behavior:auto}`;
@@ -1846,6 +1907,10 @@ const ZonosCustomerInfo = class {
1846
1907
  * Whether or not the address is being validated
1847
1908
  */
1848
1909
  this.isValidatingAddress = false;
1910
+ /**
1911
+ * Which tax id control the current error belongs on
1912
+ */
1913
+ this.taxIdErrorField = '';
1849
1914
  /**
1850
1915
  * Whether or not the tax id input is invalid
1851
1916
  */
@@ -2145,16 +2210,19 @@ const ZonosCustomerInfo = class {
2145
2210
  });
2146
2211
  log('==> isValidLink', 'info', isValidLink);
2147
2212
  // validate tax id input if it's required for specific countries, optional otherwise
2148
- const { error, valid: validTaxId } = taxIdValidationResult({
2213
+ const { error, field: taxIdErrorField, valid: validTaxId, } = taxIdValidationResult({
2149
2214
  companyName: stripeStore.companyName,
2150
2215
  shippingCountry: this.shippingCountry,
2216
+ shouldRequirePeruTaxId: getShouldRequirePeruTaxId(),
2151
2217
  taxId: stripeStore.taxId,
2218
+ taxIdType: stripeStore.taxIdType,
2152
2219
  });
2153
2220
  const { error: shortAddressCodeError, valid: validShortAddressCode } = shortAddressCodeValidationResult({
2154
2221
  shippingCountry: this.shippingCountry,
2155
2222
  shortAddressCode: stripeStore.shortAddressCode,
2156
2223
  });
2157
2224
  this.taxIdErrorMessage = !validTaxId ? translate(error) : '';
2225
+ this.taxIdErrorField = taxIdErrorField || '';
2158
2226
  this.shortAddressCodeErrorMessage = !validShortAddressCode
2159
2227
  ? translate(shortAddressCodeError)
2160
2228
  : '';
@@ -2255,10 +2323,10 @@ const ZonosCustomerInfo = class {
2255
2323
  }
2256
2324
  // Render custom address component if the custom address form is enabled
2257
2325
  if (this.addressFormRenderType === 'zonos') {
2258
- return (h("zonos-custom-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
2326
+ return (h("zonos-custom-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorField: this.taxIdErrorField, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
2259
2327
  }
2260
2328
  // Render Stripe address component by default
2261
- return (h("zonos-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
2329
+ return (h("zonos-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorField: this.taxIdErrorField, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
2262
2330
  };
2263
2331
  }
2264
2332
  watchShowErrorBanner() {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, d as createEvent, 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
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
4
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
5
5
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
6
6
  import './VarianceTest-BJmZPrZl.js';
7
7
 
@@ -1,24 +1,25 @@
1
1
  import { r as registerInstance, h, F as Fragment, a as Host } from './index-_lt63o7c.js';
2
- import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, g as getCheckoutSession, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, p as policyConsentStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreIsOrderModificationPaymentOnlySession, n as stripeStoreHandleInventoryCheck, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, q as getCheckoutSessionBody, r as cartStoreUpdateToErrorState, u as stripeStoreCleanupDomesticShippingSession, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as isPolicyConsentRequired, z as stripeStoreUpdateCheckoutSessionBaseCurrency, A as storeCreditStoreApplyCredit, B as storeCreditStoreCoversFullAmount, C as validateCheckoutSession, D as storeCreditStoreCreateOrder, E as stripeStoreConfirmPayment, F as stripeStoreHandleInventoryRefund, G as policyConsentStore, H as stripeStoreReset, I as cartStoreOnChange, J as stripeStoreOnChange, K as storeCreditStoreGetEffectiveAmount } from './cart-BoQp8Ema.js';
3
- import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-DNfvnuUU.js';
4
- import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as isCountryInShippingZone, d as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, e as storageStoreSetEnabledVariantTestKeys, t as translate, h as localizationStoreOnChange, j as currencyFormat } from './localization-BIh-4pc_.js';
5
- import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-msUlqmSD.js';
2
+ import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, g as getCheckoutSession, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, p as policyConsentStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreIsOrderModificationPaymentOnlySession, n as stripeStoreHandleInventoryCheck, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, q as getCheckoutSessionBody, r as cartStoreUpdateToErrorState, u as stripeStoreCleanupDomesticShippingSession, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as isPolicyConsentRequired, z as stripeStoreUpdateCheckoutSessionBaseCurrency, A as storeCreditStoreApplyCredit, B as storeCreditStoreCoversFullAmount, C as validateCheckoutSession, D as storeCreditStoreCreateOrder, E as stripeStoreConfirmPayment, F as stripeStoreHandleInventoryRefund, G as policyConsentStore, H as stripeStoreReset, I as cartStoreOnChange, J as stripeStoreOnChange, K as storeCreditStoreGetEffectiveAmount } from './cart-DmJkjiDE.js';
3
+ import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-BfW5aLJw.js';
4
+ import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as isCountryInShippingZone, d as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, e as storageStoreSetEnabledVariantTestKeys, t as translate, h as localizationStoreOnChange, j as currencyFormat } from './localization-DHM91diu.js';
5
+ import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-BXP9FvIt.js';
6
6
  import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
7
7
  import { h as handleFetch, g as getIsTestMode, j as jsonParse, l as logError, b as getAdditionalLogMetadata, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-D5GYDF-O.js';
8
- import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-4Jq6V4pO.js';
8
+ import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-B0bQH0uw.js';
9
9
  import { l as log, g as getElapsedTime, b as allLogs } from './VarianceTest-BJmZPrZl.js';
10
10
  import { _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector, a as checkoutHiddenInternationalBtnSelector, g as getAbandonedCartRenewTokenValue } from './CheckoutConfig-D5SpFsQJ.js';
11
11
  import { c as classes } from './classes-BJHSB96f.js';
12
12
  import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
13
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
13
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
14
14
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
15
15
  import { s as styles } from './styles-BTIeCf3T.js';
16
16
  import { R as RemoveIcon } from './RemoveIcon-C2QMVeWW.js';
17
- import './TaxId-Cye-evFK.js';
17
+ import './taxIdRules-xYlx7ZXW.js';
18
+ import './TaxId-DMIgN_sT.js';
18
19
  import './isContrastColor-CWLU13s9.js';
19
- import './submitGtag-df9AQ2zL.js';
20
- import './debounce-CrmpwbEE.js';
21
- import './debounce-BR3PaG8X.js';
20
+ import './submitGtag-BEFrutel.js';
21
+ import './debounce-DWqMT4lo.js';
22
+ import './debounce-DHj2iHA1.js';
22
23
 
23
24
  /**
24
25
  * Check if store discount is enabled
@@ -673,6 +674,20 @@ const isDisabledCountry = (showLog = true) => {
673
674
  return false;
674
675
  };
675
676
 
677
+ /**
678
+ * BigCommerce checkout depends on storefront callbacks (clear cart, inventory).
679
+ * The hosted variant leaves the storefront, so the test does not apply there.
680
+ */
681
+ const isHostedVsNativeTestAllowed = ({ createCartId, enabledTestKeys, isBigCommerce, }) => {
682
+ if (isBigCommerce) {
683
+ return false;
684
+ }
685
+ if (typeof createCartId !== 'function') {
686
+ return false;
687
+ }
688
+ return enabledTestKeys.includes('hosted_vs_native');
689
+ };
690
+
676
691
  const isShippableCountry = (showLog = true,
677
692
  /**
678
693
  * If provided, will check if the country is shippable based on the provided country code instead of the Hello selected country code
@@ -1680,16 +1695,12 @@ const ZonosCheckout = class {
1680
1695
  };
1681
1696
  };
1682
1697
  this.shouldAllowHostedVsNativeTest = () => {
1683
- // This test is only applicable to checkout that's using createCartid callback
1684
- if (typeof zonosStore.checkoutSettings.createCartId !== 'function') {
1685
- return false;
1686
- }
1687
- const hostedVsNativeTest = zonosStore.enabledVariantTestKeys.includes('hosted_vs_native');
1688
- // Should not do anything if the test is not enabled
1689
- if (!hostedVsNativeTest) {
1690
- return false;
1691
- }
1692
- return true;
1698
+ var _a;
1699
+ return isHostedVsNativeTestAllowed({
1700
+ createCartId: zonosStore.checkoutSettings.createCartId,
1701
+ enabledTestKeys: zonosStore.enabledVariantTestKeys,
1702
+ isBigCommerce: Boolean((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.isBigCommerce),
1703
+ });
1693
1704
  };
1694
1705
  // Register test hosted vs native if needed to get the variant selection for this test
1695
1706
  this.registerTestHostedVsNative = async () => {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } 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 './VarianceTest-BJmZPrZl.js';
4
4
 
5
5
  const zonosCollapseCss = () => `: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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}`;
@@ -1,15 +1,16 @@
1
1
  import { r as registerInstance, e as getAssetPath, h, a as Host } from './index-_lt63o7c.js';
2
- import { d as cartStore } from './cart-BoQp8Ema.js';
2
+ import { d as cartStore } from './cart-DmJkjiDE.js';
3
3
  import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.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
6
  import { s as styles } from './styles-BTIeCf3T.js';
7
- import './localization-BIh-4pc_.js';
7
+ import './localization-DHM91diu.js';
8
8
  import './handleFetch-D5GYDF-O.js';
9
9
  import './VarianceTest-BJmZPrZl.js';
10
+ import './taxIdRules-xYlx7ZXW.js';
11
+ import './TaxId-DMIgN_sT.js';
10
12
  import './isDarkColor-YdrG78th.js';
11
- import './getBorderRadius-DYfkeXdx.js';
12
- import './TaxId-Cye-evFK.js';
13
+ import './getBorderRadius-BiGd45jw.js';
13
14
 
14
15
  const zonosCollectCartItemsCss = () => `: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--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}`;
15
16
 
@@ -1,23 +1,24 @@
1
1
  import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-Eo4gtyql.js';
3
- import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-BoQp8Ema.js';
4
- import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-DNfvnuUU.js';
5
- import { t as translate, s as storageStore, k as languages, l as localizationStore, y as translationStoreOnChange } from './localization-BIh-4pc_.js';
6
- import { z as zonosStore } from './zonosStore-msUlqmSD.js';
2
+ import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-BV5GTPmh.js';
3
+ import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-DmJkjiDE.js';
4
+ import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-BfW5aLJw.js';
5
+ import { t as translate, s as storageStore, k as languages, l as localizationStore, y as translationStoreOnChange } from './localization-DHM91diu.js';
6
+ import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
7
7
  import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-D5GYDF-O.js';
8
8
  import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
9
- import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
9
+ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
10
10
  import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
11
11
  import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-DGlnuxEX.js';
12
12
  import { c as classes } from './classes-BJHSB96f.js';
13
- import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CCD7gpSY.js';
14
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-C2Tw73uR.js';
15
- import { p as placeTestOrder } from './placeTestOrder-CQaMKFOg.js';
13
+ import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-DwSfSHar.js';
14
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-B31ZNkUv.js';
15
+ import { p as placeTestOrder } from './placeTestOrder-CyWUFhxD.js';
16
16
  import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
17
+ import './taxIdRules-xYlx7ZXW.js';
18
+ import './TaxId-DMIgN_sT.js';
17
19
  import './isDarkColor-YdrG78th.js';
18
- import './TaxId-Cye-evFK.js';
19
20
  import './isContrastColor-CWLU13s9.js';
20
- import './submitGtag-df9AQ2zL.js';
21
+ import './submitGtag-BEFrutel.js';
21
22
 
22
23
  var RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
23
24
 
@@ -1,20 +1,21 @@
1
1
  import { r as registerInstance, h, a as Host, F as Fragment } from './index-_lt63o7c.js';
2
- import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-Eo4gtyql.js';
3
- import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-BoQp8Ema.js';
4
- import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-DNfvnuUU.js';
5
- import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-BIh-4pc_.js';
6
- import { z as zonosStore } from './zonosStore-msUlqmSD.js';
2
+ import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-BV5GTPmh.js';
3
+ import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-DmJkjiDE.js';
4
+ import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-BfW5aLJw.js';
5
+ import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-DHM91diu.js';
6
+ import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
7
7
  import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
8
8
  import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-D5GYDF-O.js';
9
9
  import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-DGlnuxEX.js';
10
10
  import { c as classes } from './classes-BJHSB96f.js';
11
11
  import { l as log } from './VarianceTest-BJmZPrZl.js';
12
12
  import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
13
+ import './taxIdRules-xYlx7ZXW.js';
14
+ import './TaxId-DMIgN_sT.js';
13
15
  import './isDarkColor-YdrG78th.js';
14
- import './getBorderRadius-DYfkeXdx.js';
15
- import './TaxId-Cye-evFK.js';
16
+ import './getBorderRadius-BiGd45jw.js';
16
17
  import './isContrastColor-CWLU13s9.js';
17
- import './submitGtag-df9AQ2zL.js';
18
+ import './submitGtag-BEFrutel.js';
18
19
 
19
20
  var ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
20
21
 
@@ -1,14 +1,15 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host } from './index-_lt63o7c.js';
2
- import { b as stripeStore } from './cart-BoQp8Ema.js';
3
- import { m as getOverridenZCountry, n as isValidSelector, o as initLocalizationStore, s as storageStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-BIh-4pc_.js';
4
- import { z as zonosStore, a as zonosStoreFontFamily, b as zonosStoreInitSetting } from './zonosStore-msUlqmSD.js';
2
+ import { b as stripeStore } from './cart-DmJkjiDE.js';
3
+ import { m as getOverridenZCountry, n as isValidSelector, o as initLocalizationStore, s as storageStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-DHM91diu.js';
4
+ import { z as zonosStore, a as zonosStoreFontFamily, b as zonosStoreInitSetting } from './zonosStore-BXP9FvIt.js';
5
5
  import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-HeAZDwVW.js';
6
6
  import { h as handleFetch, l as logError } from './handleFetch-D5GYDF-O.js';
7
7
  import { l as log } from './VarianceTest-BJmZPrZl.js';
8
- import { e as ensureAnalyticsRelayPing } from './submitGtag-df9AQ2zL.js';
8
+ import { e as ensureAnalyticsRelayPing } from './submitGtag-BEFrutel.js';
9
+ import './taxIdRules-xYlx7ZXW.js';
10
+ import './TaxId-DMIgN_sT.js';
9
11
  import './isDarkColor-YdrG78th.js';
10
- import './getBorderRadius-DYfkeXdx.js';
11
- import './TaxId-Cye-evFK.js';
12
+ import './getBorderRadius-BiGd45jw.js';
12
13
 
13
14
  const getZonosSettings = async () => {
14
15
  if (window.Zonos.cartSettings) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { l as localizationStore } from './localization-BIh-4pc_.js';
3
- import { a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
2
+ import { l as localizationStore } from './localization-DHM91diu.js';
3
+ import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
4
4
  import { c as classes } from './classes-BJHSB96f.js';
5
5
  import './handleFetch-D5GYDF-O.js';
6
6
  import './VarianceTest-BJmZPrZl.js';
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { d as localizationStoreUpdateSelectedCountryCode, l as localizationStore, t as translate, k as languages } from './localization-BIh-4pc_.js';
3
- import { a as zonosStoreFontFamily } from './zonosStore-msUlqmSD.js';
2
+ import { d as localizationStoreUpdateSelectedCountryCode, l as localizationStore, t as translate, k as languages } from './localization-DHM91diu.js';
3
+ import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-BcMPqGl0.js';
5
5
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
6
- import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CCD7gpSY.js';
6
+ import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-DwSfSHar.js';
7
7
  import { c as classes } from './classes-BJHSB96f.js';
8
8
  import './handleFetch-D5GYDF-O.js';
9
9
  import './VarianceTest-BJmZPrZl.js';