@zonos/elements 1.3.289 → 1.3.291

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 (284) hide show
  1. package/dist/cjs/{cart-WLQb2hbe.js → cart-B6Aty-21.js} +3 -3
  2. package/dist/cjs/{collect-B92uIdsY.js → collect-Oeo5tjN5.js} +3 -3
  3. package/dist/cjs/{debounce-5sZmmlCI.js → debounce-Cd2emZPn.js} +2 -2
  4. package/dist/cjs/{debounce-Nu2lJW4A.js → debounce-vY0QYT6o.js} +1 -1
  5. package/dist/cjs/{getBorderRadius-DGZiQu09.js → getBorderRadius-CyYZw4qq.js} +1 -1
  6. package/dist/cjs/{getMissingRequiredShippingFields-5w62gTIB.js → getMissingRequiredShippingFields-D03ICqss.js} +1 -1
  7. package/dist/cjs/{hasInclusivePrice-hmV0Inld.js → hasInclusivePrice-CPCoVeU3.js} +1 -1
  8. package/dist/cjs/index.cjs.js +7 -7
  9. package/dist/cjs/{invoice-Bal1mqYR.js → invoice-Cj8W7NW0.js} +3 -3
  10. package/dist/cjs/{localization-C5HPlCNK.js → localization-BzNeXeDe.js} +25 -16
  11. package/dist/cjs/{paypal-o164C26_.js → paypal-CuKshRmZ.js} +4 -4
  12. package/dist/cjs/{placeTestOrder-C7tAipav.js → placeTestOrder-7czjwkjm.js} +2 -2
  13. package/dist/cjs/{renderCheckoutCurrency-Bpx-vrTQ.js → renderCheckoutCurrency-BH8t2b2x.js} +2 -2
  14. package/dist/cjs/{shouldShowLanguageSelect-CtwkMt8b.js → shouldShowLanguageSelect-yAbtCmd8.js} +1 -1
  15. package/dist/cjs/{submitGtag-CcEL-w5D.js → submitGtag-D79e8u6s.js} +1 -1
  16. package/dist/cjs/{throttle-BcxGntLr.js → throttle-zSVRQLC0.js} +2 -2
  17. package/dist/cjs/{updateCheckoutSessionAttributes-Dltl5RBx.js → updateCheckoutSessionAttributes-jMtfOL2m.js} +1 -1
  18. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +7 -7
  19. package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
  20. package/dist/cjs/zonos-address_4.cjs.entry.js +6 -6
  21. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +5 -5
  22. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-card_5.cjs.entry.js +6 -6
  26. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +14 -14
  27. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
  28. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -9
  29. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  30. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +4 -4
  31. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +10 -10
  32. package/dist/cjs/zonos-collect.cjs.entry.js +7 -7
  33. package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
  34. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  35. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  36. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  37. package/dist/cjs/zonos-hello.cjs.entry.js +129 -51
  38. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +6 -6
  40. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +10 -10
  41. package/dist/cjs/zonos-invoice.cjs.entry.js +7 -7
  42. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  43. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  44. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +5 -5
  45. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  46. package/dist/cjs/zonos-stripe-input.cjs.entry.js +2 -2
  47. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  48. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  49. package/dist/cjs/{zonosStore-BCNYr6Tk.js → zonosStore-Bx9jK82G.js} +2 -0
  50. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +17 -15
  51. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +29 -52
  52. package/dist/collection/components/store/hello/localization.js +4 -1
  53. package/dist/collection/components/store/zonosStore.js +2 -0
  54. package/dist/collection/components/utils/hello/countryOverrideStorage.js +20 -14
  55. package/dist/collection/components/utils/hello/resolveHelloFloatPlacement.js +98 -0
  56. package/dist/collection/types/generated/graphql.internal.types.js +176 -9
  57. package/dist/esm/{cart-BDc4RTBJ.js → cart-BoQp8Ema.js} +3 -3
  58. package/dist/esm/{collect-NRCK3t-M.js → collect-CdrR5OBy.js} +3 -3
  59. package/dist/esm/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +1 -1
  60. package/dist/esm/{debounce-DWPsxJsW.js → debounce-CrmpwbEE.js} +2 -2
  61. package/dist/esm/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
  62. package/dist/esm/{getMissingRequiredShippingFields-D-B-N1NH.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +1 -1
  63. package/dist/esm/{hasInclusivePrice-Bti4iudO.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
  64. package/dist/esm/index.js +7 -7
  65. package/dist/esm/{invoice-DsvQvu4a.js → invoice-S1KahJ_Z.js} +3 -3
  66. package/dist/esm/{localization-Bs6hVcKV.js → localization-BIh-4pc_.js} +25 -16
  67. package/dist/esm/{paypal-BqyEZS_u.js → paypal-DNfvnuUU.js} +4 -4
  68. package/dist/esm/{placeTestOrder-x3xwMAnW.js → placeTestOrder-CQaMKFOg.js} +2 -2
  69. package/dist/esm/{renderCheckoutCurrency-DIBdWKN1.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
  70. package/dist/esm/{shouldShowLanguageSelect-Bb9sbQ41.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
  71. package/dist/esm/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
  72. package/dist/esm/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
  73. package/dist/esm/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
  74. package/dist/esm/zonos-address-completion-dialog_7.entry.js +7 -7
  75. package/dist/esm/zonos-address-display_2.entry.js +3 -3
  76. package/dist/esm/zonos-address_4.entry.js +6 -6
  77. package/dist/esm/zonos-airwallex-payment.entry.js +5 -5
  78. package/dist/esm/zonos-badge.entry.js +1 -1
  79. package/dist/esm/zonos-banner.entry.js +1 -1
  80. package/dist/esm/zonos-button_3.entry.js +2 -2
  81. package/dist/esm/zonos-card_5.entry.js +6 -6
  82. package/dist/esm/zonos-cart-items_12.entry.js +14 -14
  83. package/dist/esm/zonos-checkbox_2.entry.js +2 -2
  84. package/dist/esm/zonos-checkout.entry.js +9 -9
  85. package/dist/esm/zonos-collapse.entry.js +1 -1
  86. package/dist/esm/zonos-collect-cart-items_3.entry.js +4 -4
  87. package/dist/esm/zonos-collect-finish_6.entry.js +10 -10
  88. package/dist/esm/zonos-collect.entry.js +7 -7
  89. package/dist/esm/zonos-controller.entry.js +5 -5
  90. package/dist/esm/zonos-country-flag.entry.js +2 -2
  91. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  92. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  93. package/dist/esm/zonos-hello.entry.js +129 -51
  94. package/dist/esm/zonos-input.entry.js +2 -2
  95. package/dist/esm/zonos-invoice-cart-items_2.entry.js +6 -6
  96. package/dist/esm/zonos-invoice-finish_5.entry.js +10 -10
  97. package/dist/esm/zonos-invoice.entry.js +7 -7
  98. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  99. package/dist/esm/zonos-logo.entry.js +1 -1
  100. package/dist/esm/zonos-policy-consent_2.entry.js +5 -5
  101. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  102. package/dist/esm/zonos-stripe-input.entry.js +2 -2
  103. package/dist/esm/zonos-text.entry.js +1 -1
  104. package/dist/esm/zonos-v-stack.entry.js +1 -1
  105. package/dist/esm/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +2 -0
  106. package/dist/esm-es5/{cart-BDc4RTBJ.js → cart-BoQp8Ema.js} +1 -1
  107. package/dist/esm-es5/{collect-NRCK3t-M.js → collect-CdrR5OBy.js} +1 -1
  108. package/dist/esm-es5/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +7 -7
  109. package/dist/esm-es5/debounce-CrmpwbEE.js +1 -0
  110. package/dist/esm-es5/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
  111. package/dist/esm-es5/{getMissingRequiredShippingFields-D-B-N1NH.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +3 -3
  112. package/dist/esm-es5/{hasInclusivePrice-Bti4iudO.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
  113. package/dist/esm-es5/index.js +4 -4
  114. package/dist/esm-es5/{invoice-DsvQvu4a.js → invoice-S1KahJ_Z.js} +1 -1
  115. package/dist/esm-es5/{localization-Bs6hVcKV.js → localization-BIh-4pc_.js} +14 -4
  116. package/dist/esm-es5/{paypal-BqyEZS_u.js → paypal-DNfvnuUU.js} +1 -1
  117. package/dist/esm-es5/{placeTestOrder-x3xwMAnW.js → placeTestOrder-CQaMKFOg.js} +1 -1
  118. package/dist/esm-es5/{renderCheckoutCurrency-DIBdWKN1.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
  119. package/dist/esm-es5/{shouldShowLanguageSelect-Bb9sbQ41.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
  120. package/dist/esm-es5/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
  121. package/dist/esm-es5/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
  122. package/dist/esm-es5/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
  123. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
  124. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  125. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  126. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  127. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  128. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  129. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  130. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  131. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  132. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  133. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  134. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  135. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  136. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  137. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  138. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  139. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  140. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  141. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  142. package/dist/esm-es5/zonos-hello.entry.js +21 -24
  143. package/dist/esm-es5/zonos-input.entry.js +1 -1
  144. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  145. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  146. package/dist/esm-es5/zonos-invoice.entry.js +3 -3
  147. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  148. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  149. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  150. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  151. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  152. package/dist/esm-es5/zonos-text.entry.js +1 -1
  153. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  154. package/dist/esm-es5/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +1 -1
  155. package/dist/scripts/index.d.ts +36 -6
  156. package/dist/scripts/index.js +1 -1
  157. package/dist/scripts/loadZonos.js +1 -1
  158. package/dist/scripts/zonos.js +1 -1
  159. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +5 -3
  160. package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +1 -1
  161. package/dist/types/components/utils/hello/resolveHelloFloatPlacement.d.ts +39 -0
  162. package/dist/types/components.d.ts +4 -6
  163. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +10 -0
  164. package/dist/types/types/generated/graphql.internal.types.d.ts +239 -11
  165. package/dist/types/types/generated/graphql.internal.types.ts +302 -15
  166. package/dist/types/types/hello/HelloConfig.d.ts +12 -0
  167. package/dist/zonos-elements/index.esm.js +1 -1
  168. package/dist/zonos-elements/{p-d9527bd7.system.entry.js → p-04bded81.system.entry.js} +45 -45
  169. package/dist/zonos-elements/{p-18021e6b.entry.js → p-06fe2939.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-058f07aa.system.entry.js → p-0a4a7742.system.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-d261f27c.system.entry.js → p-0b81f8b9.system.entry.js} +16 -16
  172. package/dist/zonos-elements/{p-c5f17bad.entry.js → p-0fca452b.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-72b6a006.system.entry.js → p-11defdca.system.entry.js} +18 -18
  174. package/dist/zonos-elements/{p-1568ab06.system.entry.js → p-1409de3b.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-2466b5f0.system.entry.js → p-17c7ea4a.system.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-8328f44d.entry.js → p-193d9722.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-22fab1ba.system.entry.js → p-195f6e38.system.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-cc5306fe.system.entry.js → p-1bac5ac1.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-128485dc.entry.js → p-1c150f26.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-c4713ff1.system.entry.js → p-23352709.system.entry.js} +4 -4
  181. package/dist/zonos-elements/{p-cc949df1.system.entry.js → p-244e0302.system.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-e9a3bc27.system.entry.js → p-249c1ee1.system.entry.js} +3 -3
  183. package/dist/zonos-elements/{p-7681798d.entry.js → p-24f3c547.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-5c08d36b.entry.js → p-2603dce0.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-b78bab27.entry.js → p-34656e6c.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-4625058a.entry.js → p-39ee1558.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-f8fd756a.system.entry.js → p-474e8a92.system.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-0ff26236.system.entry.js → p-4806b264.system.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-56159b7c.system.entry.js → p-5016d71b.system.entry.js} +58 -58
  190. package/dist/zonos-elements/{p-b96666ca.system.entry.js → p-51400242.system.entry.js} +3 -3
  191. package/dist/zonos-elements/{p-e126e9bd.system.entry.js → p-5236c676.system.entry.js} +80 -80
  192. package/dist/zonos-elements/{p-cf53f67a.entry.js → p-550d4eea.entry.js} +1 -1
  193. package/dist/zonos-elements/{p-36559431.system.entry.js → p-552fbde1.system.entry.js} +21 -21
  194. package/dist/zonos-elements/{p-a6faab6a.entry.js → p-55916c90.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-317d4665.system.entry.js → p-5b80aff2.system.entry.js} +15 -15
  196. package/dist/zonos-elements/p-69c3e367.system.entry.js +118 -0
  197. package/dist/zonos-elements/{p-3cc27e0e.system.entry.js → p-6abec43f.system.entry.js} +4 -4
  198. package/dist/zonos-elements/{p-635341d6.entry.js → p-6c41b00c.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-d451d5bc.system.entry.js → p-6db7c0b1.system.entry.js} +4 -4
  200. package/dist/zonos-elements/{p-cc17a230.entry.js → p-6e296228.entry.js} +1 -1
  201. package/dist/zonos-elements/{p-beeb9d36.system.entry.js → p-756d303f.system.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-B6X55m0b.js → p-7abqRc9V.js} +2 -2
  203. package/dist/zonos-elements/{p-3d536086.entry.js → p-82595838.entry.js} +1 -1
  204. package/dist/zonos-elements/{p-34d1545a.entry.js → p-83aa1c8c.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-CaUXHglQ.system.js → p-8PPEbm_0.system.js} +9 -9
  206. package/dist/zonos-elements/{p-b6deae2b.system.entry.js → p-92fe9a1f.system.entry.js} +2 -2
  207. package/dist/zonos-elements/{p-5eb82be3.entry.js → p-938fc1e4.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-CZl1nwqv.system.js → p-B4Ufchqh.system.js} +3 -3
  209. package/dist/zonos-elements/p-BGktDPwA.system.js +1 -0
  210. package/dist/zonos-elements/{p-D2fOB4Wn.system.js → p-Be3Hpms1.system.js} +1 -1
  211. package/dist/zonos-elements/{p-D0erXw7p.js → p-BpDCLBwW.js} +1 -1
  212. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  213. package/dist/zonos-elements/{p-CPnR_T0a.system.js → p-BuU_p5DP.system.js} +58 -58
  214. package/dist/zonos-elements/{p-CaAod213.system.js → p-CBx5nYet.system.js} +1 -1
  215. package/dist/zonos-elements/{p-UM1aYZBV.system.js → p-CEK_Wk6v.system.js} +1 -1
  216. package/dist/zonos-elements/p-CFbfEmjN.js +1 -0
  217. package/dist/zonos-elements/{p-nU86HJ5w.js → p-CUaf1cEg.js} +1 -1
  218. package/dist/zonos-elements/p-C_z9WL8a.js +1 -0
  219. package/dist/zonos-elements/p-CcJF6xhQ.js +1 -0
  220. package/dist/zonos-elements/p-Cxuiqv1I.js +1 -0
  221. package/dist/zonos-elements/p-D-bZg-Pc.js +1 -0
  222. package/dist/zonos-elements/{p-CH6tsv9B.system.js → p-D4MevhAL.system.js} +3 -3
  223. package/dist/zonos-elements/{p-BybDGrH4.system.js → p-DI2vXnXc.system.js} +3 -3
  224. package/dist/zonos-elements/{p-CQyFoOXW.system.js → p-DNc279vN.system.js} +13 -13
  225. package/dist/zonos-elements/{p-Cd9xIgx7.system.js → p-DOD2I44l.system.js} +92 -82
  226. package/dist/zonos-elements/p-DQZncB2d.system.js +9 -0
  227. package/dist/zonos-elements/{p-NL_Eiq6m.system.js → p-DS-qw_qc.system.js} +15 -15
  228. package/dist/zonos-elements/p-DZ2mevDK.js +1 -0
  229. package/dist/zonos-elements/{p-uV7m6KrY.system.js → p-DoEHepOc.system.js} +1 -1
  230. package/dist/zonos-elements/{p-D4WI0B6-.system.js → p-DuufSrhH.system.js} +4 -4
  231. package/dist/zonos-elements/{p-MHVIIOVE.js → p-DzLNk-Pf.js} +1 -1
  232. package/dist/zonos-elements/{p-DqEtY53c.js → p-FRWZayxL.js} +1 -1
  233. package/dist/zonos-elements/p-Mrz_lnC1.js +1 -0
  234. package/dist/zonos-elements/{p-CtEsvWI6.js → p-W82paT5F.js} +1 -1
  235. package/dist/zonos-elements/{p-CVQ7-7E2.system.js → p-XDxdMlQl.system.js} +22 -22
  236. package/dist/zonos-elements/{p-CuhGrJBA.system.js → p-XqkqjeNV.system.js} +1 -1
  237. package/dist/zonos-elements/{p-8cac7911.system.entry.js → p-a40fd99b.system.entry.js} +12 -12
  238. package/dist/zonos-elements/{p-b68ca96f.entry.js → p-a938c174.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-9ebe9a36.entry.js → p-acd50b0b.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-fcfac62f.system.entry.js → p-b2dd7f02.system.entry.js} +1 -1
  241. package/dist/zonos-elements/{p-0f603278.system.entry.js → p-b5882fbb.system.entry.js} +2 -2
  242. package/dist/zonos-elements/{p-e582ae2a.entry.js → p-b79036fc.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-6c6c65f0.entry.js → p-bb3546c0.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-02628b9f.entry.js → p-c1cbfdba.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-b88e521e.system.entry.js → p-c3646ae6.system.entry.js} +19 -19
  246. package/dist/zonos-elements/{p-be64d823.system.entry.js → p-c403f004.system.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-c090cc60.entry.js → p-c47ce656.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-68e0180a.entry.js → p-c5bab786.entry.js} +1 -1
  249. package/dist/zonos-elements/{p-628a0f7f.entry.js → p-c961caaf.entry.js} +1 -1
  250. package/dist/zonos-elements/p-c9QtIdJX.js +1 -0
  251. package/dist/zonos-elements/{p-CGkdA4pY.js → p-clDfq9AL.js} +1 -1
  252. package/dist/zonos-elements/p-d168023b.entry.js +1 -0
  253. package/dist/zonos-elements/{p-3e59d41c.entry.js → p-d3d0656a.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-9b6482ef.entry.js → p-d4d2b39e.entry.js} +1 -1
  255. package/dist/zonos-elements/p-d74bc3e8.entry.js +1 -0
  256. package/dist/zonos-elements/p-db87b0dd.entry.js +1 -0
  257. package/dist/zonos-elements/{p-f44631d5.entry.js → p-dea26048.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-5e074243.entry.js → p-defc2d18.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-bdba7d9e.system.entry.js → p-dfc87b10.system.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-03fbe813.system.entry.js → p-e005b6a5.system.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-02ff6f8b.system.entry.js → p-e0e9cff5.system.entry.js} +42 -42
  262. package/dist/zonos-elements/p-f8b50aa0.entry.js +1 -0
  263. package/dist/zonos-elements/{p-ClUEwqZW.system.js → p-kaOxUR9u.system.js} +6 -6
  264. package/dist/zonos-elements/p-rVp8hgWw.js +1 -0
  265. package/dist/zonos-elements/{p-i1iCWKdv.js → p-sz4L-ZnB.js} +1 -1
  266. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  267. package/package.json +1 -1
  268. package/dist/esm-es5/debounce-DWPsxJsW.js +0 -1
  269. package/dist/zonos-elements/p-037d3688.entry.js +0 -1
  270. package/dist/zonos-elements/p-0466650f.entry.js +0 -1
  271. package/dist/zonos-elements/p-163b81c0.system.entry.js +0 -121
  272. package/dist/zonos-elements/p-3ERbuo5a.js +0 -1
  273. package/dist/zonos-elements/p-97f848f6.entry.js +0 -1
  274. package/dist/zonos-elements/p-9H2p9XKE.js +0 -1
  275. package/dist/zonos-elements/p-BANhKkF2.system.js +0 -1
  276. package/dist/zonos-elements/p-BJufDgh3.js +0 -1
  277. package/dist/zonos-elements/p-BSgVcCxT.system.js +0 -9
  278. package/dist/zonos-elements/p-CpvnCfKt.js +0 -1
  279. package/dist/zonos-elements/p-CtKp6AQ4.js +0 -1
  280. package/dist/zonos-elements/p-DdpeA8cH.js +0 -1
  281. package/dist/zonos-elements/p-DkirvyAh.js +0 -1
  282. package/dist/zonos-elements/p-a6354d15.entry.js +0 -1
  283. package/dist/zonos-elements/p-opB7B9YB.js +0 -1
  284. package/dist/zonos-elements/p-t_ClFAJR.js +0 -1
@@ -1,14 +1,14 @@
1
- var __awaiter=this&&this.__awaiter||function(e,a,t,r){function o(e){return e instanceof t?e:new t((function(a){a(e)}))}return new(t||(t=Promise))((function(t,n){function l(e){try{s(r.next(e))}catch(e){n(e)}}function i(e){try{s(r["throw"](e))}catch(e){n(e)}}function s(e){e.done?t(e.value):o(e.value).then(l,i)}s((r=r.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=i(0),l["throw"]=i(1),l["return"]=i(2),typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(e){return function(a){return s([e,a])}}function s(i){if(r)throw new TypeError("Generator is already executing.");while(l&&(l=0,i[0]&&(t=0)),t)try{if(r=1,o&&(n=i[0]&2?o["return"]:i[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;if(o=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;o=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){t.label=i[1];break}if(i[0]===6&&t.label<n[1]){t.label=n[1];n=i;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(i);break}if(n[2])t.ops.pop();t.trys.pop();continue}i=a.call(e,t)}catch(e){i=[6,e];o=0}finally{r=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,a,t){if(t||arguments.length===2)for(var r=0,o=a.length,n;r<o;r++){if(n||!(r in a)){if(!n)n=Array.prototype.slice.call(a,0,r);n[r]=a[r]}}return e.concat(n||Array.prototype.slice.call(a))};System.register(["./p-CPnR_T0a.system.js","./p-zVLAvre1.system.js","./p-BbgqQIHv.system.js"],(function(e){"use strict";var a,t,r,o,n,l,i;return{setters:[function(e){a=e.c;t=e.z},function(e){r=e.j;o=e.h;n=e.l},function(e){l=e.a;i=e.l}],execute:function(){var s=this;
1
+ var __awaiter=this&&this.__awaiter||function(e,a,t,r){function o(e){return e instanceof t?e:new t((function(a){a(e)}))}return new(t||(t=Promise))((function(t,n){function i(e){try{s(r.next(e))}catch(e){n(e)}}function l(e){try{s(r["throw"](e))}catch(e){n(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,l)}s((r=r.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=l(0),i["throw"]=l(1),i["return"]=l(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(a){return s([e,a])}}function s(l){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(t=0)),t)try{if(r=1,o&&(n=l[0]&2?o["return"]:l[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,l[1])).done)return n;if(o=0,n)l=[l[0]&2,n.value];switch(l[0]){case 0:case 1:n=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;o=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!n||l[1]>n[0]&&l[1]<n[3])){t.label=l[1];break}if(l[0]===6&&t.label<n[1]){t.label=n[1];n=l;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(l);break}if(n[2])t.ops.pop();t.trys.pop();continue}l=a.call(e,t)}catch(e){l=[6,e];o=0}finally{r=n=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,a,t){if(t||arguments.length===2)for(var r=0,o=a.length,n;r<o;r++){if(n||!(r in a)){if(!n)n=Array.prototype.slice.call(a,0,r);n[r]=a[r]}}return e.concat(n||Array.prototype.slice.call(a))};System.register(["./p-BuU_p5DP.system.js","./p-zVLAvre1.system.js","./p-BbgqQIHv.system.js"],(function(e){"use strict";var a,t,r,o,n,i,l;return{setters:[function(e){a=e.c;t=e.z},function(e){r=e.j;o=e.h;n=e.l},function(e){i=e.a;l=e.l}],execute:function(){var s=this;
2
2
  /**
3
3
  * Check if the response contains at least one available test key that we support
4
- */var u=function(e){var a=!!e.find((function(e){return e.testKey in l}));if(!a){i("No available test key found in response","info",{response:e})}return!!e.find((function(e){return e.testKey in l}))};
4
+ */var u=function(e){var a=!!e.find((function(e){return e.testKey in i}));if(!a){l("No available test key found in response","info",{response:e})}return!!e.find((function(e){return e.testKey in i}))};
5
5
  /**
6
6
  * Filter the response to only include test keys and variants key that we support
7
7
  */var d=e("f",(function(e){
8
8
  // Type guard the response to ensure it matches the expected structure
9
9
  if(!u(e)){return[]}
10
10
  // Filter the response to only include test keys that we support
11
- return e.filter((function(e){var a;var t=l[e.testKey]&&!e.selectedVariantKey;var r=e.selectedVariantKey&&!!((a=l[e.testKey])===null||a===void 0?void 0:a["availableVariants"].includes(e.selectedVariantKey));return t||r})).map((function(e){return Object.assign(Object.assign({},e),{expiresAt:e.expiresAt||Date.now()+c,selectedVariantKey:e.selectedVariantKey||null})}))}));
11
+ return e.filter((function(e){var a;var t=i[e.testKey]&&!e.selectedVariantKey;var r=e.selectedVariantKey&&!!((a=i[e.testKey])===null||a===void 0?void 0:a["availableVariants"].includes(e.selectedVariantKey));return t||r})).map((function(e){return Object.assign(Object.assign({},e),{expiresAt:e.expiresAt||Date.now()+c,selectedVariantKey:e.selectedVariantKey||null})}))}));
12
12
  /**
13
13
  * Expiration time for variant test keys in milliseconds
14
14
  * @default 1 day
@@ -26,49 +26,55 @@ City:{value:"City"},"City/Town":{value:"City/Town"},"Click to copy the card numb
26
26
  * translate('Above de minimis threshold for')
27
27
  */var X=e("t",(function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}var t=e[0],r=e[1];var o,n;if(r){
28
28
  // replace all variables in the string
29
- var l=((o=R.translatedChunks[t])===null||o===void 0?void 0:o.value)||t;Object.entries(r).forEach((function(e){var a=e[0],t=e[1];l=l.replace(new RegExp("\\[".concat(a,"\\]"),"g"),t.toString())}));return l}return((n=R.translatedChunks[t])===null||n===void 0?void 0:n.value)||t}));var B=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4/*yield*/,o("/api/zonos-elements/get-countries",{method:"GET"})];case 1:e=n.sent(),a=e.errors,t=e.json;if(a.length||!t){return[2/*return*/,null]}return[2/*return*/,t];case 2:r=n.sent();return[2/*return*/,null];case 3:return[2/*return*/]}}))}))};var O=function(e){return __awaiter(s,void 0,void 0,(function(){var a,t,r,l,i;return __generator(this,(function(s){switch(s.label){case 0:if(!e){return[2/*return*/,null]}t="/api/zonos-elements/country-landed-cost/".concat(e);return[4/*yield*/,o(t)];case 1:r=s.sent(),l=r.errors,i=r.json;if(l.length||!i){n("Error fetching country landed cost: ".concat((a=l.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}return[2/*return*/,i||null]}}))}))};var K={exchangeRate:{rate:1,targetFormat:{currencyCode:"USD",decimalDelimiter:".",scale:2,symbol:"$",symbolLocation:"before",thousandsDelimiter:","}},maxAge:null};var W=e("w",(function(e){return __awaiter(s,[e],void 0,(function(e){var a,t,r,l,i,s,u,d,c,v;var p=e.country,m=e.isGuaranteed,h=e.sourceCurrency,g=e.targetCurrency;return __generator(this,(function(e){switch(e.label){case 0:
29
+ var i=((o=R.translatedChunks[t])===null||o===void 0?void 0:o.value)||t;Object.entries(r).forEach((function(e){var a=e[0],t=e[1];i=i.replace(new RegExp("\\[".concat(a,"\\]"),"g"),t.toString())}));return i}return((n=R.translatedChunks[t])===null||n===void 0?void 0:n.value)||t}));var B=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4/*yield*/,o("/api/zonos-elements/get-countries",{method:"GET"})];case 1:e=n.sent(),a=e.errors,t=e.json;if(a.length||!t){return[2/*return*/,null]}return[2/*return*/,t];case 2:r=n.sent();return[2/*return*/,null];case 3:return[2/*return*/]}}))}))};var O=function(e){return __awaiter(s,void 0,void 0,(function(){var a,t,r,i,l;return __generator(this,(function(s){switch(s.label){case 0:if(!e){return[2/*return*/,null]}t="/api/zonos-elements/country-landed-cost/".concat(e);return[4/*yield*/,o(t)];case 1:r=s.sent(),i=r.errors,l=r.json;if(i.length||!l){n("Error fetching country landed cost: ".concat((a=i.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}return[2/*return*/,l||null]}}))}))};var K={exchangeRate:{rate:1,targetFormat:{currencyCode:"USD",decimalDelimiter:".",scale:2,symbol:"$",symbolLocation:"before",thousandsDelimiter:","}},maxAge:null};var W=e("w",(function(e){return __awaiter(s,[e],void 0,(function(e){var a,t,r,i,l,s,u,d,c,v;var p=e.country,m=e.isGuaranteed,h=e.sourceCurrency,g=e.targetCurrency;return __generator(this,(function(e){switch(e.label){case 0:
30
30
  // If source currency matches target currency (US -> US) and is not a guaranteed rate, return default exchange rate so we still format properly.
31
- if(h===g&&!m){return[2/*return*/,K]}t=new URLSearchParams;t.set("sourceCurrency",h);t.set("targetCurrency",g);t.set("isGuaranteed",String(m));t.set("country",p||"");return[4/*yield*/,o("/api/zonos-elements/exchange-rates?".concat(t.toString()))];case 1:r=e.sent(),l=r.errors,i=r.json;if(l.length||!i){n("Error fetching country landed cost: ".concat((a=l.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,K]}s=i.exchangeRateCreate,u=s.rate,d=s.targetFormat;c=i.maxAge;if(u){sessionStorage.setItem(p+"_rate",JSON.stringify(u));v={rate:u,targetFormat:d};return[2/*return*/,{exchangeRate:v,maxAge:c}]}return[2/*return*/,K]}}))}))}));var q=function(e){return __awaiter(s,void 0,void 0,(function(){var a,t,r,l;return __generator(this,(function(i){switch(i.label){case 0:if(!e){return[2/*return*/,null]}return[4/*yield*/,o("/api/zonos-elements/inclusive-prices/".concat(e))];case 1:t=i.sent(),r=t.errors,l=t.json;if(r.length||!l){n("Error fetching country inclusive price setting: ".concat((a=r.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}return[2/*return*/,l||null]}}))}))};var Y=function(e){return __awaiter(s,[e],void 0,(function(e){var a,t,r,l,i;var s=e.countryCode,u=e.localeTo,d=e.storeId;return __generator(this,(function(e){switch(e.label){case 0:t=new URLSearchParams;t.set("countryCode",s);t.set("storeId",d.toString());if(u){t.set("localeTo",u)}return[4/*yield*/,o("/api/zonos-elements/locale-messages?".concat(t.toString()))];case 1:r=e.sent(),l=r.errors,i=r.json;if(l.length||!i){n("Error fetching exchange rate",(a=l.find(Boolean))===null||a===void 0?void 0:a.message);return[2/*return*/,[]]}return[2/*return*/,i.locale_countryCodesPage]}}))}))};var M=function(e){return/^[A-Z]{2}$/.test(e)};var Z="zonos--country";var H=function(e){try{e()}catch(e){
31
+ if(h===g&&!m){return[2/*return*/,K]}t=new URLSearchParams;t.set("sourceCurrency",h);t.set("targetCurrency",g);t.set("isGuaranteed",String(m));t.set("country",p||"");return[4/*yield*/,o("/api/zonos-elements/exchange-rates?".concat(t.toString()))];case 1:r=e.sent(),i=r.errors,l=r.json;if(i.length||!l){n("Error fetching country landed cost: ".concat((a=i.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,K]}s=l.exchangeRateCreate,u=s.rate,d=s.targetFormat;c=l.maxAge;if(u){sessionStorage.setItem(p+"_rate",JSON.stringify(u));v={rate:u,targetFormat:d};return[2/*return*/,{exchangeRate:v,maxAge:c}]}return[2/*return*/,K]}}))}))}));var q=function(e){return __awaiter(s,void 0,void 0,(function(){var a,t,r,i;return __generator(this,(function(l){switch(l.label){case 0:if(!e){return[2/*return*/,null]}return[4/*yield*/,o("/api/zonos-elements/inclusive-prices/".concat(e))];case 1:t=l.sent(),r=t.errors,i=t.json;if(r.length||!i){n("Error fetching country inclusive price setting: ".concat((a=r.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}return[2/*return*/,i||null]}}))}))};var Y=function(e){return __awaiter(s,[e],void 0,(function(e){var a,t,r,i,l;var s=e.countryCode,u=e.localeTo,d=e.storeId;return __generator(this,(function(e){switch(e.label){case 0:t=new URLSearchParams;t.set("countryCode",s);t.set("storeId",d.toString());if(u){t.set("localeTo",u)}return[4/*yield*/,o("/api/zonos-elements/locale-messages?".concat(t.toString()))];case 1:r=e.sent(),i=r.errors,l=r.json;if(i.length||!l){n("Error fetching exchange rate",(a=i.find(Boolean))===null||a===void 0?void 0:a.message);return[2/*return*/,[]]}return[2/*return*/,l.locale_countryCodesPage]}}))}))};var M=function(e){return/^[A-Z]{2}$/.test(e)};var Z="zonos--country";var H=function(e){try{e()}catch(e){
32
32
  // localStorage/sessionStorage can throw in blocked-storage contexts
33
33
  // (Safari private mode, cross-origin iframes).
34
- }};var J=function(){window.sessionStorage.removeItem(Z)};var _=function(e){try{var a=e.getItem(Z);if(!a||!M(a)){return null}return a}catch(e){return null}};var Q=function(){var e;return(e=_(window.localStorage))!==null&&e!==void 0?e:_(window.sessionStorage)};var $=function(){H((function(){if(_(window.localStorage)){J()}}))};var ee=function(e){H((function(){window.localStorage.setItem(Z,e);J()}))};var ae=function(){H((function(){window.localStorage.removeItem(Z);J()}))};var te=e("g",(function(e){var a=new URLSearchParams(e||window.location.search);var t=function(e){var t=a.get(e);if(t&&M(t)){return t}return null};var r=t("zCountry");
34
+ }};var J=function(e){try{var a=e.getItem(Z);if(!a||!M(a)){return null}return a}catch(e){return null}};var _=function(e,a){e.setItem(Z,a)};var Q=function(e){H((function(){return e(window.localStorage)}));H((function(){return e(window.sessionStorage)}))};var $=function(){var e;return(e=J(window.localStorage))!==null&&e!==void 0?e:J(window.sessionStorage)};var ee=function(e){if(!e){return}H((function(){var a=J(window.localStorage);
35
+ // Only mirror the country Hello actually kept. A failed localStorage
36
+ // clear can leave a discarded country in local; never copy that to
37
+ // session for older Elements. Never copy session → local.
38
+ if(a===e){_(window.sessionStorage,a)}}))};var ae=function(e){
39
+ // Dual-write so older Elements that only read sessionStorage see the pick.
40
+ Q((function(a){return _(a,e)}))};var te=function(){Q((function(e){return e.removeItem(Z)}))};var re=e("g",(function(e){var a=new URLSearchParams(e||window.location.search);var t=function(e){var t=a.get(e);if(t&&M(t)){return t}return null};var r=t("zCountry");
35
41
  // Fallback to legacy 'country'
36
42
  var o=t("country");
37
43
  // Fallback to customerCountry
38
44
  var n=t("customerCountry");return r||o||n}));
39
45
  /**
40
46
  * Retrieve the shopper country override from the URL or remembered storage.
41
- */var re=e("m",(function(){var e=new URL(window.location.href);return te(e.searchParams)||Q()}));var oe=function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}return __awaiter(s,__spreadArray([],e,true),void 0,(function(e){var a,t,r,n,l,i;var s=e===void 0?{}:e,u=s.ignoreCountryOverride,d=u===void 0?false:u;return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);a=d?null:re();t=new URLSearchParams;if(a){t.set("zCountry",a)}return[4/*yield*/,o("/api/zonos-elements/localization?".concat(t.toString()))];case 1:r=e.sent(),n=r.errors,l=r.json;if(n.length||!l){return[2/*return*/,{country:null,locale:null}]}return[2/*return*/,{country:l.country,locale:l.locale}];case 2:i=e.sent();return[2/*return*/,{country:null,locale:null}];case 3:return[2/*return*/]}}))}))};var ne=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,l,i,s;return __generator(this,(function(u){switch(u.label){case 0:if((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.shippingZones){return[2/*return*/,window.Zonos.cartSettings.shippingZones.flatMap((function(e){return e===null||e===void 0?void 0:e.countryCodes})).filter(Boolean)]}return[4/*yield*/,o("/api/zonos-elements/shipping-zones")];case 1:r=u.sent(),l=r.errors,i=r.json;if(l.length||!i){n("Error fetching shipping zones: ".concat((a=l.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}s=(t=i===null||i===void 0?void 0:i.shippingZones)===null||t===void 0?void 0:t.flatMap((function(e){return e===null||e===void 0?void 0:e.countryCodes})).filter(Boolean);return[2/*return*/,s||null]}}))}))};
47
+ */var oe=e("m",(function(){var e=new URL(window.location.href);return re(e.searchParams)||$()}));var ne=function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}return __awaiter(s,__spreadArray([],e,true),void 0,(function(e){var a,t,r,n,i,l;var s=e===void 0?{}:e,u=s.ignoreCountryOverride,d=u===void 0?false:u;return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);a=d?null:oe();t=new URLSearchParams;if(a){t.set("zCountry",a)}return[4/*yield*/,o("/api/zonos-elements/localization?".concat(t.toString()))];case 1:r=e.sent(),n=r.errors,i=r.json;if(n.length||!i){return[2/*return*/,{country:null,locale:null}]}return[2/*return*/,{country:i.country,locale:i.locale}];case 2:l=e.sent();return[2/*return*/,{country:null,locale:null}];case 3:return[2/*return*/]}}))}))};var ie=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,i,l,s;return __generator(this,(function(u){switch(u.label){case 0:if((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.shippingZones){return[2/*return*/,window.Zonos.cartSettings.shippingZones.flatMap((function(e){return e===null||e===void 0?void 0:e.countryCodes})).filter(Boolean)]}return[4/*yield*/,o("/api/zonos-elements/shipping-zones")];case 1:r=u.sent(),i=r.errors,l=r.json;if(i.length||!l){n("Error fetching shipping zones: ".concat((a=i.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}s=(t=l===null||l===void 0?void 0:l.shippingZones)===null||t===void 0?void 0:t.flatMap((function(e){return e===null||e===void 0?void 0:e.countryCodes})).filter(Boolean);return[2/*return*/,s||null]}}))}))};
42
48
  /**
43
49
  * Fetch the checkout/cart ID from the BigCommerce Storefront Cart API.
44
50
  * The `/checkout` page URL does not include the checkout ID, so we
45
51
  * retrieve it from `/api/storefront/cart` which returns the active cart(s).
46
- */var le=e("a",(function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,o;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,3,,4]);return[4/*yield*/,fetch("/api/storefront/cart",{credentials:"same-origin",headers:{Accept:"application/json"}})];case 1:t=l.sent();if(!t.ok){i("Failed to fetch BigCommerce cart: ".concat(String(t.status)),"error");return[2/*return*/,null]}return[4/*yield*/,t.json()];case 2:r=l.sent();return[2/*return*/,(a=(e=r===null||r===void 0?void 0:r[0])===null||e===void 0?void 0:e.id)!==null&&a!==void 0?a:null];case 3:o=l.sent();n("Error fetching BigCommerce cart data",o);return[2/*return*/,null];case 4:return[2/*return*/]}}))}))}));
52
+ */var le=e("a",(function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,o;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,3,,4]);return[4/*yield*/,fetch("/api/storefront/cart",{credentials:"same-origin",headers:{Accept:"application/json"}})];case 1:t=i.sent();if(!t.ok){l("Failed to fetch BigCommerce cart: ".concat(String(t.status)),"error");return[2/*return*/,null]}return[4/*yield*/,t.json()];case 2:r=i.sent();return[2/*return*/,(a=(e=r===null||r===void 0?void 0:r[0])===null||e===void 0?void 0:e.id)!==null&&a!==void 0?a:null];case 3:o=i.sent();n("Error fetching BigCommerce cart data",o);return[2/*return*/,null];case 4:return[2/*return*/]}}))}))}));
47
53
  /**
48
54
  * Fetch checkout data from the BigCommerce Storefront API.
49
55
  * This API is cookie-authenticated (same-origin), so no token is needed.
50
- */var ie=e("b",(function(e){return __awaiter(s,void 0,void 0,(function(){var a,t;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4/*yield*/,fetch("/api/storefront/checkouts/".concat(e,"?include=customer.customerGroup,customer.addresses"),{credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}})];case 1:a=r.sent();if(!a.ok){i("Failed to fetch BigCommerce checkout: ".concat(String(a.status)),"error");return[2/*return*/,null]}return[4/*yield*/,a.json()];case 2:return[2/*return*/,r.sent()];case 3:t=r.sent();n("Error fetching BigCommerce checkout data",t);return[2/*return*/,null];case 4:return[2/*return*/]}}))}))}));
56
+ */var se=e("b",(function(e){return __awaiter(s,void 0,void 0,(function(){var a,t;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4/*yield*/,fetch("/api/storefront/checkouts/".concat(e,"?include=customer.customerGroup,customer.addresses"),{credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}})];case 1:a=r.sent();if(!a.ok){l("Failed to fetch BigCommerce checkout: ".concat(String(a.status)),"error");return[2/*return*/,null]}return[4/*yield*/,a.json()];case 2:return[2/*return*/,r.sent()];case 3:t=r.sent();n("Error fetching BigCommerce checkout data",t);return[2/*return*/,null];case 4:return[2/*return*/]}}))}))}));
51
57
  /**
52
58
  * Delete a consignment (a saved shipping selection, e.g. a domestic shipping
53
59
  * quote the shopper added on the cart page) from the active BigCommerce
54
60
  * checkout via the Storefront API. Cookie-authenticated (same-origin), so no
55
61
  * token is needed. Returns the updated checkout on success, or null on
56
62
  * failure.
57
- */var se=function(e,a){return __awaiter(s,void 0,void 0,(function(){var t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4/*yield*/,fetch("/api/storefront/checkouts/".concat(e,"/consignments/").concat(a),{credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},method:"DELETE"})];case 1:t=o.sent();if(!t.ok){i("Failed to delete BigCommerce consignment: ".concat(String(t.status)),"error");return[2/*return*/,null]}return[4/*yield*/,t.json()];case 2:return[2/*return*/,o.sent()];case 3:r=o.sent();n("Error deleting BigCommerce consignment",r);return[2/*return*/,null];case 4:return[2/*return*/]}}))}))};
63
+ */var ue=function(e,a){return __awaiter(s,void 0,void 0,(function(){var t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4/*yield*/,fetch("/api/storefront/checkouts/".concat(e,"/consignments/").concat(a),{credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},method:"DELETE"})];case 1:t=o.sent();if(!t.ok){l("Failed to delete BigCommerce consignment: ".concat(String(t.status)),"error");return[2/*return*/,null]}return[4/*yield*/,t.json()];case 2:return[2/*return*/,o.sent()];case 3:r=o.sent();n("Error deleting BigCommerce consignment",r);return[2/*return*/,null];case 4:return[2/*return*/]}}))}))};
58
64
  /**
59
65
  * Whether the BigCommerce shopper is already logged in. We key off the
60
66
  * customer's numeric `id` since the storefront API populates it only for
61
67
  * authenticated sessions (guest checkouts have an empty `customer` object).
62
- */var ue=e("i",(function(e){var a;return!!((a=e===null||e===void 0?void 0:e.customer)===null||a===void 0?void 0:a.id)}));var de=e("c",(function(e){var a;return!!e&&!!((a=Oe.shippingZoneCountries)===null||a===void 0?void 0:a[e])&&!t.disabledCountries.includes(e)}));
68
+ */var de=e("i",(function(e){var a;return!!((a=e===null||e===void 0?void 0:e.customer)===null||a===void 0?void 0:a.id)}));var ce=e("c",(function(e){var a;return!!e&&!!((a=Ke.shippingZoneCountries)===null||a===void 0?void 0:a[e])&&!t.disabledCountries.includes(e)}));
63
69
  /**
64
70
  * Visibility rules for Hello, ignoring whether localization has finished
65
71
  * loading. Used during init reconcile before `localizationLoaded` is set.
66
72
  * Pass `countryCode` to evaluate a remembered country instead of the
67
73
  * currently selected one.
68
- */var ce=function(e,a){if(e===void 0){e=true}if(a===void 0){a=Oe.selectedCountryCode}var r,o;var n=t.helloSettings,l=n.countryDisplayRules,s=n.showForCountries;var u=l===null||l===void 0?void 0:l.widgetVisibility;var d=a;var c=de(a);
74
+ */var ve=function(e,a){if(e===void 0){e=true}if(a===void 0){a=Ke.selectedCountryCode}var r,o;var n=t.helloSettings,i=n.countryDisplayRules,s=n.showForCountries;var u=i===null||i===void 0?void 0:i.widgetVisibility;var d=a;var c=ce(a);
69
75
  // Resolve behavior: deprecated showForCountries overrides widgetVisibility.behavior
70
76
  // If showForCountries is an array of country codes, treat as legacy explicit list
71
- var v=Array.isArray(s)?s:s!==null&&s!==void 0?s:u===null||u===void 0?void 0:u.behavior;if(e&&!c){i("Hello: not shippable country - Show for countries: ".concat(v))}
77
+ var v=Array.isArray(s)?s:s!==null&&s!==void 0?s:u===null||u===void 0?void 0:u.behavior;if(e&&!c){l("Hello: not shippable country - Show for countries: ".concat(v))}
72
78
  // Legacy: explicit list of country codes from deprecated showForCountries
73
79
  if(Array.isArray(v)){return!!d&&v.includes(d)}
74
80
  // Determine base visibility from behavior
@@ -89,13 +95,13 @@ if(p&&d&&((o=u===null||u===void 0?void 0:u.excludedCountries)===null||o===void 0
89
95
  * @param showLog - emit a debug log when the shopper is not in a shipping zone.
90
96
  * Defaults to `true`; pass `false` from non-rendering callers to avoid log
91
97
  * noise.
92
- */var ve=e("v",(function(e){if(e===void 0){e=true}if(!Oe.localizationLoaded){return false}return ce(e)}));
98
+ */var pe=e("v",(function(e){if(e===void 0){e=true}if(!Ke.localizationLoaded){return false}return ve(e)}));
93
99
  /**
94
100
  * Guard against overlapping passes. `removeBigcommerceCartShipping` is fired on
95
101
  * every country change; without this flag, rapid country switches could stack
96
102
  * concurrent fetch/DELETE cycles against the same cart before the reload kicks
97
103
  * in.
98
- */var pe=false;
104
+ */var me=false;
99
105
  /**
100
106
  * On the BigCommerce cart page, drop any native domestic shipping quote the
101
107
  * shopper added before they switched to an international country, then reload
@@ -112,120 +118,120 @@ if(p&&d&&((o=u===null||u===void 0?void 0:u.excludedCountries)===null||o===void 0
112
118
  * active checkout actually has a consignment. Because the reload happens only
113
119
  * when a consignment is found and removed, the freshly-loaded page has none —
114
120
  * so this cannot loop.
115
- */var me=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,o,l,s,u;return __generator(this,(function(d){switch(d.label){case 0:if(typeof window==="undefined"||!((e=window.Zonos)===null||e===void 0?void 0:e.isBigCommerce)){return[2/*return*/]}
121
+ */var he=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,o,i,s,u;return __generator(this,(function(d){switch(d.label){case 0:if(typeof window==="undefined"||!((e=window.Zonos)===null||e===void 0?void 0:e.isBigCommerce)){return[2/*return*/]}
116
122
  // Only on the cart page and only when Hello is shown — elsewhere there is no
117
123
  // Grand Total to correct. Gate on Hello visibility (not raw shipping-zone
118
124
  // membership) so include/exclude country overrides are respected.
119
- if(window.location.pathname!=="/cart.php"||!Oe.isShippableCountry||!ve(false)){return[2/*return*/]}if(pe){return[2/*return*/]}pe=true;d.label=1;case 1:d.trys.push([1,5,6,7]);return[4/*yield*/,le()];case 2:t=d.sent();if(!t){return[2/*return*/]}return[4/*yield*/,ie(t)];case 3:r=d.sent();o=((a=r===null||r===void 0?void 0:r.consignments)!==null&&a!==void 0?a:[]).map((function(e){return e.id})).filter((function(e){return!!e}));
125
+ if(window.location.pathname!=="/cart.php"||!Ke.isShippableCountry||!pe(false)){return[2/*return*/]}if(me){return[2/*return*/]}me=true;d.label=1;case 1:d.trys.push([1,5,6,7]);return[4/*yield*/,le()];case 2:t=d.sent();if(!t){return[2/*return*/]}return[4/*yield*/,se(t)];case 3:r=d.sent();o=((a=r===null||r===void 0?void 0:r.consignments)!==null&&a!==void 0?a:[]).map((function(e){return e.id})).filter((function(e){return!!e}));
120
126
  // Nothing to do if there is no domestic shipping quote on the cart.
121
- if(!o.length){return[2/*return*/]}i("Removing ".concat(String(o.length)," BigCommerce cart consignment(s) for international shopper"),"info");return[4/*yield*/,Promise.all(o.map((function(e){return se(t,e)})))];case 4:l=d.sent();s=l.filter(Boolean).length;
127
+ if(!o.length){return[2/*return*/]}l("Removing ".concat(String(o.length)," BigCommerce cart consignment(s) for international shopper"),"info");return[4/*yield*/,Promise.all(o.map((function(e){return ue(t,e)})))];case 4:i=d.sent();s=i.filter(Boolean).length;
122
128
  // Only reload when at least one consignment was actually removed. If every
123
129
  // DELETE failed, reloading would re-run this on init with the same
124
130
  // consignments still present and trap the shopper in a reload loop.
125
- if(!s){i("No BigCommerce cart consignments were removed; skipping reload to avoid a reload loop","warn");return[2/*return*/]}
131
+ if(!s){l("No BigCommerce cart consignments were removed; skipping reload to avoid a reload loop","warn");return[2/*return*/]}
126
132
  // Reload so the server re-renders the cart consistently without the removed
127
133
  // shipping, instead of surgically patching the DOM total.
128
- window.location.reload();return[3/*break*/,7];case 5:u=d.sent();n("Error removing BigCommerce cart shipping consignment",u);return[3/*break*/,7];case 6:pe=false;return[7/*endfinally*/];case 7:return[2/*return*/]}}))}))};var he=e("k",[{code:"en",label:"English",translatedLabel:"English"},{code:"es",label:"Spanish",translatedLabel:"Español"},{code:"pt",label:"Portuguese",translatedLabel:"Português"},{code:"ru",label:"Russian",translatedLabel:"русский"},{code:"da",label:"Danish",translatedLabel:"dansk"},{code:"it",label:"Italian",translatedLabel:"Italiano"},{code:"pl",label:"Polish",translatedLabel:"Polskie"},{code:"ar",label:"Arabic",translatedLabel:"عربى"},{code:"de",label:"German",translatedLabel:"Deutsch"},{code:"ja",label:"Japanese",translatedLabel:"日本語"},{code:"no",label:"Norwegian",translatedLabel:"norsk"},{code:"vi",label:"Vietnamese",translatedLabel:"Tiếng Việt"},{code:"tr",label:"Turkish",translatedLabel:"Türkçe"},{code:"he",label:"Hebrew",translatedLabel:"עִברִית"},{code:"fr",label:"French",translatedLabel:"Français"},{code:"nl",label:"Dutch",translatedLabel:"Nederlands"},{code:"zh",label:"Chinese",translatedLabel:"中文"},{code:"sv",label:"Swedish",translatedLabel:"svenska"},{code:"id",label:"Indonesian",translatedLabel:"bahasa Indonesia"},{code:"ko",label:"Korean",translatedLabel:"한국어"}]);
134
+ window.location.reload();return[3/*break*/,7];case 5:u=d.sent();n("Error removing BigCommerce cart shipping consignment",u);return[3/*break*/,7];case 6:me=false;return[7/*endfinally*/];case 7:return[2/*return*/]}}))}))};var ge=e("k",[{code:"en",label:"English",translatedLabel:"English"},{code:"es",label:"Spanish",translatedLabel:"Español"},{code:"pt",label:"Portuguese",translatedLabel:"Português"},{code:"ru",label:"Russian",translatedLabel:"русский"},{code:"da",label:"Danish",translatedLabel:"dansk"},{code:"it",label:"Italian",translatedLabel:"Italiano"},{code:"pl",label:"Polish",translatedLabel:"Polskie"},{code:"ar",label:"Arabic",translatedLabel:"عربى"},{code:"de",label:"German",translatedLabel:"Deutsch"},{code:"ja",label:"Japanese",translatedLabel:"日本語"},{code:"no",label:"Norwegian",translatedLabel:"norsk"},{code:"vi",label:"Vietnamese",translatedLabel:"Tiếng Việt"},{code:"tr",label:"Turkish",translatedLabel:"Türkçe"},{code:"he",label:"Hebrew",translatedLabel:"עִברִית"},{code:"fr",label:"French",translatedLabel:"Français"},{code:"nl",label:"Dutch",translatedLabel:"Nederlands"},{code:"zh",label:"Chinese",translatedLabel:"中文"},{code:"sv",label:"Swedish",translatedLabel:"svenska"},{code:"id",label:"Indonesian",translatedLabel:"bahasa Indonesia"},{code:"ko",label:"Korean",translatedLabel:"한국어"}]);
129
135
  /**
130
136
  * The languages offered in the language selector, honoring the merchant's
131
137
  * `appearanceSettings.supportedLocales`. Falls back to every supported language when the
132
138
  * merchant has not restricted the list, or when their selection matches nothing we ship
133
139
  * translations for — an empty selector is never the right answer.
134
- */var ge=e("A",(function(){var e=t.appearance.supportedLocales;if(!(e===null||e===void 0?void 0:e.length)){return he}var a=new Set(e);var r=he.filter((function(e){return a.has(e.code)}));return r.length?r:he}));var ye=e("B",(function(e){var a=Oe.inclusivePricingConfigurations.find((function(e){return e.shipToCountry===Oe.selectedCountryCode}));if(!a){return e}var t=a.effectiveRate;
140
+ */var ye=e("A",(function(){var e=t.appearance.supportedLocales;if(!(e===null||e===void 0?void 0:e.length)){return ge}var a=new Set(e);var r=ge.filter((function(e){return a.has(e.code)}));return r.length?r:ge}));var fe=e("B",(function(e){var a=Ke.inclusivePricingConfigurations.find((function(e){return e.shipToCountry===Ke.selectedCountryCode}));if(!a){return e}var t=a.effectiveRate;
135
141
  // Just multiply the amount by the effective rate to get the new amount for inclusive pricing
136
- return e*(1+t)}));var fe=e("u",(function(e){
142
+ return e*(1+t)}));var be=e("u",(function(e){
137
143
  // TODO(potentially): Bring over the code for vanity checks
138
- var a=Oe.exchangeRate;if(!a||!e||isNaN(e)){return e}var t=(a===null||a===void 0?void 0:a.targetFormat.scale)||2;var r=e*a.rate;var o=r.toFixed(t);return Number(o)}));
144
+ var a=Ke.exchangeRate;if(!a||!e||isNaN(e)){return e}var t=(a===null||a===void 0?void 0:a.targetFormat.scale)||2;var r=e*a.rate;var o=r.toFixed(t);return Number(o)}));
139
145
  /**
140
146
  * This function only to format the number in
141
147
  * @returns
142
- */var be=e("x",(function(e){var a=e.amount,t=e.currency,r=e.targetFormat;var o=t||Oe.targetCurrency;var n=(r===null||r===void 0?void 0:r.scale)||2;var l=window.navigator.userAgent.indexOf("MSIE ")!==-1;var i=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(l||!i){
148
+ */var ke=e("x",(function(e){var a=e.amount,t=e.currency,r=e.targetFormat;var o=t||Ke.targetCurrency;var n=(r===null||r===void 0?void 0:r.scale)||2;var i=window.navigator.userAgent.indexOf("MSIE ")!==-1;var l=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(i||!l){
143
149
  // use native number formatting if it's IE.
144
- var s=Number(a).toFixed(n).replace(".","|dec|").replace(",",(r===null||r===void 0?void 0:r.thousandsDelimiter)||"").replace("|dec|",(r===null||r===void 0?void 0:r.decimalDelimiter)||"");return s}var u=new Intl.NumberFormat(window.navigator.language,{currency:o,currencyDisplay:"code",minimumFractionDigits:n,style:"currency"}).format(a);return u.replace(new RegExp("".concat(o,"\\s+")),"")}));var ke=e("j",(function(e){var a=e.amount,r=e.currency;if(isNaN(a)||a!==0&&!a){return""}var o=t.overrideCurrencyFormat;var n=Oe.exchangeRate;var l=r||Oe.targetCurrency;
150
+ var s=Number(a).toFixed(n).replace(".","|dec|").replace(",",(r===null||r===void 0?void 0:r.thousandsDelimiter)||"").replace("|dec|",(r===null||r===void 0?void 0:r.decimalDelimiter)||"");return s}var u=new Intl.NumberFormat(window.navigator.language,{currency:o,currencyDisplay:"code",minimumFractionDigits:n,style:"currency"}).format(a);return u.replace(new RegExp("".concat(o,"\\s+")),"")}));var we=e("j",(function(e){var a=e.amount,r=e.currency;if(isNaN(a)||a!==0&&!a){return""}var o=t.overrideCurrencyFormat;var n=Ke.exchangeRate;var i=r||Ke.targetCurrency;
145
151
  // Use user-defined currency format
146
- if(typeof o==="function"){return o({amount:a,currencyCode:l,numberFormat:function(e){var a=e.amount;return be({amount:a,currency:l,targetFormat:(n===null||n===void 0?void 0:n.targetFormat)||null})}})}var i=(n||{}).targetFormat;var s=i===null||i===void 0?void 0:i.scale;var u=window.navigator.userAgent.indexOf("MSIE ")!==-1;var d=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(u||!d){
152
+ if(typeof o==="function"){return o({amount:a,currencyCode:i,numberFormat:function(e){var a=e.amount;return ke({amount:a,currency:i,targetFormat:(n===null||n===void 0?void 0:n.targetFormat)||null})}})}var l=(n||{}).targetFormat;var s=l===null||l===void 0?void 0:l.scale;var u=window.navigator.userAgent.indexOf("MSIE ")!==-1;var d=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(u||!d){
147
153
  // target format is mainly used to get the minimum fraction digits for IE or no Intl.NumberFormat is available
148
- if(!i||!n){
154
+ if(!l||!n){
149
155
  // Return the amount as a string if no exchange rate is available
150
- return"".concat(a.toFixed(2)," ").concat(l)}
156
+ return"".concat(a.toFixed(2)," ").concat(i)}
151
157
  // use native number formatting if it's IE.
152
- var c=Number(a).toFixed(s||2).replace(".","|dec|").replace(",",i.thousandsDelimiter||"").replace("|dec|",i.decimalDelimiter||"");var v="".concat(c).concat(i.currencyCode!=="USD"?" ".concat(i.currencyCode):"");return v}var p=(o===null||o===void 0?void 0:o.currencyDisplay)||"symbol";var m=new Intl.NumberFormat(t.sourceCurrency==="AUD"?"en-AU":window.navigator.language,{currency:l,currencyDisplay:p,minimumFractionDigits:s,style:"currency"}).format(a);
158
+ var c=Number(a).toFixed(s||2).replace(".","|dec|").replace(",",l.thousandsDelimiter||"").replace("|dec|",l.decimalDelimiter||"");var v="".concat(c).concat(l.currencyCode!=="USD"?" ".concat(l.currencyCode):"");return v}var p=(o===null||o===void 0?void 0:o.currencyDisplay)||"symbol";var m=new Intl.NumberFormat(t.sourceCurrency==="AUD"?"en-AU":window.navigator.language,{currency:i,currencyDisplay:p,minimumFractionDigits:s,style:"currency"}).format(a);
153
159
  // Move currency code to the end of the string if currencyDisplay is 'code'
154
- var h=p==="code"?"".concat(m.replace(new RegExp("".concat(l,"\\s+")),"")," ").concat(l):m;return h}));var we=e("r",(function(e){var a=fe(e);var t=ke({amount:a});return t}));
160
+ var h=p==="code"?"".concat(m.replace(new RegExp("".concat(i,"\\s+")),"")," ").concat(i):m;return h}));var Pe=e("r",(function(e){var a=be(e);var t=we({amount:a});return t}));
155
161
  /**
156
162
  * Check if selector user pass is valid
157
163
  * @example
158
164
  * isValidSelector('div') // true
159
165
  * isValidSelector('div + >>> span') // false
160
- */var Pe=e("n",(function(e){try{
166
+ */var Se=e("n",(function(e){try{
161
167
  // this will error out if the selector is invalid in the DOM
162
- document.createDocumentFragment().querySelector(e)}catch(e){return false}return true}));var Se=function(e){var a=e||".money";if(!Pe(a)){n('Currency element selector "'.concat(a,'" is not valid.'));return null}var t=document.querySelectorAll(a);if(!t.length){i('No currency elements found with selector "'.concat(a,'"'),"warn");return null}
168
+ document.createDocumentFragment().querySelector(e)}catch(e){return false}return true}));var Ce=function(e){var a=e||".money";if(!Se(a)){n('Currency element selector "'.concat(a,'" is not valid.'));return null}var t=document.querySelectorAll(a);if(!t.length){l('No currency elements found with selector "'.concat(a,'"'),"warn");return null}
163
169
  // return array of currency elements instead of a NodeList
164
- return Array.from(t)};var Ce=function(e){var a;var t=e.getAttribute("data-domestic");var r=e.getAttribute("data-zintl");
170
+ return Array.from(t)};var ze=function(e){var a;var t=e.getAttribute("data-domestic");var r=e.getAttribute("data-zintl");
165
171
  // Only keep numbers, decimal, and hyphens
166
172
  var o=(a=e.textContent)===null||a===void 0?void 0:a.replace(/[^\d.-]/g,"");if(!o){return null}
167
173
  // If the element has no data-domestic attribute, or the text content is different from the data-zintl attribute, set the data-domestic attribute
168
174
  if(!t||e.textContent!==r&&r){
169
175
  // Store the original value on the element once, and international on every new conversion
170
- e.setAttribute("data-domestic",o);return parseFloat(o)}return parseFloat(t)};var ze=7e3;var Ae="z--blur";var Te=function(){return __awaiter(s,void 0,void 0,(function(){var e,a;return __generator(this,(function(t){switch(t.label){case 0:e=window.zonosBlurCurrencyOnInitIntervalId;if(!e){
176
+ e.setAttribute("data-domestic",o);return parseFloat(o)}return parseFloat(t)};var Ae=7e3;var Te="z--blur";var xe=function(){return __awaiter(s,void 0,void 0,(function(){var e,a;return __generator(this,(function(t){switch(t.label){case 0:e=window.zonosBlurCurrencyOnInitIntervalId;if(!e){
171
177
  // Do nothing if the interval is not set
172
178
  return[2/*return*/]}
173
179
  // Wait a bit to make sure price is fully rendered in DOM
174
180
  return[4/*yield*/,new Promise((function(e){return setTimeout(e,500)}))];case 1:
175
181
  // Wait a bit to make sure price is fully rendered in DOM
176
- t.sent();clearInterval(e);a=document.querySelectorAll(".".concat(Ae));a.forEach((function(e){e.classList.remove(Ae)}));window.zonosBlurCurrencyOnInitIntervalId=undefined;return[2/*return*/]}}))}))};
182
+ t.sent();clearInterval(e);a=document.querySelectorAll(".".concat(Te));a.forEach((function(e){e.classList.remove(Te)}));window.zonosBlurCurrencyOnInitIntervalId=undefined;return[2/*return*/]}}))}))};
177
183
  /**
178
184
  * This function is used to remove the blur effect from a specific element. (combined with performBlurSpecificElement)
179
185
  * @returns void
180
- */var xe=function(e){return __awaiter(s,[e],void 0,(function(e){var a=e.specificSelector,t=e.timeoutId;return __generator(this,(function(e){switch(e.label){case 0:
186
+ */var De=function(e){return __awaiter(s,[e],void 0,(function(e){var a=e.specificSelector,t=e.timeoutId;return __generator(this,(function(e){switch(e.label){case 0:
181
187
  // Wait a bit to make sure price is fully rendered in DOM
182
188
  return[4/*yield*/,new Promise((function(e){return setTimeout(e,500)}))];case 1:
183
189
  // Wait a bit to make sure price is fully rendered in DOM
184
- e.sent();if(t){clearTimeout(t)}a.classList.remove(Ae);return[2/*return*/]}}))}))};var De=function(e){var a=e.currencySelector,t=e.specificSelector;
190
+ e.sent();if(t){clearTimeout(t)}a.classList.remove(Te);return[2/*return*/]}}))}))};var Ne=function(e){var a=e.currencySelector,t=e.specificSelector;
185
191
  // Do nothing if the currency selector is not provided or blurCurrencyOnInit is false
186
- if(!a&&!t){return}if(t){t.classList.add(Ae)}else{var r=document.querySelectorAll([a].filter(Boolean).join(","));r.forEach((function(e){e.classList.add(Ae)}))}};var Ne=function(e){if(typeof window==="undefined"){return}De({specificSelector:e});
192
+ if(!a&&!t){return}if(t){t.classList.add(Te)}else{var r=document.querySelectorAll([a].filter(Boolean).join(","));r.forEach((function(e){e.classList.add(Te)}))}};var Ie=function(e){if(typeof window==="undefined"){return}Ne({specificSelector:e});
187
193
  // The blur will be removed as soon as we got the exchange rate back. But if the exchange rate is not available for some reason, the blur effect will be automatically removed after 10 seconds
188
- var a=setTimeout((function(){void xe({specificSelector:e,timeoutId:a})}),ze);return a};var Ie=function(){if(typeof window==="undefined"){return}
194
+ var a=setTimeout((function(){void De({specificSelector:e,timeoutId:a})}),Ae);return a};var Ue=function(){if(typeof window==="undefined"){return}
189
195
  // If the interval is already in progress, do nothing
190
- if(window.zonosBlurCurrencyOnInitIntervalId){return}De({currencySelector:window.zonosBlurCurrencyOnInitCurrencySelector});
196
+ if(window.zonosBlurCurrencyOnInitIntervalId){return}Ne({currencySelector:window.zonosBlurCurrencyOnInitCurrencySelector});
191
197
  // Add blur effect to the currency elements
192
- var e=setInterval((function(){De({currencySelector:window.zonosBlurCurrencyOnInitCurrencySelector})}),10);window.zonosBlurCurrencyOnInitIntervalId=e;
198
+ var e=setInterval((function(){Ne({currencySelector:window.zonosBlurCurrencyOnInitCurrencySelector})}),10);window.zonosBlurCurrencyOnInitIntervalId=e;
193
199
  // The blur will be removed as soon as we got the exchange rate back. But if the exchange rate is not available for some reason, the blur effect will be automatically removed after 10 seconds
194
- setTimeout((function(){void Te()}),ze)};var Ue=function(e){var a;var r=Ce(e);if(r===null||isNaN(r)){return}var o=e.getAttribute("data-zintl");
200
+ setTimeout((function(){void xe()}),Ae)};var Le=function(e){var a;var r=ze(e);if(r===null||isNaN(r)){return}var o=e.getAttribute("data-zintl");
195
201
  // get rate
196
- var n=parseFloat(e.getAttribute("data-zrate")||"1");var l=e.getAttribute("data-zcountry-code");
202
+ var n=parseFloat(e.getAttribute("data-zrate")||"1");var i=e.getAttribute("data-zcountry-code");
197
203
  // do nothing if the target currency is the same
198
- var i=Oe.exchangeRate&&Oe.targetCurrency===Oe.exchangeRate.targetFormat.currencyCode;var s=((a=Oe.exchangeRate)===null||a===void 0?void 0:a.rate)||1;
204
+ var l=Ke.exchangeRate&&Ke.targetCurrency===Ke.exchangeRate.targetFormat.currencyCode;var s=((a=Ke.exchangeRate)===null||a===void 0?void 0:a.rate)||1;
199
205
  // if the current value on the element is different from the current intl value, update the data-zintl attribute
200
- if(i&&(
206
+ if(l&&(
201
207
  // Update currency if the value is not yet formatted
202
208
  e.textContent!==o||
203
209
  // Update rate when new rate is available
204
210
  s!==n||
205
211
  // Update currency when the country code changes
206
- l!==Oe.selectedCountryCode)){var u=void 0;
212
+ i!==Ke.selectedCountryCode)){var u=void 0;
207
213
  // Only trigger blur effect if the source currency is different from the target currency
208
- if(t.sourceCurrency!==Oe.targetCurrency){
214
+ if(t.sourceCurrency!==Ke.targetCurrency){
209
215
  // Hide the currency until DOM is ready to display the new value
210
- u=Ne(e)}var d=ye(r);var c=typeof t.currencyConverter==="function"&&t.currencyConverter({convert:fe,convertAndFormat:we,currencyCode:Oe.targetCurrency,format:function(e){return ke({amount:e})},originalAmount:d,selector:e});
216
+ u=Ie(e)}var d=fe(r);var c=typeof t.currencyConverter==="function"&&t.currencyConverter({convert:be,convertAndFormat:Pe,currencyCode:Ke.targetCurrency,format:function(e){return we({amount:e})},originalAmount:d,selector:e});
211
217
  // default to the currencyConvertAndFormat if the currencyConverter function does not return a value, or invalid value. This is to make sure we don't break the merchant's price.
212
- var v=c||we(d);if(v!==e.textContent){
218
+ var v=c||Pe(d);if(v!==e.textContent){
213
219
  // Only set textContent if the value has changed, this is to prevent it redrawing the element if the value is the same
214
220
  e.textContent=v}
215
221
  // save the new rate to the data-zrate attribute
216
222
  e.setAttribute("data-zrate",s.toString());
217
223
  // save the new value to the data-zintl attribute
218
- e.setAttribute("data-zintl",v);e.setAttribute("data-zcountry-code",Oe.selectedCountryCode||"");void xe({specificSelector:e,timeoutId:u})}};var Le=function(){var e=t.helloSettings.currencyElementSelector;var a=Se(e);
224
+ e.setAttribute("data-zintl",v);e.setAttribute("data-zcountry-code",Ke.selectedCountryCode||"");void De({specificSelector:e,timeoutId:u})}};var Ee=function(){var e=t.helloSettings.currencyElementSelector;var a=Ce(e);
219
225
  // do nothing if none of the currency elements are found
220
- if(!(a===null||a===void 0?void 0:a.length)){return}if(!Oe.exchangeRate){n("Could not display currency. Exchange rate and format data is not available.");return}a.forEach((function(e){
226
+ if(!(a===null||a===void 0?void 0:a.length)){return}if(!Ke.exchangeRate){n("Could not display currency. Exchange rate and format data is not available.");return}a.forEach((function(e){
221
227
  // convert the currency and save the formatted value to the data-zintl attribute
222
- Ue(e)}))};var Ee=e("q",(function(){if(t.helloSettings.currencyBehavior==="DISABLED"||window.Zonos.isLegacyCheckout){void Te();return}
228
+ Le(e)}))};var je=e("q",(function(){if(t.helloSettings.currencyBehavior==="DISABLED"||window.Zonos.isLegacyCheckout){void xe();return}
223
229
  // BigCommerce renders prices server-side using its native currency selector
224
230
  // (exposed via `document.body.dataset.currencyCode`). When that currency
225
231
  // differs from `zonosStore.sourceCurrency`, the DOM amounts are not in the
226
232
  // currency Hello would convert *from* — running conversion would double-
227
233
  // convert and produce wrong prices.
228
- if(window.Zonos.isBigCommerce){var e=document.body.dataset.currencyCode;if(e&&e!==t.sourceCurrency){i('Skipping Hello currency conversion: BigCommerce native currency "'.concat(e,'" does not match sourceCurrency "').concat(t.sourceCurrency,'".'),"info");void Te();return}}Le()}));var je=function(e){var a;var t=(a=Oe.shippingZoneCountries)===null||a===void 0?void 0:a[e];if(t){return t.currencyCode}return null};
234
+ if(window.Zonos.isBigCommerce){var e=document.body.dataset.currencyCode;if(e&&e!==t.sourceCurrency){l('Skipping Hello currency conversion: BigCommerce native currency "'.concat(e,'" does not match sourceCurrency "').concat(t.sourceCurrency,'".'),"info");void xe();return}}Ee()}));var Ge=function(e){var a;var t=(a=Ke.shippingZoneCountries)===null||a===void 0?void 0:a[e];if(t){return t.currencyCode}return null};
229
235
  /**
230
236
  * Drop a remembered Hello country when widgetVisibility would hide the
231
237
  * widget for it, then fall back to geo.
@@ -238,7 +244,7 @@ if(window.Zonos.isBigCommerce){var e=document.body.dataset.currencyCode;if(e&&e!
238
244
  * default is `null`, not the current URL. Storage is cleared when geo
239
245
  * succeeds, or when a load-time URL country won and the stored country
240
246
  * would be hidden.
241
- */var Ge=function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}return __awaiter(s,__spreadArray([],e,true),void 0,(function(e){var a,t,r;var o=e===void 0?{}:e,n=o.geoCountry,l=o.urlCountryAtLoad,i=l===void 0?null:l;return __generator(this,(function(e){switch(e.label){case 0:a=Q();if(!a){return[2/*return*/,null]}if(ce(false,a)){return[2/*return*/,null]}if(i){ae();return[2/*return*/,null]}if(!(n!==undefined))return[3/*break*/,1];r=n;return[3/*break*/,3];case 1:return[4/*yield*/,oe({ignoreCountryOverride:true})];case 2:r=e.sent().country;e.label=3;case 3:t=r;if(!t){return[2/*return*/,null]}ae();return[2/*return*/,t]}}))}))};var Fe=e("p",(function(e){if(!e){return}var a=new URLSearchParams(window.location.search);
247
+ */var Fe=function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}return __awaiter(s,__spreadArray([],e,true),void 0,(function(e){var a,t,r;var o=e===void 0?{}:e,n=o.geoCountry,i=o.urlCountryAtLoad,l=i===void 0?null:i;return __generator(this,(function(e){switch(e.label){case 0:a=$();if(!a){return[2/*return*/,null]}if(ve(false,a)){return[2/*return*/,null]}if(l){te();return[2/*return*/,null]}if(!(n!==undefined))return[3/*break*/,1];r=n;return[3/*break*/,3];case 1:return[4/*yield*/,ne({ignoreCountryOverride:true})];case 2:r=e.sent().country;e.label=3;case 3:t=r;if(!t){return[2/*return*/,null]}te();return[2/*return*/,t]}}))}))};var Re=e("p",(function(e){if(!e){return}var a=new URLSearchParams(window.location.search);
242
248
  // Only append zCountry if it's already in the URL or the countryOverrideBehavior is URL_PARAM
243
249
  var r=a.has("zCountry")||t.helloSettings.countryOverrideBehavior==="URL_PARAM";if(r){
244
250
  // Only append zCountry if it's not already in the URL
@@ -246,7 +252,7 @@ a.set("zCountry",e);var o="".concat(window.location.pathname,"?").concat(a.toStr
246
252
  /**
247
253
  * Setting the state to null in window.history.replaceState can cause issues with rendering when using next/link and pressing the back button.
248
254
  * @ref https://github.com/vercel/next.js/issues/33233#issuecomment-1052349396
249
- **/window.history.replaceState(window.history.state,document.title,o)}}));var Re="z--bc-currency-hide";
255
+ **/window.history.replaceState(window.history.state,document.title,o)}}));var Ve="z--bc-currency-hide";
250
256
  /**
251
257
  * Hides BigCommerce's native currency selector while Hello is actively
252
258
  * converting prices, and restores it otherwise. The selector is hidden
@@ -262,77 +268,81 @@ a.set("zCountry",e);var o="".concat(window.location.pathname,"?").concat(a.toStr
262
268
  * If those conditions don't hold (non-BC platform, non-shippable country,
263
269
  * BC currency differs from source, or the selector is not configured), the
264
270
  * function removes the class so any previously hidden element re-appears.
265
- */var Ve=function(){var e,a;if(typeof window==="undefined"||!((e=window.Zonos)===null||e===void 0?void 0:e.isBigCommerce)){return}var r=(a=t.genericSettings)===null||a===void 0?void 0:a.bigcommerceNativeCurrencySelector;if(!r){return}var o=document.body.dataset.currencyCode;var l=(ve(false)||Oe.isShippableCountry)&&!!o&&o===t.sourceCurrency;try{var i=document.querySelectorAll(r);i.forEach((function(e){if(l){e.classList.add(Re)}else{e.classList.remove(Re)}}))}catch(e){n("Error toggling BigCommerce native currency selector: ".concat(e))}};var Xe=a({allCountries:null,countryLandedCost:null,customMessages:[],exchangeRate:null,helloCountryList:null,inclusivePricingConfigurations:[],inclusivePricingIsFetching:false,isDisabledCountry:true,isShippableCountry:false,localizationLoaded:false,selectedCountryCode:null,selectedLocale:"en",shippingZoneCountries:null,targetCurrency:"USD"}),Be=Xe.onChange,Oe=Xe.state;e({h:Be,l:Oe});var Ke=function(e){return __awaiter(s,void 0,void 0,(function(){var a,r,o;return __generator(this,(function(n){switch(n.label){case 0:return[4/*yield*/,W({country:Oe.selectedCountryCode,isGuaranteed:e,sourceCurrency:t.sourceCurrency,targetCurrency:Oe.targetCurrency})];case 1:a=n.sent(),r=a.exchangeRate,o=a.maxAge;if(r){Oe.exchangeRate=r;Ee()}return[2/*return*/,{maxAge:o}]}}))}))};
271
+ */var Xe=function(){var e,a;if(typeof window==="undefined"||!((e=window.Zonos)===null||e===void 0?void 0:e.isBigCommerce)){return}var r=(a=t.genericSettings)===null||a===void 0?void 0:a.bigcommerceNativeCurrencySelector;if(!r){return}var o=document.body.dataset.currencyCode;var i=(pe(false)||Ke.isShippableCountry)&&!!o&&o===t.sourceCurrency;try{var l=document.querySelectorAll(r);l.forEach((function(e){if(i){e.classList.add(Ve)}else{e.classList.remove(Ve)}}))}catch(e){n("Error toggling BigCommerce native currency selector: ".concat(e))}};var Be=a({allCountries:null,countryLandedCost:null,customMessages:[],exchangeRate:null,helloCountryList:null,inclusivePricingConfigurations:[],inclusivePricingIsFetching:false,isDisabledCountry:true,isShippableCountry:false,localizationLoaded:false,selectedCountryCode:null,selectedLocale:"en",shippingZoneCountries:null,targetCurrency:"USD"}),Oe=Be.onChange,Ke=Be.state;e({h:Oe,l:Ke});var We=function(e){return __awaiter(s,void 0,void 0,(function(){var a,r,o;return __generator(this,(function(n){switch(n.label){case 0:return[4/*yield*/,W({country:Ke.selectedCountryCode,isGuaranteed:e,sourceCurrency:t.sourceCurrency,targetCurrency:Ke.targetCurrency})];case 1:a=n.sent(),r=a.exchangeRate,o=a.maxAge;if(r){Ke.exchangeRate=r;je()}return[2/*return*/,{maxAge:o}]}}))}))};
266
272
  /**
267
273
  * CHORE: This is mostly for legacy checkout as the country param is not guaranteed.
268
- */var We="CA";var qe=e("C",(function(e){if(Oe.selectedCountryCode&&e.includes(Oe.selectedCountryCode)){return Oe.selectedCountryCode}
274
+ */var qe="CA";var Ye=e("C",(function(e){if(Ke.selectedCountryCode&&e.includes(Ke.selectedCountryCode)){return Ke.selectedCountryCode}
269
275
  // Don't check if it is allowed. If it is not allowed it will fallback to Albania (first option).
270
- return We}));var Ye=function(e){return __awaiter(s,void 0,void 0,(function(){var a;return __generator(this,(function(t){switch(t.label){case 0:if(!e){return[2/*return*/]}
276
+ return qe}));var Me=function(e){return __awaiter(s,void 0,void 0,(function(){var a;return __generator(this,(function(t){switch(t.label){case 0:if(!e){return[2/*return*/]}
271
277
  // These requests are only needed for Hello, so we can skip them for legacy checkout
272
- Oe.inclusivePricingIsFetching=true;return[4/*yield*/,q(e)];case 1:a=t.sent();Oe.inclusivePricingConfigurations=a||[];Oe.inclusivePricingIsFetching=false;return[2/*return*/]}}))}))};
278
+ Ke.inclusivePricingIsFetching=true;return[4/*yield*/,q(e)];case 1:a=t.sent();Ke.inclusivePricingConfigurations=a||[];Ke.inclusivePricingIsFetching=false;return[2/*return*/]}}))}))};
273
279
  // This recursive function is for users who step away from their computer and come back needing a new exchange rate
