@zonos/elements 1.3.288 → 1.3.289

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 (219) hide show
  1. package/dist/cjs/{cart-CV4buPlT.js → cart-WLQb2hbe.js} +1 -1
  2. package/dist/cjs/{collect-jzWKzrV7.js → collect-B92uIdsY.js} +2 -2
  3. package/dist/cjs/{getMissingRequiredShippingFields-r5vYIqoX.js → getMissingRequiredShippingFields-5w62gTIB.js} +1 -1
  4. package/dist/cjs/{hasInclusivePrice-BZMQohG9.js → hasInclusivePrice-hmV0Inld.js} +1 -1
  5. package/dist/cjs/index.cjs.js +8 -9
  6. package/dist/cjs/{invoice-CHw-mJdS.js → invoice-Bal1mqYR.js} +2 -2
  7. package/dist/cjs/{localization-CxXsmxs5.js → localization-C5HPlCNK.js} +191 -68
  8. package/dist/cjs/{paypal-BLuHeOJH.js → paypal-o164C26_.js} +2 -2
  9. package/dist/cjs/{placeTestOrder-VK_CMeq0.js → placeTestOrder-C7tAipav.js} +2 -2
  10. package/dist/cjs/{renderCheckoutCurrency-CC4CAy-a.js → renderCheckoutCurrency-Bpx-vrTQ.js} +2 -2
  11. package/dist/cjs/{shouldShowLanguageSelect-Bj_jKWPK.js → shouldShowLanguageSelect-CtwkMt8b.js} +1 -1
  12. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +7 -7
  13. package/dist/cjs/zonos-address-display_2.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
  15. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +3 -3
  16. package/dist/cjs/zonos-card_5.cjs.entry.js +4 -4
  17. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +9 -9
  18. package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
  19. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +8 -8
  21. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  22. package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
  23. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  27. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  28. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +8 -8
  29. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  30. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  31. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
  32. package/dist/cjs/zonos-stripe-input.cjs.entry.js +1 -1
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +1 -1
  34. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
  35. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
  36. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +1 -1
  37. package/dist/collection/components/main/zonos-controller.js +2 -2
  38. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -2
  39. package/dist/collection/components/store/hello/localization.js +69 -34
  40. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
  41. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -3
  42. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  43. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +0 -1
  44. package/dist/collection/components/utils/api/getLocalization.js +2 -2
  45. package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -4
  46. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +1 -0
  47. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +2 -0
  48. package/dist/collection/components/utils/formatDate.js +1 -3
  49. package/dist/collection/components/utils/getOverridenZCountry.js +3 -5
  50. package/dist/collection/components/utils/hello/countryOverrideStorage.js +49 -0
  51. package/dist/collection/components/utils/hello/getZCountryUrlParam.js +5 -9
  52. package/dist/collection/components/utils/hello/isCountryCode.js +1 -0
  53. package/dist/collection/components/utils/hello/isCountryInShippingZone.js +8 -0
  54. package/dist/collection/components/utils/hello/reconcileRememberedCountryOverride.js +37 -0
  55. package/dist/collection/components/utils/hello/shouldShowHelloWidget.js +27 -20
  56. package/dist/collection/environment.js +0 -1
  57. package/dist/collection/scripts/_stripe.js +0 -2
  58. package/dist/collection/scripts/_zonosBase.js +1 -1
  59. package/dist/collection/types/generated/graphql.frontend.types.js +218 -63
  60. package/dist/collection/types/generated/graphql.internal.types.js +643 -147
  61. package/dist/collection/utils/formattedCloudflareApiUrl.js +1 -0
  62. package/dist/collection/utils/generateCloudflareDeployUrl.js +5 -2
  63. package/dist/esm/{cart-ekBk_gxV.js → cart-BDc4RTBJ.js} +1 -1
  64. package/dist/esm/{collect-33rMINDo.js → collect-NRCK3t-M.js} +2 -2
  65. package/dist/esm/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-D-B-N1NH.js} +1 -1
  66. package/dist/esm/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-Bti4iudO.js} +1 -1
  67. package/dist/esm/index.js +8 -9
  68. package/dist/esm/{invoice-BNDWuVsD.js → invoice-DsvQvu4a.js} +2 -2
  69. package/dist/esm/{localization-AOqYXGdP.js → localization-Bs6hVcKV.js} +191 -69
  70. package/dist/esm/{paypal-CW1D2XqZ.js → paypal-BqyEZS_u.js} +2 -2
  71. package/dist/esm/{placeTestOrder-nhmsLLOA.js → placeTestOrder-x3xwMAnW.js} +2 -2
  72. package/dist/esm/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-DIBdWKN1.js} +2 -2
  73. package/dist/esm/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-Bb9sbQ41.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 +1 -1
  76. package/dist/esm/zonos-address_4.entry.js +4 -4
  77. package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
  78. package/dist/esm/zonos-card_5.entry.js +4 -4
  79. package/dist/esm/zonos-cart-items_12.entry.js +9 -9
  80. package/dist/esm/zonos-checkout.entry.js +6 -6
  81. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  82. package/dist/esm/zonos-collect-finish_6.entry.js +8 -8
  83. package/dist/esm/zonos-collect.entry.js +4 -4
  84. package/dist/esm/zonos-controller.entry.js +4 -4
  85. package/dist/esm/zonos-country-flag.entry.js +1 -1
  86. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  87. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  88. package/dist/esm/zonos-hello.entry.js +1 -1
  89. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  90. package/dist/esm/zonos-invoice-finish_5.entry.js +8 -8
  91. package/dist/esm/zonos-invoice.entry.js +4 -4
  92. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  93. package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
  94. package/dist/esm/zonos-stripe-input.entry.js +1 -1
  95. package/dist/esm-es5/{cart-ekBk_gxV.js → cart-BDc4RTBJ.js} +1 -1
  96. package/dist/esm-es5/{collect-33rMINDo.js → collect-NRCK3t-M.js} +1 -1
  97. package/dist/esm-es5/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-D-B-N1NH.js} +1 -1
  98. package/dist/esm-es5/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-Bti4iudO.js} +1 -1
  99. package/dist/esm-es5/index.js +6 -8
  100. package/dist/esm-es5/{invoice-BNDWuVsD.js → invoice-DsvQvu4a.js} +1 -1
  101. package/dist/esm-es5/{localization-AOqYXGdP.js → localization-Bs6hVcKV.js} +74 -68
  102. package/dist/esm-es5/{paypal-CW1D2XqZ.js → paypal-BqyEZS_u.js} +1 -1
  103. package/dist/esm-es5/{placeTestOrder-nhmsLLOA.js → placeTestOrder-x3xwMAnW.js} +1 -1
  104. package/dist/esm-es5/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-DIBdWKN1.js} +1 -1
  105. package/dist/esm-es5/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-Bb9sbQ41.js} +1 -1
  106. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +3 -3
  107. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  108. package/dist/esm-es5/zonos-address_4.entry.js +2 -2
  109. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  110. package/dist/esm-es5/zonos-card_5.entry.js +2 -2
  111. package/dist/esm-es5/zonos-cart-items_12.entry.js +2 -2
  112. package/dist/esm-es5/zonos-checkout.entry.js +4 -4
  113. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  114. package/dist/esm-es5/zonos-collect-finish_6.entry.js +2 -2
  115. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  116. package/dist/esm-es5/zonos-controller.entry.js +3 -3
  117. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  118. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  119. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  120. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  121. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  122. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +2 -2
  123. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  124. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  125. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  126. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  127. package/dist/scripts/index.js +1 -1
  128. package/dist/scripts/loadZonos.js +1 -1
  129. package/dist/scripts/zonos.js +1 -1
  130. package/dist/types/components/store/hello/localization.d.ts +2 -1
  131. package/dist/types/components/utils/api/getLocalization.d.ts +3 -1
  132. package/dist/types/components/utils/getOverridenZCountry.d.ts +2 -3
  133. package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +5 -0
  134. package/dist/types/components/utils/hello/isCountryCode.d.ts +2 -0
  135. package/dist/types/components/utils/hello/isCountryInShippingZone.d.ts +2 -0
  136. package/dist/types/components/utils/hello/reconcileRememberedCountryOverride.d.ts +18 -0
  137. package/dist/types/components/utils/hello/shouldShowHelloWidget.d.ts +8 -4
  138. package/dist/types/types/generated/graphql.frontend.types.d.ts +41 -52
  139. package/dist/types/types/generated/graphql.frontend.types.ts +226 -114
  140. package/dist/types/types/generated/graphql.internal.types.d.ts +231 -94
  141. package/dist/types/types/generated/graphql.internal.types.ts +712 -245
  142. package/dist/types/utils/formattedCloudflareApiUrl.d.ts +1 -0
  143. package/dist/types/utils/generateCloudflareDeployUrl.d.ts +5 -2
  144. package/dist/zonos-elements/index.esm.js +1 -1
  145. package/dist/zonos-elements/p-02628b9f.entry.js +1 -0
  146. package/dist/zonos-elements/{p-04cc0dac.system.entry.js → p-02ff6f8b.system.entry.js} +38 -38
  147. package/dist/zonos-elements/p-037d3688.entry.js +1 -0
  148. package/dist/zonos-elements/{p-02ef0f99.system.entry.js → p-03fbe813.system.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-5a631080.system.entry.js → p-0ff26236.system.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-f2cedbcd.system.entry.js → p-163b81c0.system.entry.js} +6 -6
  151. package/dist/zonos-elements/{p-e9320825.entry.js → p-18021e6b.entry.js} +1 -1
  152. package/dist/zonos-elements/{p-dcdbc610.system.entry.js → p-22fab1ba.system.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-b14819ab.system.entry.js → p-2466b5f0.system.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-daf9fa07.system.entry.js → p-317d4665.system.entry.js} +19 -19
  155. package/dist/zonos-elements/{p-d55b9664.system.entry.js → p-36559431.system.entry.js} +17 -17
  156. package/dist/zonos-elements/{p-f27317d3.system.entry.js → p-3cc27e0e.system.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-891b47d7.entry.js → p-3d536086.entry.js} +1 -1
  158. package/dist/zonos-elements/{p-a38e62cc.entry.js → p-3e59d41c.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-64e7bc5b.entry.js → p-4625058a.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-5024df2d.system.entry.js → p-56159b7c.system.entry.js} +60 -60
  161. package/dist/zonos-elements/p-5e074243.entry.js +1 -0
  162. package/dist/zonos-elements/{p-9818f823.entry.js → p-5eb82be3.entry.js} +1 -1
  163. package/dist/zonos-elements/{p-cf5688f7.entry.js → p-628a0f7f.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-5d3079e8.entry.js → p-635341d6.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-d4c4a00e.entry.js → p-68e0180a.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-6b0afaa7.entry.js → p-6c6c65f0.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-04bfcd72.system.entry.js → p-72b6a006.system.entry.js} +18 -18
  168. package/dist/zonos-elements/{p-4973f8d8.system.entry.js → p-8cac7911.system.entry.js} +8 -8
  169. package/dist/zonos-elements/p-97f848f6.entry.js +1 -0
  170. package/dist/zonos-elements/p-9H2p9XKE.js +1 -0
  171. package/dist/zonos-elements/{p-CJCoACvU.js → p-B6X55m0b.js} +2 -2
  172. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  173. package/dist/zonos-elements/{p-D31lQiWo.system.js → p-BybDGrH4.system.js} +4 -4
  174. package/dist/zonos-elements/{p-DTgv0QpG.js → p-CGkdA4pY.js} +1 -1
  175. package/dist/zonos-elements/{p-D5AtAlJx.system.js → p-CH6tsv9B.system.js} +1 -1
  176. package/dist/zonos-elements/{p-CYdt69j5.system.js → p-CQyFoOXW.system.js} +23 -23
  177. package/dist/zonos-elements/{p-B2EZRfoq.system.js → p-CVQ7-7E2.system.js} +18 -18
  178. package/dist/zonos-elements/{p-DIJaXkiE.system.js → p-Cd9xIgx7.system.js} +111 -105
  179. package/dist/zonos-elements/{p-CQqNJo0D.system.js → p-ClUEwqZW.system.js} +4 -4
  180. package/dist/zonos-elements/{p-DkpYo2Fs.js → p-CpvnCfKt.js} +1 -1
  181. package/dist/zonos-elements/p-CtKp6AQ4.js +1 -0
  182. package/dist/zonos-elements/{p-DGsEWFDU.system.js → p-CuhGrJBA.system.js} +1 -1
  183. package/dist/zonos-elements/{p-D-DawUYF.system.js → p-D2fOB4Wn.system.js} +1 -1
  184. package/dist/zonos-elements/{p-BtMauqj_.system.js → p-D4WI0B6-.system.js} +6 -8
  185. package/dist/zonos-elements/{p-CKTIJ2Gr.js → p-DdpeA8cH.js} +1 -1
  186. package/dist/zonos-elements/p-DkirvyAh.js +1 -0
  187. package/dist/zonos-elements/{p-DHwpNxG9.js → p-DqEtY53c.js} +1 -1
  188. package/dist/zonos-elements/{p-DjuFsKLG.js → p-MHVIIOVE.js} +1 -1
  189. package/dist/zonos-elements/{p-DPW1yXt9.system.js → p-NL_Eiq6m.system.js} +65 -65
  190. package/dist/zonos-elements/{p-Dj-O6VfM.system.js → p-UM1aYZBV.system.js} +2 -2
  191. package/dist/zonos-elements/p-a6354d15.entry.js +1 -0
  192. package/dist/zonos-elements/{p-8cd3f1e2.entry.js → p-b78bab27.entry.js} +1 -1
  193. package/dist/zonos-elements/{p-f6ba59f6.system.entry.js → p-b88e521e.system.entry.js} +14 -14
  194. package/dist/zonos-elements/{p-450ed170.system.entry.js → p-b96666ca.system.entry.js} +3 -3
  195. package/dist/zonos-elements/{p-39c8a898.entry.js → p-c090cc60.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-cadf6b63.system.entry.js → p-c4713ff1.system.entry.js} +10 -10
  197. package/dist/zonos-elements/{p-ea8790aa.entry.js → p-c5f17bad.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-f57495dc.entry.js → p-cc17a230.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-7ae48e31.entry.js → p-cf53f67a.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-7a5d2211.system.entry.js → p-d261f27c.system.entry.js} +15 -15
  201. package/dist/zonos-elements/{p-e101d722.system.entry.js → p-d451d5bc.system.entry.js} +4 -4
  202. package/dist/zonos-elements/{p-d33dfc78.system.entry.js → p-d9527bd7.system.entry.js} +35 -35
  203. package/dist/zonos-elements/{p-f6e0aeba.system.entry.js → p-e126e9bd.system.entry.js} +176 -176
  204. package/dist/zonos-elements/{p-e284d329.entry.js → p-e582ae2a.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-5562a955.system.entry.js → p-e9a3bc27.system.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-844a743a.entry.js → p-f44631d5.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-5836d426.system.entry.js → p-fcfac62f.system.entry.js} +1 -1
  208. package/dist/zonos-elements/p-opB7B9YB.js +1 -0
  209. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  210. package/package.json +12 -11
  211. package/dist/zonos-elements/p-2ba738ec.entry.js +0 -1
  212. package/dist/zonos-elements/p-4a54f664.entry.js +0 -1
  213. package/dist/zonos-elements/p-6f742021.entry.js +0 -1
  214. package/dist/zonos-elements/p-89ddab88.entry.js +0 -1
  215. package/dist/zonos-elements/p-C19J2XSh.js +0 -1
  216. package/dist/zonos-elements/p-LypTHRUC.js +0 -1
  217. package/dist/zonos-elements/p-adfee3a3.entry.js +0 -1
  218. package/dist/zonos-elements/p-lGLcGvEA.js +0 -1
  219. package/dist/zonos-elements/p-pfIceXbY.js +0 -1
