@zonos/elements 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/dist/cjs/_isBigCommerceNativeCheckout-3-xbKbAO.js +133 -0
  2. package/dist/cjs/{cart-BJpqPdFU.js → cart-C39TMSgB.js} +14 -0
  3. package/dist/cjs/{collect-CyUttsvB.js → collect-lF9DenLk.js} +2 -2
  4. package/dist/cjs/{getMissingRequiredShippingFields-DEbNbRAZ.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
  5. package/dist/cjs/index.cjs.js +61 -42
  6. package/dist/cjs/{invoice-DzRkkpLu.js → invoice-BD3pCr8P.js} +1 -1
  7. package/dist/cjs/{paypal-DCSqbdjW.js → paypal-Bd1qmwiv.js} +1 -1
  8. package/dist/cjs/{placeTestOrder-Bkip4PUT.js → placeTestOrder-BMQRvX2q.js} +1 -1
  9. package/dist/cjs/{renderCheckoutCurrency-BDvEZ3Hv.js → renderCheckoutCurrency-DE2p8CT8.js} +1 -1
  10. package/dist/cjs/{taxIdFields-e4OCgr8K.js → taxIdFields-BKbk2bhi.js} +1 -1
  11. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +4 -4
  12. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-card_5.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +5 -5
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +41 -15
  17. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +1 -1
  18. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +5 -5
  19. package/dist/cjs/zonos-collect.cjs.entry.js +3 -3
  20. package/dist/cjs/zonos-controller.cjs.entry.js +63 -38
  21. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +3 -3
  22. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +5 -5
  23. package/dist/cjs/zonos-invoice.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +2 -2
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +10 -1
  26. package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
  27. package/dist/collection/components/main/zonos-controller.js +24 -9
  28. package/dist/collection/components/store/checkout/stripe.js +13 -1
  29. package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
  30. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
  31. package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
  32. package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
  33. package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
  34. package/dist/collection/scripts/_loadStripe.js +15 -4
  35. package/dist/collection/scripts/_zonosBase.js +40 -31
  36. package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
  37. package/dist/esm/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +14 -2
  38. package/dist/esm/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +3 -3
  39. package/dist/esm/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
  40. package/dist/esm/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
  41. package/dist/esm/index.js +61 -42
  42. package/dist/esm/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +2 -2
  43. package/dist/esm/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
  44. package/dist/esm/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +2 -2
  45. package/dist/esm/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +2 -2
  46. package/dist/esm/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
  47. package/dist/esm/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
  48. package/dist/esm/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
  49. package/dist/esm/zonos-address-completion-dialog_7.entry.js +5 -5
  50. package/dist/esm/zonos-address-display_2.entry.js +1 -1
  51. package/dist/esm/zonos-address_4.entry.js +3 -3
  52. package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
  53. package/dist/esm/zonos-card_5.entry.js +3 -3
  54. package/dist/esm/zonos-cart-items_12.entry.js +8 -8
  55. package/dist/esm/zonos-checkout.entry.js +42 -16
  56. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  57. package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
  58. package/dist/esm/zonos-collect.entry.js +4 -4
  59. package/dist/esm/zonos-controller.entry.js +63 -38
  60. package/dist/esm/zonos-country-flag.entry.js +1 -1
  61. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  62. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  63. package/dist/esm/zonos-hello.entry.js +1 -1
  64. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  65. package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
  66. package/dist/esm/zonos-invoice.entry.js +4 -4
  67. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  68. package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
  69. package/dist/esm-es5/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
  70. package/dist/esm-es5/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +9 -9
  71. package/dist/esm-es5/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +2 -2
  72. package/dist/esm-es5/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
  73. package/dist/esm-es5/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
  74. package/dist/esm-es5/index.js +76 -65
  75. package/dist/esm-es5/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +1 -1
  76. package/dist/esm-es5/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
  77. package/dist/esm-es5/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +1 -1
  78. package/dist/esm-es5/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +1 -1
  79. package/dist/esm-es5/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +4 -4
  80. package/dist/esm-es5/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
  81. package/dist/esm-es5/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
  82. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2 -2
  83. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  84. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  85. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  86. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  87. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  88. package/dist/esm-es5/zonos-checkout.entry.js +20 -9
  89. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  90. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  91. package/dist/esm-es5/zonos-collect.entry.js +6 -6
  92. package/dist/esm-es5/zonos-controller.entry.js +22 -13
  93. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  94. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  95. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  96. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  97. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  98. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  99. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  100. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  101. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  102. package/dist/scripts/index.d.ts +16 -0
  103. package/dist/scripts/index.js +1 -1
  104. package/dist/scripts/loadZonos.js +1 -1
  105. package/dist/scripts/zonos.js +1 -1
  106. package/dist/types/components/main/mountCheckoutWithoutStripe.d.ts +8 -0
  107. package/dist/types/components/store/checkout/stripe.d.ts +4 -1
  108. package/dist/types/scripts/_bigcommerceCheckoutPath.d.ts +12 -0
  109. package/dist/types/scripts/_detectBigCommerceHost.d.ts +5 -0
  110. package/dist/types/scripts/_isBigCommerceNativeCheckout.d.ts +21 -0
  111. package/dist/types/scripts/_zonosBase.d.ts +16 -0
  112. package/dist/zonos-elements/index.esm.js +1 -1
  113. package/dist/zonos-elements/{p-08b01c96.entry.js → p-02faff47.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-573a4e7c.system.entry.js → p-0c68cbbb.system.entry.js} +6 -6
  115. package/dist/zonos-elements/{p-68325c5a.system.entry.js → p-1cd2d097.system.entry.js} +4 -4
  116. package/dist/zonos-elements/{p-af741506.entry.js → p-255e411a.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-dJcbnNlE.system.js → p-2c_UqKJL.system.js} +2 -2
  118. package/dist/zonos-elements/{p-BUfCTQXY.system.js → p-3AUMK-5E.system.js} +113 -113
  119. package/dist/zonos-elements/{p-dd003161.entry.js → p-3ee87d8b.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-8f9f859f.system.entry.js → p-42fa5694.system.entry.js} +5 -5
  121. package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
  122. package/dist/zonos-elements/{p-ebc7ea54.system.entry.js → p-4ce4c49f.system.entry.js} +1 -1
  123. package/dist/zonos-elements/{p-9b3668a4.system.entry.js → p-5622fc50.system.entry.js} +263 -252
  124. package/dist/zonos-elements/{p-3a506614.system.entry.js → p-59457fd9.system.entry.js} +71 -62
  125. package/dist/zonos-elements/{p-7fe83919.entry.js → p-66398133.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-9df31243.system.entry.js → p-674323ac.system.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-97729873.entry.js → p-71d9a5b7.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-30bf4700.system.entry.js → p-81780f8f.system.entry.js} +2 -2
  129. package/dist/zonos-elements/{p-1986cc37.entry.js → p-821b83a2.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-5a296dbc.system.entry.js → p-877a82d2.system.entry.js} +61 -61
  131. package/dist/zonos-elements/p-8daec112.entry.js +1 -0
  132. package/dist/zonos-elements/{p-150047b3.system.entry.js → p-93bc75fd.system.entry.js} +19 -19
  133. package/dist/zonos-elements/{p-b540c636.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
  134. package/dist/zonos-elements/{p-4b65f192.entry.js → p-9a4947a5.entry.js} +1 -1
  135. package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
  136. package/dist/zonos-elements/{p-D4xpkSsK.js → p-BIJM2Kj-.js} +1 -1
  137. package/dist/zonos-elements/{p-D-Lnf8mS.system.js → p-BOh4ifdL.system.js} +2 -2
  138. package/dist/zonos-elements/p-BZAX-HmS.js +1 -0
  139. package/dist/zonos-elements/p-Bb90IMVt.js +1 -0
  140. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  141. package/dist/zonos-elements/{p-DC1OPJDq.system.js → p-BvoPE_nb.system.js} +1 -1
  142. package/dist/zonos-elements/{p-C5fs3rIR.js → p-C3E55OqH.js} +1 -1
  143. package/dist/zonos-elements/{p-BnQyot7Y.system.js → p-C3gF3UV5.system.js} +29 -29
  144. package/dist/zonos-elements/{p-BKUlQxBd.system.js → p-CD2ahEZn.system.js} +1 -1
  145. package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
  146. package/dist/zonos-elements/{p-Cp1IAJvW.system.js → p-CEV0O_IQ.system.js} +4 -4
  147. package/dist/zonos-elements/{p-yv7ekcdG.system.js → p-CZ-uYiCo.system.js} +2 -2
  148. package/dist/zonos-elements/{p-CP7KnfR3.system.js → p-Cn2xE-9t.system.js} +79 -68
  149. package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
  150. package/dist/zonos-elements/{p-Dv5a-V6w.system.js → p-Cw_Qnyow.system.js} +1 -1
  151. package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
  152. package/dist/zonos-elements/{p-CVRbGFV3.js → p-D9OPKqLg.js} +1 -1
  153. package/dist/zonos-elements/{p-DrbN3rPL.js → p-Df62LRNs.js} +2 -2
  154. package/dist/zonos-elements/{p-DKnphvmJ.js → p-Lsqrpzc5.js} +1 -1
  155. package/dist/zonos-elements/{p-DrS-0mk7.system.js → p-YQFbWtjn.system.js} +1 -1
  156. package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
  157. package/dist/zonos-elements/{p-bb1b414a.system.entry.js → p-a6bb296c.system.entry.js} +6 -6
  158. package/dist/zonos-elements/{p-13015d34.system.entry.js → p-abb85879.system.entry.js} +3 -3
  159. package/dist/zonos-elements/{p-383343c7.entry.js → p-b8653024.entry.js} +1 -1
  160. package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
  161. package/dist/zonos-elements/{p-96b250d8.system.entry.js → p-be067e12.system.entry.js} +2 -2
  162. package/dist/zonos-elements/{p-Cl5yV0ak.js → p-bmrOH9oh.js} +1 -1
  163. package/dist/zonos-elements/{p-71d29603.entry.js → p-c185bc23.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-13d5b2f9.entry.js → p-c6e78de2.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-a3c147d2.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
  166. package/dist/zonos-elements/{p-0909ef77.entry.js → p-cbb96382.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-6db7317a.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
  168. package/dist/zonos-elements/{p-e43470f7.system.entry.js → p-df240119.system.entry.js} +17 -17
  169. package/dist/zonos-elements/{p-f2ed52bc.system.entry.js → p-e16e4db6.system.entry.js} +15 -15
  170. package/dist/zonos-elements/{p-7214c953.system.entry.js → p-eb016dd8.system.entry.js} +16 -16
  171. package/dist/zonos-elements/{p-709d1561.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-e374aaa4.entry.js → p-ed8a7a7f.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-3466bcba.entry.js → p-ef932fda.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-bfa9e32a.entry.js → p-f792ba5f.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-aK18R41t.js → p-fZcKMzE-.js} +1 -1
  176. package/dist/zonos-elements/{p-C-zdj7MK.js → p-fdritVtG.js} +1 -1
  177. package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
  178. package/dist/zonos-elements/{p-CMneHjck.system.js → p-v8IEjQ2z.system.js} +10 -10
  179. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  180. package/package.json +10 -10
  181. package/dist/zonos-elements/p-43c0ebe9.entry.js +0 -1
  182. package/dist/zonos-elements/p-8ac26831.entry.js +0 -1
  183. package/dist/zonos-elements/p-BI6VAB5B.js +0 -1
  184. package/dist/zonos-elements/p-BJ_kE5rM.js +0 -1
  185. package/dist/zonos-elements/p-DATNIakn.js +0 -1
  186. package/dist/zonos-elements/p-af4ad54b.entry.js +0 -1
  187. package/dist/zonos-elements/p-bac94956.entry.js +0 -1
  188. package/dist/zonos-elements/p-cf6bf7a4.entry.js +0 -1
  189. package/dist/zonos-elements/p-db40b9c3.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, a as Host, d as createEvent } from './index-_lt63o7c.js';
2
- import { t as translate, l as localizationStore } from './localization-CXHiWcJp.js';
2
+ import { t as translate, l as localizationStore } from './localization-B5CRzthT.js';
3
3
  import { i as isTextContainsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
4
4
  import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
5
5
  import { c as classes } from './classes-BJHSB96f.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { t as throttle, r as renderTaxIdFields } from './taxIdFields-BUKnHMaL.js';
3
- import { U as extractName, w as stripeStorePrefetchLandedCost, b as stripeStore, t as trackConversionEvent, J as stripeStoreOnChange, d as cartStore } from './cart-BS5mSI8x.js';
4
- import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-CXHiWcJp.js';
2
+ import { t as throttle, r as renderTaxIdFields } from './taxIdFields-BCyXnc9O.js';
3
+ import { W as extractName, y as stripeStorePrefetchLandedCost, e as stripeStore, u as trackConversionEvent, L as stripeStoreOnChange, h as cartStore } from './cart-b84n0nhi.js';
4
+ import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-B5CRzthT.js';
5
5
  import { e as getShouldRequirePeruTaxId, z as zonosStore, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
6
6
  import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-BFVO7oAR.js';
7
7
  import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-B9ZxDDl7.js';
3
- import { d as cartStore } from './cart-BS5mSI8x.js';
4
- import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-CXHiWcJp.js';
2
+ import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-B_AEVONL.js';
3
+ import { h as cartStore } from './cart-b84n0nhi.js';
4
+ import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-B5CRzthT.js';
5
5
  import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
6
6
  import { l as log } from './VarianceTest-BJmZPrZl.js';
7
7
  import { l as logError } from './handleFetch-BFVO7oAR.js';
@@ -2,10 +2,10 @@ import { r as registerInstance, h, a as Host, g as getElement, d as createEvent
2
2
  import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
3
3
  import { c as classes } from './classes-BJHSB96f.js';
4
4
  import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
5
- import { b as stripeStore, t as trackConversionEvent } from './cart-BS5mSI8x.js';
6
- import { s as storageStore } from './localization-CXHiWcJp.js';
5
+ import { e as stripeStore, u as trackConversionEvent } from './cart-b84n0nhi.js';
6
+ import { s as storageStore } from './localization-B5CRzthT.js';
7
7
  import { l as logError } from './handleFetch-BFVO7oAR.js';
8
- import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-BE_NVBoy.js';
8
+ import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-CF_oM0B6.js';
9
9
  import { l as log } from './VarianceTest-BJmZPrZl.js';
10
10
  import './taxIdRules-xYlx7ZXW.js';
11
11
  import './TaxId-DMIgN_sT.js';
@@ -1,24 +1,24 @@
1
1
  import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-_lt63o7c.js';
2
- import { d as cartStore, L as cartStoreHasOneEligibleItem, M as isEuDapRemittance, m as cartStoreIsOrderModificationPaymentOnlySession, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, b as stripeStore, H as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, R as storeCreditStore, S as storeCreditStoreReset, B as storeCreditStoreCoversFullAmount, y as isPolicyConsentRequired, G as policyConsentStore, T as stripeStoreRecordPolicyConsent, x as cartStoreNextStep, U as extractName, V as resolveTaxIdSelection, W as stripeStoreTranslateAddressToLatin, I as cartStoreOnChange, X as getCountryField, Y as stripeStoreAsyncAddressUpdate, Z as cartStoreUpdateSelectedShippingOption, _ as cartStoreGetShippingTransitInfo, $ as cartStoreGetMethod, a0 as sortServiceLevelOptionsByAmount } from './cart-BS5mSI8x.js';
3
- import { t as translate, l as localizationStore, s as storageStore, k as languages, w as getExchangeRate, x as numberFormat, h as localizationStoreOnChange } from './localization-CXHiWcJp.js';
4
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-KMa4HlAf.js';
2
+ import { h as cartStore, N as cartStoreHasOneEligibleItem, O as isEuDapRemittance, q as cartStoreIsOrderModificationPaymentOnlySession, P as stripeStoreApplyPromoCode, Q as stripeStoreRemovePromoCode, e as stripeStore, J as stripeStoreReset, f as stripeStoreRetrievePayment, u as trackConversionEvent, R as stripeStoreResetPromoCode, S as stripeStoreMessageBasedOnStatus, T as storeCreditStore, U as storeCreditStoreReset, D as storeCreditStoreCoversFullAmount, A as isPolicyConsentRequired, I as policyConsentStore, V as stripeStoreRecordPolicyConsent, z as cartStoreNextStep, W as extractName, X as resolveTaxIdSelection, Y as stripeStoreTranslateAddressToLatin, K as cartStoreOnChange, Z as getCountryField, _ as stripeStoreAsyncAddressUpdate, $ as cartStoreUpdateSelectedShippingOption, a0 as cartStoreGetShippingTransitInfo, a1 as cartStoreGetMethod, a2 as sortServiceLevelOptionsByAmount } from './cart-b84n0nhi.js';
3
+ import { t as translate, l as localizationStore, s as storageStore, k as languages, w as getExchangeRate, x as numberFormat, h as localizationStoreOnChange } from './localization-B5CRzthT.js';
4
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-CpeuDWx-.js';
5
5
  import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.js';
6
6
  import { c as classes } from './classes-BJHSB96f.js';
7
7
  import { z as zonosStore, c as createStore, d as zonosStoreOnChange, g as getZonosStoreTheme, e as getShouldRequirePeruTaxId, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
8
- import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-zSvDReDb.js';
8
+ import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-DfEiyzw7.js';
9
9
  import { i as isSameHostCheckoutLink } from './isSameHostCheckoutLink-BxAHnL5J.js';
10
- import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-BE_NVBoy.js';
10
+ import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-CF_oM0B6.js';
11
11
  import { h as handleFetch, s as sendErrorLog, j as jsonParse, c as safeGetItem, e as safeSetItem, b as safeRemoveItem, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode, l as logError } from './handleFetch-BFVO7oAR.js';
12
12
  import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
13
13
  import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
14
14
  import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
15
- import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-BI_ApEsQ.js';
16
- import { p as placeTestOrder } from './placeTestOrder-BXA9K9Iy.js';
15
+ import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CJinx9-m.js';
16
+ import { p as placeTestOrder } from './placeTestOrder-BTpfyqPL.js';
17
17
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
18
18
  import { g as getContrastColor } from './getContrastColor-CfCPlW9U.js';
19
19
  import { i as isColorVariable } from './isColorVariable-DXXUq2Lv.js';
20
20
  import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-C9bMKTjz.js';
21
- import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-BkEV865q.js';
21
+ import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-EY10c34-.js';
22
22
  import { c as containsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
23
23
  import { s as shouldRenderShortAddressCodeInput } from './shouldRenderShortAddressCodeInput-Bc8k2vN0.js';
24
24
  import { b as isPeruTaxIdActive, a as isPeruTaxIdType, s as stripTaxIdSeparators, p as peruTaxIdTypeFromValue, r as rfcRegex, c as curpRegex } from './taxIdRules-xYlx7ZXW.js';
@@ -1,13 +1,14 @@
1
1
  import { r as registerInstance, h, F as Fragment, a as Host } from './index-_lt63o7c.js';
2
- import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, g as getCheckoutSession, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, p as policyConsentStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreIsOrderModificationPaymentOnlySession, n as stripeStoreHandleInventoryCheck, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, q as getCheckoutSessionBody, r as cartStoreUpdateToErrorState, u as stripeStoreCleanupDomesticShippingSession, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as isPolicyConsentRequired, z as stripeStoreUpdateCheckoutSessionBaseCurrency, A as storeCreditStoreApplyCredit, B as storeCreditStoreCoversFullAmount, C as validateCheckoutSession, D as storeCreditStoreCreateOrder, E as stripeStoreConfirmPayment, F as stripeStoreHandleInventoryRefund, G as policyConsentStore, H as stripeStoreReset, I as cartStoreOnChange, J as stripeStoreOnChange, K as storeCreditStoreGetEffectiveAmount } from './cart-BS5mSI8x.js';
3
- import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-BE_NVBoy.js';
4
- import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as isCountryInShippingZone, d as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, e as storageStoreSetEnabledVariantTestKeys, t as translate, h as localizationStoreOnChange, j as currencyFormat } from './localization-CXHiWcJp.js';
2
+ import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreHasDomesticSessionRedirectMarker, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreMarkDomesticSessionRedirected, d as stripeStoreSaveDomesticShippingSession, e as stripeStore, i as initStripeElements, f as stripeStoreRetrievePayment, g as getCheckoutSession, h as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, p as policyConsentStoreReset, l as cartStoreResetTabItems, m as cartStoreClearCheckoutInterval, n as stripeStoreInitCheckoutSession, o as stripeStoreGetPaymentIntent, q as cartStoreIsOrderModificationPaymentOnlySession, r as stripeStoreHandleInventoryCheck, t as cartStoreStartCheckoutInterval, u as trackConversionEvent, v as getCheckoutSessionBody, w as cartStoreUpdateToErrorState, x as cartStoreSetCheckoutSession, y as stripeStorePrefetchLandedCost, z as cartStoreNextStep, A as isPolicyConsentRequired, B as stripeStoreUpdateCheckoutSessionBaseCurrency, C as storeCreditStoreApplyCredit, D as storeCreditStoreCoversFullAmount, E as validateCheckoutSession, F as storeCreditStoreCreateOrder, G as stripeStoreConfirmPayment, H as stripeStoreHandleInventoryRefund, I as policyConsentStore, J as stripeStoreReset, K as cartStoreOnChange, L as stripeStoreOnChange, M as storeCreditStoreGetEffectiveAmount } from './cart-b84n0nhi.js';
3
+ import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-CF_oM0B6.js';
4
+ import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as isCountryInShippingZone, d as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, e as storageStoreSetEnabledVariantTestKeys, t as translate, h as localizationStoreOnChange, j as currencyFormat } from './localization-B5CRzthT.js';
5
5
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-BXP9FvIt.js';
6
6
  import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
7
7
  import { h as handleFetch, g as getIsTestMode, j as jsonParse, l as logError, d as getAdditionalLogMetadata, c as safeGetItem, b as safeRemoveItem, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-BFVO7oAR.js';
8
8
  import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-C9bMKTjz.js';
9
9
  import { l as log, g as getElapsedTime, b as allLogs } from './VarianceTest-BJmZPrZl.js';
10
10
  import { _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector, a as checkoutHiddenInternationalBtnSelector, g as getAbandonedCartRenewTokenValue } from './CheckoutConfig-D5SpFsQJ.js';
11
+ import { p as pathContainsCheckout, i as isBigCommerceNativeCheckout } from './_isBigCommerceNativeCheckout-Bb90IMVt.js';
11
12
  import { c as classes } from './classes-BJHSB96f.js';
12
13
  import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
13
14
  import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
@@ -721,7 +722,7 @@ const ZBYPASS_ON_VALUES = ['1', 'true', 'yes'];
721
722
  */
722
723
  let consumedZBypassQuery = null;
723
724
  const isCheckoutPage = () => {
724
- return window.location.pathname.includes('/checkout');
725
+ return pathContainsCheckout(window.location.pathname);
725
726
  };
726
727
  const isAcceptedZBypassQuery = (rawValue) => {
727
728
  if (rawValue === null) {
@@ -886,7 +887,7 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
886
887
  // Only the native checkout page skips address detection. Storefront pages
887
888
  // still run the domestic-session handoff below, and they do not consume
888
889
  // a `zBypass` query, so the parameter can survive until `/checkout`.
889
- if (window.location.pathname.includes('/checkout') &&
890
+ if (pathContainsCheckout(window.location.pathname) &&
890
891
  isBigCommerceCheckoutBypassEnabled()) {
891
892
  return;
892
893
  }
@@ -1139,17 +1140,35 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
1139
1140
  const shippingAddressSession = stripeStoreGetDomesticShippingSession();
1140
1141
  // append a hidden button to the body if the shipping address session is found
1141
1142
  if (!domesticRedirectedButton && shippingAddressSession) {
1142
- // create a hidden button to trigger the click event
1143
- const button = document.createElement('button');
1144
- button.style.display = 'none';
1145
- button.id = 'zonos--domestic-redirected-checkout-button';
1146
- document.body.appendChild(button);
1147
- onShippingAddressSessionFound === null || onShippingAddressSessionFound === void 0 ? void 0 : onShippingAddressSessionFound(shippingAddressSession);
1148
- // disconnect the observer after we found the shipping continue button
1149
- observer.disconnect();
1150
- return;
1143
+ // Stripe.js is not loaded on native checkout, so nothing here can click
1144
+ // a hidden button or clear this session. Send the shopper to `/` once.
1145
+ // Saving or clearing the session drops that hop marker, so a later
1146
+ // leftover session still gets its own redirect. If they come back and
1147
+ // the session is still set, drop it and keep watching the address.
1148
+ if (isBigCommerceNativeCheckout()) {
1149
+ if (stripeStoreHasDomesticSessionRedirectMarker()) {
1150
+ stripeStoreCleanupDomesticShippingSession();
1151
+ }
1152
+ else {
1153
+ stripeStoreMarkDomesticSessionRedirected();
1154
+ observer.disconnect();
1155
+ window.location.href = buildBigcommerceRedirectUrl('/');
1156
+ return;
1157
+ }
1158
+ }
1159
+ else {
1160
+ // create a hidden button to trigger the click event
1161
+ const button = document.createElement('button');
1162
+ button.style.display = 'none';
1163
+ button.id = 'zonos--domestic-redirected-checkout-button';
1164
+ document.body.appendChild(button);
1165
+ onShippingAddressSessionFound === null || onShippingAddressSessionFound === void 0 ? void 0 : onShippingAddressSessionFound(shippingAddressSession);
1166
+ // disconnect the observer after we found the shipping continue button
1167
+ observer.disconnect();
1168
+ return;
1169
+ }
1151
1170
  }
1152
- const isBigcommerceDomesticCheckoutPage = window.location.pathname.includes('/checkout') &&
1171
+ const isBigcommerceDomesticCheckoutPage = pathContainsCheckout(window.location.pathname) &&
1153
1172
  window.Zonos.isBigCommerce;
1154
1173
  // Should just disconnect the observer if it's not bigcommerce domestic checkout page
1155
1174
  if (!isBigcommerceDomesticCheckoutPage) {
@@ -2701,6 +2720,13 @@ const ZonosCheckout = class {
2701
2720
  if (window.Zonos) {
2702
2721
  this.useLegacyQueryParams();
2703
2722
  }
2723
+ // Native BigCommerce checkout never loads Stripe.js. The address watcher
2724
+ // above still has to run. Skip the poll so checkout does not wait 10s
2725
+ // for a Stripe instance that will not arrive, and so attachCheckout
2726
+ // cannot bind the store's place-order buttons.
2727
+ if (isBigCommerceNativeCheckout()) {
2728
+ return;
2729
+ }
2704
2730
  // only initialize checkout if visitor's country is in the shipping zones.
2705
2731
  const interval = setInterval(() => {
2706
2732
  stripeStore.stripe = window.Zonos.stripe;
@@ -3228,7 +3254,7 @@ const ZonosCheckout = class {
3228
3254
  return;
3229
3255
  }
3230
3256
  // Check if the page is checkout page, if so, do nothing since they're already at the right page
3231
- if (window.location.pathname.includes('/checkout')) {
3257
+ if (pathContainsCheckout(window.location.pathname)) {
3232
3258
  return;
3233
3259
  }
3234
3260
  const shippingCountry = addressEventData.value.address.country;
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, e as getAssetPath, h, a as Host } from './index-_lt63o7c.js';
2
- import { d as cartStore } from './cart-BS5mSI8x.js';
2
+ import { h as cartStore } from './cart-b84n0nhi.js';
3
3
  import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.js';
4
4
  import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
5
5
  import { c as classes } from './classes-BJHSB96f.js';
6
6
  import { s as styles } from './styles-BTIeCf3T.js';
7
- import './localization-CXHiWcJp.js';
7
+ import './localization-B5CRzthT.js';
8
8
  import './handleFetch-BFVO7oAR.js';
9
9
  import './VarianceTest-BJmZPrZl.js';
10
10
  import './taxIdRules-xYlx7ZXW.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-B9ZxDDl7.js';
3
- import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-BS5mSI8x.js';
4
- import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-BE_NVBoy.js';
5
- import { t as translate, s as storageStore, k as languages, l as localizationStore, y as translationStoreOnChange } from './localization-CXHiWcJp.js';
2
+ import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-B_AEVONL.js';
3
+ import { e as stripeStore, f as stripeStoreRetrievePayment, u as trackConversionEvent, R as stripeStoreResetPromoCode, J as stripeStoreReset, S as stripeStoreMessageBasedOnStatus, h as cartStore, z as cartStoreNextStep, K as cartStoreOnChange } from './cart-b84n0nhi.js';
4
+ import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-CF_oM0B6.js';
5
+ import { t as translate, s as storageStore, k as languages, l as localizationStore, y as translationStoreOnChange } from './localization-B5CRzthT.js';
6
6
  import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
7
7
  import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-BFVO7oAR.js';
8
8
  import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
@@ -10,9 +10,9 @@ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
10
10
  import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
11
11
  import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-DGlnuxEX.js';
12
12
  import { c as classes } from './classes-BJHSB96f.js';
13
- import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-BI_ApEsQ.js';
14
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-KMa4HlAf.js';
15
- import { p as placeTestOrder } from './placeTestOrder-BXA9K9Iy.js';
13
+ import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CJinx9-m.js';
14
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-CpeuDWx-.js';
15
+ import { p as placeTestOrder } from './placeTestOrder-BTpfyqPL.js';
16
16
  import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
17
17
  import './taxIdRules-xYlx7ZXW.js';
18
18
  import './TaxId-DMIgN_sT.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, a as Host, F as Fragment } from './index-_lt63o7c.js';
2
- import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-B9ZxDDl7.js';
3
- import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-BS5mSI8x.js';
4
- import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-BE_NVBoy.js';
5
- import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-CXHiWcJp.js';
2
+ import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-B_AEVONL.js';
3
+ import { e as stripeStore, i as initStripeElements, h as cartStore, f as stripeStoreRetrievePayment, w as cartStoreUpdateToErrorState, j as cartStoreUpdateItems, n as stripeStoreInitCheckoutSession, o as stripeStoreGetPaymentIntent, B as stripeStoreUpdateCheckoutSessionBaseCurrency, G as stripeStoreConfirmPayment, L as stripeStoreOnChange, J as stripeStoreReset, k as cartStoreReset } from './cart-b84n0nhi.js';
4
+ import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-CF_oM0B6.js';
5
+ import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-B5CRzthT.js';
6
6
  import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
7
7
  import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
8
8
  import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-BFVO7oAR.js';
@@ -1,42 +1,17 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host } from './index-_lt63o7c.js';
2
- import { b as stripeStore } from './cart-BS5mSI8x.js';
3
- import { m as getOverridenZCountry, n as isValidSelector, o as initLocalizationStore, s as storageStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-CXHiWcJp.js';
4
2
  import { z as zonosStore, a as zonosStoreFontFamily, b as zonosStoreInitSetting } from './zonosStore-BXP9FvIt.js';
3
+ import { m as isValidSelector, n as getOverridenZCountry, o as initLocalizationStore, s as storageStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-B5CRzthT.js';
4
+ import { l as logError, h as handleFetch, c as safeGetItem } from './handleFetch-BFVO7oAR.js';
5
+ import { e as stripeStore } from './cart-b84n0nhi.js';
5
6
  import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-HeAZDwVW.js';
6
- import { h as handleFetch, l as logError, c as safeGetItem } from './handleFetch-BFVO7oAR.js';
7
7
  import { l as log } from './VarianceTest-BJmZPrZl.js';
8
8
  import { e as ensureAnalyticsRelayPing } from './submitGtag-C5xzFHjG.js';
9
+ import { i as isBigCommerceNativeCheckout } from './_isBigCommerceNativeCheckout-Bb90IMVt.js';
9
10
  import './taxIdRules-xYlx7ZXW.js';
10
11
  import './TaxId-DMIgN_sT.js';
11
12
  import './isDarkColor-YdrG78th.js';
12
13
  import './getBorderRadius-BiGd45jw.js';
13
14
 
14
- const getZonosSettings = async () => {
15
- if (window.Zonos.cartSettings) {
16
- log('Reusing cached zonos settings');
17
- return {
18
- errors: [],
19
- json: window.Zonos.cartSettings,
20
- zonosMode: window.Zonos.zonosMode,
21
- };
22
- }
23
- const overrideSettings = getGenericSettingsOverride();
24
- const params = new URLSearchParams();
25
- if (overrideSettings.overrideShouldEnabledCustomAddress) {
26
- params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
27
- }
28
- const zCountry = getOverridenZCountry();
29
- if (zCountry) {
30
- params.set('zCountry', zCountry);
31
- }
32
- const { errors, json, zonosMode } = await handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
33
- if (errors.length) {
34
- logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
35
- return { errors, json: null, zonosMode };
36
- }
37
- return { errors: [], json, zonosMode };
38
- };
39
-
40
15
  const injectCheckoutElement$2 = () => {
41
16
  // append checkout component if doesn't exist
42
17
  const checkoutElement = document.querySelector('zonos-checkout');
@@ -67,6 +42,43 @@ const initCheckout = (config) => {
67
42
  injectCheckoutElement$2();
68
43
  };
69
44
 
45
+ /**
46
+ * Mount `<zonos-checkout>` without a Stripe instance.
47
+ *
48
+ * Native BigCommerce checkout must not receive Stripe.js. Creating the
49
+ * element still runs `zonos-checkout.init()`, which registers the
50
+ * international-address watcher and then returns before the Stripe poll.
51
+ */
52
+ const mountCheckoutWithoutStripe = () => {
53
+ initCheckout(zonosStore.checkoutSettings);
54
+ };
55
+
56
+ const getZonosSettings = async () => {
57
+ if (window.Zonos.cartSettings) {
58
+ log('Reusing cached zonos settings');
59
+ return {
60
+ errors: [],
61
+ json: window.Zonos.cartSettings,
62
+ zonosMode: window.Zonos.zonosMode,
63
+ };
64
+ }
65
+ const overrideSettings = getGenericSettingsOverride();
66
+ const params = new URLSearchParams();
67
+ if (overrideSettings.overrideShouldEnabledCustomAddress) {
68
+ params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
69
+ }
70
+ const zCountry = getOverridenZCountry();
71
+ if (zCountry) {
72
+ params.set('zCountry', zCountry);
73
+ }
74
+ const { errors, json, zonosMode } = await handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
75
+ if (errors.length) {
76
+ logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
77
+ return { errors, json: null, zonosMode };
78
+ }
79
+ return { errors: [], json, zonosMode };
80
+ };
81
+
70
82
  const injectCheckoutElement$1 = () => {
71
83
  // append checkout component if doesn't exist
72
84
  const collectElement = document.querySelector('zonos-collect');
@@ -777,11 +789,17 @@ const ZonosController = class {
777
789
  log('Checkout failed to load -- missing publishable key', 'warn');
778
790
  return;
779
791
  }
792
+ // `_loadStripe.ts` is the only module that injects Stripe.js. This
793
+ // method only chooses whether to ask for it or to mount checkout
794
+ // without it.
795
+ const nativeBigCommerceCheckout = isBigCommerceNativeCheckout();
780
796
  if (window.Zonos.isCollect || window.Zonos.isInvoice) {
781
- // send publishable key out to load stripe
782
- this.stripeInitEvent.emit({
783
- publishableKey: publishableKey.token,
784
- });
797
+ // Collect and Invoice off native checkout still ask for Stripe.
798
+ if (!nativeBigCommerceCheckout) {
799
+ this.stripeInitEvent.emit({
800
+ publishableKey: publishableKey.token,
801
+ });
802
+ }
785
803
  // init google places service
786
804
  void this.initGooglePlacesService(json);
787
805
  return;
@@ -809,10 +827,17 @@ const ZonosController = class {
809
827
  log(`Skip loading Stripe because no cart callback (buildCartDetail/createCartId), prefetched cart, or payment client secret is present`, 'warn');
810
828
  return;
811
829
  }
812
- // send publishable key out to load stripe
813
- this.stripeInitEvent.emit({
814
- publishableKey: publishableKey.token,
815
- });
830
+ // Cart callbacks, a prefetched cart, and a client secret do not override
831
+ // the native BigCommerce checkout skip. Mount checkout anyway so the
832
+ // international-address watcher runs, without Stripe.js.
833
+ if (nativeBigCommerceCheckout) {
834
+ mountCheckoutWithoutStripe();
835
+ }
836
+ else {
837
+ this.stripeInitEvent.emit({
838
+ publishableKey: publishableKey.token,
839
+ });
840
+ }
816
841
  // init google places service
817
842
  void this.initGooglePlacesService(json);
818
843
  })();
@@ -868,7 +893,7 @@ const ZonosController = class {
868
893
  zonosStore.organizationName = organizationName;
869
894
  }
870
895
  render() {
871
- return h(Host, { key: 'a72ab4fb14df090eb24520fd5821746caa61e318', class: "zonos--elements" });
896
+ return h(Host, { key: '0d8bcffcb7e22891c082a4916b00b87bdf5fc2e8', class: "zonos--elements" });
872
897
  }
873
898
  };
874
899
  ZonosController.style = zonosControllerCss();
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { l as localizationStore } from './localization-CXHiWcJp.js';
2
+ import { l as localizationStore } from './localization-B5CRzthT.js';
3
3
  import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
4
4
  import { c as classes } from './classes-BJHSB96f.js';
5
5
  import './handleFetch-BFVO7oAR.js';
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { d as localizationStoreUpdateSelectedCountryCode, l as localizationStore, t as translate, k as languages } from './localization-CXHiWcJp.js';
2
+ import { d as localizationStoreUpdateSelectedCountryCode, l as localizationStore, t as translate, k as languages } from './localization-B5CRzthT.js';
3
3
  import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-BcMPqGl0.js';
5
5
  import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
6
- import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-BI_ApEsQ.js';
6
+ import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CJinx9-m.js';
7
7
  import { c as classes } from './classes-BJHSB96f.js';
8
8
  import './handleFetch-BFVO7oAR.js';
9
9
  import './VarianceTest-BJmZPrZl.js';
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host } from './index-_lt63o7c.js';
2
- import { l as localizationStore, t as translate, j as currencyFormat } from './localization-CXHiWcJp.js';
2
+ import { l as localizationStore, t as translate, j as currencyFormat } from './localization-B5CRzthT.js';
3
3
  import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
4
4
  import { c as classes } from './classes-BJHSB96f.js';
5
5
  import { f as formatStringWithLinks } from './formatStringWithLinks-BcMPqGl0.js';
6
- import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-zSvDReDb.js';
6
+ import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-DfEiyzw7.js';
7
7
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-DAscqB23.js';
8
8
  import { e as euCountryCodes } from './TaxId-DMIgN_sT.js';
9
9
  import './handleFetch-BFVO7oAR.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
2
2
  import { d as debounce } from './debounce-DWqMT4lo.js';
3
- import { l as localizationStore, n as isValidSelector, t as translate, g as getZCountryUrlParam, p as setZCountryUrlParam, q as currencyDisplay, r as currencyConvertAndFormat, u as currencyConvert, j as currencyFormat, v as shouldShowHelloWidget } from './localization-CXHiWcJp.js';
3
+ import { l as localizationStore, m as isValidSelector, t as translate, g as getZCountryUrlParam, p as setZCountryUrlParam, q as currencyDisplay, r as currencyConvertAndFormat, u as currencyConvert, j as currencyFormat, v as shouldShowHelloWidget } from './localization-B5CRzthT.js';
4
4
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-BXP9FvIt.js';
5
5
  import { c as classes } from './classes-BJHSB96f.js';
6
6
  import { h as handleFetch, l as logError } from './handleFetch-BFVO7oAR.js';
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
2
- import { d as cartStore } from './cart-BS5mSI8x.js';
3
- import { t as translate } from './localization-CXHiWcJp.js';
4
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-KMa4HlAf.js';
2
+ import { h as cartStore } from './cart-b84n0nhi.js';
3
+ import { t as translate } from './localization-B5CRzthT.js';
4
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-CpeuDWx-.js';
5
5
  import { c as classes } from './classes-BJHSB96f.js';
6
- import { c as invoiceStore } from './invoice-6iTuS6ek.js';
6
+ import { c as invoiceStore } from './invoice-dQ0ONK5Q.js';
7
7
  import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
8
8
  import './zonosStore-BXP9FvIt.js';
9
9
  import './VarianceTest-BJmZPrZl.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-BS5mSI8x.js';
3
- import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-BE_NVBoy.js';
4
- import { t as translate, s as storageStore, k as languages, l as localizationStore } from './localization-CXHiWcJp.js';
2
+ import { e as stripeStore, f as stripeStoreRetrievePayment, u as trackConversionEvent, R as stripeStoreResetPromoCode, J as stripeStoreReset, S as stripeStoreMessageBasedOnStatus, h as cartStore, z as cartStoreNextStep, K as cartStoreOnChange } from './cart-b84n0nhi.js';
3
+ import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-CF_oM0B6.js';
4
+ import { t as translate, s as storageStore, k as languages, l as localizationStore } from './localization-B5CRzthT.js';
5
5
  import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
6
6
  import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-BFVO7oAR.js';
7
7
  import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
@@ -9,10 +9,10 @@ import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
9
9
  import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
10
10
  import { i as isInvoiceMobile, a as isInvoiceTablet } from './isInvoiceMobileTablet-Clej0Ffe.js';
11
11
  import { c as classes } from './classes-BJHSB96f.js';
12
- import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-BI_ApEsQ.js';
13
- import { c as invoiceStore } from './invoice-6iTuS6ek.js';
14
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-KMa4HlAf.js';
15
- import { p as placeTestOrder } from './placeTestOrder-BXA9K9Iy.js';
12
+ import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-CJinx9-m.js';
13
+ import { c as invoiceStore } from './invoice-dQ0ONK5Q.js';
14
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-CpeuDWx-.js';
15
+ import { p as placeTestOrder } from './placeTestOrder-BTpfyqPL.js';
16
16
  import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
17
17
  import './taxIdRules-xYlx7ZXW.js';
18
18
  import './TaxId-DMIgN_sT.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, a as Host, F as Fragment } from './index-_lt63o7c.js';
2
- import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-BS5mSI8x.js';
3
- import { i as invoiceStoreUpdateSelectedShippingOption, a as invoiceStoreInitShippingInfo, b as invoiceStoreAsyncAddressUpdate, c as invoiceStore } from './invoice-6iTuS6ek.js';
4
- import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-BE_NVBoy.js';
5
- import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-CXHiWcJp.js';
2
+ import { e as stripeStore, i as initStripeElements, f as stripeStoreRetrievePayment, h as cartStore, w as cartStoreUpdateToErrorState, j as cartStoreUpdateItems, n as stripeStoreInitCheckoutSession, o as stripeStoreGetPaymentIntent, B as stripeStoreUpdateCheckoutSessionBaseCurrency, G as stripeStoreConfirmPayment, L as stripeStoreOnChange, J as stripeStoreReset, k as cartStoreReset } from './cart-b84n0nhi.js';
3
+ import { i as invoiceStoreUpdateSelectedShippingOption, a as invoiceStoreInitShippingInfo, b as invoiceStoreAsyncAddressUpdate, c as invoiceStore } from './invoice-dQ0ONK5Q.js';
4
+ import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-CF_oM0B6.js';
5
+ import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-B5CRzthT.js';
6
6
  import { z as zonosStore } from './zonosStore-BXP9FvIt.js';
7
7
  import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
8
8
  import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-BFVO7oAR.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
2
- import { D as localizationStoreUpdateSelectedLocale, t as translate, A as getSupportedLanguages, l as localizationStore } from './localization-CXHiWcJp.js';
2
+ import { D as localizationStoreUpdateSelectedLocale, t as translate, A as getSupportedLanguages, l as localizationStore } from './localization-B5CRzthT.js';
3
3
  import { a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
4
4
  import './handleFetch-BFVO7oAR.js';
5
5
  import './VarianceTest-BJmZPrZl.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
2
- import { a2 as getEnabledPolicies, G as policyConsentStore, a3 as storeCreditStoreSetEnabled, a4 as storeCreditStoreSetUseFullBalance, a5 as cartStoreUpdateStoreCredit, R as storeCreditStore, a6 as storeCreditStoreSetAmount, a7 as storeCreditStoreRefreshBalance, K as storeCreditStoreGetEffectiveAmount } from './cart-BS5mSI8x.js';
3
- import { l as localizationStore, t as translate } from './localization-CXHiWcJp.js';
2
+ import { a4 as getEnabledPolicies, I as policyConsentStore, a5 as storeCreditStoreSetEnabled, a6 as storeCreditStoreSetUseFullBalance, a7 as cartStoreUpdateStoreCredit, T as storeCreditStore, a8 as storeCreditStoreSetAmount, a9 as storeCreditStoreRefreshBalance, M as storeCreditStoreGetEffectiveAmount } from './cart-b84n0nhi.js';
3
+ import { l as localizationStore, t as translate } from './localization-B5CRzthT.js';
4
4
  import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-BXP9FvIt.js';
5
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-KMa4HlAf.js';
5
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-CpeuDWx-.js';
6
6
  import { g as getBorderRadius } from './getBorderRadius-BiGd45jw.js';
7
7
  import './taxIdRules-xYlx7ZXW.js';
8
8
  import './TaxId-DMIgN_sT.js';
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Two checkout-path rules, kept together so they cannot drift in separate files.
3
+ *
4
+ * `pathContainsCheckout` is the broad rule for zBypass and address detection.
5
+ * It still matches paths such as `checkout-page`.
6
+ *
7
+ * `hasExactCheckoutSegment` is the strict rule for the Stripe.js skip. Only a
8
+ * segment exactly equal to `checkout` counts, so a slug does not drop the
9
+ * payment script.
10
+ */
11
+ var pathContainsCheckout=function(e){return e.includes("/checkout")};var hasExactCheckoutSegment=function(e){return e.split("/").some((function(e){return e==="checkout"}))};
12
+ /**
13
+ * Storefront signals BigCommerce sets before Zonos copies `isBigCommerce`.
14
+ * Shared by the loader script and the Stripe skip so the two cannot drift.
15
+ */var detectBigCommerceHost=function(){if(typeof window==="undefined"||typeof document==="undefined"){return false}return!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')};var hasCheckoutSegment=function(){return hasExactCheckoutSegment(window.location.pathname)};var sharedZonos=function(){if(typeof window==="undefined"||!("Zonos"in window)){return undefined}return window.Zonos};var isFlaggedBigCommerce=function(){var e;return((e=sharedZonos())===null||e===void 0?void 0:e.isBigCommerce)===true};
16
+ /**
17
+ * The settled answer lives on `window.Zonos`, the object loadZonos.js,
18
+ * zonos.js, and the component bundle already share.
19
+ *
20
+ * A `true` result sticks for that pathname. A `false` result sticks once
21
+ * the path is not checkout, or once host detection has finished. A checkout
22
+ * path whose BigCommerce signals are not in the page yet stays unset, so a
23
+ * later signal can still settle it.
24
+ */var readSettled=function(){var e=sharedZonos();if(e===undefined){return undefined}if(e.isBigCommerceNativeCheckoutPath!==window.location.pathname){return undefined}var n=e.isBigCommerceNativeCheckout;if(n===true||n===false){return n}return undefined};var writeSettled=function(e){var n=sharedZonos();if(n!==undefined){n.isBigCommerceNativeCheckout=e;n.isBigCommerceNativeCheckoutPath=window.location.pathname}return e};
25
+ /**
26
+ * Call after `isBigCommerce` has been copied from host detection. Writes the
27
+ * settled boolean onto `window.Zonos` for this pathname.
28
+ */var markBigCommerceHostChecked=function(){if(typeof window==="undefined"||typeof document==="undefined"){return}var e=sharedZonos();if(e===undefined){return}var n=hasCheckoutSegment()&&(detectBigCommerceHost()||isFlaggedBigCommerce());e.isBigCommerceNativeCheckout=n;e.isBigCommerceNativeCheckoutPath=window.location.pathname};var decide=function(){if(typeof window==="undefined"||typeof document==="undefined"){return false}var e=readSettled();if(e!==undefined){return e}if(!hasCheckoutSegment()){return writeSettled(false)}if(detectBigCommerceHost()||isFlaggedBigCommerce()){return writeSettled(true)}return undefined};
29
+ /**
30
+ * True when this document is BigCommerce native checkout.
31
+ * Stripe.js injection is owned by `loadStripeScript` in `_loadStripe.ts`.
32
+ * Other callers use this for a different job: skip `attachCheckout`, leave
33
+ * the store's buttons enabled, or hand a leftover domestic session to `/`.
34
+ * An undecided checkout path returns false and is not stored.
35
+ */var isBigCommerceNativeCheckout=function(){return decide()===true};
36
+ /**
37
+ * True when Stripe.js must not be injected. An undecided checkout path
38
+ * holds the script until host detection finishes, instead of storing "not
39
+ * native checkout" and injecting v3 early.
40
+ */var holdStripeForNativeCheckout=function(){var e=decide();if(e===undefined){return true}return e};export{holdStripeForNativeCheckout as h,isBigCommerceNativeCheckout as i,markBigCommerceHostChecked as m,pathContainsCheckout as p};