274
- var Me=function(e){var a=e.isGuaranteed,t=e.maxAge;if(Oe.exchangeRateTimeout){clearTimeout(Oe.exchangeRateTimeout)}
280
+ var Ze=function(e){var a=e.isGuaranteed,t=e.maxAge;if(Ke.exchangeRateTimeout){clearTimeout(Ke.exchangeRateTimeout)}
275
281
  // maxAge comes in seconds, convert to milliseconds
276
282
  var r=5*60;var o=t||r;
277
283
  // Recursively set timeouts to get new exchange rates when the current one expires
278
- Oe.exchangeRateTimeout=setTimeout((function(){return __awaiter(s,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:
284
+ Ke.exchangeRateTimeout=setTimeout((function(){return __awaiter(s,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:
279
285
  // Refresh inclusive pricing configurations before getting a new exchange rate, so hello can use the new effective rate
280
- return[4/*yield*/,Ye(Oe.selectedCountryCode)];case 1:
286
+ return[4/*yield*/,Me(Ke.selectedCountryCode)];case 1:
281
287
  // Refresh inclusive pricing configurations before getting a new exchange rate, so hello can use the new effective rate
282
- t.sent();return[4/*yield*/,Ke(a)];case 2:e=t.sent().maxAge;Me({isGuaranteed:a,maxAge:e});return[2/*return*/]}}))}))}),o*1e3)};var Ze=function(e){return __awaiter(s,[e],void 0,(function(e){var a,r,o,n,l,s,u,d;var c=e.isInitializing;return __generator(this,(function(e){switch(e.label){case 0:i("get new localization store");o=Oe.isDisabledCountry,n=Oe.isShippableCountry,l=Oe.selectedCountryCode;if(t.helloSettings.currencyBehavior==="DISABLED"||!n||o||!l){return[2/*return*/]}s=t.checkoutSettings.visibilityStatus==="ENABLED";
288
+ t.sent();return[4/*yield*/,We(a)];case 2:e=t.sent().maxAge;Ze({isGuaranteed:a,maxAge:e});return[2/*return*/]}}))}))}),o*1e3)};var He=function(e){return __awaiter(s,[e],void 0,(function(e){var a,r,o,n,i,s,u,d;var c=e.isInitializing;return __generator(this,(function(e){switch(e.label){case 0:l("get new localization store");o=Ke.isDisabledCountry,n=Ke.isShippableCountry,i=Ke.selectedCountryCode;if(t.helloSettings.currencyBehavior==="DISABLED"||!n||o||!i){return[2/*return*/]}s=t.checkoutSettings.visibilityStatus==="ENABLED";
283
289
  // blur currency out before getting exchange rate
284
- Ie();return[4/*yield*/,Ke(s)];case 1:u=e.sent().maxAge;Me({isGuaranteed:s,maxAge:u});if(c&&((a=window.Zonos.cartSettings)===null||a===void 0?void 0:a.inclusivePriceConfigurations)){Oe.inclusivePricingConfigurations=((r=window.Zonos.cartSettings)===null||r===void 0?void 0:r.inclusivePriceConfigurations)||[];void Te()}if(!!window.Zonos.isLegacyCheckout)return[3/*break*/,3];Oe.inclusivePricingIsFetching=true;return[4/*yield*/,Promise.all([O(Oe.selectedCountryCode),Ye(Oe.selectedCountryCode)])];case 2:d=e.sent()[0];Oe.countryLandedCost=d;
290
+ Ue();return[4/*yield*/,We(s)];case 1:u=e.sent().maxAge;Ze({isGuaranteed:s,maxAge:u});if(c&&((a=window.Zonos.cartSettings)===null||a===void 0?void 0:a.inclusivePriceConfigurations)){Ke.inclusivePricingConfigurations=((r=window.Zonos.cartSettings)===null||r===void 0?void 0:r.inclusivePriceConfigurations)||[];void xe()}if(!!window.Zonos.isLegacyCheckout)return[3/*break*/,3];Ke.inclusivePricingIsFetching=true;return[4/*yield*/,Promise.all([O(Ke.selectedCountryCode),Me(Ke.selectedCountryCode)])];case 2:d=e.sent()[0];Ke.countryLandedCost=d;
285
291
  // Remove blur effect after the currency is converted
286
- void Te();return[3/*break*/,4];case 3:i("Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout");e.label=4;case 4:return[2/*return*/]}}))}))};var He=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,r;return __generator(this,(function(o){switch(o.label){case 0:e=Oe.selectedCountryCode;i("Getting custom messages for ".concat(e));if(!e||!t.storeId){return[2/*return*/]}return[4/*yield*/,Y({countryCode:e,localeTo:Oe.selectedLocale,storeId:t.storeId})];case 1:a=o.sent();if(Oe.selectedCountryCode!==e){return[2/*return*/]}r=a.flatMap((function(a){var t;return{countryCode:e,message:(t=a.countryCodesPageMessageLinks.find(Boolean))===null||t===void 0?void 0:t.message.textTo,pageName:a.pageName}}));Oe.customMessages=r;return[2/*return*/]}}))}))};var Je=function(){var e=new URL(window.location.href);var a=e.searchParams.get("zonosLocale");return a};var _e=function(){if(Oe.isShippableCountry){document.body.classList.add("z-intl")}else{document.body.classList.remove("z-intl")}};var Qe=function(e){if(e==="UK"){return"GB"}return e};
292
+ void xe();return[3/*break*/,4];case 3:l("Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout");e.label=4;case 4:return[2/*return*/]}}))}))};var Je=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,r;return __generator(this,(function(o){switch(o.label){case 0:e=Ke.selectedCountryCode;l("Getting custom messages for ".concat(e));if(!e||!t.storeId){return[2/*return*/]}return[4/*yield*/,Y({countryCode:e,localeTo:Ke.selectedLocale,storeId:t.storeId})];case 1:a=o.sent();if(Ke.selectedCountryCode!==e){return[2/*return*/]}r=a.flatMap((function(a){var t;return{countryCode:e,message:(t=a.countryCodesPageMessageLinks.find(Boolean))===null||t===void 0?void 0:t.message.textTo,pageName:a.pageName}}));Ke.customMessages=r;return[2/*return*/]}}))}))};var _e=function(){var e=new URL(window.location.href);var a=e.searchParams.get("zonosLocale");return a};var Qe=function(){if(Ke.isShippableCountry){document.body.classList.add("z-intl")}else{document.body.classList.remove("z-intl")}};var $e=function(e){if(e==="UK"){return"GB"}return e};
287
293
  /**
288
294
  * Clamps a locale to what the merchant offers. The requested locale comes from geolocation, the
289
295
  * browser, or the `zonosLocale` param — none of which know about
290
296
  * `appearanceSettings.supportedLocales` — so without this a shopper could land on a language the
291
297
  * merchant has removed, with no way to switch back to it once the selector hides it.
292
- */var $e=function(e){var a=ge();if(a.some((function(a){return a.code===e}))){return e}
298
+ */var ea=function(e){var a=ye();if(a.some((function(a){return a.code===e}))){return e}
293
299
  // prefer English when it is on offer, otherwise take the first language the merchant kept
294
- var t=a.find((function(e){return e.code==="en"}))||a[0];i("Locale ".concat(e," is not offered, falling back to ").concat(t===null||t===void 0?void 0:t.code));return(t===null||t===void 0?void 0:t.code)||"en"};var ea=function(e){var a;Fe(e);(a=document.querySelector("zonos-hello"))===null||a===void 0?void 0:a.setAttribute("z-country",e)};var aa=e("d",(function(e){var a=e.isInitializing,r=e.newSelectedCountryCode,o=e.persistOverride;var n;i("Updating selected country code to ".concat(r));var l=!Oe.selectedCountryCode;Oe.selectedCountryCode=Qe(r);var s=Oe.selectedCountryCode;var u=de(s);
300
+ var t=a.find((function(e){return e.code==="en"}))||a[0];l("Locale ".concat(e," is not offered, falling back to ").concat(t===null||t===void 0?void 0:t.code));return(t===null||t===void 0?void 0:t.code)||"en"};var aa=function(e){var a;Re(e);(a=document.querySelector("zonos-hello"))===null||a===void 0?void 0:a.setAttribute("z-country",e)};var ta=e("d",(function(e){var a=e.isInitializing,r=e.newSelectedCountryCode,o=e.persistOverride;var n;l("Updating selected country code to ".concat(r));var i=!Ke.selectedCountryCode;Ke.selectedCountryCode=$e(r);var s=Ke.selectedCountryCode;var u=ce(s);
295
301
  // update shippable country
296
- Oe.isShippableCountry=u;i("".concat(Oe.selectedCountryCode," is a shippable country: ").concat(Oe.isShippableCountry));var d=!!s&&t.disabledCountries.includes(s);Oe.isDisabledCountry=d;i("".concat(Oe.selectedCountryCode," is a disabled country: ").concat(Oe.isDisabledCountry));_e();
302
+ Ke.isShippableCountry=u;l("".concat(Ke.selectedCountryCode," is a shippable country: ").concat(Ke.isShippableCountry));var d=!!s&&t.disabledCountries.includes(s);Ke.isDisabledCountry=d;l("".concat(Ke.selectedCountryCode," is a disabled country: ").concat(Ke.isDisabledCountry));Qe();
297
303
  // Hide / restore BC's native currency selector based on the new
298
304
  // shipping-zone state. Runs here (rather than inside `currencyDisplay`)
299
305
  // because `currencyDisplay` is also invoked from the price-mutation
300
306
  // observer in `zonos-hello.tsx`, which fires on every DOM render.
301
- Ve();
307
+ Xe();
302
308
  // On the BigCommerce cart page, drop any native domestic shipping quote the
303
309
  // shopper added before switching to an international country so the Grand
304
310
  // Total reflects only subtotal + coupon. No-ops off-cart, off-BigCommerce,
305
311
  // for non-shippable countries, or when the cart has no consignment.
306
- void me();if(!s){return}var c=je(s);var v=o!==null&&o!==void 0?o:!a;
312
+ void he();if(!s){return}var c=Ge(s);var v=o!==null&&o!==void 0?o:!a;
307
313
  // Only trigger onCountryChange after init — the first apply, and any
308
314
  // reconcile fallback during init, are not shopper-selected changes.
309
- if(!l&&!a){(n=t.onCountryChange)===null||n===void 0?void 0:n.call(t,{countryCode:s,currencyCode:c,isShippableCountry:u})}if(!c){
315
+ if(!i&&!a){(n=t.onCountryChange)===null||n===void 0?void 0:n.call(t,{countryCode:s,currencyCode:c,isShippableCountry:u})}if(!c){
310
316
  // Non-shippable country: revert any previously-converted international
311
317
  // prices back to the merchant's domestic (source) currency before bailing.
312
- if(Oe.exchangeRateTimeout){clearTimeout(Oe.exchangeRateTimeout);Oe.exchangeRateTimeout=undefined}var p=t.sourceCurrency;Oe.targetCurrency=p;Oe.exchangeRate={rate:1,targetFormat:{currencyCode:p,decimalDelimiter:".",scale:2,symbol:"",symbolLocation:"before",thousandsDelimiter:","}};Oe.countryLandedCost=null;Oe.inclusivePricingConfigurations=[];Ee()}else{Oe.targetCurrency=c;
318
+ if(Ke.exchangeRateTimeout){clearTimeout(Ke.exchangeRateTimeout);Ke.exchangeRateTimeout=undefined}var p=t.sourceCurrency;Ke.targetCurrency=p;Ke.exchangeRate={rate:1,targetFormat:{currencyCode:p,decimalDelimiter:".",scale:2,symbol:"",symbolLocation:"before",thousandsDelimiter:","}};Ke.countryLandedCost=null;Ke.inclusivePricingConfigurations=[];je()}else{Ke.targetCurrency=c;
313
319
  // Init may apply a remembered country that reconcile then discards. Fetch
314
320
  // exchange rates once after reconcile for the final country instead.
315
- if(!a){void Ze({isInitializing:false})}}if(!a){void He()}if(v){ee(s)}if(!a){ea(s)}}));var ta=function(e){var a,r,o,n,l,s;var u=t.helloSettings,d=u.countryDisplayRules,c=u.showCountryList;var v=Oe.shippingZoneCountries;var p=d===null||d===void 0?void 0:d.countrySelector;
321
+ if(!a){void He({isInitializing:false})}}if(!a){void Je()}if(v){ae(s)}if(!a){aa(s)}}));var ra=function(e){var a,r,o,n,i,s;var u=t.helloSettings,d=u.countryDisplayRules,c=u.showCountryList;var v=Ke.shippingZoneCountries;var p=d===null||d===void 0?void 0:d.countrySelector;
316
322
  // Resolve behavior: deprecated showCountryList overrides countrySelector.behavior
317
323
  // If showCountryList is an array of country codes, treat as legacy explicit list
318
- var m=Array.isArray(c)?c:c!==null&&c!==void 0?c:p===null||p===void 0?void 0:p.behavior;i("Country selector behavior","info",{behavior:p===null||p===void 0?void 0:p.behavior,excludedCount:(r=(a=p===null||p===void 0?void 0:p.excludedCountries)===null||a===void 0?void 0:a.length)!==null&&r!==void 0?r:0,includedCount:(n=(o=p===null||p===void 0?void 0:p.includedCountries)===null||o===void 0?void 0:o.length)!==null&&n!==void 0?n:0,showCountryList:c});
324
+ var m=Array.isArray(c)?c:c!==null&&c!==void 0?c:p===null||p===void 0?void 0:p.behavior;l("Country selector behavior","info",{behavior:p===null||p===void 0?void 0:p.behavior,excludedCount:(r=(a=p===null||p===void 0?void 0:p.excludedCountries)===null||a===void 0?void 0:a.length)!==null&&r!==void 0?r:0,includedCount:(n=(o=p===null||p===void 0?void 0:p.includedCountries)===null||o===void 0?void 0:o.length)!==null&&n!==void 0?n:0,showCountryList:c});
319
325
  // Legacy: explicit list of country codes from deprecated showCountryList
320
- if(Array.isArray(m)){Oe.helloCountryList=m.reduce((function(a,t){var r;var o=e===null||e===void 0?void 0:e[t];return o?Object.assign(Object.assign({},a),(r={},r[t]=o,r)):a}),{});return}
326
+ if(Array.isArray(m)){Ke.helloCountryList=m.reduce((function(a,t){var r;var o=e===null||e===void 0?void 0:e[t];return o?Object.assign(Object.assign({},a),(r={},r[t]=o,r)):a}),{});return}
321
327
  // Determine base country list from behavior
322
328
  var h;if(m==="ALL"){h=Object.assign({},e)}else{
323
329
  // Default: ONLY_SHIPPABLE
324
330
  h=v?Object.assign({},v):{}}
325
331
  // Apply includedCountries — add countries not already in the list
326
- if((l=p===null||p===void 0?void 0:p.includedCountries)===null||l===void 0?void 0:l.length){for(var g=0,y=p.includedCountries;g<y.length;g++){var f=y[g];if(!h[f]&&e[f]){h[f]=e[f]}}}
332
+ if((i=p===null||p===void 0?void 0:p.includedCountries)===null||i===void 0?void 0:i.length){for(var g=0,y=p.includedCountries;g<y.length;g++){var f=y[g];if(!h[f]&&e[f]){h[f]=e[f]}}}
327
333
  // Apply excludedCountries — remove countries from the list
328
- if((s=p===null||p===void 0?void 0:p.excludedCountries)===null||s===void 0?void 0:s.length){for(var b=0,k=p.excludedCountries;b<k.length;b++){var f=k[b];delete h[f]}}Oe.helloCountryList=h};var ra=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t;return __generator(this,(function(r){switch(r.label){case 0:if(!m.checkoutSessionId){return[2/*return*/,null]}return[4/*yield*/,o("/api/zonos-elements/update-checkout-session-metadata",{body:{id:m.checkoutSessionId,metadata:[
334
+ if((s=p===null||p===void 0?void 0:p.excludedCountries)===null||s===void 0?void 0:s.length){for(var b=0,k=p.excludedCountries;b<k.length;b++){var f=k[b];delete h[f]}}Ke.helloCountryList=h};var oa=function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t;return __generator(this,(function(r){switch(r.label){case 0:if(!m.checkoutSessionId){return[2/*return*/,null]}return[4/*yield*/,o("/api/zonos-elements/update-checkout-session-metadata",{body:{id:m.checkoutSessionId,metadata:[
329
335
  // This is being used from the backend to determine the language of the checkout session
330
- {key:"language",value:Oe.selectedLocale}]},method:"POST"})];case 1:e=r.sent(),a=e.errors,t=e.json;if(a.length||!t){n("Error occurs when updating checkout session",JSON.stringify(a,null,2));return[2/*return*/,{errors:a,json:t}]}return[2/*return*/,{errors:[],json:t}]}}))}))};var oa=e("D",(function(e){var a=$e(e);Oe.selectedLocale=a;V(a);void ra();if(Oe.localizationLoaded){void He()}}));var na=e("o",(function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,o,n,l,s,u,d,c,v,p,m,h,g;return __generator(this,(function(y){switch(y.label){case 0:$();a=te();t=Q();r=!!t&&!a;return[4/*yield*/,Promise.all([B(),ne(),oe(),r?oe({ignoreCountryOverride:true}):Promise.resolve(undefined)])];case 1:o=y.sent(),n=o[0],l=o[1],s=o[2],u=o[3];d=l===null||l===void 0?void 0:l.reduce((function(e,a){var t;var r=n===null||n===void 0?void 0:n[a];return r?Object.assign(Object.assign({},e),(t={},t[a]=r,t)):e}),{});Oe.allCountries=n;Oe.shippingZoneCountries=d||null;Oe.inclusivePricingConfigurations=((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.inclusivePriceConfigurations)||[];
336
+ {key:"language",value:Ke.selectedLocale}]},method:"POST"})];case 1:e=r.sent(),a=e.errors,t=e.json;if(a.length||!t){n("Error occurs when updating checkout session",JSON.stringify(a,null,2));return[2/*return*/,{errors:a,json:t}]}return[2/*return*/,{errors:[],json:t}]}}))}))};var na=e("D",(function(e){var a=ea(e);Ke.selectedLocale=a;V(a);void oa();if(Ke.localizationLoaded){void Je()}}));var ia=e("o",(function(){return __awaiter(s,void 0,void 0,(function(){var e,a,t,r,o,n,i,s,u,d,c,v,p,m,h,g;return __generator(this,(function(y){switch(y.label){case 0:a=re();t=$();r=!!t&&!a;return[4/*yield*/,Promise.all([B(),ie(),ne(),r?ne({ignoreCountryOverride:true}):Promise.resolve(undefined)])];case 1:o=y.sent(),n=o[0],i=o[1],s=o[2],u=o[3];d=i===null||i===void 0?void 0:i.reduce((function(e,a){var t;var r=n===null||n===void 0?void 0:n[a];return r?Object.assign(Object.assign({},e),(t={},t[a]=r,t)):e}),{});Ke.allCountries=n;Ke.shippingZoneCountries=d||null;Ke.inclusivePricingConfigurations=((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.inclusivePriceConfigurations)||[];
331
337
  // Initialize the country list for the hello widget
332
- ta(n||{});c=s.country,v=s.locale;i("Country code from localization: ".concat(c));i("Locale from localization: ".concat(v));
338
+ ra(n||{});c=s.country,v=s.locale;l("Country code from localization: ".concat(c));l("Locale from localization: ".concat(v));
333
339
  // update selected country code in store
334
- aa({isInitializing:true,newSelectedCountryCode:c||t});p=Je();oa(p||v||"en");m=["dev.storybook.elements","dev.elements","dev.demo.elements","dev.dashboard"];h=new URLSearchParams(window.location.search);
340
+ ta({isInitializing:true,newSelectedCountryCode:c||t});p=_e();na(p||v||"en");m=["dev.storybook.elements","dev.elements","dev.demo.elements","dev.dashboard"];h=new URLSearchParams(window.location.search);
335
341
  // If the country code is not set, set it to the US for development (vercel can't get geo country in dev)
336
- if(!Oe.selectedCountryCode&&(m.some((function(e){return window.location.origin.includes(e)}))||h.get("zonosQaUrl")==="dev-elements")){
342
+ if(!Ke.selectedCountryCode&&(m.some((function(e){return window.location.origin.includes(e)}))||h.get("zonosQaUrl")==="dev-elements")){
337
343
  // update selected country code in store
338
- aa({isInitializing:true,newSelectedCountryCode:"CA"})}return[4/*yield*/,Ge({geoCountry:u===null||u===void 0?void 0:u.country,urlCountryAtLoad:a})];case 2:g=y.sent();if(g){aa({isInitializing:true,newSelectedCountryCode:g})}if(Oe.selectedCountryCode){ea(Oe.selectedCountryCode)}void He();void Ze({isInitializing:true});if(!Oe.localizationLoaded){Oe.localizationLoaded=true;void me();void Ve()}return[2/*return*/]}}))}))}))}}}));
344
+ ta({isInitializing:true,newSelectedCountryCode:"CA"})}return[4/*yield*/,Fe({geoCountry:u===null||u===void 0?void 0:u.country,urlCountryAtLoad:a})];case 2:g=y.sent();if(g){ta({isInitializing:true,newSelectedCountryCode:g})}
345
+ // After reconcile + fallback: only then is selectedCountryCode the
346
+ // country Hello kept. Mirroring earlier (or without this match) can
347
+ // publish a discarded localStorage leftover into sessionStorage.
348
+ ee(Ke.selectedCountryCode);if(Ke.selectedCountryCode){aa(Ke.selectedCountryCode)}void Je();void He({isInitializing:true});if(!Ke.localizationLoaded){Ke.localizationLoaded=true;void he();void Xe()}return[2/*return*/]}}))}))}))}}}));
@@ -0,0 +1,9 @@
1
+ System.register(["./p-BuU_p5DP.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.z}],execute:function(){
2
+ /**
3
+ * Get the border radius for the elements based on the style
4
+ * @param overrideBorderStyle
5
+ * @returns
6
+ */
7
+ var r=t("g",(function(t){var r=(t===null||t===void 0?void 0:t.customRoundRadius)||"10px";var u=t===null||t===void 0?void 0:t.overrideBorderStyle;if(u){
8
+ // If the override is set, use that, otherwise use the default radius style
9
+ return u==="SHARP"?"0px":r}return n.appearance.style==="SHARP"?"0px":r}))}}}));