@zonos/elements 1.3.267 → 1.3.269

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 (348) hide show
  1. package/dist/cjs/{cart-ed2de167.js → cart-87fbbb5a.js} +129 -4
  2. package/dist/cjs/{debounce-606d1801.js → debounce-7990f5ea.js} +1 -1
  3. package/dist/cjs/{getBorderRadius-a91911e7.js → getBorderRadius-fc683d94.js} +1 -1
  4. package/dist/cjs/{getContrastColor-ce80dbe7.js → getContrastColor-d5134ef3.js} +2 -2
  5. package/dist/cjs/{hasInclusivePrice-bf31fbdb.js → hasInclusivePrice-c86ed1f5.js} +1 -1
  6. package/dist/cjs/index.cjs.js +7 -7
  7. package/dist/cjs/{invoice-542c23e7.js → invoice-952f32c4.js} +3 -3
  8. package/dist/cjs/{isCollectMobileTablet-fe8149a5.js → isCollectMobileTablet-1cb21c59.js} +3 -3
  9. package/dist/cjs/{isContrastColor-a02c4889.js → isContrastColor-76592c92.js} +1 -1
  10. package/dist/cjs/{isDarkColor-e317bb06.js → isDarkColor-5d6ca405.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{localization-66d378ab.js → localization-a969f224.js} +660 -3
  13. package/dist/cjs/{paypal-d8282578.js → paypal-cfe1e8e9.js} +60 -18
  14. package/dist/cjs/{placeTestOrder-0a4b9dd7.js → placeTestOrder-613878fb.js} +2 -2
  15. package/dist/cjs/{renderCheckoutCurrency-ac9083d9.js → renderCheckoutCurrency-5a333d29.js} +2 -2
  16. package/dist/cjs/{submitGtag-07a3b09e.js → submitGtag-4906b161.js} +1 -1
  17. package/dist/cjs/{throttle-8aebac7d.js → throttle-02c2e917.js} +2 -2
  18. package/dist/cjs/{updateCheckoutSessionAttributes-a9a97194.js → updateCheckoutSessionAttributes-47d73942.js} +1 -1
  19. package/dist/cjs/zonos-address-display_8.cjs.entry.js +7 -7
  20. package/dist/cjs/zonos-address_4.cjs.entry.js +7 -7
  21. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-card_5.cjs.entry.js +8 -8
  25. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +94 -27
  26. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-checkout.cjs.entry.js +124 -154
  28. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -5
  30. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +11 -11
  31. package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
  32. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  33. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  35. package/dist/cjs/zonos-elements.cjs.js +1 -1
  36. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  37. package/dist/cjs/zonos-hello.cjs.entry.js +4 -47
  38. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +7 -7
  40. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +11 -11
  41. package/dist/cjs/zonos-invoice.cjs.entry.js +9 -9
  42. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  43. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  44. package/dist/cjs/{zonos-store-credit.cjs.entry.js → zonos-policy-consent_2.cjs.entry.js} +91 -6
  45. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
  46. package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
  47. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  48. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  49. package/dist/cjs/{zonosStore-0662b95f.js → zonosStore-45a87908.js} +1 -0
  50. package/dist/collection/collection-manifest.json +1 -0
  51. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +7 -2
  52. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +66 -12
  53. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +103 -75
  54. package/dist/collection/components/checkout/zonos-checkout/zonos-policy-consent/zonos-policy-consent.css +93 -0
  55. package/dist/collection/components/checkout/zonos-checkout/zonos-policy-consent/zonos-policy-consent.js +93 -0
  56. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +2 -44
  57. package/dist/collection/components/store/checkout/paypal.js +57 -14
  58. package/dist/collection/components/store/checkout/policyConsent.js +58 -0
  59. package/dist/collection/components/store/checkout/stripe.js +66 -0
  60. package/dist/collection/components/store/hello/localization.js +12 -1
  61. package/dist/collection/components/store/translationStore/strings.arabic.js +21 -0
  62. package/dist/collection/components/store/translationStore/strings.base.js +21 -0
  63. package/dist/collection/components/store/translationStore/strings.chinese.js +21 -0
  64. package/dist/collection/components/store/translationStore/strings.danish.js +21 -0
  65. package/dist/collection/components/store/translationStore/strings.dutch.js +21 -0
  66. package/dist/collection/components/store/translationStore/strings.french.js +21 -0
  67. package/dist/collection/components/store/translationStore/strings.german.js +21 -0
  68. package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -0
  69. package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -0
  70. package/dist/collection/components/store/translationStore/strings.italian.js +21 -0
  71. package/dist/collection/components/store/translationStore/strings.japanese.js +21 -0
  72. package/dist/collection/components/store/translationStore/strings.korean.js +21 -0
  73. package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -0
  74. package/dist/collection/components/store/translationStore/strings.polish.js +21 -0
  75. package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -0
  76. package/dist/collection/components/store/translationStore/strings.russian.js +21 -0
  77. package/dist/collection/components/store/translationStore/strings.spanish.js +21 -0
  78. package/dist/collection/components/store/translationStore/strings.swedish.js +21 -0
  79. package/dist/collection/components/store/translationStore/strings.turkish.js +21 -0
  80. package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -0
  81. package/dist/collection/components/store/zonosStore.js +1 -0
  82. package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +28 -0
  83. package/dist/collection/components/utils/checkout/removeBigcommerceCartShipping.js +83 -0
  84. package/dist/collection/components/utils/hello/shouldShowHelloWidget.js +61 -0
  85. package/dist/collection/types/generated/graphql.internal.types.js +64 -0
  86. package/dist/collection/utils/toggleBigcommerceNativeCurrencySelector.js +2 -1
  87. package/dist/esm/{cart-49082718.js → cart-663ef7d5.js} +125 -5
  88. package/dist/esm/{debounce-ab526ca0.js → debounce-58e4ff3e.js} +1 -1
  89. package/dist/esm/{getBorderRadius-98c64be8.js → getBorderRadius-d23f47a6.js} +1 -1
  90. package/dist/esm/{getContrastColor-0aa643c1.js → getContrastColor-f0bd5b65.js} +2 -2
  91. package/dist/esm/{hasInclusivePrice-2323d514.js → hasInclusivePrice-f8bd057d.js} +1 -1
  92. package/dist/esm/index.js +7 -7
  93. package/dist/esm/{invoice-16c688e7.js → invoice-db7211a6.js} +3 -3
  94. package/dist/esm/{isCollectMobileTablet-910aea2e.js → isCollectMobileTablet-24c912b1.js} +3 -3
  95. package/dist/esm/{isContrastColor-6bad285e.js → isContrastColor-fbddacb6.js} +1 -1
  96. package/dist/esm/{isDarkColor-0a8453e7.js → isDarkColor-566f04c5.js} +1 -1
  97. package/dist/esm/loader.js +1 -1
  98. package/dist/esm/{localization-33a9f7ff.js → localization-dc19e8bb.js} +657 -4
  99. package/dist/esm/{paypal-2e9aa4ba.js → paypal-cdbe69ef.js} +60 -18
  100. package/dist/esm/{placeTestOrder-35c9b460.js → placeTestOrder-ba67e208.js} +2 -2
  101. package/dist/esm/{renderCheckoutCurrency-b84a6da7.js → renderCheckoutCurrency-fb1cbd28.js} +2 -2
  102. package/dist/esm/{submitGtag-ae9d5d91.js → submitGtag-c7ea1f2a.js} +1 -1
  103. package/dist/esm/{throttle-882b1f47.js → throttle-f09d0659.js} +2 -2
  104. package/dist/esm/{updateCheckoutSessionAttributes-da7fdd37.js → updateCheckoutSessionAttributes-40e301a4.js} +1 -1
  105. package/dist/esm/zonos-address-display_8.entry.js +7 -7
  106. package/dist/esm/zonos-address_4.entry.js +7 -7
  107. package/dist/esm/zonos-badge.entry.js +1 -1
  108. package/dist/esm/zonos-banner.entry.js +1 -1
  109. package/dist/esm/zonos-button_3.entry.js +3 -3
  110. package/dist/esm/zonos-card_5.entry.js +8 -8
  111. package/dist/esm/zonos-cart-items_12.entry.js +94 -27
  112. package/dist/esm/zonos-checkbox_2.entry.js +3 -3
  113. package/dist/esm/zonos-checkout.entry.js +113 -143
  114. package/dist/esm/zonos-collapse.entry.js +1 -1
  115. package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -5
  116. package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
  117. package/dist/esm/zonos-collect.entry.js +9 -9
  118. package/dist/esm/zonos-controller.entry.js +6 -6
  119. package/dist/esm/zonos-country-flag.entry.js +2 -2
  120. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  121. package/dist/esm/zonos-elements.js +1 -1
  122. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  123. package/dist/esm/zonos-hello.entry.js +4 -47
  124. package/dist/esm/zonos-input.entry.js +2 -2
  125. package/dist/esm/zonos-invoice-cart-items_2.entry.js +7 -7
  126. package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
  127. package/dist/esm/zonos-invoice.entry.js +9 -9
  128. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  129. package/dist/esm/zonos-logo.entry.js +1 -1
  130. package/dist/esm/{zonos-store-credit.entry.js → zonos-policy-consent_2.entry.js} +91 -7
  131. package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
  132. package/dist/esm/zonos-stripe-input.entry.js +3 -3
  133. package/dist/esm/zonos-text.entry.js +1 -1
  134. package/dist/esm/zonos-v-stack.entry.js +1 -1
  135. package/dist/esm/{zonosStore-9662b071.js → zonosStore-8e19daff.js} +1 -0
  136. package/dist/esm-es5/cart-663ef7d5.js +1 -0
  137. package/dist/esm-es5/{debounce-ab526ca0.js → debounce-58e4ff3e.js} +1 -1
  138. package/dist/esm-es5/{getBorderRadius-98c64be8.js → getBorderRadius-d23f47a6.js} +1 -1
  139. package/dist/esm-es5/{getContrastColor-0aa643c1.js → getContrastColor-f0bd5b65.js} +1 -1
  140. package/dist/esm-es5/{hasInclusivePrice-2323d514.js → hasInclusivePrice-f8bd057d.js} +1 -1
  141. package/dist/esm-es5/index.js +1 -1
  142. package/dist/esm-es5/{invoice-16c688e7.js → invoice-db7211a6.js} +1 -1
  143. package/dist/esm-es5/{isCollectMobileTablet-910aea2e.js → isCollectMobileTablet-24c912b1.js} +1 -1
  144. package/dist/esm-es5/{isContrastColor-6bad285e.js → isContrastColor-fbddacb6.js} +1 -1
  145. package/dist/esm-es5/{isDarkColor-0a8453e7.js → isDarkColor-566f04c5.js} +1 -1
  146. package/dist/esm-es5/loader.js +1 -1
  147. package/dist/esm-es5/localization-dc19e8bb.js +1 -0
  148. package/dist/esm-es5/{paypal-2e9aa4ba.js → paypal-cdbe69ef.js} +2 -2
  149. package/dist/esm-es5/{placeTestOrder-35c9b460.js → placeTestOrder-ba67e208.js} +1 -1
  150. package/dist/esm-es5/{renderCheckoutCurrency-b84a6da7.js → renderCheckoutCurrency-fb1cbd28.js} +1 -1
  151. package/dist/esm-es5/{submitGtag-ae9d5d91.js → submitGtag-c7ea1f2a.js} +1 -1
  152. package/dist/esm-es5/throttle-f09d0659.js +1 -0
  153. package/dist/esm-es5/{updateCheckoutSessionAttributes-da7fdd37.js → updateCheckoutSessionAttributes-40e301a4.js} +1 -1
  154. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  155. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  156. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  157. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  158. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  159. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  160. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  161. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  162. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  163. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  164. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  165. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  166. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  167. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  168. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  169. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  170. package/dist/esm-es5/zonos-elements.js +1 -1
  171. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  172. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  173. package/dist/esm-es5/zonos-input.entry.js +1 -1
  174. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  175. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  176. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  177. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  178. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  179. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -0
  180. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  181. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  182. package/dist/esm-es5/zonos-text.entry.js +1 -1
  183. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  184. package/dist/esm-es5/{zonosStore-9662b071.js → zonosStore-8e19daff.js} +1 -1
  185. package/dist/scripts/index.d.ts +80 -6
  186. package/dist/scripts/index.js +1 -1
  187. package/dist/scripts/loadZonos.js +1 -1
  188. package/dist/scripts/zonos.js +1 -1
  189. package/dist/types/components/checkout/zonos-checkout/zonos-policy-consent/zonos-policy-consent.d.ts +3 -0
  190. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +0 -1
  191. package/dist/types/components/store/checkout/policyConsent.d.ts +41 -0
  192. package/dist/types/components/store/checkout/stripe.d.ts +13 -0
  193. package/dist/types/components/store/translationStore/strings.arabic.d.ts +21 -0
  194. package/dist/types/components/store/translationStore/strings.base.d.ts +21 -0
  195. package/dist/types/components/store/translationStore/strings.chinese.d.ts +21 -0
  196. package/dist/types/components/store/translationStore/strings.danish.d.ts +21 -0
  197. package/dist/types/components/store/translationStore/strings.dutch.d.ts +21 -0
  198. package/dist/types/components/store/translationStore/strings.french.d.ts +21 -0
  199. package/dist/types/components/store/translationStore/strings.german.d.ts +21 -0
  200. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +21 -0
  201. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +21 -0
  202. package/dist/types/components/store/translationStore/strings.italian.d.ts +21 -0
  203. package/dist/types/components/store/translationStore/strings.japanese.d.ts +21 -0
  204. package/dist/types/components/store/translationStore/strings.korean.d.ts +21 -0
  205. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +21 -0
  206. package/dist/types/components/store/translationStore/strings.polish.d.ts +21 -0
  207. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +21 -0
  208. package/dist/types/components/store/translationStore/strings.russian.d.ts +21 -0
  209. package/dist/types/components/store/translationStore/strings.spanish.d.ts +21 -0
  210. package/dist/types/components/store/translationStore/strings.swedish.d.ts +21 -0
  211. package/dist/types/components/store/translationStore/strings.turkish.d.ts +21 -0
  212. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +21 -0
  213. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  214. package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +9 -0
  215. package/dist/types/components/utils/checkout/removeBigcommerceCartShipping.d.ts +18 -0
  216. package/dist/types/components/utils/hello/shouldShowHelloWidget.d.ts +16 -0
  217. package/dist/types/components.d.ts +13 -0
  218. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +23 -6
  219. package/dist/types/types/checkout/CheckoutConfig.d.ts +23 -0
  220. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  221. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  222. package/dist/types/types/generated/graphql.internal.types.d.ts +170 -23
  223. package/dist/types/types/generated/graphql.internal.types.ts +152 -23
  224. package/dist/zonos-elements/index.esm.js +1 -1
  225. package/dist/zonos-elements/{p-90c932fd.entry.js → p-049fc407.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-2a8fcb71.system.entry.js → p-0581cfc9.system.entry.js} +1 -1
  227. package/dist/zonos-elements/p-097d7819.js +1 -0
  228. package/dist/zonos-elements/{p-e850e6e7.system.entry.js → p-09d32e53.system.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-1325bbd6.system.entry.js → p-0daed059.system.entry.js} +1 -1
  230. package/dist/zonos-elements/{p-79e5a629.system.entry.js → p-0e36a7cf.system.entry.js} +1 -1
  231. package/dist/zonos-elements/{p-b6df4cc2.system.entry.js → p-134c5010.system.entry.js} +1 -1
  232. package/dist/zonos-elements/p-14d6542f.system.js +1 -0
  233. package/dist/zonos-elements/{p-0207c91e.system.js → p-18af6aaa.system.js} +1 -1
  234. package/dist/zonos-elements/p-1bde60d5.system.entry.js +1 -0
  235. package/dist/zonos-elements/{p-9a5a2043.js → p-243dda5f.js} +1 -1
  236. package/dist/zonos-elements/p-263d14da.system.entry.js +1 -0
  237. package/dist/zonos-elements/{p-6b6cfc59.system.entry.js → p-26ae4ee7.system.entry.js} +1 -1
  238. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  239. package/dist/zonos-elements/{p-71fb6126.entry.js → p-2afecda7.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-458df669.js → p-2be4335f.js} +1 -1
  241. package/dist/zonos-elements/p-33a37c42.system.entry.js +1 -0
  242. package/dist/zonos-elements/{p-d28be518.js → p-33d4be28.js} +1 -1
  243. package/dist/zonos-elements/{p-26c85188.entry.js → p-344a1fee.entry.js} +1 -1
  244. package/dist/zonos-elements/p-3b28fc76.js +1 -0
  245. package/dist/zonos-elements/{p-db3b101a.js → p-3dc3596b.js} +1 -1
  246. package/dist/zonos-elements/{p-3689821f.system.js → p-3e7ee89d.system.js} +1 -1
  247. package/dist/zonos-elements/{p-843ced6c.js → p-44147850.js} +1 -1
  248. package/dist/zonos-elements/{p-71c7a1ff.entry.js → p-488c1af1.entry.js} +1 -1
  249. package/dist/zonos-elements/{p-3516340a.system.entry.js → p-48ec0b61.system.entry.js} +1 -1
  250. package/dist/zonos-elements/p-4af88255.entry.js +1 -0
  251. package/dist/zonos-elements/p-4b6e367d.system.js +1 -0
  252. package/dist/zonos-elements/{p-ab0b23f2.js → p-4df08fc4.js} +1 -1
  253. package/dist/zonos-elements/{p-0ed70279.entry.js → p-513e8278.entry.js} +1 -1
  254. package/dist/zonos-elements/p-52bd7be3.system.js +1 -0
  255. package/dist/zonos-elements/{p-deaf0e38.system.entry.js → p-536cbab5.system.entry.js} +1 -1
  256. package/dist/zonos-elements/p-56711a61.js +1 -0
  257. package/dist/zonos-elements/{p-01497a20.entry.js → p-57b55808.entry.js} +1 -1
  258. package/dist/zonos-elements/p-57c3c68f.entry.js +1 -0
  259. package/dist/zonos-elements/{p-a49ba3ae.system.entry.js → p-5b4e5608.system.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-1bf9a1b9.system.js → p-5d65be06.system.js} +1 -1
  261. package/dist/zonos-elements/{p-1957af5a.system.entry.js → p-5f92db80.system.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-2a6be4a5.entry.js → p-658ab5e2.entry.js} +1 -1
  263. package/dist/zonos-elements/{p-8f9e95c2.entry.js → p-680da401.entry.js} +1 -1
  264. package/dist/zonos-elements/{p-4f718ef9.system.js → p-699276f2.system.js} +1 -1
  265. package/dist/zonos-elements/{p-f3cfd8fa.js → p-701d9a7c.js} +1 -1
  266. package/dist/zonos-elements/{p-ce103c66.system.entry.js → p-71528303.system.entry.js} +1 -1
  267. package/dist/zonos-elements/{p-8570e88a.system.js → p-7662d32a.system.js} +1 -1
  268. package/dist/zonos-elements/{p-27061873.entry.js → p-777d396e.entry.js} +1 -1
  269. package/dist/zonos-elements/{p-46071125.entry.js → p-7aca66cd.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-eb99a625.system.js → p-7d9d2407.system.js} +1 -1
  271. package/dist/zonos-elements/{p-7003d093.system.entry.js → p-80df7e0b.system.entry.js} +1 -1
  272. package/dist/zonos-elements/{p-b7e4a020.system.entry.js → p-82ce355d.system.entry.js} +1 -1
  273. package/dist/zonos-elements/{p-5e1799bc.entry.js → p-84d4f04d.entry.js} +1 -1
  274. package/dist/zonos-elements/{p-180d3e3d.entry.js → p-858103a0.entry.js} +1 -1
  275. package/dist/zonos-elements/{p-9e0cb5b3.system.entry.js → p-882fb843.system.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-648f3ada.entry.js → p-889a44fc.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-4c89d04a.js → p-896fb969.js} +1 -1
  278. package/dist/zonos-elements/{p-2c854197.system.entry.js → p-8a24701c.system.entry.js} +1 -1
  279. package/dist/zonos-elements/{p-cb966d16.system.entry.js → p-8f0bdb87.system.entry.js} +1 -1
  280. package/dist/zonos-elements/p-8f817a47.system.js +18 -0
  281. package/dist/zonos-elements/{p-a78bc004.entry.js → p-9092f655.entry.js} +1 -1
  282. package/dist/zonos-elements/p-90d22087.system.js +1 -0
  283. package/dist/zonos-elements/{p-1ec9b3b0.entry.js → p-9377b5c2.entry.js} +1 -1
  284. package/dist/zonos-elements/{p-a6db8883.entry.js → p-9799193c.entry.js} +1 -1
  285. package/dist/zonos-elements/{p-55fb4ea3.system.entry.js → p-98bea13e.system.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-ba9e2612.system.entry.js → p-990d1495.system.entry.js} +1 -1
  287. package/dist/zonos-elements/{p-601bb27e.entry.js → p-9a509268.entry.js} +1 -1
  288. package/dist/zonos-elements/{p-a1bad0c3.system.entry.js → p-9ea67d63.system.entry.js} +1 -1
  289. package/dist/zonos-elements/p-9f5fb332.js +1 -0
  290. package/dist/zonos-elements/{p-d950b0b4.entry.js → p-a237429e.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-5d823ea7.system.js → p-a3a79b2f.system.js} +1 -1
  292. package/dist/zonos-elements/p-ac8cfdc0.js +1 -0
  293. package/dist/zonos-elements/p-accccb9c.entry.js +1 -0
  294. package/dist/zonos-elements/p-b0ed0fe7.system.entry.js +1 -0
  295. package/dist/zonos-elements/{p-b4b23475.entry.js → p-b35a0b1e.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-bf5c3dd7.system.entry.js → p-b59fc3fa.system.entry.js} +1 -1
  297. package/dist/zonos-elements/{p-db5f6b8c.entry.js → p-ba127f51.entry.js} +1 -1
  298. package/dist/zonos-elements/p-bbef037c.js +1 -0
  299. package/dist/zonos-elements/{p-6a195559.system.js → p-bc919de1.system.js} +1 -1
  300. package/dist/zonos-elements/p-be64a52e.entry.js +1 -0
  301. package/dist/zonos-elements/{p-665bfd4f.entry.js → p-c1463da7.entry.js} +1 -1
  302. package/dist/zonos-elements/{p-311ba000.system.js → p-c2023a08.system.js} +1 -1
  303. package/dist/zonos-elements/{p-8d5f413c.system.entry.js → p-c4ef873a.system.entry.js} +1 -1
  304. package/dist/zonos-elements/p-c5caf47b.system.js +1 -0
  305. package/dist/zonos-elements/{p-baf0b24c.system.entry.js → p-c62293d5.system.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-79f3c227.system.entry.js → p-c92a5ae5.system.entry.js} +1 -1
  307. package/dist/zonos-elements/p-cd34ecf2.js +1 -0
  308. package/dist/zonos-elements/p-cd5444b0.js +17 -0
  309. package/dist/zonos-elements/{p-cfb0059f.js → p-d437bc28.js} +1 -1
  310. package/dist/zonos-elements/p-d932973f.system.js +1 -0
  311. package/dist/zonos-elements/{p-28e2ac3b.entry.js → p-dae881f2.entry.js} +1 -1
  312. package/dist/zonos-elements/{p-087520f2.system.entry.js → p-df0c8fb6.system.entry.js} +1 -1
  313. package/dist/zonos-elements/{p-8571f3ce.entry.js → p-df55536b.entry.js} +1 -1
  314. package/dist/zonos-elements/p-e05e5825.entry.js +1 -0
  315. package/dist/zonos-elements/{p-928291e5.entry.js → p-e548b8ec.entry.js} +1 -1
  316. package/dist/zonos-elements/{p-5e6f85f0.system.js → p-f053975e.system.js} +1 -1
  317. package/dist/zonos-elements/{p-175c04a4.system.js → p-f5684fc2.system.js} +1 -1
  318. package/dist/zonos-elements/{p-22ba60f6.system.entry.js → p-fc270539.system.entry.js} +1 -1
  319. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  320. package/package.json +1 -1
  321. package/dist/esm-es5/cart-49082718.js +0 -1
  322. package/dist/esm-es5/localization-33a9f7ff.js +0 -1
  323. package/dist/esm-es5/throttle-882b1f47.js +0 -1
  324. package/dist/esm-es5/zonos-store-credit.entry.js +0 -1
  325. package/dist/zonos-elements/p-029be4a8.entry.js +0 -1
  326. package/dist/zonos-elements/p-034ab928.system.entry.js +0 -1
  327. package/dist/zonos-elements/p-07a76716.system.js +0 -1
  328. package/dist/zonos-elements/p-1f256673.entry.js +0 -1
  329. package/dist/zonos-elements/p-367a72bc.js +0 -1
  330. package/dist/zonos-elements/p-3b1b3598.system.js +0 -18
  331. package/dist/zonos-elements/p-40284821.system.js +0 -1
  332. package/dist/zonos-elements/p-4980facb.js +0 -1
  333. package/dist/zonos-elements/p-6987f9c9.js +0 -1
  334. package/dist/zonos-elements/p-6d81901a.js +0 -1
  335. package/dist/zonos-elements/p-703fc360.entry.js +0 -1
  336. package/dist/zonos-elements/p-77c2e465.system.js +0 -1
  337. package/dist/zonos-elements/p-84dbf474.js +0 -17
  338. package/dist/zonos-elements/p-9b0a6fe5.system.entry.js +0 -1
  339. package/dist/zonos-elements/p-adb9827c.js +0 -1
  340. package/dist/zonos-elements/p-b2d276e1.js +0 -1
  341. package/dist/zonos-elements/p-b5a26334.system.entry.js +0 -1
  342. package/dist/zonos-elements/p-b6a36c25.system.js +0 -1
  343. package/dist/zonos-elements/p-becac995.js +0 -1
  344. package/dist/zonos-elements/p-c9c17d08.system.entry.js +0 -1
  345. package/dist/zonos-elements/p-e056ae6b.entry.js +0 -1
  346. package/dist/zonos-elements/p-e3292be8.system.js +0 -1
  347. package/dist/zonos-elements/p-e5dfccd8.system.js +0 -1
  348. package/dist/zonos-elements/p-fb712719.entry.js +0 -1
@@ -3,24 +3,24 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-ed2de167.js');
7
- const paypal = require('./paypal-d8282578.js');
8
- const localization = require('./localization-66d378ab.js');
9
- const zonosStore = require('./zonosStore-0662b95f.js');
6
+ const cart = require('./cart-87fbbb5a.js');
7
+ const paypal = require('./paypal-cfe1e8e9.js');
8
+ const localization = require('./localization-a969f224.js');
9
+ const zonosStore = require('./zonosStore-45a87908.js');
10
10
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
12
- const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-a9a97194.js');
12
+ const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-47d73942.js');
13
13
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
14
  const CheckoutConfig = require('./CheckoutConfig-27c82f94.js');
15
15
  const classes = require('./classes-b7918f56.js');
16
16
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
17
- const getBorderRadius = require('./getBorderRadius-a91911e7.js');
18
- const isDarkColor = require('./isDarkColor-e317bb06.js');
17
+ const getBorderRadius = require('./getBorderRadius-fc683d94.js');
18
+ const isDarkColor = require('./isDarkColor-5d6ca405.js');
19
19
  const styles = require('./styles-d1e64fb9.js');
20
20
  const RemoveIcon = require('./RemoveIcon-081ac073.js');
21
- require('./isContrastColor-a02c4889.js');
22
- require('./submitGtag-07a3b09e.js');
23
- require('./debounce-606d1801.js');
21
+ require('./isContrastColor-76592c92.js');
22
+ require('./submitGtag-4906b161.js');
23
+ require('./debounce-7990f5ea.js');
24
24
 
25
25
  /**
26
26
  * Check if store discount is enabled
@@ -97,63 +97,6 @@ const buildCartUrl = ({ cartId, checkoutSessionId, customerAddress1, customerAdd
97
97
  return `${hostedCheckoutUrl}?${urlParams.toString()}`;
98
98
  };
99
99
 
100
- /**
101
- * Fetch the checkout/cart ID from the BigCommerce Storefront Cart API.
102
- * The `/checkout` page URL does not include the checkout ID, so we
103
- * retrieve it from `/api/storefront/cart` which returns the active cart(s).
104
- */
105
- const fetchCheckoutId = async () => {
106
- var _a, _b;
107
- try {
108
- const response = await fetch('/api/storefront/cart', {
109
- credentials: 'same-origin',
110
- headers: {
111
- Accept: 'application/json',
112
- },
113
- });
114
- if (!response.ok) {
115
- VarianceTest.log(`Failed to fetch BigCommerce cart: ${String(response.status)}`, 'error');
116
- return null;
117
- }
118
- const carts = (await response.json());
119
- return (_b = (_a = carts === null || carts === void 0 ? void 0 : carts[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;
120
- }
121
- catch (error) {
122
- handleFetch.logError('Error fetching BigCommerce cart data', error);
123
- return null;
124
- }
125
- };
126
- /**
127
- * Fetch checkout data from the BigCommerce Storefront API.
128
- * This API is cookie-authenticated (same-origin), so no token is needed.
129
- */
130
- const fetchBigCommerceCheckout = async (checkoutId) => {
131
- try {
132
- const response = await fetch(`/api/storefront/checkouts/${checkoutId}?include=customer.customerGroup,customer.addresses`, {
133
- credentials: 'same-origin',
134
- headers: {
135
- Accept: 'application/json',
136
- 'Content-Type': 'application/json',
137
- },
138
- });
139
- if (!response.ok) {
140
- VarianceTest.log(`Failed to fetch BigCommerce checkout: ${String(response.status)}`, 'error');
141
- return null;
142
- }
143
- return (await response.json());
144
- }
145
- catch (error) {
146
- handleFetch.logError('Error fetching BigCommerce checkout data', error);
147
- return null;
148
- }
149
- };
150
- /**
151
- * Whether the BigCommerce shopper is already logged in. We key off the
152
- * customer's numeric `id` since the storefront API populates it only for
153
- * authenticated sessions (guest checkouts have an empty `customer` object).
154
- */
155
- const isBigCommerceCustomerLoggedIn = (checkout) => { var _a; return !!((_a = checkout === null || checkout === void 0 ? void 0 : checkout.customer) === null || _a === void 0 ? void 0 : _a.id); };
156
-
157
100
  /**
158
101
  * The query flag that BigCommerce carries back to `cart.php` after the
159
102
  * shopper logs in. When present, Zonos-elements knows to resume the
@@ -270,7 +213,7 @@ const fetchBypassOutcome = async (preFetched) => {
270
213
  // caller-supplied data when available.
271
214
  const checkoutId = preFetched
272
215
  ? preFetched.checkoutId
273
- : await fetchCheckoutId();
216
+ : await localization.fetchCheckoutId();
274
217
  if (!checkoutId) {
275
218
  // No active cart yet — inconclusive. Common on fresh sessions where
276
219
  // `initBigCommerceBypassCheck` runs before the user has added anything
@@ -280,7 +223,7 @@ const fetchBypassOutcome = async (preFetched) => {
280
223
  }
281
224
  const checkout = preFetched
282
225
  ? preFetched.checkout
283
- : await fetchBigCommerceCheckout(checkoutId);
226
+ : await localization.fetchBigCommerceCheckout(checkoutId);
284
227
  if (!checkout) {
285
228
  // API call failed (network error, non-200, etc.) — inconclusive.
286
229
  // Caching this would permanently disable bypass for the session if
@@ -535,7 +478,7 @@ const checkBigCommerceForceLogin = async ({ preFetched, } = {}) => {
535
478
  }
536
479
  const checkoutId = preFetched
537
480
  ? preFetched.checkoutId
538
- : await fetchCheckoutId();
481
+ : await localization.fetchCheckoutId();
539
482
  if (!checkoutId) {
540
483
  // No active cart — nothing to protect. Force-login only matters once
541
484
  // the shopper has a cart we're about to carry into Zonos checkout.
@@ -543,7 +486,7 @@ const checkBigCommerceForceLogin = async ({ preFetched, } = {}) => {
543
486
  }
544
487
  const checkout = preFetched
545
488
  ? preFetched.checkout
546
- : await fetchBigCommerceCheckout(checkoutId);
489
+ : await localization.fetchBigCommerceCheckout(checkoutId);
547
490
  if (!checkout) {
548
491
  // Storefront API failure — fail open so a transient outage doesn't
549
492
  // block the shopper. The merchant's BC checkout will still enforce
@@ -551,7 +494,7 @@ const checkBigCommerceForceLogin = async ({ preFetched, } = {}) => {
551
494
  VarianceTest.log('BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue', 'info');
552
495
  return SKIP;
553
496
  }
554
- if (isBigCommerceCustomerLoggedIn(checkout)) {
497
+ if (localization.isBigCommerceCustomerLoggedIn(checkout)) {
555
498
  return SKIP;
556
499
  }
557
500
  VarianceTest.log('BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php', 'info');
@@ -768,11 +711,11 @@ const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelecte
768
711
  // function always needs the checkout for the address check, so reusing one
769
712
  // fetch avoids the earlier 4x round-trip fan-out where bypass, address
770
713
  // lookup, and force-login each fetched independently.
771
- const checkoutId = await fetchCheckoutId();
714
+ const checkoutId = await localization.fetchCheckoutId();
772
715
  if (!checkoutId) {
773
716
  return 'noAction';
774
717
  }
775
- const checkout = await fetchBigCommerceCheckout(checkoutId);
718
+ const checkout = await localization.fetchBigCommerceCheckout(checkoutId);
776
719
  const preFetched = { checkout, checkoutId };
777
720
  // Check if the customer belongs to a bypass group (e.g. resellers) before
778
721
  // redirecting them away from BigCommerce native checkout. This delegates to
@@ -874,9 +817,9 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
874
817
  // changes — prevents stale customer-group data from a cached fetch. Share
875
818
  // one fetch between the bypass and force-login decisions so this poll
876
819
  // tick does 2 Storefront API round trips instead of 4.
877
- const checkoutId = await fetchCheckoutId();
820
+ const checkoutId = await localization.fetchCheckoutId();
878
821
  const checkout = checkoutId
879
- ? await fetchBigCommerceCheckout(checkoutId)
822
+ ? await localization.fetchBigCommerceCheckout(checkoutId)
880
823
  : null;
881
824
  const preFetched = { checkout, checkoutId };
882
825
  const { shouldBypass } = await checkBigCommerceBypassCustomerGroup({
@@ -1640,12 +1583,12 @@ const ZonosCheckout = class {
1640
1583
  if (hasManualDefault) {
1641
1584
  return;
1642
1585
  }
1643
- const checkoutId = await fetchCheckoutId();
1586
+ const checkoutId = await localization.fetchCheckoutId();
1644
1587
  if (!checkoutId) {
1645
1588
  return;
1646
1589
  }
1647
- const checkout = await fetchBigCommerceCheckout(checkoutId);
1648
- if (!isBigCommerceCustomerLoggedIn(checkout)) {
1590
+ const checkout = await localization.fetchBigCommerceCheckout(checkoutId);
1591
+ if (!localization.isBigCommerceCustomerLoggedIn(checkout)) {
1649
1592
  return;
1650
1593
  }
1651
1594
  const addresses = getBigCommerceCustomerAddresses(checkout, {
@@ -1787,6 +1730,12 @@ const ZonosCheckout = class {
1787
1730
  // reset cart store if it's not preview mode and only when checkout is in the finish step.
1788
1731
  cart.cartStoreReset();
1789
1732
  }
1733
+ // Clear policy consent on every close (not just finish) so a buyer who
1734
+ // checked the box mid-flow and then closed can't carry the prior
1735
+ // acceptance into a new attempt without a fresh checkbox click.
1736
+ if (!this.preview) {
1737
+ cart.policyConsentStoreReset();
1738
+ }
1790
1739
  // reset step to customer info
1791
1740
  cart.cartStore.step = 'customer-info';
1792
1741
  // reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
@@ -2615,77 +2564,104 @@ const ZonosCheckout = class {
2615
2564
  cart.stripeStore.shouldRenderPayInUsdButton &&
2616
2565
  !this.payInUsdConfirmDialogOpen) {
2617
2566
  this.payInUsdConfirmDialogOpen = true;
2567
+ // Don't unlock consent here — the USD-confirm dialog is mid-flow; the
2568
+ // lock should hold until the user resolves the dialog and we re-enter.
2618
2569
  return;
2619
2570
  }
2620
2571
  // Close the dialog after the user confirms to proceed with the payment in USD
2621
2572
  this.payInUsdConfirmDialogOpen = false;
2622
- // reset paypal error message
2623
- paypal.paypalStore.paypalErrorMessage = null;
2624
- // reset error state
2625
- cart.stripeStore.hasPaymentError = false;
2626
- this.submitLoading = true;
2627
- // reset inventory check message
2628
- cart.cartStore.inventoryCheckErrorMessage = null;
2629
- // Attempt to change settlement currency to USD
2630
- const baseCurrencyUpdateSuccess = await cart.stripeStoreUpdateCheckoutSessionBaseCurrency();
2631
- // Should not proceed to confirm payment if base currency update failed
2632
- if (!baseCurrencyUpdateSuccess) {
2633
- cart.stripeStore.hasPaymentError = true;
2634
- cart.stripeStore.customErrorMessage = localization.translate('Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.', {
2635
- currency: cart.stripeStore.checkoutSettlementCurrency,
2636
- });
2637
- this.submitLoading = false;
2638
- return;
2639
- }
2573
+ // Track whether consent was required at the start of this flow so we know
2574
+ // whether to release the lock in `finally`. The store reset on checkout
2575
+ // close will catch any stragglers, but releasing here lets the buyer
2576
+ // recover (uncheck / retry) when an async step aborts.
2577
+ const consentWasRequired = cart.isPolicyConsentRequired();
2640
2578
  try {
2641
- // check inventory before proceeding to payment
2642
- cart.cartStore.inventoryCheckErrorMessage =
2643
- await cart.stripeStoreHandleInventoryCheck();
2644
- }
2645
- catch (_a) {
2646
- // If user provide callback and it throw an exception, default to this message and stop the payment.
2647
- cart.cartStore.inventoryCheckErrorMessage = localization.translate('Unable to check inventory. Please try again.');
2648
- }
2649
- // Don't proceed to payment if there's an error message
2650
- if (cart.cartStore.inventoryCheckErrorMessage) {
2651
- // stop the submit loading state
2652
- this.submitLoading = false;
2653
- return;
2654
- }
2655
- // Apply store credit if customer has selected an amount
2656
- const storeCreditAmount = cart.storeCreditStoreGetEffectiveAmount();
2657
- if (storeCreditAmount > 0) {
2658
- const storeCreditResult = await cart.storeCreditStoreApplyCredit();
2659
- if (!storeCreditResult.success) {
2579
+ // reset paypal error message
2580
+ paypal.paypalStore.paypalErrorMessage = null;
2581
+ // reset error state
2582
+ cart.stripeStore.hasPaymentError = false;
2583
+ this.submitLoading = true;
2584
+ // reset inventory check message
2585
+ cart.cartStore.inventoryCheckErrorMessage = null;
2586
+ // Attempt to change settlement currency to USD
2587
+ const baseCurrencyUpdateSuccess = await cart.stripeStoreUpdateCheckoutSessionBaseCurrency();
2588
+ // Should not proceed to confirm payment if base currency update failed
2589
+ if (!baseCurrencyUpdateSuccess) {
2660
2590
  cart.stripeStore.hasPaymentError = true;
2661
- cart.stripeStore.customErrorMessage =
2662
- storeCreditResult.error ||
2663
- localization.translate('Unable to apply store credit. Please try again.');
2591
+ cart.stripeStore.customErrorMessage = localization.translate('Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.', {
2592
+ currency: cart.stripeStore.checkoutSettlementCurrency,
2593
+ });
2664
2594
  this.submitLoading = false;
2665
2595
  return;
2666
2596
  }
2667
- }
2668
- // If store credit covers the full order, create order directly without payment
2669
- if (cart.storeCreditStoreCoversFullAmount()) {
2670
2597
  try {
2671
- // Validate checkout session (landed cost ID, etc.) before creating order
2672
- const checkoutSessionStatus = await cart.validateCheckoutSession();
2673
- if (!checkoutSessionStatus.valid) {
2598
+ // check inventory before proceeding to payment
2599
+ cart.cartStore.inventoryCheckErrorMessage =
2600
+ await cart.stripeStoreHandleInventoryCheck();
2601
+ }
2602
+ catch (_a) {
2603
+ // If user provide callback and it throw an exception, default to this message and stop the payment.
2604
+ cart.cartStore.inventoryCheckErrorMessage = localization.translate('Unable to check inventory. Please try again.');
2605
+ }
2606
+ // Don't proceed to payment if there's an error message
2607
+ if (cart.cartStore.inventoryCheckErrorMessage) {
2608
+ // stop the submit loading state
2609
+ this.submitLoading = false;
2610
+ return;
2611
+ }
2612
+ // Apply store credit if customer has selected an amount
2613
+ const storeCreditAmount = cart.storeCreditStoreGetEffectiveAmount();
2614
+ if (storeCreditAmount > 0) {
2615
+ const storeCreditResult = await cart.storeCreditStoreApplyCredit();
2616
+ if (!storeCreditResult.success) {
2674
2617
  cart.stripeStore.hasPaymentError = true;
2675
- cart.stripeStore.customErrorMessage = checkoutSessionStatus.errorMessage;
2618
+ cart.stripeStore.customErrorMessage =
2619
+ storeCreditResult.error ||
2620
+ localization.translate('Unable to apply store credit. Please try again.');
2676
2621
  this.submitLoading = false;
2677
2622
  return;
2678
2623
  }
2679
- const orderResult = await cart.storeCreditStoreCreateOrder();
2680
- if (!orderResult.success) {
2624
+ }
2625
+ // If store credit covers the full order, create order directly without payment
2626
+ if (cart.storeCreditStoreCoversFullAmount()) {
2627
+ try {
2628
+ // Validate checkout session (landed cost ID, etc.) before creating order
2629
+ const checkoutSessionStatus = await cart.validateCheckoutSession();
2630
+ if (!checkoutSessionStatus.valid) {
2631
+ cart.stripeStore.hasPaymentError = true;
2632
+ cart.stripeStore.customErrorMessage = checkoutSessionStatus.errorMessage;
2633
+ this.submitLoading = false;
2634
+ return;
2635
+ }
2636
+ const orderResult = await cart.storeCreditStoreCreateOrder();
2637
+ if (!orderResult.success) {
2638
+ cart.stripeStore.hasPaymentError = true;
2639
+ cart.stripeStore.customErrorMessage =
2640
+ orderResult.error ||
2641
+ localization.translate('Unable to place order with store credit. Please try again.');
2642
+ this.submitLoading = false;
2643
+ return;
2644
+ }
2645
+ cart.cartStoreNextStep();
2646
+ cart.cartStoreClearCheckoutInterval();
2647
+ }
2648
+ catch (err) {
2649
+ handleFetch.logError(err);
2650
+ paypal.submitAnalytics({
2651
+ event: 'zonos-checkout-payment-fail',
2652
+ metadata: {
2653
+ checkoutSessionId: localization.storageStore.checkoutSessionId,
2654
+ },
2655
+ });
2681
2656
  cart.stripeStore.hasPaymentError = true;
2682
- cart.stripeStore.customErrorMessage =
2683
- orderResult.error ||
2684
- localization.translate('Unable to place order with store credit. Please try again.');
2685
- this.submitLoading = false;
2686
- return;
2687
2657
  }
2658
+ this.submitLoading = false;
2659
+ return;
2660
+ }
2661
+ try {
2662
+ await cart.stripeStoreConfirmPayment();
2688
2663
  cart.cartStoreNextStep();
2664
+ // clear the checkout session timeout timer when purchase is complete
2689
2665
  cart.cartStoreClearCheckoutInterval();
2690
2666
  }
2691
2667
  catch (err) {
@@ -2697,32 +2673,22 @@ const ZonosCheckout = class {
2697
2673
  },
2698
2674
  });
2699
2675
  cart.stripeStore.hasPaymentError = true;
2676
+ // should request inventory refund if there's an error during payment
2677
+ if (cart.stripeStore.shouldInventoryRefund) {
2678
+ void cart.stripeStoreHandleInventoryRefund();
2679
+ cart.stripeStore.shouldInventoryRefund = false;
2680
+ }
2700
2681
  }
2701
2682
  this.submitLoading = false;
2702
- return;
2703
2683
  }
2704
- try {
2705
- await cart.stripeStoreConfirmPayment();
2706
- cart.cartStoreNextStep();
2707
- // clear the checkout session timeout timer when purchase is complete
2708
- cart.cartStoreClearCheckoutInterval();
2709
- }
2710
- catch (err) {
2711
- handleFetch.logError(err);
2712
- paypal.submitAnalytics({
2713
- event: 'zonos-checkout-payment-fail',
2714
- metadata: {
2715
- checkoutSessionId: localization.storageStore.checkoutSessionId,
2716
- },
2717
- });
2718
- cart.stripeStore.hasPaymentError = true;
2719
- // should request inventory refund if there's an error during payment
2720
- if (cart.stripeStore.shouldInventoryRefund) {
2721
- void cart.stripeStoreHandleInventoryRefund();
2722
- cart.stripeStore.shouldInventoryRefund = false;
2684
+ finally {
2685
+ // Release the consent lock on every terminal exit (success or failure)
2686
+ // so the buyer can re-toggle / retry. On success the cart advances and
2687
+ // the close-handler reset would clean this up anyway.
2688
+ if (consentWasRequired) {
2689
+ cart.policyConsentStore.locked = false;
2723
2690
  }
2724
2691
  }
2725
- this.submitLoading = false;
2726
2692
  }
2727
2693
  async handleFinishClick() {
2728
2694
  // reset stripe store
@@ -2734,6 +2700,8 @@ const ZonosCheckout = class {
2734
2700
  }
2735
2701
  // reset cart store
2736
2702
  cart.cartStoreReset();
2703
+ // reset policy consent so the next checkout starts un-accepted
2704
+ cart.policyConsentStoreReset();
2737
2705
  // redirect to vendor store url if this is legacy checkout.
2738
2706
  if (window.Zonos.isLegacyCheckout && window.Zonos.cartData) {
2739
2707
  const storeBaseUrl = window.Zonos.cartData.storeBaseUrl ||
@@ -2935,6 +2903,8 @@ const ZonosCheckout = class {
2935
2903
  cart.stripeStoreReset();
2936
2904
  // reset cart store
2937
2905
  cart.cartStoreReset();
2906
+ // reset policy consent
2907
+ cart.policyConsentStoreReset();
2938
2908
  // cleanup onChange listener
2939
2909
  this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
2940
2910
  window.removeEventListener('message', this.handleHostedOpenWindowCallback);
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const zonosStore = require('./zonosStore-0662b95f.js');
6
+ const zonosStore = require('./zonosStore-45a87908.js');
7
7
  require('./VarianceTest-bec00ea8.js');
8
8
 
9
9
  const zonosCollapseCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-ed2de167.js');
6
+ const cart = require('./cart-87fbbb5a.js');
7
7
  const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-31da84b7.js');
8
- const zonosStore = require('./zonosStore-0662b95f.js');
8
+ const zonosStore = require('./zonosStore-45a87908.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const styles = require('./styles-d1e64fb9.js');
11
- require('./localization-66d378ab.js');
11
+ require('./localization-a969f224.js');
12
12
  require('./handleFetch-954f30e1.js');
13
13
  require('./VarianceTest-bec00ea8.js');
14
- require('./isDarkColor-e317bb06.js');
15
- require('./getBorderRadius-a91911e7.js');
14
+ require('./isDarkColor-5d6ca405.js');
15
+ require('./getBorderRadius-fc683d94.js');
16
16
 
17
17
  const zonosCollectCartItemsCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}";
18
18
  const ZonosCollectCartItemsStyle0 = zonosCollectCartItemsCss;
@@ -3,23 +3,23 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-ed2de167.js');
7
- const paypal = require('./paypal-d8282578.js');
8
- const localization = require('./localization-66d378ab.js');
9
- const zonosStore = require('./zonosStore-0662b95f.js');
6
+ const cart = require('./cart-87fbbb5a.js');
7
+ const paypal = require('./paypal-cfe1e8e9.js');
8
+ const localization = require('./localization-a969f224.js');
9
+ const zonosStore = require('./zonosStore-45a87908.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
11
11
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
12
- const getBorderRadius = require('./getBorderRadius-a91911e7.js');
12
+ const getBorderRadius = require('./getBorderRadius-fc683d94.js');
13
13
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
- const isCollectMobileTablet = require('./isCollectMobileTablet-fe8149a5.js');
14
+ const isCollectMobileTablet = require('./isCollectMobileTablet-1cb21c59.js');
15
15
  const classes = require('./classes-b7918f56.js');
16
16
  const ILanguage = require('./ILanguage-98b04442.js');
17
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-ac9083d9.js');
18
- const placeTestOrder = require('./placeTestOrder-0a4b9dd7.js');
17
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-5a333d29.js');
18
+ const placeTestOrder = require('./placeTestOrder-613878fb.js');
19
19
  const renderFallback = require('./renderFallback-bc20ee20.js');
20
- require('./isDarkColor-e317bb06.js');
21
- require('./isContrastColor-a02c4889.js');
22
- require('./submitGtag-07a3b09e.js');
20
+ require('./isDarkColor-5d6ca405.js');
21
+ require('./isContrastColor-76592c92.js');
22
+ require('./submitGtag-4906b161.js');
23
23
 
24
24
  const RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
25
25
 
@@ -3,21 +3,21 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-ed2de167.js');
7
- const isCollectMobileTablet = require('./isCollectMobileTablet-fe8149a5.js');
8
- const paypal = require('./paypal-d8282578.js');
9
- const localization = require('./localization-66d378ab.js');
10
- const zonosStore = require('./zonosStore-0662b95f.js');
6
+ const cart = require('./cart-87fbbb5a.js');
7
+ const isCollectMobileTablet = require('./isCollectMobileTablet-1cb21c59.js');
8
+ const paypal = require('./paypal-cfe1e8e9.js');
9
+ const localization = require('./localization-a969f224.js');
10
+ const zonosStore = require('./zonosStore-45a87908.js');
11
11
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
12
12
  const handleFetch = require('./handleFetch-954f30e1.js');
13
13
  const classes = require('./classes-b7918f56.js');
14
14
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
15
15
  const renderFallback = require('./renderFallback-bc20ee20.js');
16
16
  const ILanguage = require('./ILanguage-98b04442.js');
17
- require('./isDarkColor-e317bb06.js');
18
- require('./getBorderRadius-a91911e7.js');
19
- require('./isContrastColor-a02c4889.js');
20
- require('./submitGtag-07a3b09e.js');
17
+ require('./isDarkColor-5d6ca405.js');
18
+ require('./getBorderRadius-fc683d94.js');
19
+ require('./isContrastColor-76592c92.js');
20
+ require('./submitGtag-4906b161.js');
21
21
 
22
22
  const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
23
23
 
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-ed2de167.js');
7
- const localization = require('./localization-66d378ab.js');
8
- const zonosStore = require('./zonosStore-0662b95f.js');
6
+ const cart = require('./cart-87fbbb5a.js');
7
+ const localization = require('./localization-a969f224.js');
8
+ const zonosStore = require('./zonosStore-45a87908.js');
9
9
  const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
11
11
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
12
- const submitGtag = require('./submitGtag-07a3b09e.js');
13
- require('./isDarkColor-e317bb06.js');
14
- require('./getBorderRadius-a91911e7.js');
12
+ const submitGtag = require('./submitGtag-4906b161.js');
13
+ require('./isDarkColor-5d6ca405.js');
14
+ require('./getBorderRadius-fc683d94.js');
15
15
 
16
16
  const getZonosSettings = async () => {
17
17
  if (window.Zonos.cartSettings) {
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-66d378ab.js');
7
- const zonosStore = require('./zonosStore-0662b95f.js');
6
+ const localization = require('./localization-a969f224.js');
7
+ const zonosStore = require('./zonosStore-45a87908.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  require('./handleFetch-954f30e1.js');
10
10
  require('./VarianceTest-bec00ea8.js');
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-66d378ab.js');
7
- const zonosStore = require('./zonosStore-0662b95f.js');
6
+ const localization = require('./localization-a969f224.js');
7
+ const zonosStore = require('./zonosStore-45a87908.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
- const isDarkColor = require('./isDarkColor-e317bb06.js');
9
+ const isDarkColor = require('./isDarkColor-5d6ca405.js');
10
10
  const ILanguage = require('./ILanguage-98b04442.js');
11
11
  const classes = require('./classes-b7918f56.js');
12
12
  require('./handleFetch-954f30e1.js');