@@ -1,4 +1,4 @@
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}}};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{j as jsonParse,h as handleFetch,l as logError}from"./handleFetch-D5GYDF-O.js";import{a as availableTestKeys,l as log}from"./VarianceTest-BJmZPrZl.js";
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))};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{j as jsonParse,h as handleFetch,l as logError}from"./handleFetch-D5GYDF-O.js";import{a as availableTestKeys,l as log}from"./VarianceTest-BJmZPrZl.js";
2
2
  /**
3
3
  * Check if the response contains at least one available test key that we support
4
4
  */var hasAtLeastOneAvailableTestKey=function(e){var a=!!e.find((function(e){return e.testKey in availableTestKeys}));if(!a){log("No available test key found in response","info",{response:e})}return!!e.find((function(e){return e.testKey in availableTestKeys}))};
@@ -26,22 +26,19 @@ 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 translate=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=translationStore.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=translationStore.translatedChunks[t])===null||n===void 0?void 0:n.value)||t};var getCountries=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4/*yield*/,handleFetch("/api/zonos-elements/get-countries",{method:"GET"})];case 1:e=o.sent(),a=e.errors,t=e.json;if(a.length||!t){return[2/*return*/,null]}return[2/*return*/,t];case 2:r=o.sent();return[2/*return*/,null];case 3:return[2/*return*/]}}))}))};var getCountryLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var a,t,r,o,n;return __generator(this,(function(l){switch(l.label){case 0:if(!e){return[2/*return*/,null]}t="/api/zonos-elements/country-landed-cost/".concat(e);return[4/*yield*/,handleFetch(t)];case 1:r=l.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching country landed cost: ".concat((a=o.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}return[2/*return*/,n||null]}}))}))};var defaultUsExchangeRate={exchangeRate:{rate:1,targetFormat:{currencyCode:"USD",decimalDelimiter:".",scale:2,symbol:"$",symbolLocation:"before",thousandsDelimiter:","}},maxAge:null};var getExchangeRate=function(e){return __awaiter(void 0,[e],void 0,(function(e){var a,t,r,o,n,l,i,s,u,d;var c=e.country,v=e.isGuaranteed,p=e.sourceCurrency,m=e.targetCurrency;return __generator(this,(function(e){switch(e.label){case 0:
29
+ var i=((o=translationStore.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=translationStore.translatedChunks[t])===null||n===void 0?void 0:n.value)||t};var getCountries=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4/*yield*/,handleFetch("/api/zonos-elements/get-countries",{method:"GET"})];case 1:e=o.sent(),a=e.errors,t=e.json;if(a.length||!t){return[2/*return*/,null]}return[2/*return*/,t];case 2:r=o.sent();return[2/*return*/,null];case 3:return[2/*return*/]}}))}))};var getCountryLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var a,t,r,o,n;return __generator(this,(function(i){switch(i.label){case 0:if(!e){return[2/*return*/,null]}t="/api/zonos-elements/country-landed-cost/".concat(e);return[4/*yield*/,handleFetch(t)];case 1:r=i.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching country landed cost: ".concat((a=o.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}return[2/*return*/,n||null]}}))}))};var defaultUsExchangeRate={exchangeRate:{rate:1,targetFormat:{currencyCode:"USD",decimalDelimiter:".",scale:2,symbol:"$",symbolLocation:"before",thousandsDelimiter:","}},maxAge:null};var getExchangeRate=function(e){return __awaiter(void 0,[e],void 0,(function(e){var a,t,r,o,n,i,l,s,u,d;var c=e.country,v=e.isGuaranteed,p=e.sourceCurrency,m=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(p===m&&!v){return[2/*return*/,defaultUsExchangeRate]}t=new URLSearchParams;t.set("sourceCurrency",p);t.set("targetCurrency",m);t.set("isGuaranteed",String(v));t.set("country",c||"");return[4/*yield*/,handleFetch("/api/zonos-elements/exchange-rates?".concat(t.toString()))];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching country landed cost: ".concat((a=o.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,defaultUsExchangeRate]}l=n.exchangeRateCreate,i=l.rate,s=l.targetFormat;u=n.maxAge;if(i){sessionStorage.setItem(c+"_rate",JSON.stringify(i));d={rate:i,targetFormat:s};return[2/*return*/,{exchangeRate:d,maxAge:u}]}return[2/*return*/,defaultUsExchangeRate]}}))}))};var getInclusivePriceConfigurations=function(e){return __awaiter(void 0,void 0,void 0,(function(){var a,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:if(!e){return[2/*return*/,null]}return[4/*yield*/,handleFetch("/api/zonos-elements/inclusive-prices/".concat(e))];case 1:t=n.sent(),r=t.errors,o=t.json;if(r.length||!o){logError("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*/,o||null]}}))}))};var getLocaleMessages=function(e){return __awaiter(void 0,[e],void 0,(function(e){var a,t,r,o,n;var l=e.countryCode,i=e.localeTo,s=e.storeId;return __generator(this,(function(e){switch(e.label){case 0:t=new URLSearchParams;t.set("countryCode",l);t.set("storeId",s.toString());if(i){t.set("localeTo",i)}return[4/*yield*/,handleFetch("/api/zonos-elements/locale-messages?".concat(t.toString()))];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching exchange rate",(a=o.find(Boolean))===null||a===void 0?void 0:a.message);return[2/*return*/,[]]}return[2/*return*/,n.locale_countryCodesPage]}}))}))};var validateCountryCode=function(e){
32
- // Check that the country is two characters and is upper case
33
- if(e&&/^[A-Z]{2}$/.test(e)){return e}return null};var getZCountryUrlParam=function(e){var a=new URLSearchParams(e||window.location.search);var t=function(e){var t=a.get(e);
34
- // Check that the country is two characters and is upper case
35
- return validateCountryCode(t)};var r=t("zCountry");
31
+ if(p===m&&!v){return[2/*return*/,defaultUsExchangeRate]}t=new URLSearchParams;t.set("sourceCurrency",p);t.set("targetCurrency",m);t.set("isGuaranteed",String(v));t.set("country",c||"");return[4/*yield*/,handleFetch("/api/zonos-elements/exchange-rates?".concat(t.toString()))];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching country landed cost: ".concat((a=o.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,defaultUsExchangeRate]}i=n.exchangeRateCreate,l=i.rate,s=i.targetFormat;u=n.maxAge;if(l){sessionStorage.setItem(c+"_rate",JSON.stringify(l));d={rate:l,targetFormat:s};return[2/*return*/,{exchangeRate:d,maxAge:u}]}return[2/*return*/,defaultUsExchangeRate]}}))}))};var getInclusivePriceConfigurations=function(e){return __awaiter(void 0,void 0,void 0,(function(){var a,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:if(!e){return[2/*return*/,null]}return[4/*yield*/,handleFetch("/api/zonos-elements/inclusive-prices/".concat(e))];case 1:t=n.sent(),r=t.errors,o=t.json;if(r.length||!o){logError("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*/,o||null]}}))}))};var getLocaleMessages=function(e){return __awaiter(void 0,[e],void 0,(function(e){var a,t,r,o,n;var i=e.countryCode,l=e.localeTo,s=e.storeId;return __generator(this,(function(e){switch(e.label){case 0:t=new URLSearchParams;t.set("countryCode",i);t.set("storeId",s.toString());if(l){t.set("localeTo",l)}return[4/*yield*/,handleFetch("/api/zonos-elements/locale-messages?".concat(t.toString()))];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching exchange rate",(a=o.find(Boolean))===null||a===void 0?void 0:a.message);return[2/*return*/,[]]}return[2/*return*/,n.locale_countryCodesPage]}}))}))};var isCountryCode=function(e){return/^[A-Z]{2}$/.test(e)};var COUNTRY_OVERRIDE_KEY="zonos--country";var withBlockedStorage=function(e){try{e()}catch(e){
32
+ // localStorage/sessionStorage can throw in blocked-storage contexts
33
+ // (Safari private mode, cross-origin iframes).
34
+ }};var clearSessionOverride=function(){window.sessionStorage.removeItem(COUNTRY_OVERRIDE_KEY)};var readStoredCountry=function(e){try{var a=e.getItem(COUNTRY_OVERRIDE_KEY);if(!a||!isCountryCode(a)){return null}return a}catch(e){return null}};var getCountryOverrideStorage=function(){var e;return(e=readStoredCountry(window.localStorage))!==null&&e!==void 0?e:readStoredCountry(window.sessionStorage)};var migrateCountryOverrideStorage=function(){withBlockedStorage((function(){if(readStoredCountry(window.localStorage)){clearSessionOverride()}}))};var setCountryOverrideStorage=function(e){withBlockedStorage((function(){window.localStorage.setItem(COUNTRY_OVERRIDE_KEY,e);clearSessionOverride()}))};var clearCountryOverrideStorage=function(){withBlockedStorage((function(){window.localStorage.removeItem(COUNTRY_OVERRIDE_KEY);clearSessionOverride()}))};var getZCountryUrlParam=function(e){var a=new URLSearchParams(e||window.location.search);var t=function(e){var t=a.get(e);if(t&&isCountryCode(t)){return t}return null};var r=t("zCountry");
36
35
  // Fallback to legacy 'country'
37
36
  var o=t("country");
38
37
  // Fallback to customerCountry
39
38
  var n=t("customerCountry");return r||o||n};
40
39
  /**
41
- * Retrieve the zCountry from the URL or session storage.
42
- */var getOverridenZCountry=function(){var e=new URL(window.location.href);
43
- // load and use country from session storage when zCountry query param is not present
44
- var a=window.sessionStorage.getItem("zonos--country");var t=getZCountryUrlParam(e.searchParams)||a;return t};var getLocalization=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);e=getOverridenZCountry();a=new URLSearchParams;if(e){a.set("zCountry",e)}return[4/*yield*/,handleFetch("/api/zonos-elements/localization?".concat(a.toString()))];case 1:t=l.sent(),r=t.errors,o=t.json;if(r.length||!o){return[2/*return*/,{country:null,locale:null}]}return[2/*return*/,{country:o.country,locale:o.locale}];case 2:n=l.sent();return[2/*return*/,{country:null,locale:null}];case 3:return[2/*return*/]}}))}))};var getShippingZones=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,l;return __generator(this,(function(i){switch(i.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*/,handleFetch("/api/zonos-elements/shipping-zones")];case 1:r=i.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching shipping zones: ".concat((a=o.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}l=(t=n===null||n===void 0?void 0:n.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*/,l||null]}}))}))};
40
+ * Retrieve the shopper country override from the URL or remembered storage.
41
+ */var getOverridenZCountry=function(){var e=new URL(window.location.href);return getZCountryUrlParam(e.searchParams)||getCountryOverrideStorage()};var getLocalization=function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}return __awaiter(void 0,__spreadArray([],e,true),void 0,(function(e){var a,t,r,o,n,i;var l=e===void 0?{}:e,s=l.ignoreCountryOverride,u=s===void 0?false:s;return __generator(this,(function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);a=u?null:getOverridenZCountry();t=new URLSearchParams;if(a){t.set("zCountry",a)}return[4/*yield*/,handleFetch("/api/zonos-elements/localization?".concat(t.toString()))];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){return[2/*return*/,{country:null,locale:null}]}return[2/*return*/,{country:n.country,locale:n.locale}];case 2:i=e.sent();return[2/*return*/,{country:null,locale:null}];case 3:return[2/*return*/]}}))}))};var getShippingZones=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,i;return __generator(this,(function(l){switch(l.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*/,handleFetch("/api/zonos-elements/shipping-zones")];case 1:r=l.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching shipping zones: ".concat((a=o.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}i=(t=n===null||n===void 0?void 0:n.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*/,i||null]}}))}))};
45
42
  /**
46
43
  * Fetch the checkout/cart ID from the BigCommerce Storefront Cart API.
47
44
  * The `/checkout` page URL does not include the checkout ID, so we
@@ -62,7 +59,26 @@ var a=window.sessionStorage.getItem("zonos--country");var t=getZCountryUrlParam(
62
59
  * Whether the BigCommerce shopper is already logged in. We key off the
63
60
  * customer's numeric `id` since the storefront API populates it only for
64
61
  * authenticated sessions (guest checkouts have an empty `customer` object).
65
- */var isBigCommerceCustomerLoggedIn=function(e){var a;return!!((a=e===null||e===void 0?void 0:e.customer)===null||a===void 0?void 0:a.id)};
62
+ */var isBigCommerceCustomerLoggedIn=function(e){var a;return!!((a=e===null||e===void 0?void 0:e.customer)===null||a===void 0?void 0:a.id)};var isCountryInShippingZone=function(e){var a;return!!e&&!!((a=localizationStore.shippingZoneCountries)===null||a===void 0?void 0:a[e])&&!zonosStore.disabledCountries.includes(e)};
63
+ /**
64
+ * Visibility rules for Hello, ignoring whether localization has finished
65
+ * loading. Used during init reconcile before `localizationLoaded` is set.
66
+ * Pass `countryCode` to evaluate a remembered country instead of the
67
+ * currently selected one.
68
+ */var getHelloWidgetVisibility=function(e,a){if(e===void 0){e=true}if(a===void 0){a=localizationStore.selectedCountryCode}var t,r;var o=zonosStore.helloSettings,n=o.countryDisplayRules,i=o.showForCountries;var l=n===null||n===void 0?void 0:n.widgetVisibility;var s=a;var u=isCountryInShippingZone(a);
69
+ // Resolve behavior: deprecated showForCountries overrides widgetVisibility.behavior
70
+ // If showForCountries is an array of country codes, treat as legacy explicit list
71
+ var d=Array.isArray(i)?i:i!==null&&i!==void 0?i:l===null||l===void 0?void 0:l.behavior;if(e&&!u){log("Hello: not shippable country - Show for countries: ".concat(d))}
72
+ // Legacy: explicit list of country codes from deprecated showForCountries
73
+ if(Array.isArray(d)){return!!s&&d.includes(s)}
74
+ // Determine base visibility from behavior
75
+ var c;if(d==="ALL"){c=true}else{
76
+ // Default: ONLY_SHIPPABLE
77
+ c=u}
78
+ // Apply includedCountries — force show the widget for these countries
79
+ if(!c&&s&&((t=l===null||l===void 0?void 0:l.includedCountries)===null||t===void 0?void 0:t.includes(s))){c=true}
80
+ // Apply excludedCountries — force hide the widget for these countries
81
+ if(c&&s&&((r=l===null||l===void 0?void 0:l.excludedCountries)===null||r===void 0?void 0:r.includes(s))){c=false}return c};
66
82
  /**
67
83
  * Whether the Hello widget should be shown for the current shopper. This is the
68
84
  * single source of truth for Hello's visibility decision — the `zonos-hello`
@@ -70,27 +86,10 @@ var a=window.sessionStorage.getItem("zonos--country");var t=getZCountryUrlParam(
70
86
  * cleanup) gate on it so their behavior stays in lockstep with what the shopper
71
87
  * actually sees.
72
88
  *
73
- * Resolves the configured `widgetVisibility` behavior (with the deprecated
74
- * `showForCountries` override) against the selected country and shipping-zone
75
- * state, then applies the include/exclude country overrides.
76
- *
77
89
  * @param showLog - emit a debug log when the shopper is not in a shipping zone.
78
90
  * Defaults to `true`; pass `false` from non-rendering callers to avoid log
79
91
  * noise.
80
- */var shouldShowHelloWidget=function(e){if(e===void 0){e=true}var a,t;if(!localizationStore.localizationLoaded){return false}var r=zonosStore.helloSettings,o=r.countryDisplayRules,n=r.showForCountries;var l=o===null||o===void 0?void 0:o.widgetVisibility;var i=localizationStore.selectedCountryCode;
81
- // Resolve behavior: deprecated showForCountries overrides widgetVisibility.behavior
82
- // If showForCountries is an array of country codes, treat as legacy explicit list
83
- var s=Array.isArray(n)?n:n!==null&&n!==void 0?n:l===null||l===void 0?void 0:l.behavior;if(e&&!localizationStore.isShippableCountry){log("Hello: not shippable country - Show for countries: ".concat(s))}
84
- // Legacy: explicit list of country codes from deprecated showForCountries
85
- if(Array.isArray(s)){return!!i&&s.includes(i)}
86
- // Determine base visibility from behavior
87
- var u;if(s==="ALL"){u=true}else{
88
- // Default: ONLY_SHIPPABLE
89
- u=localizationStore.isShippableCountry}
90
- // Apply includedCountries — force show the widget for these countries
91
- if(!u&&i&&((a=l===null||l===void 0?void 0:l.includedCountries)===null||a===void 0?void 0:a.includes(i))){u=true}
92
- // Apply excludedCountries — force hide the widget for these countries
93
- if(u&&i&&((t=l===null||l===void 0?void 0:l.excludedCountries)===null||t===void 0?void 0:t.includes(i))){u=false}return u};
92
+ */var shouldShowHelloWidget=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return false}return getHelloWidgetVisibility(e)};
94
93
  /**
95
94
  * Guard against overlapping passes. `removeBigcommerceCartShipping` is fired on
96
95
  * every country change; without this flag, rapid country switches could stack
@@ -113,20 +112,20 @@ if(u&&i&&((t=l===null||l===void 0?void 0:l.excludedCountries)===null||t===void 0
113
112
  * active checkout actually has a consignment. Because the reload happens only
114
113
  * when a consignment is found and removed, the freshly-loaded page has none —
115
114
  * so this cannot loop.
116
- */var removeBigcommerceCartShipping=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,l,i;return __generator(this,(function(s){switch(s.label){case 0:if(typeof window==="undefined"||!((e=window.Zonos)===null||e===void 0?void 0:e.isBigCommerce)){return[2/*return*/]}
115
+ */var removeBigcommerceCartShipping=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,i,l;return __generator(this,(function(s){switch(s.label){case 0:if(typeof window==="undefined"||!((e=window.Zonos)===null||e===void 0?void 0:e.isBigCommerce)){return[2/*return*/]}
117
116
  // Only on the cart page and only when Hello is shown — elsewhere there is no
118
117
  // Grand Total to correct. Gate on Hello visibility (not raw shipping-zone
119
118
  // membership) so include/exclude country overrides are respected.
120
119
  if(window.location.pathname!=="/cart.php"||!localizationStore.isShippableCountry||!shouldShowHelloWidget(false)){return[2/*return*/]}if(isRemoving){return[2/*return*/]}isRemoving=true;s.label=1;case 1:s.trys.push([1,5,6,7]);return[4/*yield*/,fetchCheckoutId()];case 2:t=s.sent();if(!t){return[2/*return*/]}return[4/*yield*/,fetchBigCommerceCheckout(t)];case 3:r=s.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}));
121
120
  // Nothing to do if there is no domestic shipping quote on the cart.
122
- if(!o.length){return[2/*return*/]}log("Removing ".concat(String(o.length)," BigCommerce cart consignment(s) for international shopper"),"info");return[4/*yield*/,Promise.all(o.map((function(e){return deleteBigCommerceConsignment(t,e)})))];case 4:n=s.sent();l=n.filter(Boolean).length;
121
+ if(!o.length){return[2/*return*/]}log("Removing ".concat(String(o.length)," BigCommerce cart consignment(s) for international shopper"),"info");return[4/*yield*/,Promise.all(o.map((function(e){return deleteBigCommerceConsignment(t,e)})))];case 4:n=s.sent();i=n.filter(Boolean).length;
123
122
  // Only reload when at least one consignment was actually removed. If every
124
123
  // DELETE failed, reloading would re-run this on init with the same
125
124
  // consignments still present and trap the shopper in a reload loop.
126
- if(!l){log("No BigCommerce cart consignments were removed; skipping reload to avoid a reload loop","warn");return[2/*return*/]}
125
+ if(!i){log("No BigCommerce cart consignments were removed; skipping reload to avoid a reload loop","warn");return[2/*return*/]}
127
126
  // Reload so the server re-renders the cart consistently without the removed
128
127
  // shipping, instead of surgically patching the DOM total.
129
- window.location.reload();return[3/*break*/,7];case 5:i=s.sent();logError("Error removing BigCommerce cart shipping consignment",i);return[3/*break*/,7];case 6:isRemoving=false;return[7/*endfinally*/];case 7:return[2/*return*/]}}))}))};var languages=[{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:"한국어"}];
128
+ window.location.reload();return[3/*break*/,7];case 5:l=s.sent();logError("Error removing BigCommerce cart shipping consignment",l);return[3/*break*/,7];case 6:isRemoving=false;return[7/*endfinally*/];case 7:return[2/*return*/]}}))}))};var languages=[{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:"한국어"}];
130
129
  /**
131
130
  * The languages offered in the language selector, honoring the merchant's
132
131
  * `appearanceSettings.supportedLocales`. Falls back to every supported language when the
@@ -140,17 +139,17 @@ var a=localizationStore.exchangeRate;if(!a||!e||isNaN(e)){return e}var t=(a===nu
140
139
  /**
141
140
  * This function only to format the number in
142
141
  * @returns
143
- */var numberFormat=function(e){var a=e.amount,t=e.currency,r=e.targetFormat;var o=t||localizationStore.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){
142
+ */var numberFormat=function(e){var a=e.amount,t=e.currency,r=e.targetFormat;var o=t||localizationStore.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){
144
143
  // use native number formatting if it's IE.
145
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 currencyFormat=function(e){var a=e.amount,t=e.currency;if(isNaN(a)||a!==0&&!a){return""}var r=zonosStore.overrideCurrencyFormat;var o=localizationStore.exchangeRate;var n=t||localizationStore.targetCurrency;
146
145
  // Use user-defined currency format
147
- if(typeof r==="function"){return r({amount:a,currencyCode:n,numberFormat:function(e){var a=e.amount;return numberFormat({amount:a,currency:n,targetFormat:(o===null||o===void 0?void 0:o.targetFormat)||null})}})}var l=(o||{}).targetFormat;var i=l===null||l===void 0?void 0:l.scale;var s=window.navigator.userAgent.indexOf("MSIE ")!==-1;var u=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(s||!u){
146
+ if(typeof r==="function"){return r({amount:a,currencyCode:n,numberFormat:function(e){var a=e.amount;return numberFormat({amount:a,currency:n,targetFormat:(o===null||o===void 0?void 0:o.targetFormat)||null})}})}var i=(o||{}).targetFormat;var l=i===null||i===void 0?void 0:i.scale;var s=window.navigator.userAgent.indexOf("MSIE ")!==-1;var u=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(s||!u){
148
147
  // target format is mainly used to get the minimum fraction digits for IE or no Intl.NumberFormat is available
149
- if(!l||!o){
148
+ if(!i||!o){
150
149
  // Return the amount as a string if no exchange rate is available
151
150
  return"".concat(a.toFixed(2)," ").concat(n)}
152
151
  // use native number formatting if it's IE.
153
- var d=Number(a).toFixed(i||2).replace(".","|dec|").replace(",",l.thousandsDelimiter||"").replace("|dec|",l.decimalDelimiter||"");var c="".concat(d).concat(l.currencyCode!=="USD"?" ".concat(l.currencyCode):"");return c}var v=(r===null||r===void 0?void 0:r.currencyDisplay)||"symbol";var p=new Intl.NumberFormat(zonosStore.sourceCurrency==="AUD"?"en-AU":window.navigator.language,{currency:n,currencyDisplay:v,minimumFractionDigits:i,style:"currency"}).format(a);
152
+ var d=Number(a).toFixed(l||2).replace(".","|dec|").replace(",",i.thousandsDelimiter||"").replace("|dec|",i.decimalDelimiter||"");var c="".concat(d).concat(i.currencyCode!=="USD"?" ".concat(i.currencyCode):"");return c}var v=(r===null||r===void 0?void 0:r.currencyDisplay)||"symbol";var p=new Intl.NumberFormat(zonosStore.sourceCurrency==="AUD"?"en-AU":window.navigator.language,{currency:n,currencyDisplay:v,minimumFractionDigits:l,style:"currency"}).format(a);
154
153
  // Move currency code to the end of the string if currencyDisplay is 'code'
155
154
  var m=v==="code"?"".concat(p.replace(new RegExp("".concat(n,"\\s+")),"")," ").concat(n):p;return m};var currencyConvertAndFormat=function(e){var a=currencyConvert(e);var t=currencyFormat({amount:a});return t};
156
155
  /**
@@ -196,13 +195,13 @@ setTimeout((function(){void removeBlurCurrency()}),BLUR_CURRENCY_DURATION)};var
196
195
  // get rate
197
196
  var o=parseFloat(e.getAttribute("data-zrate")||"1");var n=e.getAttribute("data-zcountry-code");
198
197
  // do nothing if the target currency is the same
199
- var l=localizationStore.exchangeRate&&localizationStore.targetCurrency===localizationStore.exchangeRate.targetFormat.currencyCode;var i=((a=localizationStore.exchangeRate)===null||a===void 0?void 0:a.rate)||1;
198
+ var i=localizationStore.exchangeRate&&localizationStore.targetCurrency===localizationStore.exchangeRate.targetFormat.currencyCode;var l=((a=localizationStore.exchangeRate)===null||a===void 0?void 0:a.rate)||1;
200
199
  // if the current value on the element is different from the current intl value, update the data-zintl attribute
201
- if(l&&(
200
+ if(i&&(
202
201
  // Update currency if the value is not yet formatted
203
202
  e.textContent!==r||
204
203
  // Update rate when new rate is available
205
- i!==o||
204
+ l!==o||
206
205
  // Update currency when the country code changes
207
206
  n!==localizationStore.selectedCountryCode)){var s=void 0;
208
207
  // Only trigger blur effect if the source currency is different from the target currency
@@ -214,7 +213,7 @@ var c=d||currencyConvertAndFormat(u);if(c!==e.textContent){
214
213
  // Only set textContent if the value has changed, this is to prevent it redrawing the element if the value is the same
215
214
  e.textContent=c}
216
215
  // save the new rate to the data-zrate attribute
217
- e.setAttribute("data-zrate",i.toString());
216
+ e.setAttribute("data-zrate",l.toString());
218
217
  // save the new value to the data-zintl attribute
219
218
  e.setAttribute("data-zintl",c);e.setAttribute("data-zcountry-code",localizationStore.selectedCountryCode||"");void removeBlurSpecificElement({specificSelector:e,timeoutId:s})}};var defaultCurrencyConverter=function(){var e=zonosStore.helloSettings.currencyElementSelector;var a=getCurrencyElements(e);
220
219
  // do nothing if none of the currency elements are found
@@ -226,7 +225,20 @@ convertCurrency(e)}))};var currencyDisplay=function(){if(zonosStore.helloSetting
226
225
  // differs from `zonosStore.sourceCurrency`, the DOM amounts are not in the
227
226
  // currency Hello would convert *from* — running conversion would double-
228
227
  // convert and produce wrong prices.
229
- if(window.Zonos.isBigCommerce){var e=document.body.dataset.currencyCode;if(e&&e!==zonosStore.sourceCurrency){log('Skipping Hello currency conversion: BigCommerce native currency "'.concat(e,'" does not match sourceCurrency "').concat(zonosStore.sourceCurrency,'".'),"info");void removeBlurCurrency();return}}defaultCurrencyConverter()};var getCurrencyCode=function(e){var a;var t=(a=localizationStore.shippingZoneCountries)===null||a===void 0?void 0:a[e];if(t){return t.currencyCode}return null};var setZCountryUrlParam=function(e){if(!e){return}var a=new URLSearchParams(window.location.search);
228
+ if(window.Zonos.isBigCommerce){var e=document.body.dataset.currencyCode;if(e&&e!==zonosStore.sourceCurrency){log('Skipping Hello currency conversion: BigCommerce native currency "'.concat(e,'" does not match sourceCurrency "').concat(zonosStore.sourceCurrency,'".'),"info");void removeBlurCurrency();return}}defaultCurrencyConverter()};var getCurrencyCode=function(e){var a;var t=(a=localizationStore.shippingZoneCountries)===null||a===void 0?void 0:a[e];if(t){return t.currencyCode}return null};
229
+ /**
230
+ * Drop a remembered Hello country when widgetVisibility would hide the
231
+ * widget for it, then fall back to geo.
232
+ *
233
+ * Does not mutate the localization store — the caller applies the returned
234
+ * country. Pass `geoCountry` when init already fetched IP localization so
235
+ * discard does not wait on a second round trip. Pass `urlCountryAtLoad`
236
+ * from the URL as it was at page load (before init writes `zCountry` for
237
+ * URL_PARAM merchants). Do not omit it after a live URL write — the
238
+ * default is `null`, not the current URL. Storage is cleared when geo
239
+ * succeeds, or when a load-time URL country won and the stored country
240
+ * would be hidden.
241
+ */var reconcileRememberedCountryOverride=function(){var e=[];for(var a=0;a<arguments.length;a++){e[a]=arguments[a]}return __awaiter(void 0,__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=getCountryOverrideStorage();if(!a){return[2/*return*/,null]}if(getHelloWidgetVisibility(false,a)){return[2/*return*/,null]}if(l){clearCountryOverrideStorage();return[2/*return*/,null]}if(!(n!==undefined))return[3/*break*/,1];r=n;return[3/*break*/,3];case 1:return[4/*yield*/,getLocalization({ignoreCountryOverride:true})];case 2:r=e.sent().country;e.label=3;case 3:t=r;if(!t){return[2/*return*/,null]}clearCountryOverrideStorage();return[2/*return*/,t]}}))}))};var setZCountryUrlParam=function(e){if(!e){return}var a=new URLSearchParams(window.location.search);
230
242
  // Only append zCountry if it's already in the URL or the countryOverrideBehavior is URL_PARAM
231
243
  var t=a.has("zCountry")||zonosStore.helloSettings.countryOverrideBehavior==="URL_PARAM";if(t){
232
244
  // Only append zCountry if it's not already in the URL
@@ -267,11 +279,11 @@ localizationStore.exchangeRateTimeout=setTimeout((function(){return __awaiter(vo
267
279
  // Refresh inclusive pricing configurations before getting a new exchange rate, so hello can use the new effective rate
268
280
  return[4/*yield*/,refreshInclusivePricingConfigurations(localizationStore.selectedCountryCode)];case 1:
269
281
  // Refresh inclusive pricing configurations before getting a new exchange rate, so hello can use the new effective rate
270
- t.sent();return[4/*yield*/,triggerGetExchangeRate(a)];case 2:e=t.sent().maxAge;startExchangeRateTimeout({isGuaranteed:a,maxAge:e});return[2/*return*/]}}))}))}),o*1e3)};var getNewLocalization=function(e){return __awaiter(void 0,[e],void 0,(function(e){var a,t,r,o,n,l,i,s;var u=e.isInitializing;return __generator(this,(function(e){switch(e.label){case 0:log("get new localization store");r=localizationStore.isDisabledCountry,o=localizationStore.isShippableCountry,n=localizationStore.selectedCountryCode;if(zonosStore.helloSettings.currencyBehavior==="DISABLED"||!o||r||!n){return[2/*return*/]}l=zonosStore.checkoutSettings.visibilityStatus==="ENABLED";
282
+ t.sent();return[4/*yield*/,triggerGetExchangeRate(a)];case 2:e=t.sent().maxAge;startExchangeRateTimeout({isGuaranteed:a,maxAge:e});return[2/*return*/]}}))}))}),o*1e3)};var getNewLocalization=function(e){return __awaiter(void 0,[e],void 0,(function(e){var a,t,r,o,n,i,l,s;var u=e.isInitializing;return __generator(this,(function(e){switch(e.label){case 0:log("get new localization store");r=localizationStore.isDisabledCountry,o=localizationStore.isShippableCountry,n=localizationStore.selectedCountryCode;if(zonosStore.helloSettings.currencyBehavior==="DISABLED"||!o||r||!n){return[2/*return*/]}i=zonosStore.checkoutSettings.visibilityStatus==="ENABLED";
271
283
  // blur currency out before getting exchange rate
272
- performBlurCurrency();return[4/*yield*/,triggerGetExchangeRate(l)];case 1:i=e.sent().maxAge;startExchangeRateTimeout({isGuaranteed:l,maxAge:i});if(u&&((a=window.Zonos.cartSettings)===null||a===void 0?void 0:a.inclusivePriceConfigurations)){localizationStore.inclusivePricingConfigurations=((t=window.Zonos.cartSettings)===null||t===void 0?void 0:t.inclusivePriceConfigurations)||[];void removeBlurCurrency()}if(!!window.Zonos.isLegacyCheckout)return[3/*break*/,3];localizationStore.inclusivePricingIsFetching=true;return[4/*yield*/,Promise.all([getCountryLandedCost(localizationStore.selectedCountryCode),refreshInclusivePricingConfigurations(localizationStore.selectedCountryCode)])];case 2:s=e.sent()[0];localizationStore.countryLandedCost=s;
284
+ performBlurCurrency();return[4/*yield*/,triggerGetExchangeRate(i)];case 1:l=e.sent().maxAge;startExchangeRateTimeout({isGuaranteed:i,maxAge:l});if(u&&((a=window.Zonos.cartSettings)===null||a===void 0?void 0:a.inclusivePriceConfigurations)){localizationStore.inclusivePricingConfigurations=((t=window.Zonos.cartSettings)===null||t===void 0?void 0:t.inclusivePriceConfigurations)||[];void removeBlurCurrency()}if(!!window.Zonos.isLegacyCheckout)return[3/*break*/,3];localizationStore.inclusivePricingIsFetching=true;return[4/*yield*/,Promise.all([getCountryLandedCost(localizationStore.selectedCountryCode),refreshInclusivePricingConfigurations(localizationStore.selectedCountryCode)])];case 2:s=e.sent()[0];localizationStore.countryLandedCost=s;
273
285
  // Remove blur effect after the currency is converted
274
- void removeBlurCurrency();return[3/*break*/,4];case 3:log("Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout");e.label=4;case 4:return[2/*return*/]}}))}))};var getCustomMessages=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a;return __generator(this,(function(t){switch(t.label){case 0:log("Getting custom messages for ".concat(localizationStore.selectedCountryCode));if(!localizationStore.selectedCountryCode||!zonosStore.storeId){return[2/*return*/]}return[4/*yield*/,getLocaleMessages({countryCode:localizationStore.selectedCountryCode,localeTo:localizationStore.selectedLocale,storeId:zonosStore.storeId})];case 1:e=t.sent();a=e.flatMap((function(e){var a;return{countryCode:localizationStore.selectedCountryCode,message:(a=e.countryCodesPageMessageLinks.find(Boolean))===null||a===void 0?void 0:a.message.textTo,pageName:e.pageName}}));localizationStore.customMessages=a;return[2/*return*/]}}))}))};var getOverrideLocale=function(){var e=new URL(window.location.href);var a=e.searchParams.get("zonosLocale");return a};var addInternationalHideClass=function(){if(localizationStore.isShippableCountry){document.body.classList.add("z-intl")}else{document.body.classList.remove("z-intl")}};var getValidCountryCode=function(e){if(e==="UK"){return"GB"}return e};
286
+ void removeBlurCurrency();return[3/*break*/,4];case 3:log("Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout");e.label=4;case 4:return[2/*return*/]}}))}))};var getCustomMessages=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t;return __generator(this,(function(r){switch(r.label){case 0:e=localizationStore.selectedCountryCode;log("Getting custom messages for ".concat(e));if(!e||!zonosStore.storeId){return[2/*return*/]}return[4/*yield*/,getLocaleMessages({countryCode:e,localeTo:localizationStore.selectedLocale,storeId:zonosStore.storeId})];case 1:a=r.sent();if(localizationStore.selectedCountryCode!==e){return[2/*return*/]}t=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}}));localizationStore.customMessages=t;return[2/*return*/]}}))}))};var getOverrideLocale=function(){var e=new URL(window.location.href);var a=e.searchParams.get("zonosLocale");return a};var addInternationalHideClass=function(){if(localizationStore.isShippableCountry){document.body.classList.add("z-intl")}else{document.body.classList.remove("z-intl")}};var getValidCountryCode=function(e){if(e==="UK"){return"GB"}return e};
275
287
  /**
276
288
  * Clamps a locale to what the merchant offers. The requested locale comes from geolocation, the
277
289
  * browser, or the `zonosLocale` param — none of which know about
@@ -279,11 +291,9 @@ void removeBlurCurrency();return[3/*break*/,4];case 3:log("Skipping country land
279
291
  * merchant has removed, with no way to switch back to it once the selector hides it.
280
292
  */var getValidLocale=function(e){var a=getSupportedLanguages();if(a.some((function(a){return a.code===e}))){return e}
281
293
  // prefer English when it is on offer, otherwise take the first language the merchant kept
282
- var t=a.find((function(e){return e.code==="en"}))||a[0];log("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 localizationStoreUpdateSelectedCountryCode=function(e){var a=e.isInitializing,t=e.newSelectedCountryCode;var r,o,n;log("Updating selected country code to ".concat(t));var l=!localizationStore.selectedCountryCode;localizationStore.selectedCountryCode=getValidCountryCode(t);var i=localizationStore.selectedCountryCode,s=localizationStore.shippingZoneCountries;var u=!!s&&!!i&&!!s[i]&&
283
- // Make sure the country is not in the disabled countries list
284
- !zonosStore.disabledCountries.includes(i);
294
+ var t=a.find((function(e){return e.code==="en"}))||a[0];log("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 syncSelectedCountryToPage=function(e){var a;setZCountryUrlParam(e);(a=document.querySelector("zonos-hello"))===null||a===void 0?void 0:a.setAttribute("z-country",e)};var localizationStoreUpdateSelectedCountryCode=function(e){var a=e.isInitializing,t=e.newSelectedCountryCode,r=e.persistOverride;var o;log("Updating selected country code to ".concat(t));var n=!localizationStore.selectedCountryCode;localizationStore.selectedCountryCode=getValidCountryCode(t);var i=localizationStore.selectedCountryCode;var l=isCountryInShippingZone(i);
285
295
  // update shippable country
286
- localizationStore.isShippableCountry=u;log("".concat(localizationStore.selectedCountryCode," is a shippable country: ").concat(localizationStore.isShippableCountry));var d=!!i&&zonosStore.disabledCountries.includes(i);localizationStore.isDisabledCountry=d;log("".concat(localizationStore.selectedCountryCode," is a disabled country: ").concat(localizationStore.isDisabledCountry));addInternationalHideClass();
296
+ localizationStore.isShippableCountry=l;log("".concat(localizationStore.selectedCountryCode," is a shippable country: ").concat(localizationStore.isShippableCountry));var s=!!i&&zonosStore.disabledCountries.includes(i);localizationStore.isDisabledCountry=s;log("".concat(localizationStore.selectedCountryCode," is a disabled country: ").concat(localizationStore.isDisabledCountry));addInternationalHideClass();
287
297
  // Hide / restore BC's native currency selector based on the new
288
298
  // shipping-zone state. Runs here (rather than inside `currencyDisplay`)
289
299
  // because `currencyDisplay` is also invoked from the price-mutation
@@ -293,18 +303,16 @@ toggleBigcommerceNativeCurrencySelector();
293
303
  // shopper added before switching to an international country so the Grand
294
304
  // Total reflects only subtotal + coupon. No-ops off-cart, off-BigCommerce,
295
305
  // for non-shippable countries, or when the cart has no consignment.
296
- void removeBigcommerceCartShipping();if(!i){return}var c=getCurrencyCode(i);
297
- // Only trigger callback onCountryChange if the country code has been set before
298
- if(!l){
299
- // Trigger callback onCountryChange
300
- (r=zonosStore.onCountryChange)===null||r===void 0?void 0:r.call(zonosStore,{countryCode:i,currencyCode:c,isShippableCountry:u})}if(!c){
306
+ void removeBigcommerceCartShipping();if(!i){return}var u=getCurrencyCode(i);var d=r!==null&&r!==void 0?r:!a;
307
+ // Only trigger onCountryChange after init — the first apply, and any
308
+ // reconcile fallback during init, are not shopper-selected changes.
309
+ if(!n&&!a){(o=zonosStore.onCountryChange)===null||o===void 0?void 0:o.call(zonosStore,{countryCode:i,currencyCode:u,isShippableCountry:l})}if(!u){
301
310
  // Non-shippable country: revert any previously-converted international
302
311
  // prices back to the merchant's domestic (source) currency before bailing.
303
- if(localizationStore.exchangeRateTimeout){clearTimeout(localizationStore.exchangeRateTimeout);localizationStore.exchangeRateTimeout=undefined}var v=zonosStore.sourceCurrency;localizationStore.targetCurrency=v;localizationStore.exchangeRate={rate:1,targetFormat:{currencyCode:v,decimalDelimiter:".",scale:2,symbol:"",symbolLocation:"before",thousandsDelimiter:","}};localizationStore.countryLandedCost=null;localizationStore.inclusivePricingConfigurations=[];currencyDisplay();if(!a){void getCustomMessages()}
304
- // Clear session so the next visit falls back to geolocation, but keep
305
- // the current shopper's explicit selection visible in the URL (so a
306
- // same-tab reload still honors it) and on the hello element.
307
- window.sessionStorage.removeItem("zonos--country");setZCountryUrlParam(i);(o=document.querySelector("zonos-hello"))===null||o===void 0?void 0:o.setAttribute("z-country",i);return}localizationStore.targetCurrency=c;void getNewLocalization({isInitializing:a});if(!a){void getCustomMessages()}window.sessionStorage.setItem("zonos--country",i);setZCountryUrlParam(i);(n=document.querySelector("zonos-hello"))===null||n===void 0?void 0:n.setAttribute("z-country",i)};var initHelloCountryList=function(e){var a,t,r,o,n,l;var i=zonosStore.helloSettings,s=i.countryDisplayRules,u=i.showCountryList;var d=localizationStore.shippingZoneCountries;var c=s===null||s===void 0?void 0:s.countrySelector;
312
+ if(localizationStore.exchangeRateTimeout){clearTimeout(localizationStore.exchangeRateTimeout);localizationStore.exchangeRateTimeout=undefined}var c=zonosStore.sourceCurrency;localizationStore.targetCurrency=c;localizationStore.exchangeRate={rate:1,targetFormat:{currencyCode:c,decimalDelimiter:".",scale:2,symbol:"",symbolLocation:"before",thousandsDelimiter:","}};localizationStore.countryLandedCost=null;localizationStore.inclusivePricingConfigurations=[];currencyDisplay()}else{localizationStore.targetCurrency=u;
313
+ // Init may apply a remembered country that reconcile then discards. Fetch
314
+ // exchange rates once after reconcile for the final country instead.
315
+ if(!a){void getNewLocalization({isInitializing:false})}}if(!a){void getCustomMessages()}if(d){setCountryOverrideStorage(i)}if(!a){syncSelectedCountryToPage(i)}};var initHelloCountryList=function(e){var a,t,r,o,n,i;var l=zonosStore.helloSettings,s=l.countryDisplayRules,u=l.showCountryList;var d=localizationStore.shippingZoneCountries;var c=s===null||s===void 0?void 0:s.countrySelector;
308
316
  // Resolve behavior: deprecated showCountryList overrides countrySelector.behavior
309
317
  // If showCountryList is an array of country codes, treat as legacy explicit list
310
318
  var v=Array.isArray(u)?u:u!==null&&u!==void 0?u:c===null||c===void 0?void 0:c.behavior;log("Country selector behavior","info",{behavior:c===null||c===void 0?void 0:c.behavior,excludedCount:(t=(a=c===null||c===void 0?void 0:c.excludedCountries)===null||a===void 0?void 0:a.length)!==null&&t!==void 0?t:0,includedCount:(o=(r=c===null||c===void 0?void 0:c.includedCountries)===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0,showCountryList:u});
@@ -317,16 +325,14 @@ p=d?Object.assign({},d):{}}
317
325
  // Apply includedCountries — add countries not already in the list
318
326
  if((n=c===null||c===void 0?void 0:c.includedCountries)===null||n===void 0?void 0:n.length){for(var m=0,h=c.includedCountries;m<h.length;m++){var g=h[m];if(!p[g]&&e[g]){p[g]=e[g]}}}
319
327
  // Apply excludedCountries — remove countries from the list
320
- if((l=c===null||c===void 0?void 0:c.excludedCountries)===null||l===void 0?void 0:l.length){for(var y=0,f=c.excludedCountries;y<f.length;y++){var g=f[y];delete p[g]}}localizationStore.helloCountryList=p};var updateCheckoutSessionLanguage=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t;return __generator(this,(function(r){switch(r.label){case 0:if(!storageStore.checkoutSessionId){return[2/*return*/,null]}return[4/*yield*/,handleFetch("/api/zonos-elements/update-checkout-session-metadata",{body:{id:storageStore.checkoutSessionId,metadata:[
328
+ if((i=c===null||c===void 0?void 0:c.excludedCountries)===null||i===void 0?void 0:i.length){for(var y=0,f=c.excludedCountries;y<f.length;y++){var g=f[y];delete p[g]}}localizationStore.helloCountryList=p};var updateCheckoutSessionLanguage=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t;return __generator(this,(function(r){switch(r.label){case 0:if(!storageStore.checkoutSessionId){return[2/*return*/,null]}return[4/*yield*/,handleFetch("/api/zonos-elements/update-checkout-session-metadata",{body:{id:storageStore.checkoutSessionId,metadata:[
321
329
  // This is being used from the backend to determine the language of the checkout session
322
- {key:"language",value:localizationStore.selectedLocale}]},method:"POST"})];case 1:e=r.sent(),a=e.errors,t=e.json;if(a.length||!t){logError("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 localizationStoreUpdateSelectedLocale=function(e){var a=getValidLocale(e);localizationStore.selectedLocale=a;translationStoreUpdateLanguage(a);void updateCheckoutSessionLanguage();void getCustomMessages()};var initLocalizationStore=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,l,i,s,u,d;return __generator(this,(function(c){switch(c.label){case 0:return[4/*yield*/,Promise.all([getCountries(),getShippingZones(),getLocalization()])];case 1:a=c.sent(),t=a[0],r=a[1],o=a[2];n=r===null||r===void 0?void 0:r.reduce((function(e,a){var r;var o=t===null||t===void 0?void 0:t[a];return o?Object.assign(Object.assign({},e),(r={},r[a]=o,r)):e}),{});localizationStore.allCountries=t;localizationStore.shippingZoneCountries=n||null;localizationStore.inclusivePricingConfigurations=((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.inclusivePriceConfigurations)||[];
330
+ {key:"language",value:localizationStore.selectedLocale}]},method:"POST"})];case 1:e=r.sent(),a=e.errors,t=e.json;if(a.length||!t){logError("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 localizationStoreUpdateSelectedLocale=function(e){var a=getValidLocale(e);localizationStore.selectedLocale=a;translationStoreUpdateLanguage(a);void updateCheckoutSessionLanguage();if(localizationStore.localizationLoaded){void getCustomMessages()}};var initLocalizationStore=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,i,l,s,u,d,c,v,p,m,h;return __generator(this,(function(g){switch(g.label){case 0:migrateCountryOverrideStorage();a=getZCountryUrlParam();t=getCountryOverrideStorage();r=!!t&&!a;return[4/*yield*/,Promise.all([getCountries(),getShippingZones(),getLocalization(),r?getLocalization({ignoreCountryOverride:true}):Promise.resolve(undefined)])];case 1:o=g.sent(),n=o[0],i=o[1],l=o[2],s=o[3];u=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}),{});localizationStore.allCountries=n;localizationStore.shippingZoneCountries=u||null;localizationStore.inclusivePricingConfigurations=((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.inclusivePriceConfigurations)||[];
323
331
  // Initialize the country list for the hello widget
324
- initHelloCountryList(t||{});l=o.country,i=o.locale;log("Country code from localization: ".concat(l));log("Locale from localization: ".concat(i));
332
+ initHelloCountryList(n||{});d=l.country,c=l.locale;log("Country code from localization: ".concat(d));log("Locale from localization: ".concat(c));
325
333
  // update selected country code in store
326
- localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:l||null});s=getOverrideLocale();localizationStoreUpdateSelectedLocale(s||i||"en");u=["dev.storybook.elements","dev.elements","dev.demo.elements","dev.dashboard"];d=new URLSearchParams(window.location.search);
334
+ localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:d||t});v=getOverrideLocale();localizationStoreUpdateSelectedLocale(v||c||"en");p=["dev.storybook.elements","dev.elements","dev.demo.elements","dev.dashboard"];m=new URLSearchParams(window.location.search);
327
335
  // If the country code is not set, set it to the US for development (vercel can't get geo country in dev)
328
- if(!localizationStore.selectedCountryCode&&(u.some((function(e){return window.location.origin.includes(e)}))||d.get("zonosQaUrl")==="dev-elements")){
336
+ if(!localizationStore.selectedCountryCode&&(p.some((function(e){return window.location.origin.includes(e)}))||m.get("zonosQaUrl")==="dev-elements")){
329
337
  // update selected country code in store
330
- localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:"CA"})}if(!localizationStore.localizationLoaded){localizationStore.localizationLoaded=true;void removeBigcommerceCartShipping();
331
- // shouldShowHelloWidget is false because localization is not loaded yet
332
- void toggleBigcommerceNativeCurrencySelector()}return[2/*return*/]}}))}))};export{applyInclusiveEffectiveRate as A,getFallbackDefaultCountryCode as B,localizationStoreUpdateSelectedLocale as C,VARIANT_TEST_KEY_EXPIRATION as V,fetchCheckoutId as a,fetchBigCommerceCheckout as b,localizationStoreUpdateSelectedCountryCode as c,storageStoreSetEnabledVariantTestKeys as d,localizationStoreOnChange as e,filterValidTests as f,getZCountryUrlParam as g,currencyFormat as h,isBigCommerceCustomerLoggedIn as i,languages as j,getOverridenZCountry as k,localizationStore as l,isValidSelector as m,initLocalizationStore as n,setZCountryUrlParam as o,currencyDisplay as p,currencyConvertAndFormat as q,currencyConvert as r,storageStore as s,translate as t,shouldShowHelloWidget as u,getExchangeRate as v,numberFormat as w,translationStoreOnChange as x,storageStoreOnChange as y,getSupportedLanguages as z};
338
+ localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:"CA"})}return[4/*yield*/,reconcileRememberedCountryOverride({geoCountry:s===null||s===void 0?void 0:s.country,urlCountryAtLoad:a})];case 2:h=g.sent();if(h){localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:h})}if(localizationStore.selectedCountryCode){syncSelectedCountryToPage(localizationStore.selectedCountryCode)}void getCustomMessages();void getNewLocalization({isInitializing:true});if(!localizationStore.localizationLoaded){localizationStore.localizationLoaded=true;void removeBigcommerceCartShipping();void toggleBigcommerceNativeCurrencySelector()}return[2/*return*/]}}))}))};export{getSupportedLanguages as A,applyInclusiveEffectiveRate as B,getFallbackDefaultCountryCode as C,localizationStoreUpdateSelectedLocale as D,VARIANT_TEST_KEY_EXPIRATION as V,fetchCheckoutId as a,fetchBigCommerceCheckout as b,isCountryInShippingZone as c,localizationStoreUpdateSelectedCountryCode as d,storageStoreSetEnabledVariantTestKeys as e,filterValidTests as f,getZCountryUrlParam as g,localizationStoreOnChange as h,isBigCommerceCustomerLoggedIn as i,currencyFormat as j,languages as k,localizationStore as l,getOverridenZCountry as m,isValidSelector as n,initLocalizationStore as o,setZCountryUrlParam as p,currencyDisplay as q,currencyConvertAndFormat as r,storageStore as s,translate as t,currencyConvert as u,shouldShowHelloWidget as v,getExchangeRate as w,numberFormat as x,translationStoreOnChange as y,storageStoreOnChange as z};
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i["throw"]=u(1),i["return"]=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(n=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=r.call(e,t)}catch(e){u=[6,e];o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-DrIOAz4M.js";import{x as cartStoreNextStep,j as cartStoreClearCheckoutInterval,t as trackConversionEvent,y as isPolicyConsentRequired,G as policyConsentStore,C as validateCheckoutSession,b as stripeStore,d as cartStore,n as stripeStoreHandleInventoryCheck,A as storeCreditStoreApplyCredit,T as stripeStoreRecordPolicyConsent,B as storeCreditStoreCoversFullAmount,D as storeCreditStoreCreateOrder,K as storeCreditStoreGetEffectiveAmount}from"./cart-ekBk_gxV.js";import{s as storageStore,t as translate}from"./localization-AOqYXGdP.js";import{h as handleFetch,g as getIsTestMode,l as logError,j as jsonParse}from"./handleFetch-D5GYDF-O.js";import{i as isContrastColor}from"./isContrastColor-CWLU13s9.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{i as isAnalyticsRelayInIframe,a as enqueueRelayEvent,s as submitGtag}from"./submitGtag-CCGQS060.js";
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i["throw"]=u(1),i["return"]=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(n=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=r.call(e,t)}catch(e){u=[6,e];o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-DrIOAz4M.js";import{x as cartStoreNextStep,j as cartStoreClearCheckoutInterval,t as trackConversionEvent,y as isPolicyConsentRequired,G as policyConsentStore,C as validateCheckoutSession,b as stripeStore,d as cartStore,n as stripeStoreHandleInventoryCheck,A as storeCreditStoreApplyCredit,T as stripeStoreRecordPolicyConsent,B as storeCreditStoreCoversFullAmount,D as storeCreditStoreCreateOrder,K as storeCreditStoreGetEffectiveAmount}from"./cart-BDc4RTBJ.js";import{s as storageStore,t as translate}from"./localization-Bs6hVcKV.js";import{h as handleFetch,g as getIsTestMode,l as logError,j as jsonParse}from"./handleFetch-D5GYDF-O.js";import{i as isContrastColor}from"./isContrastColor-CWLU13s9.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{i as isAnalyticsRelayInIframe,a as enqueueRelayEvent,s as submitGtag}from"./submitGtag-CCGQS060.js";
2
2
  /*!
3
3
  * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
4
4
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=c(0),a["throw"]=c(1),a["return"]=c(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-ekBk_gxV.js";import{s as storageStore}from"./localization-AOqYXGdP.js";import{l as logError,h as handleFetch}from"./handleFetch-D5GYDF-O.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2/*return*/,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4/*yield*/,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2/*return*/,{errors:c.map((function(r){return r.message})),json:null}]}return[2/*return*/,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
1
+ var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=c(0),a["throw"]=c(1),a["return"]=c(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-BDc4RTBJ.js";import{s as storageStore}from"./localization-Bs6hVcKV.js";import{l as logError,h as handleFetch}from"./handleFetch-D5GYDF-O.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2/*return*/,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4/*yield*/,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2/*return*/,{errors:c.map((function(r){return r.message})),json:null}]}return[2/*return*/,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
@@ -1,4 +1,4 @@
1
- import{d as cartStore}from"./cart-ekBk_gxV.js";import{A as applyInclusiveEffectiveRate,h as currencyFormat}from"./localization-AOqYXGdP.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};
1
+ import{d as cartStore}from"./cart-BDc4RTBJ.js";import{B as applyInclusiveEffectiveRate,j as currencyFormat}from"./localization-Bs6hVcKV.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};
2
2
  /**
3
3
  * Unified currency rendering for checkout amounts.
4
4
  * @note This is only to display, not for calculations.
@@ -1,4 +1,4 @@
1
- import{z as getSupportedLanguages}from"./localization-AOqYXGdP.js";
1
+ import{A as getSupportedLanguages}from"./localization-Bs6hVcKV.js";
2
2
  /**
3
3
  * Whether to offer the language selector. Hidden when the merchant has narrowed
4
4
  * `appearanceSettings.supportedLocales` to a single language — there is nothing to pick, so the
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function d(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?r(e.value):o(e.value).then(d,s)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=s(0),d["throw"]=s(1),d["return"]=s(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return a([e,t])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(r=0)),r)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as translate,s as storageStore,y as storageStoreOnChange,l as localizationStore}from"./localization-AOqYXGdP.js";import{z as zonosStore,a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{M as MIN_POSTAL_CODE_LENGTH}from"./getMissingRequiredShippingFields-u1nhQzJ1.js";import{c as classes}from"./classes-BJHSB96f.js";import{U as extractName,b as stripeStore,w as stripeStorePrefetchLandedCost,t as trackConversionEvent}from"./cart-ekBk_gxV.js";import{R as RemoveIcon$1}from"./RemoveIcon-C2QMVeWW.js";import{i as isTextContainsNonLatinChars,c as containsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import{t as throttle}from"./throttle-D5GyA3yr.js";import{i as isCheckoutMobile}from"./handleFetch-D5GYDF-O.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-Cye-evFK.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./helpers-DJIdCwJ5.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import"./debounce-D4ko2kvZ.js";import"./ShortAddressCode-nJ6oI8-n.js";var zonosAddressCompletionDialogCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:24px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-bottom:5px;gap:20px;-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--selected-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--completion-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--completion-name-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--completion-name-row zonos-input{-ms-flex:1;flex:1}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--completion-name-row{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--submit-btn{-ms-flex-order:1;order:1}"};var ZonosAddressCompletionDialog=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.closeCompletionDialog=createEvent(this,"closeCompletionDialog",7);this.completionSubmit=createEvent(this,"completionSubmit",7);
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function d(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?r(e.value):o(e.value).then(d,s)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=s(0),d["throw"]=s(1),d["return"]=s(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return a([e,t])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(r=0)),r)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as translate,s as storageStore,z as storageStoreOnChange,l as localizationStore}from"./localization-Bs6hVcKV.js";import{z as zonosStore,a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{M as MIN_POSTAL_CODE_LENGTH}from"./getMissingRequiredShippingFields-D-B-N1NH.js";import{c as classes}from"./classes-BJHSB96f.js";import{U as extractName,b as stripeStore,w as stripeStorePrefetchLandedCost,t as trackConversionEvent}from"./cart-BDc4RTBJ.js";import{R as RemoveIcon$1}from"./RemoveIcon-C2QMVeWW.js";import{i as isTextContainsNonLatinChars,c as containsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import{t as throttle}from"./throttle-D5GyA3yr.js";import{i as isCheckoutMobile}from"./handleFetch-D5GYDF-O.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-Cye-evFK.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./helpers-DJIdCwJ5.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import"./debounce-D4ko2kvZ.js";import"./ShortAddressCode-nJ6oI8-n.js";var zonosAddressCompletionDialogCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:24px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-bottom:5px;gap:20px;-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--selected-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--completion-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--completion-name-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--completion-name-row zonos-input{-ms-flex:1;flex:1}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--completion-name-row{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--submit-btn{-ms-flex-order:1;order:1}"};var ZonosAddressCompletionDialog=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.closeCompletionDialog=createEvent(this,"closeCompletionDialog",7);this.completionSubmit=createEvent(this,"completionSubmit",7);
2
2
  /**
3
3
  * Whether or not the continue button is loading
4
4
  */this.continueLoading=false;
@@ -74,7 +74,7 @@ if(t.startOffset>n){r.push({isMatch:false,text:e.slice(n,t.startOffset)})}
74
74
  // Add matching segment
75
75
  r.push({isMatch:true,text:e.slice(t.startOffset,t.endOffset)});n=t.endOffset}));
76
76
  // Add remaining non-matching text if exists
77
- if(n<e.length){r.push({isMatch:false,text:e.slice(n)})}return r};e.prototype.render=function(){var e=this;return h(Host,{key:"9de4179f1bd0057ac71d6b9ed646c034035382f7",class:"zonos--address-suggestions",role:"group",style:{"--zonos--border-radius":getBorderRadius()}},h("ul",{key:"62fa5ed92fafcdd641f9a7eb36e36e62309c9f52","aria-label":"Suggestions",class:"wrapper",role:"listbox"},!!this.localSuggestions.length&&h("li",{key:"27c61b5693720d0b33a75385841476787f92b884","aria-selected":false,class:"powered-by option",role:"option"},h("div",{key:"fea9f2e8f65cd50fdf28fc45e18beb8976320f0d",class:"powered-by-container"},h("zonos-text",{key:"1fec46f543e3673433b6924f7dca1cbd84e0ef16",type:"caption"},"Suggestions powered by"),h("zonos-text",{key:"7b3fd93c18d4320522d61e07278f5388d14c8bbb",type:"semiBoldLabel"},"Google")),h("zonos-button",{key:"61a8362ab0514a78dd71eaa9bd638dc8b50e2a9c","aria-label":"Clear suggestions",icon:h("zonos-icon",{content:RemoveIcon}),noBackground:true,onClick:function(){e.localSuggestions=[]}})),this.localSuggestions.map((function(t){
77
+ if(n<e.length){r.push({isMatch:false,text:e.slice(n)})}return r};e.prototype.render=function(){var e=this;return h(Host,{key:"34018ecc951c0335041e24102329eb83a8d68439",class:"zonos--address-suggestions",role:"group",style:{"--zonos--border-radius":getBorderRadius()}},h("ul",{key:"80433831c875845e57225a1317c430e2626edf9a","aria-label":"Suggestions",class:"wrapper",role:"listbox"},!!this.localSuggestions.length&&h("li",{key:"3510ef51b56b1cb0a36334e842792bccc2daeca5","aria-selected":false,class:"powered-by option",role:"option"},h("div",{key:"72773af6f9c7e0644ebc5239e4bf585bba6e164a",class:"powered-by-container"},h("zonos-text",{key:"7fabccbe33cbc8d037dfd25f6e5b0a5bdaf97b2f",type:"caption"},"Suggestions powered by"),h("zonos-text",{key:"2d88a3b8d7369a44e910ec60f5c7ac0c3f0ce801",type:"semiBoldLabel"},"Google")),h("zonos-button",{key:"74315c248cc84617d854a3b51d0bad8300c6b762","aria-label":"Clear suggestions",icon:h("zonos-icon",{content:RemoveIcon}),noBackground:true,onClick:function(){e.localSuggestions=[]}})),this.localSuggestions.map((function(t){
78
78
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
79
79
  return h("li",{"aria-selected":e.selectedSuggestionId===t.id,class:classes(["suggestion","option",e.lastHoveredSuggestionId===t.id&&"last-hovered"]),key:t.id,onClick:function(){e.selectedSuggestionId=t.id;e.suggestionSelected.emit({placeId:t.id,type:e.type})},onMouseEnter:function(){e.lastHoveredSuggestionId=t.id},role:"option",tabIndex:0},h("zonos-text",null,e.getHighlightedText(t.place,t.matches).map((function(e,t){return h("span",{class:e.isMatch?"highlight":undefined,key:"".concat(t,"-").concat(e.text)},e.text)}))))}))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{suggestions:[{suggestionsChanged:0}]}},enumerable:false,configurable:true});return e}();ZonosAddressSuggestions.style=zonosAddressSuggestionsCss();var zonosAddressUpdateDialogCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--group{-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}"};var ZonosAddressUpdateDialog=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.closeUpdateDialog=createEvent(this,"closeUpdateDialog",7);this.continueClicked=createEvent(this,"continueClicked",7);
80
80
  /**
@@ -362,7 +362,7 @@ this.onStoreCheckoutSessionIdChanged();this.countryChanged((e===null||e===void 0
362
362
  // Only set country if custom address form is enabled
363
363
  if(!this.country&&localizationStore.selectedCountryCode){this.country=localizationStore.selectedCountryCode}
364
364
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
365
- return h(Host,{key:"b4e39a6e92e646f98c0061bf3de8e028c9285556",class:classes(["zonos--address zonos--elements","zonos--".concat(this.type,"-address")])},h("zonos-text",{key:"28d21737c78a1b8125c5170c67f214e3f39939ff",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("slot",{key:"97357f001b27197b8648d6158b786b153c31a7ba",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),this.renderCustomAddressForm())};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checkoutSessionId:[{isAddressFilledChanged:0}],isAddressFilled:[{isAddressFilledChanged:0}],defaultAddress:[{defaultAddressChanged:0}],line1:[{line1Changed:0}],city:[{formFieldsChanged:0}],country:[{formFieldsChanged:0},{countryChanged:0}],firstName:[{formFieldsChanged:0}],lastName:[{formFieldsChanged:0}],line2:[{formFieldsChanged:0}],phone:[{formFieldsChanged:0}],postalCode:[{formFieldsChanged:0}],state:[{formFieldsChanged:0}],addressService:[{shouldEnabledCustomAddressChanged:0}]}},enumerable:false,configurable:true});return e}();ZonosAddress.style=zonosCustomAddressCss();
365
+ return h(Host,{key:"9d178094ee341623633d1e3822bd79f254a27e51",class:classes(["zonos--address zonos--elements","zonos--".concat(this.type,"-address")])},h("zonos-text",{key:"c36b4ce9b63cce95664894fd8929ffe15807a22a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("slot",{key:"661eab7074f99b6dca52d5f7f546cfbd29322fbf",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),this.renderCustomAddressForm())};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checkoutSessionId:[{isAddressFilledChanged:0}],isAddressFilled:[{isAddressFilledChanged:0}],defaultAddress:[{defaultAddressChanged:0}],line1:[{line1Changed:0}],city:[{formFieldsChanged:0}],country:[{formFieldsChanged:0},{countryChanged:0}],firstName:[{formFieldsChanged:0}],lastName:[{formFieldsChanged:0}],line2:[{formFieldsChanged:0}],phone:[{formFieldsChanged:0}],postalCode:[{formFieldsChanged:0}],state:[{formFieldsChanged:0}],addressService:[{shouldEnabledCustomAddressChanged:0}]}},enumerable:false,configurable:true});return e}();ZonosAddress.style=zonosCustomAddressCss();
366
366
  // This file is a workaround for a bug in web browsers' "native"
367
367
  // ES6 importing system which is uncapable of importing "*.json" files.
368
368
  // https://github.com/catamphetamine/libphonenumber-js/issues/239
@@ -1,4 +1,4 @@
1
- import{r as registerInstance,h,a as Host,d as createEvent}from"./index-_lt63o7c.js";import{t as translate,l as localizationStore}from"./localization-AOqYXGdP.js";import{i as isTextContainsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{c as classes}from"./classes-BJHSB96f.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import"./handleFetch-D5GYDF-O.js";import"./VarianceTest-BJmZPrZl.js";var zonosAddressDisplayCss=function(){return':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}'};var ZonosAddressDisplay=/** @class */function(){function o(o){registerInstance(this,o)}o.prototype.render=function(){var o,s;var e=this.currentAddress,t=e.city,n=e.country,i=e.email,a=e.line1,l=e.line2,r=e.name,d=e.phone,c=e.postal_code,f=e.state;
1
+ import{r as registerInstance,h,a as Host,d as createEvent}from"./index-_lt63o7c.js";import{t as translate,l as localizationStore}from"./localization-Bs6hVcKV.js";import{i as isTextContainsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{c as classes}from"./classes-BJHSB96f.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import"./handleFetch-D5GYDF-O.js";import"./VarianceTest-BJmZPrZl.js";var zonosAddressDisplayCss=function(){return':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}'};var ZonosAddressDisplay=/** @class */function(){function o(o){registerInstance(this,o)}o.prototype.render=function(){var o,s;var e=this.currentAddress,t=e.city,n=e.country,i=e.email,a=e.line1,l=e.line2,r=e.name,d=e.phone,c=e.postal_code,f=e.state;
2
2
  /**
3
3
  * Look the country up in the full country list first, since a billing
4
4
  * address can be in a country the merchant does not ship to and would
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,o,n){function s(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function r(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n["throw"](t))}catch(t){i(t)}}function l(t){t.done?o(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;s=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,o){if(o||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return t.concat(i||Array.prototype.slice.call(e))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as throttle}from"./throttle-D5GyA3yr.js";import{U as extractName,w as stripeStorePrefetchLandedCost,b as stripeStore,t as trackConversionEvent,J as stripeStoreOnChange,d as cartStore}from"./cart-ekBk_gxV.js";import{s as storageStore,l as localizationStore,B as getFallbackDefaultCountryCode,t as translate,y as storageStoreOnChange}from"./localization-AOqYXGdP.js";import{z as zonosStore,g as getZonosStoreTheme,a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{l as logError,i as isCheckoutMobile,s as sendErrorLog}from"./handleFetch-D5GYDF-O.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{c as classes}from"./classes-BJHSB96f.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-Cye-evFK.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import"./debounce-D4ko2kvZ.js";import"./isDarkColor-YdrG78th.js";import"./ShortAddressCode-nJ6oI8-n.js";
1
+ var __awaiter=this&&this.__awaiter||function(t,e,o,n){function s(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function r(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n["throw"](t))}catch(t){i(t)}}function l(t){t.done?o(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;s=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,o){if(o||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return t.concat(i||Array.prototype.slice.call(e))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as throttle}from"./throttle-D5GyA3yr.js";import{U as extractName,w as stripeStorePrefetchLandedCost,b as stripeStore,t as trackConversionEvent,J as stripeStoreOnChange,d as cartStore}from"./cart-BDc4RTBJ.js";import{s as storageStore,l as localizationStore,C as getFallbackDefaultCountryCode,t as translate,z as storageStoreOnChange}from"./localization-Bs6hVcKV.js";import{z as zonosStore,g as getZonosStoreTheme,a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{l as logError,i as isCheckoutMobile,s as sendErrorLog}from"./handleFetch-D5GYDF-O.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{c as classes}from"./classes-BJHSB96f.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-Cye-evFK.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import"./debounce-D4ko2kvZ.js";import"./isDarkColor-YdrG78th.js";import"./ShortAddressCode-nJ6oI8-n.js";
2
2
  /**
3
3
  * Map a Stripe address change event value into a Stripe `ContactOption`, used to
4
4
  * pre-seed the address element's saved-address (contacts) list on remount.
@@ -100,7 +100,7 @@ try{this.storeUnsubscribeList.forEach((function(t){return t()}))}catch(t){}};t.p
100
100
  // @Watch doesn't get trigger on initial load
101
101
  void this.watchInitStripe();this.checkoutSessionId=storageStore.checkoutSessionId;this.storeUnsubscribeList=[storageStoreOnChange("checkoutSessionId",(function(){t.checkoutSessionId=storageStore.checkoutSessionId})),stripeStoreOnChange("stripeElements",(function(){if(t.type==="shipping"){void t.watchInitStripe()}})),stripeStoreOnChange("stripeElementsForBillingAddress",(function(){if(t.type==="billing"){void t.watchInitStripe()}}))]};t.prototype.render=function(){var t;this.checkoutSessionId=storageStore.checkoutSessionId;if((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.complete){this.isAddressFilled=true}
102
102
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
103
- return h(Host,{key:"9b7a5340b839d63c64da03639bdfda5a11a5c25e",class:classes(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&h("zonos-text",{key:"23739f6a48e5698372df2d53098dea6ad1c0559a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("slot",{key:"dea4b437eedaad2af2f6bbe3a1e2ae4f0706aa13",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),h("div",{key:"b4be684977a632371b9b6ff4587ccdd7bacc8c67",class:"zonos--address-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{checkoutSessionId:[{isAddressFilledChanged:0}],isAddressFilled:[{isAddressFilledChanged:0}],stripe:[{watchInitStripe:0}],defaultAddress:[{defaultAddressChanged:0}]}},enumerable:false,configurable:true});return t}();ZonosAddress.style=zonosAddressCss();var ExclamationMarkDuotoneIcon='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var HelpDuotoneIcon='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var WarningDuotoneIcon='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var zonosConfirmDialogCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}"};var ZonosConfirmDialog=/** @class */function(){function t(t){var e=this;registerInstance(this,t);this.confirmClicked=createEvent(this,"confirmClicked",7);this.cancelClicked=createEvent(this,"cancelClicked",7);
103
+ return h(Host,{key:"302dafde973c4bf2d847640d8f0e064d88f350f8",class:classes(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&h("zonos-text",{key:"706204604ad32eed710e38adbe8133b3384044eb",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("slot",{key:"0edc4c5d6c3ff965be6edbf680acaed892c71a16",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),h("div",{key:"6aa6e4e86a76f1081c5af1f2b5f3282dfd91f3c5",class:"zonos--address-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{checkoutSessionId:[{isAddressFilledChanged:0}],isAddressFilled:[{isAddressFilledChanged:0}],stripe:[{watchInitStripe:0}],defaultAddress:[{defaultAddressChanged:0}]}},enumerable:false,configurable:true});return t}();ZonosAddress.style=zonosAddressCss();var ExclamationMarkDuotoneIcon='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var HelpDuotoneIcon='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var WarningDuotoneIcon='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var zonosConfirmDialogCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}"};var ZonosConfirmDialog=/** @class */function(){function t(t){var e=this;registerInstance(this,t);this.confirmClicked=createEvent(this,"confirmClicked",7);this.cancelClicked=createEvent(this,"cancelClicked",7);
104
104
  /**
105
105
  * Dialog title text
106
106
  * @default "Are you sure?"
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,a,n){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n["throw"](e))}catch(e){o(e)}}function s(e){e.done?a(e.value):r(e.value).then(i,l)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,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(t){return s([e,t])}}function s(l){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(a=0)),a)try{if(n=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;r=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(l[0]===6&&a.label<o[1]){a.label=o[1];o=l;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(l);break}if(o[2])a.ops.pop();a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e];r=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{b as airwallexStore,c as collectStore,f as airwallexStoreInitSdk,l as createElement,m as airwallexStoreGetLocale,n as airwallexStoreOnChange}from"./collect-33rMINDo.js";import{d as cartStore}from"./cart-ekBk_gxV.js";import{e as localizationStoreOnChange,t as translate,l as localizationStore}from"./localization-AOqYXGdP.js";import{z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{l as logError}from"./handleFetch-D5GYDF-O.js";import"./isDarkColor-YdrG78th.js";import"./getBorderRadius-HwG64EKM.js";import"./TaxId-Cye-evFK.js";var zonosAirwallexPaymentCss=function(){return".sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}"};var ZonosAirwallexPayment=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.airwallexPaymentSuccess=createEvent(this,"airwallexPaymentSuccess",7);this.airwallexPaymentError=createEvent(this,"airwallexPaymentError",7);this.element=null;this.storeUnsubscribeList=[];
1
+ var __awaiter=this&&this.__awaiter||function(e,t,a,n){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n["throw"](e))}catch(e){o(e)}}function s(e){e.done?a(e.value):r(e.value).then(i,l)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,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(t){return s([e,t])}}function s(l){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(a=0)),a)try{if(n=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;r=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(l[0]===6&&a.label<o[1]){a.label=o[1];o=l;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(l);break}if(o[2])a.ops.pop();a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e];r=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{b as airwallexStore,c as collectStore,f as airwallexStoreInitSdk,l as createElement,m as airwallexStoreGetLocale,n as airwallexStoreOnChange}from"./collect-NRCK3t-M.js";import{d as cartStore}from"./cart-BDc4RTBJ.js";import{h as localizationStoreOnChange,t as translate,l as localizationStore}from"./localization-Bs6hVcKV.js";import{z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{l as logError}from"./handleFetch-D5GYDF-O.js";import"./isDarkColor-YdrG78th.js";import"./getBorderRadius-HwG64EKM.js";import"./TaxId-Cye-evFK.js";var zonosAirwallexPaymentCss=function(){return".sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}"};var ZonosAirwallexPayment=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.airwallexPaymentSuccess=createEvent(this,"airwallexPaymentSuccess",7);this.airwallexPaymentError=createEvent(this,"airwallexPaymentError",7);this.element=null;this.storeUnsubscribeList=[];
2
2
  /** Client secret currently being mounted, to avoid overlapping mounts. */this.mountingClientSecret=null;
3
3
  /**
4
4
  * Whether the SDK failed to load or the element failed to mount.