@zonos/elements 1.3.142 → 1.3.144

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/{CheckoutConfig-eaaf62a1.js → CheckoutConfig-d25d548d.js} +13 -3
  2. package/dist/cjs/TaxId-4632639d.js +29 -0
  3. package/dist/cjs/{cart-199b0751.js → cart-2398abd4.js} +547 -42
  4. package/dist/cjs/{createCustomEvent-3e982e57.js → createCustomEvent-7b6fad95.js} +0 -3
  5. package/dist/cjs/{getBorderRadius-f97c99ad.js → getBorderRadius-7d0772bf.js} +1 -1
  6. package/dist/cjs/{handleFetch-864d3c53.js → handleFetch-3673a0c2.js} +30 -1
  7. package/dist/cjs/{index-b678ce0c.js → index-2f90486e.js} +209 -157
  8. package/dist/cjs/index.cjs.js +15 -11
  9. package/dist/cjs/{isDarkColor-434d71dd.js → isDarkColor-2acf30d1.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{paypal-4f1ee604.js → paypal-7ed9dfb7.js} +4 -4
  12. package/dist/cjs/{zonos-address_7.cjs.entry.js → zonos-address_8.cjs.entry.js} +143 -10
  13. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  16. package/dist/cjs/zonos-card.cjs.entry.js +3 -3
  17. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +151 -32
  18. package/dist/cjs/zonos-checkout.cjs.entry.js +36 -16
  19. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  21. package/dist/cjs/zonos-controller.cjs.entry.js +8 -8
  22. package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
  23. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
  24. package/dist/cjs/zonos-elements.cjs.js +3 -3
  25. package/dist/cjs/{zonos-notification_3.cjs.entry.js → zonos-empty-state-payment_4.cjs.entry.js} +87 -9
  26. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +10 -10
  27. package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
  28. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  29. package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
  30. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  31. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  33. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
  35. package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
  36. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
  37. package/dist/cjs/{zonosStore-8971eb65.js → zonosStore-46809186.js} +1 -1
  38. package/dist/collection/collection-manifest.json +3 -1
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +5 -1
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -2
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -4
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -0
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -0
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +34 -6
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -0
  46. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +109 -18
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateDarkIcon.svg +22 -0
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateLightIcon.svg +22 -0
  49. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.css +51 -0
  50. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +90 -0
  51. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +62 -7
  52. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
  53. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +32 -1
  54. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +4 -0
  55. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +6 -0
  56. package/dist/collection/components/common/zonos-badge/zonos-badge.js +18 -2
  57. package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -0
  58. package/dist/collection/components/common/zonos-button/zonos-button.js +30 -0
  59. package/dist/collection/components/common/zonos-card/zonos-card.js +20 -4
  60. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +14 -0
  61. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +4 -0
  62. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +4 -0
  63. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +22 -0
  64. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +4 -0
  65. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -0
  66. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -0
  67. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +26 -0
  68. package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -0
  69. package/dist/collection/components/common/zonos-input/zonos-input.js +12 -0
  70. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -0
  71. package/dist/collection/components/common/zonos-link/zonos-link.js +8 -0
  72. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -0
  73. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +6 -0
  74. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +4 -0
  75. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +11 -1
  76. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -0
  77. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +162 -0
  78. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +264 -0
  79. package/dist/collection/components/common/zonos-text/zonos-text.js +8 -0
  80. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +6 -2
  81. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +6 -2
  82. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +4 -2
  83. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +12 -4
  84. package/dist/collection/components/component-template/zonos-component/zonos-component.js +7 -1
  85. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +7 -1
  86. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +9 -3
  87. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +17 -5
  88. package/dist/collection/components/main/zonos-controller.js +7 -3
  89. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  90. package/dist/collection/components/store/checkout/cart.js +3 -0
  91. package/dist/collection/components/store/checkout/stripe.js +121 -40
  92. package/dist/collection/components/store/translationStore/strings.arabic.js +21 -0
  93. package/dist/collection/components/store/translationStore/strings.base.js +21 -0
  94. package/dist/collection/components/store/translationStore/strings.chinese.js +21 -0
  95. package/dist/collection/components/store/translationStore/strings.danish.js +21 -0
  96. package/dist/collection/components/store/translationStore/strings.dutch.js +21 -0
  97. package/dist/collection/components/store/translationStore/strings.french.js +21 -0
  98. package/dist/collection/components/store/translationStore/strings.german.js +21 -0
  99. package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -0
  100. package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -0
  101. package/dist/collection/components/store/translationStore/strings.italian.js +21 -0
  102. package/dist/collection/components/store/translationStore/strings.japanese.js +21 -0
  103. package/dist/collection/components/store/translationStore/strings.korean.js +21 -0
  104. package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -0
  105. package/dist/collection/components/store/translationStore/strings.polish.js +21 -0
  106. package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -0
  107. package/dist/collection/components/store/translationStore/strings.russian.js +21 -0
  108. package/dist/collection/components/store/translationStore/strings.spanish.js +21 -0
  109. package/dist/collection/components/store/translationStore/strings.swedish.js +21 -0
  110. package/dist/collection/components/store/translationStore/strings.turkish.js +21 -0
  111. package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -0
  112. package/dist/collection/components/stripe/zonos-address/zonos-address.js +7 -1
  113. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +84 -3
  114. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -1
  115. package/dist/collection/components/utils/api/getCheckoutSession.js +1 -1
  116. package/dist/collection/components/utils/api/placeTestOrder.js +40 -0
  117. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  118. package/dist/collection/components/utils/checkout/getIsStagingMode.js +1 -0
  119. package/dist/collection/components/utils/checkout/getIsTestMode.js +5 -1
  120. package/dist/collection/components/utils/handleFetch.js +22 -1
  121. package/dist/collection/components/utils/validateEmailValue.js +4 -0
  122. package/dist/collection/scripts/_getTempCartById.js +2 -2
  123. package/dist/collection/scripts/_getWithTestPublicCredential.js +5 -2
  124. package/dist/collection/scripts/cart/_getIsValidCartId.js +11 -0
  125. package/dist/collection/types/checkout/TaxId.js +24 -0
  126. package/dist/collection/types/checkout/api/PlaceTestOrder.js +1 -0
  127. package/dist/collection/types/generated/graphql.internal.types.js +64 -0
  128. package/dist/collection/types/index.js +2 -0
  129. package/dist/esm/{CheckoutConfig-262008fe.js → CheckoutConfig-573bd959.js} +13 -3
  130. package/dist/esm/TaxId-915ef042.js +26 -0
  131. package/dist/esm/{cart-cf87ec6f.js → cart-3427ee25.js} +547 -42
  132. package/dist/esm/{createCustomEvent-31a792d3.js → createCustomEvent-58159025.js} +1 -3
  133. package/dist/esm/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
  134. package/dist/esm/{handleFetch-badf4543.js → handleFetch-b4633675.js} +29 -2
  135. package/dist/esm/{index-986b5ff2.js → index-d82f06f2.js} +209 -157
  136. package/dist/esm/index.js +14 -12
  137. package/dist/esm/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
  138. package/dist/esm/loader.js +3 -3
  139. package/dist/esm/{paypal-b7124cc4.js → paypal-4e2f9753.js} +4 -4
  140. package/dist/esm/{zonos-address_7.entry.js → zonos-address_8.entry.js} +143 -11
  141. package/dist/esm/zonos-badge.entry.js +2 -2
  142. package/dist/esm/zonos-banner.entry.js +2 -2
  143. package/dist/esm/zonos-button_3.entry.js +4 -4
  144. package/dist/esm/zonos-card.entry.js +3 -3
  145. package/dist/esm/zonos-cart-items_13.entry.js +149 -30
  146. package/dist/esm/zonos-checkout.entry.js +34 -14
  147. package/dist/esm/zonos-collapse.entry.js +2 -2
  148. package/dist/esm/zonos-component.entry.js +2 -2
  149. package/dist/esm/zonos-controller.entry.js +8 -8
  150. package/dist/esm/zonos-country-flag.entry.js +6 -6
  151. package/dist/esm/zonos-country-select_4.entry.js +10 -10
  152. package/dist/esm/zonos-elements.js +4 -4
  153. package/dist/esm/{zonos-notification_3.entry.js → zonos-empty-state-payment_4.entry.js} +87 -10
  154. package/dist/esm/zonos-hello-dialog.entry.js +10 -10
  155. package/dist/esm/zonos-hello.entry.js +6 -6
  156. package/dist/esm/zonos-input.entry.js +3 -3
  157. package/dist/esm/zonos-language-select_2.entry.js +6 -6
  158. package/dist/esm/zonos-link.entry.js +1 -1
  159. package/dist/esm/zonos-logo.entry.js +2 -2
  160. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  161. package/dist/esm/zonos-text.entry.js +2 -2
  162. package/dist/esm/zonos-toggle.entry.js +4 -4
  163. package/dist/esm/zonos-tooltip.entry.js +3 -3
  164. package/dist/esm/zonos-v-stack.entry.js +4 -4
  165. package/dist/esm/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
  166. package/dist/esm-es5/CheckoutConfig-573bd959.js +1 -0
  167. package/dist/esm-es5/TaxId-915ef042.js +1 -0
  168. package/dist/esm-es5/cart-3427ee25.js +1 -0
  169. package/dist/esm-es5/createCustomEvent-58159025.js +1 -0
  170. package/dist/esm-es5/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
  171. package/dist/esm-es5/handleFetch-b4633675.js +1 -0
  172. package/dist/esm-es5/index-d82f06f2.js +2 -0
  173. package/dist/esm-es5/index.js +1 -1
  174. package/dist/esm-es5/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
  175. package/dist/esm-es5/loader.js +1 -1
  176. package/dist/esm-es5/{paypal-b7124cc4.js → paypal-4e2f9753.js} +1 -1
  177. package/dist/esm-es5/zonos-address_8.entry.js +1 -0
  178. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  179. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  180. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  181. package/dist/esm-es5/zonos-card.entry.js +1 -1
  182. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  183. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  184. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  185. package/dist/esm-es5/zonos-component.entry.js +1 -1
  186. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  187. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  188. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  189. package/dist/esm-es5/zonos-elements.js +1 -1
  190. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -0
  191. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  192. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  193. package/dist/esm-es5/zonos-input.entry.js +1 -1
  194. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  195. package/dist/esm-es5/zonos-link.entry.js +1 -1
  196. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  197. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  198. package/dist/esm-es5/zonos-text.entry.js +1 -1
  199. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  200. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  201. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  202. package/dist/esm-es5/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
  203. package/dist/scripts/index.d.ts +170 -0
  204. package/dist/scripts/index.js +1 -1
  205. package/dist/scripts/loadZonos.js +1 -1
  206. package/dist/scripts/zonos.js +1 -1
  207. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
  208. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +18 -0
  209. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.d.ts +13 -0
  210. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
  211. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
  212. package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +46 -0
  213. package/dist/types/components/store/checkout/cart.d.ts +5 -0
  214. package/dist/types/components/store/checkout/stripe.d.ts +16 -2
  215. package/dist/types/components/store/translationStore/strings.arabic.d.ts +21 -0
  216. package/dist/types/components/store/translationStore/strings.base.d.ts +21 -0
  217. package/dist/types/components/store/translationStore/strings.chinese.d.ts +21 -0
  218. package/dist/types/components/store/translationStore/strings.danish.d.ts +21 -0
  219. package/dist/types/components/store/translationStore/strings.dutch.d.ts +21 -0
  220. package/dist/types/components/store/translationStore/strings.french.d.ts +21 -0
  221. package/dist/types/components/store/translationStore/strings.german.d.ts +21 -0
  222. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +21 -0
  223. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +21 -0
  224. package/dist/types/components/store/translationStore/strings.italian.d.ts +21 -0
  225. package/dist/types/components/store/translationStore/strings.japanese.d.ts +21 -0
  226. package/dist/types/components/store/translationStore/strings.korean.d.ts +21 -0
  227. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +21 -0
  228. package/dist/types/components/store/translationStore/strings.polish.d.ts +21 -0
  229. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +21 -0
  230. package/dist/types/components/store/translationStore/strings.russian.d.ts +21 -0
  231. package/dist/types/components/store/translationStore/strings.spanish.d.ts +21 -0
  232. package/dist/types/components/store/translationStore/strings.swedish.d.ts +21 -0
  233. package/dist/types/components/store/translationStore/strings.turkish.d.ts +21 -0
  234. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +21 -0
  235. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +6 -0
  236. package/dist/types/components/utils/api/placeTestOrder.d.ts +7 -0
  237. package/dist/types/components/utils/checkout/getIsStagingMode.d.ts +1 -0
  238. package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
  239. package/dist/types/components/utils/validateEmailValue.d.ts +1 -0
  240. package/dist/types/components.d.ts +161 -0
  241. package/dist/types/types/checkout/TaxId.d.ts +20 -0
  242. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  243. package/dist/types/types/checkout/api/CheckoutSession.d.ts +8 -2
  244. package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +7 -0
  245. package/dist/types/types/generated/graphql.internal.types.d.ts +144 -109
  246. package/dist/types/types/generated/graphql.internal.types.ts +180 -99
  247. package/dist/types/types/index.d.ts +2 -0
  248. package/dist/zonos-elements/index.esm.js +1 -1
  249. package/dist/zonos-elements/{p-68d79b58.entry.js → p-00136c20.entry.js} +1 -1
  250. package/dist/zonos-elements/{p-d381288e.entry.js → p-0028d158.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-72256333.entry.js → p-05013308.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-c1b098de.system.js → p-0e6a3cd2.system.js} +1 -1
  253. package/dist/zonos-elements/{p-c0164a3c.system.js → p-12546668.system.js} +1 -1
  254. package/dist/zonos-elements/p-12a6b7bd.system.js +1 -0
  255. package/dist/zonos-elements/p-1423ebbe.js +1 -0
  256. package/dist/zonos-elements/p-18e5b741.system.js +1 -0
  257. package/dist/zonos-elements/p-2deae669.entry.js +1 -0
  258. package/dist/zonos-elements/{p-36dfc7ac.system.js → p-32912caf.system.js} +1 -1
  259. package/dist/zonos-elements/{p-fc4658a6.entry.js → p-36f97fd9.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-983f23a1.system.entry.js → p-3a213429.system.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-e6554a6f.system.entry.js → p-3aa4841a.system.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-a13d5957.system.entry.js → p-3d221556.system.entry.js} +1 -1
  263. package/dist/zonos-elements/{p-381874b0.system.entry.js → p-41e26cc4.system.entry.js} +1 -1
  264. package/dist/zonos-elements/{p-2d514c1d.system.entry.js → p-463e44b6.system.entry.js} +1 -1
  265. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -0
  266. package/dist/zonos-elements/{p-6271e108.js → p-485d89a4.js} +1 -1
  267. package/dist/zonos-elements/p-48bca3d4.system.entry.js +1 -0
  268. package/dist/zonos-elements/p-4caffd96.system.js +2 -0
  269. package/dist/zonos-elements/{p-0920500d.entry.js → p-50896f89.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-2e152517.system.entry.js → p-515e3606.system.entry.js} +1 -1
  271. package/dist/zonos-elements/p-5834c218.system.js +1 -0
  272. package/dist/zonos-elements/p-595f5dd2.js +1 -0
  273. package/dist/zonos-elements/p-5bd927f2.js +1 -0
  274. package/dist/zonos-elements/{p-2761ad55.system.entry.js → p-619c07c6.system.entry.js} +1 -1
  275. package/dist/zonos-elements/{p-2b8cddb7.entry.js → p-69f84611.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-766dd01f.js → p-6c578d26.js} +1 -1
  277. package/dist/zonos-elements/{p-28295342.entry.js → p-709c7e9e.entry.js} +1 -1
  278. package/dist/zonos-elements/{p-0197a9bf.system.entry.js → p-7140439f.system.entry.js} +1 -1
  279. package/dist/zonos-elements/p-7302a081.system.entry.js +1 -0
  280. package/dist/zonos-elements/p-7e47f6cf.entry.js +1 -0
  281. package/dist/zonos-elements/{p-44dd4269.entry.js → p-7f288336.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-0e54432c.system.entry.js → p-81084be5.system.entry.js} +1 -1
  283. package/dist/zonos-elements/p-81a5dd5c.js +1 -0
  284. package/dist/zonos-elements/p-84e5fc0b.entry.js +1 -0
  285. package/dist/zonos-elements/{p-33e1d25e.system.entry.js → p-86e825f0.system.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-0b5f4ca7.system.entry.js → p-91fc6c24.system.entry.js} +1 -1
  287. package/dist/zonos-elements/p-9951462e.entry.js +1 -0
  288. package/dist/zonos-elements/{p-a2bce31d.system.entry.js → p-9cf018c8.system.entry.js} +1 -1
  289. package/dist/zonos-elements/{p-232963d3.system.entry.js → p-9e05e259.system.entry.js} +1 -1
  290. package/dist/zonos-elements/{p-6b490b0a.system.entry.js → p-a8cf3542.system.entry.js} +1 -1
  291. package/dist/zonos-elements/p-ab68ad11.js +2 -0
  292. package/dist/zonos-elements/{p-4b685549.js → p-b0616716.js} +1 -1
  293. package/dist/zonos-elements/{p-1e3ea4ae.entry.js → p-b12fbc07.entry.js} +1 -1
  294. package/dist/zonos-elements/{p-d198421b.system.entry.js → p-b2292b70.system.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-58a09715.entry.js → p-b262b93e.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-545c05ce.entry.js → p-b288c2ed.entry.js} +1 -1
  297. package/dist/zonos-elements/p-b3882a73.system.js +1 -0
  298. package/dist/zonos-elements/{p-9306a835.entry.js → p-b5c360af.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-2cfc00b8.system.entry.js → p-b6bbdb59.system.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-f295030e.system.entry.js → p-bb92882d.system.entry.js} +1 -1
  301. package/dist/zonos-elements/p-bf37ccc7.system.js +1 -0
  302. package/dist/zonos-elements/{p-21b538ea.system.js → p-c015be06.system.js} +1 -1
  303. package/dist/zonos-elements/p-c8b0bc02.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-39cac2c1.entry.js → p-cbd5d932.entry.js} +1 -1
  305. package/dist/zonos-elements/{p-7c5c0a85.entry.js → p-cdfca133.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-675f60b4.entry.js → p-d2f2c685.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-2c19f5e2.entry.js → p-d6061c79.entry.js} +1 -1
  308. package/dist/zonos-elements/p-da6a29e4.system.entry.js +1 -0
  309. package/dist/zonos-elements/{p-65069140.entry.js → p-db3f381d.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-9dec2b74.entry.js → p-de221545.entry.js} +1 -1
  311. package/dist/zonos-elements/{p-2949faf3.entry.js → p-e01ccb27.entry.js} +1 -1
  312. package/dist/zonos-elements/{p-b0174a8f.js → p-e02fd9ae.js} +1 -1
  313. package/dist/zonos-elements/{p-3cf30d83.entry.js → p-e2f1fa53.entry.js} +1 -1
  314. package/dist/zonos-elements/{p-ebdd9b64.system.entry.js → p-e8c70c7d.system.entry.js} +1 -1
  315. package/dist/zonos-elements/{p-a8bd492d.system.entry.js → p-ea35b237.system.entry.js} +1 -1
  316. package/dist/zonos-elements/p-f0c8150e.js +1 -0
  317. package/dist/zonos-elements/p-f3b0a097.system.js +1 -0
  318. package/dist/zonos-elements/{p-d5a3851d.system.entry.js → p-fc4ebe6b.system.entry.js} +1 -1
  319. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  320. package/dist/zonos-elements/zonos-elements.js +1 -1
  321. package/package.json +9 -8
  322. package/dist/esm-es5/CheckoutConfig-262008fe.js +0 -1
  323. package/dist/esm-es5/cart-cf87ec6f.js +0 -1
  324. package/dist/esm-es5/createCustomEvent-31a792d3.js +0 -1
  325. package/dist/esm-es5/handleFetch-badf4543.js +0 -1
  326. package/dist/esm-es5/index-986b5ff2.js +0 -2
  327. package/dist/esm-es5/zonos-address_7.entry.js +0 -1
  328. package/dist/esm-es5/zonos-notification_3.entry.js +0 -1
  329. package/dist/zonos-elements/p-076388d3.entry.js +0 -1
  330. package/dist/zonos-elements/p-0cda2818.system.js +0 -1
  331. package/dist/zonos-elements/p-0d2cf216.entry.js +0 -1
  332. package/dist/zonos-elements/p-1460f917.js +0 -1
  333. package/dist/zonos-elements/p-272052bd.system.entry.js +0 -1
  334. package/dist/zonos-elements/p-3cb4468f.system.entry.js +0 -1
  335. package/dist/zonos-elements/p-3d82e70e.js +0 -1
  336. package/dist/zonos-elements/p-64372f93.system.js +0 -1
  337. package/dist/zonos-elements/p-673b4402.system.entry.js +0 -1
  338. package/dist/zonos-elements/p-680d3694.js +0 -2
  339. package/dist/zonos-elements/p-7b999a40.js +0 -1
  340. package/dist/zonos-elements/p-7c643376.system.js +0 -1
  341. package/dist/zonos-elements/p-866bb93e.system.js +0 -1
  342. package/dist/zonos-elements/p-8c487480.entry.js +0 -1
  343. package/dist/zonos-elements/p-9b720cf4.entry.js +0 -1
  344. package/dist/zonos-elements/p-a5b294d7.js +0 -1
  345. package/dist/zonos-elements/p-b50667b6.system.js +0 -2
  346. package/dist/zonos-elements/p-bfcfd29b.system.js +0 -1
  347. package/dist/zonos-elements/p-ded984d9.system.entry.js +0 -1
  348. package/dist/zonos-elements/p-e9964a5a.system.js +0 -1
@@ -1,16 +1,17 @@
1
- import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-986b5ff2.js';
2
- import { e as cartStore, J as currencyFormat, q as translate, K as cartStoreHasOneEligibleItem, L as stripeStoreApplyPromoCode, M as stripeStoreRemovePromoCode, f as stripeStore, A as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, N as stripeStoreResetPromoCode, O as stripeStoreMessageBasedOnStatus, l as localizationStore, P as stripeStoreTranslateAddressToLatin, Q as cartStoreUpdateSelectedShippingOption, R as cartStoreGetShippingTransitInfo, S as sortServiceLevelOptionsByAmount } from './cart-cf87ec6f.js';
1
+ import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-d82f06f2.js';
2
+ import { e as cartStore, J as currencyFormat, q as translate, K as cartStoreHasOneEligibleItem, L as stripeStoreApplyPromoCode, M as stripeStoreRemovePromoCode, f as stripeStore, A as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, N as stripeStoreResetPromoCode, O as stripeStoreMessageBasedOnStatus, l as localizationStore, w as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as cartStoreUpdateSelectedShippingOption, R as cartStoreGetShippingTransitInfo, S as sortServiceLevelOptionsByAmount } from './cart-3427ee25.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-b7124cc4.js';
5
- import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-708637e7.js';
6
- import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
7
- import { g as getBorderRadius } from './getBorderRadius-4aca63d4.js';
8
- import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, b as allLogs } from './handleFetch-badf4543.js';
4
+ import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-4e2f9753.js';
5
+ import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
6
+ import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, b as logError, a as getIsStagingMode } from './handleFetch-b4633675.js';
7
+ import { c as createCustomEvent } from './createCustomEvent-58159025.js';
8
+ import { g as getBorderRadius } from './getBorderRadius-b32d4218.js';
9
9
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
10
10
  import { l as languages } from './ILanguage-cd6acb72.js';
11
- import { i as isDarkColor, t as tinycolor } from './isDarkColor-4915739f.js';
11
+ import { i as isDarkColor, t as tinycolor } from './isDarkColor-10f38df6.js';
12
12
  import { i as isColorVariable } from './isColorVariable-0a94004f.js';
13
13
  import { c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
14
+ import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-915ef042.js';
14
15
 
15
16
  const getDisplayCurrency = () => {
16
17
  var _a, _b;
@@ -1524,6 +1525,20 @@ const ZonosCheckoutFinish = class {
1524
1525
  stripeStoreReset();
1525
1526
  cartStore.checkoutSessionId = null;
1526
1527
  };
1528
+ this.checkStagingOrderStatus = async () => {
1529
+ this.notificationType = 'success';
1530
+ this.notificationTitle = translate("You're all set!");
1531
+ this.notificationMessages =
1532
+ stripeStoreMessageBasedOnStatus('succeeded').messages;
1533
+ // override title if notification type is success
1534
+ this.useOverrideSuccessNotification();
1535
+ await this.handleSuccessBehavior();
1536
+ // reset promo when checkout is finished
1537
+ stripeStoreResetPromoCode();
1538
+ stripeStoreReset();
1539
+ paypalStoreReset();
1540
+ cartStore.checkoutSessionId = null;
1541
+ };
1527
1542
  this.checkPaypalPaymentStatus = async () => {
1528
1543
  // render error message if there's an error
1529
1544
  if (paypalStore.paypalErrorMessage) {
@@ -1590,7 +1605,10 @@ const ZonosCheckoutFinish = class {
1590
1605
  this.isLoading = false;
1591
1606
  return;
1592
1607
  }
1593
- if (paypalStore.orderIdCreated) {
1608
+ if (cartStore.isStagingMode) {
1609
+ void this.checkStagingOrderStatus();
1610
+ }
1611
+ else if (paypalStore.orderIdCreated) {
1594
1612
  void this.checkPaypalPaymentStatus();
1595
1613
  }
1596
1614
  else {
@@ -1599,17 +1617,22 @@ const ZonosCheckoutFinish = class {
1599
1617
  }
1600
1618
  render() {
1601
1619
  const isTestMode = getIsTestMode();
1602
- return (h(Host, { key: '7e1b8c53a085ae60d8189aef087a9c458c3dccd0', class: "zonos--checkout-finish zonos--elements", style: {
1620
+ return (h(Host, { key: '6ad050e91df2b56c55e142cc69d0b582c0c8469a', class: "zonos--checkout-finish zonos--elements", style: {
1603
1621
  '--zonos--border-radius': getBorderRadius({
1604
1622
  overrideBorderStyle: this.borderRadius,
1605
1623
  }),
1606
- } }, !this.isLoading && (h("div", { key: 'b31bed34ca67255cdc6ef6b546f5d6a880e4b309', class: "zonos--finish-details" }, h("div", { key: 'e3cb21607b8f1256b3096fe4f21a806a74174f66', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'fac1d2134f1c032cefeb9d36c5c4677767ed0972', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '94b8da1ca6a391295c22d285e65530f5dfe97a41', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: '4ebf2bb81ceb0d27b4fd582400606b238a3dfbae',
1624
+ } }, !this.isLoading && (h("div", { key: '8e47016dc83cbe1af79f384285c606fcb737e475', class: "zonos--finish-details" }, h("div", { key: 'd1c14e8db7aa70d04b77b10bb0d8b1e3de5529e3', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'd26717fe5d844f2fe6a87b05a566ef0da2d740f7', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '7845c4ff7872884d8e5b8b275eb8a76efa855e52', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: '891901ad2c4fb7c2025ad47417425cd239e36cf1',
1607
1625
  // Only show loading spinner if it's not an error notification
1608
1626
  loading: this.isWaitingToRedirect &&
1609
1627
  this.notificationType !== 'error', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
1610
- this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '6548724f163ad59fc3cb502c24d82ae7585c6b7f', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
1628
+ this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '550bd94f93b842d71c23bd158362b711797dd4a1', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
1611
1629
  cartStore.step === 'finish' &&
1612
- this.notificationType === 'success' && (h("div", { key: 'f9aeb5d59dc4b0f163868e5a2358a69a0884bb56', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '98ae907d33624e54f84f88519abacd1ea178554c', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '506eeb9eabe16fed59b98b9eef49552542272233', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
1630
+ this.notificationType === 'success' && (h("div", { key: '8fdaa205f4517e0a9a6c5482e80d6dbccba6a585', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '41b524fc8dea752a6f4745191970ac665e7b9fa8', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '70297a07cc8d3c11545776d600d8a1a2a3c2a744', onClick: () => {
1631
+ const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
1632
+ this.redirectToUrl(isZonosDashboard
1633
+ ? '/orders/all'
1634
+ : 'https://dashboard.zonos.com/orders/all');
1635
+ }, size: "lg", variant: "primary" }, "View order in Dashboard")))))));
1613
1636
  }
1614
1637
  static get assetsDirs() { return ["assets"]; }
1615
1638
  };
@@ -1669,6 +1692,44 @@ const ZonosCheckoutFooter = class {
1669
1692
  };
1670
1693
  ZonosCheckoutFooter.style = ZonosCheckoutFooterStyle0;
1671
1694
 
1695
+ const placeTestOrder = async () => {
1696
+ var _a, _b;
1697
+ const shipToPartyId = (_a = cartStore.partiesData.find(party => party.type === 'DESTINATION')) === null || _a === void 0 ? void 0 : _a.id;
1698
+ const billToPartyId = (_b = cartStore.partiesData.find(party => party.type === 'PAYOR')) === null || _b === void 0 ? void 0 : _b.id;
1699
+ const checkoutSessionId = cartStore.checkoutSessionId;
1700
+ if (!checkoutSessionId || !billToPartyId || !shipToPartyId) {
1701
+ logError('Missing required data', {
1702
+ billToPartyId,
1703
+ checkoutSessionId,
1704
+ shipToPartyId,
1705
+ });
1706
+ return {
1707
+ errors: ['Missing required data'],
1708
+ json: null,
1709
+ };
1710
+ }
1711
+ const payload = {
1712
+ billToPartyId,
1713
+ checkoutSessionId,
1714
+ shipToPartyId,
1715
+ };
1716
+ const { errors, json } = await handleFetch('/api/zonos-elements/place-test-order', {
1717
+ body: payload,
1718
+ method: 'POST',
1719
+ });
1720
+ if (errors.length || !json) {
1721
+ logError('Error occurs when placing test order', errors);
1722
+ return {
1723
+ errors: errors.map(error => error.message),
1724
+ json: null,
1725
+ };
1726
+ }
1727
+ return {
1728
+ errors: [],
1729
+ json,
1730
+ };
1731
+ };
1732
+
1672
1733
  const CheckmarkLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>`;
1673
1734
 
1674
1735
  const RemoveLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>`;
@@ -1706,11 +1767,31 @@ const ZonosCheckoutPayment = class {
1706
1767
  type: 'success',
1707
1768
  });
1708
1769
  };
1770
+ this.placeTestOrder = async () => {
1771
+ this.internalContinueLoading = true;
1772
+ const { errors } = await placeTestOrder();
1773
+ if (errors.length) {
1774
+ this.stagingOrderCreateErrorMessage =
1775
+ errors[0] || 'Failed to create staging order. Please try again.';
1776
+ this.internalContinueLoading = false;
1777
+ return;
1778
+ }
1779
+ this.internalContinueLoading = false;
1780
+ // continue to the next step
1781
+ cartStoreNextStep();
1782
+ };
1709
1783
  this.submitBtnType = undefined;
1710
1784
  this.continueLoading = false;
1711
1785
  this.submitBtnColor = undefined;
1786
+ this.isMobile = false;
1787
+ this.overridePrimaryColor = undefined;
1712
1788
  this.showErrorBanner = false;
1713
1789
  this.hasStripePaymentError = false;
1790
+ this.stagingOrderCreateErrorMessage = '';
1791
+ this.internalContinueLoading = this.continueLoading;
1792
+ }
1793
+ continueLoadingWatcher() {
1794
+ this.internalContinueLoading = this.continueLoading;
1714
1795
  }
1715
1796
  stripePaymentErrorWatcher() {
1716
1797
  if (this.hasStripePaymentError) {
@@ -1734,25 +1815,43 @@ const ZonosCheckoutPayment = class {
1734
1815
  this.showErrorBanner = !this.handleValidate();
1735
1816
  }
1736
1817
  const isTestMode = getIsTestMode();
1818
+ const isStagingMode = cartStore.isStagingMode || getIsStagingMode();
1737
1819
  const isPaypalTabSelected = ((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.value.type) === 'external_paypal';
1738
- return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, stripeStore.customErrorMessage ||
1739
- translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypalStore.paypalErrorMessage && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypalStore.paypalErrorMessage)), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => {
1740
- this.continueClickHandler();
1741
- }, size: "lg",
1742
- // use primary type when on mobile mode
1743
- variant: this.submitBtnType }, translate('Pay [orderTotal]', {
1744
- orderTotal: renderCheckoutCurrency({
1745
- amount: cartStore.total,
1746
- isForeign: true,
1747
- }),
1748
- }))), h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
1749
- this.paypalSessionDone.emit(orderId);
1750
- }, onPaypalSessionFail: () => this.paypalSessionFailed.emit(), style: {
1751
- display: isPaypalTabSelected ? 'block' : 'none',
1752
- } })), isTestMode && (h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, h("zonos-v-stack", { spacing: 16 }, h("div", null, h("zonos-text", { type: "semiBoldLabel" }, translate('Test cards')), h("zonos-text", { textColor: "gray-700" }, translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), h("zonos-button", { icon: h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, translate('Success'), " (****4242)"), h("zonos-button", { icon: h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, translate('Failure'), " (****0002)")), h("zonos-notification", null))))));
1820
+ const renderPayment = () => {
1821
+ if (isStagingMode) {
1822
+ const { colorPrimary } = zonosStore.appearance;
1823
+ const themeBasedColor = colorPrimary && isDarkColor(colorPrimary) ? 'DARK' : 'LIGHT';
1824
+ // If in mobile, use the theme from the store since the UI is solely by theme
1825
+ const theme = this.isMobile
1826
+ ? zonosStore.appearance.theme
1827
+ : themeBasedColor;
1828
+ return (h(Fragment, null, this.stagingOrderCreateErrorMessage && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, this.stagingOrderCreateErrorMessage)), h("zonos-empty-state-payment", { emptyStateText: translate('No payment method needed for staging'), theme: theme }), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.internalContinueLoading, onClick: () => {
1829
+ void this.placeTestOrder();
1830
+ }, size: "lg",
1831
+ // use primary type when on mobile mode
1832
+ variant: this.submitBtnType }, translate('Place test order')))));
1833
+ }
1834
+ return (h(Fragment, null, this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, stripeStore.customErrorMessage ||
1835
+ translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypalStore.paypalErrorMessage && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypalStore.paypalErrorMessage)), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => {
1836
+ this.continueClickHandler();
1837
+ }, size: "lg",
1838
+ // use primary type when on mobile mode
1839
+ variant: this.submitBtnType }, translate('Pay [orderTotal]', {
1840
+ orderTotal: renderCheckoutCurrency({
1841
+ amount: cartStore.total,
1842
+ isForeign: true,
1843
+ }),
1844
+ }))), h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
1845
+ this.paypalSessionDone.emit(orderId);
1846
+ }, onPaypalSessionFail: () => this.paypalSessionFailed.emit(), style: {
1847
+ display: isPaypalTabSelected ? 'block' : 'none',
1848
+ } })), isTestMode && (h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, h("zonos-v-stack", { spacing: 16 }, h("div", null, h("zonos-text", { type: "semiBoldLabel" }, translate('Test cards')), h("zonos-text", { textColor: "gray-700" }, translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), h("zonos-button", { icon: h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, translate('Success'), " (****4242)"), h("zonos-button", { icon: h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, translate('Failure'), " (****0002)")), h("zonos-notification", null)))));
1849
+ };
1850
+ return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), renderPayment())));
1753
1851
  }
1754
1852
  get ele() { return getElement(this); }
1755
1853
  static get watchers() { return {
1854
+ "continueLoading": ["continueLoadingWatcher"],
1756
1855
  "hasStripePaymentError": ["stripePaymentErrorWatcher"]
1757
1856
  }; }
1758
1857
  };
@@ -2030,7 +2129,7 @@ const ZonosCurrencyToggle = class {
2030
2129
  static get assetsDirs() { return ["assets"]; }
2031
2130
  };
2032
2131
 
2033
- const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
2132
+ const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
2034
2133
  const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
2035
2134
 
2036
2135
  const ZonosCustomerInfo = class {
@@ -2196,6 +2295,26 @@ const ZonosCustomerInfo = class {
2196
2295
  }
2197
2296
  return invalidList;
2198
2297
  }
2298
+ isInTaxIdCountry(countryCode) {
2299
+ return countryRequireTaxId.includes(countryCode);
2300
+ }
2301
+ /**
2302
+ * Render tax id input based on ship to country code
2303
+ */
2304
+ renderTaxIdInput(countryCode) {
2305
+ // Don't render tax id input if the country is not provided
2306
+ if (!countryCode) {
2307
+ return null;
2308
+ }
2309
+ const isCountryRequireTaxId = this.isInTaxIdCountry(countryCode);
2310
+ if (!isCountryRequireTaxId) {
2311
+ return null;
2312
+ }
2313
+ const taxIdInputInfo = shipToTaxIdLabels[countryCode];
2314
+ return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', onInputChange: (event) => {
2315
+ stripeStore.taxId = event.detail;
2316
+ } })));
2317
+ }
2199
2318
  render() {
2200
2319
  var _a, _b;
2201
2320
  if (!stripeStore.stripeElements) {
@@ -2220,7 +2339,7 @@ const ZonosCustomerInfo = class {
2220
2339
  if (this.showErrorBanner) {
2221
2340
  this.showErrorBanner = !this.handleValidate();
2222
2341
  }
2223
- return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: (_b = this.defaultAddress) === null || _b === void 0 ? void 0 : _b.email, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" }), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
2342
+ return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: (_b = this.defaultAddress) === null || _b === void 0 ? void 0 : _b.email, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" }), this.renderTaxIdInput(this.shippingCountry), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
2224
2343
  stripeStore.stripeShippingSameAsBilling = e.detail;
2225
2344
  } }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Billing address'), type: "billing" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
2226
2345
  // use primary type when on mobile mode
@@ -1,15 +1,15 @@
1
- import { r as registerInstance, h, H as Host, F as Fragment } from './index-986b5ff2.js';
2
- import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as cartStoreStartCheckoutInterval, t as trackConversionEvent, o as getCheckoutSessionBody, p as cartStoreUpdateToErrorState, q as translate, r as getZCountryUrlParam, u as cartStoreSetCheckoutSession, v as stripeStorePrefetchLandedCost, w as cartStoreNextStep, x as stripeStoreHandleInventoryCheck, y as stripeStoreConfirmPayment, z as stripeStoreHandleInventoryRefund, A as stripeStoreReset, B as localizationStoreOnUpdate } from './cart-cf87ec6f.js';
3
- import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-b7124cc4.js';
4
- import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-708637e7.js';
5
- import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs, j as jsonParse } from './handleFetch-badf4543.js';
6
- import { g as getIsTestMode, c as createCustomEvent } from './createCustomEvent-31a792d3.js';
1
+ import { r as registerInstance, h, H as Host, F as Fragment } from './index-d82f06f2.js';
2
+ import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as cartStoreStartCheckoutInterval, t as trackConversionEvent, o as getCheckoutSessionBody, p as cartStoreUpdateToErrorState, q as translate, r as getZCountryUrlParam, u as cartStoreSetCheckoutSession, v as stripeStorePrefetchLandedCost, w as cartStoreNextStep, x as stripeStoreHandleInventoryCheck, y as stripeStoreConfirmPayment, z as stripeStoreHandleInventoryRefund, A as stripeStoreReset, B as localizationStoreOnUpdate } from './cart-3427ee25.js';
3
+ import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-4e2f9753.js';
4
+ import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-44efd080.js';
5
+ import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, g as getIsTestMode, j as jsonParse, a as getIsStagingMode } from './handleFetch-b4633675.js';
7
6
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
8
7
  import { c as classes } from './classes-0d95c529.js';
9
- import { g as getBorderRadius } from './getBorderRadius-4aca63d4.js';
10
- import { i as isDarkColor } from './isDarkColor-4915739f.js';
8
+ import { c as createCustomEvent } from './createCustomEvent-58159025.js';
9
+ import { g as getBorderRadius } from './getBorderRadius-b32d4218.js';
10
+ import { i as isDarkColor } from './isDarkColor-10f38df6.js';
11
11
  import { s as styles } from './styles-6fc2fad9.js';
12
- import { c as checkoutHiddenBtnSelector, s as setupCartData, d as domesticRedirectedBtnSelector } from './CheckoutConfig-262008fe.js';
12
+ import { c as checkoutHiddenBtnSelector, s as setupCartData, d as domesticRedirectedBtnSelector } from './CheckoutConfig-573bd959.js';
13
13
  import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
14
14
 
15
15
  /**
@@ -369,6 +369,7 @@ const ZonosCheckout = class {
369
369
  this.appearanceSettingsOverride = undefined;
370
370
  this.preview = false;
371
371
  this.mobile = false;
372
+ this.overrideStagingMode = undefined;
372
373
  this.defaultAddress = null;
373
374
  this.forceDialogOpen = false;
374
375
  this.defaultAddressParams = null;
@@ -386,6 +387,7 @@ const ZonosCheckout = class {
386
387
  this.isCartExpired = false;
387
388
  this.inventoryCheckErrorMessage = null;
388
389
  this.placedOrderInfo = null;
390
+ this.clientSecret = stripeStore.clientSecret;
389
391
  }
390
392
  /**
391
393
  * Init cart info handler event
@@ -442,7 +444,7 @@ const ZonosCheckout = class {
442
444
  const isExpired = this.handleCartExpiredCheck();
443
445
  if (isExpired) {
444
446
  // Do not proceed if the cart is expired
445
- return;
447
+ return false;
446
448
  }
447
449
  const { adjustments, cartItems } = buildCartItemsByTempCart(window.Zonos.cartData);
448
450
  await cartStoreUpdateItems({ adjustments, cartItems });
@@ -456,13 +458,13 @@ const ZonosCheckout = class {
456
458
  const cartData = cartResult === null || cartResult === void 0 ? void 0 : cartResult.cartData;
457
459
  if (!cartData) {
458
460
  logError('Failed to build cart, please try again.');
459
- return;
461
+ return false;
460
462
  }
461
463
  window.Zonos.cartData = cartData;
462
464
  const isExpired = this.handleCartExpiredCheck();
463
465
  if (isExpired) {
464
466
  // Do not proceed if the cart is expired
465
- return;
467
+ return false;
466
468
  }
467
469
  const { adjustments, cartItems } = buildCartItemsByTempCart(cartData);
468
470
  await cartStoreUpdateItems({ adjustments, cartItems });
@@ -754,12 +756,21 @@ const ZonosCheckout = class {
754
756
  phone,
755
757
  };
756
758
  }
759
+ overrideStagingModeChanged() {
760
+ cartStore.isStagingMode = !!this.overrideStagingMode;
761
+ }
757
762
  /**
758
763
  * Setup all of the event listeners for the component on first load
759
764
  */
760
765
  async init() {
761
766
  stripeStore.stripe = window.Zonos.stripe;
762
767
  this.stripe = window.Zonos.stripe;
768
+ // Set staging mode on init
769
+ cartStore.isStagingMode = getIsStagingMode();
770
+ // Override staging mode if it's provided
771
+ if (typeof this.overrideStagingMode !== 'undefined') {
772
+ cartStore.isStagingMode = this.overrideStagingMode;
773
+ }
763
774
  // check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
764
775
  watchBigcommerceDomesticCheckout({
765
776
  domesticRedirectedBtnSelector: domesticRedirectedBtnSelector,
@@ -998,6 +1009,10 @@ const ZonosCheckout = class {
998
1009
  handleAddressChange() {
999
1010
  stripeStoreReset();
1000
1011
  }
1012
+ handleClientSecretChange() {
1013
+ // apply theme to stripe elements
1014
+ void this.applyStripeTheme();
1015
+ }
1001
1016
  handleOpenChange() {
1002
1017
  const overflowAttrKey = 'data-zonos-overflow-origin';
1003
1018
  const body = document.body;
@@ -1062,6 +1077,8 @@ const ZonosCheckout = class {
1062
1077
  }
1063
1078
  render() {
1064
1079
  var _a, _b, _c, _d;
1080
+ // Set client secret so that we can add this to @Watch listener
1081
+ this.clientSecret = stripeStore.clientSecret;
1065
1082
  const dialogLoading =
1066
1083
  // if it's last step, don't need to check stripe elements
1067
1084
  (cartStore.step !== 'finish' &&
@@ -1095,7 +1112,8 @@ const ZonosCheckout = class {
1095
1112
  const zonosQaUrl = urlParams.get('zonosQaUrl');
1096
1113
  const zonosDebug = urlParams.get('zonosDebug');
1097
1114
  const zonosE2ETest = urlParams.get('zonosE2ETest');
1098
- return (h("zonos-v-stack", null, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), h("zonos-checkout-progress-tabs", { backgroundColor:
1115
+ const zonosStagingMode = this.overrideStagingMode || getIsStagingMode();
1116
+ return (h("zonos-v-stack", null, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosStagingMode && (h("zonos-badge", { badgeColor: "red", size: "small" }, translate('Staging mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl)), zonosE2ETest && (h("zonos-badge", { badgeColor: "gray", size: "small" }, "E2E Test"))), h("zonos-checkout-progress-tabs", { backgroundColor:
1099
1117
  // only use different contrast color when the secondary color is too off with the background in mobile
1100
1118
  this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
1101
1119
  };
@@ -1111,7 +1129,7 @@ const ZonosCheckout = class {
1111
1129
  '--zonos--primary-color': !this.isMobile
1112
1130
  ? colorPrimary
1113
1131
  : undefined,
1114
- }) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress || this.defaultAddressParams, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: async () => {
1132
+ }) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress || this.defaultAddressParams, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
1115
1133
  await this.handleStripePaymentContinue();
1116
1134
  }, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
1117
1135
  // do nothing if it's not mobile
@@ -1178,8 +1196,10 @@ const ZonosCheckout = class {
1178
1196
  static get assetsDirs() { return ["assets"]; }
1179
1197
  static get watchers() { return {
1180
1198
  "appearanceSettingsOverride": ["appearanceSettingsOverrideChanged", "handleAppearanceSettingsOverrideChange"],
1199
+ "overrideStagingMode": ["overrideStagingModeChanged"],
1181
1200
  "mobile": ["handleMobileChange"],
1182
1201
  "defaultAddress": ["handleAddressChange"],
1202
+ "clientSecret": ["handleClientSecretChange"],
1183
1203
  "open": ["handleOpenChange"]
1184
1204
  }; }
1185
1205
  };
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host, d as getElement } from './index-986b5ff2.js';
2
- import { d as zonosStoreFontFamily } from './zonosStore-708637e7.js';
1
+ import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
2
+ import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
3
3
 
4
4
  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}";
5
5
  const ZonosCollapseStyle0 = zonosCollapseCss;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-986b5ff2.js';
1
+ import { r as registerInstance, h } from './index-d82f06f2.js';
2
2
 
3
3
  function format(first, middle, last) {
4
4
  return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
@@ -18,7 +18,7 @@ const ZonosComponent = class {
18
18
  return format(this.first, this.middle, this.last);
19
19
  }
20
20
  render() {
21
- return h("div", { key: '564c34a7a93a16b8e619a0e140f8d99fabc91c34' }, "Hello, World! I'm ", this.getText());
21
+ return h("div", { key: '63b0c771133fd495f36e2c67601d64d6e56f5f2b' }, "Hello, World! I'm ", this.getText());
22
22
  }
23
23
  };
24
24
  ZonosComponent.style = ZonosComponentStyle0;
@@ -1,9 +1,9 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-986b5ff2.js';
2
- import { D as isValidSelector, f as stripeStore, E as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-cf87ec6f.js';
3
- import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-708637e7.js';
4
- import { h as handleFetch, a as logError, l as log } from './handleFetch-badf4543.js';
5
- import './isDarkColor-4915739f.js';
6
- import './getBorderRadius-4aca63d4.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-d82f06f2.js';
2
+ import { D as isValidSelector, f as stripeStore, E as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-3427ee25.js';
3
+ import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
4
+ import { h as handleFetch, b as logError, l as log } from './handleFetch-b4633675.js';
5
+ import './isDarkColor-10f38df6.js';
6
+ import './getBorderRadius-b32d4218.js';
7
7
 
8
8
  const getZonosSettings = async () => {
9
9
  const { errors, json, zonosMode } = await handleFetch('/api/zonos-elements/zonos-settings');
@@ -321,7 +321,7 @@ const ZonosController = class {
321
321
  */
322
322
  async reset() {
323
323
  cartStore.checkoutSessionId = null;
324
- stripeStore.clientSecret = null;
324
+ stripeStore.clientSecret = '';
325
325
  }
326
326
  /**
327
327
  * Override the setting
@@ -353,7 +353,7 @@ const ZonosController = class {
353
353
  zonosStore.organizationName = organizationName;
354
354
  }
355
355
  render() {
356
- return h(Host, { key: '7cdde4733b47d96c6539a6bd9c78f150de8a6eb4', class: "zonos--elements" });
356
+ return h(Host, { key: 'ab190aefdb7b90e03ec8f4f2da73a05c3416c776', class: "zonos--elements" });
357
357
  }
358
358
  };
359
359
  ZonosController.style = ZonosControllerStyle0;
@@ -1,10 +1,10 @@
1
- import { r as registerInstance, h, H as Host, d as getElement } from './index-986b5ff2.js';
2
- import { l as localizationStore } from './cart-cf87ec6f.js';
3
- import { d as zonosStoreFontFamily } from './zonosStore-708637e7.js';
1
+ import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
2
+ import { l as localizationStore } from './cart-3427ee25.js';
3
+ import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import './handleFetch-badf4543.js';
6
- import './isDarkColor-4915739f.js';
7
- import './getBorderRadius-4aca63d4.js';
5
+ import './handleFetch-b4633675.js';
6
+ import './isDarkColor-10f38df6.js';
7
+ import './getBorderRadius-b32d4218.js';
8
8
 
9
9
  const zonosCountryFlagCss = ":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{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
10
10
  const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
@@ -1,11 +1,11 @@
1
- import { r as registerInstance, h, H as Host, d as getElement } from './index-986b5ff2.js';
2
- import { a as localizationStoreUpdateSelectedCountryCode, q as translate, l as localizationStore } from './cart-cf87ec6f.js';
3
- import { d as zonosStoreFontFamily } from './zonosStore-708637e7.js';
1
+ import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
2
+ import { a as localizationStoreUpdateSelectedCountryCode, q as translate, l as localizationStore } from './cart-3427ee25.js';
3
+ import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
- import { i as isDarkColor } from './isDarkColor-4915739f.js';
5
+ import { i as isDarkColor } from './isDarkColor-10f38df6.js';
6
6
  import { l as languages } from './ILanguage-cd6acb72.js';
7
- import './handleFetch-badf4543.js';
8
- import './getBorderRadius-4aca63d4.js';
7
+ import './handleFetch-b4633675.js';
8
+ import './getBorderRadius-b32d4218.js';
9
9
 
10
10
  /**
11
11
  * Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io)
@@ -1893,9 +1893,9 @@ const ZonosHelloDialogFooter = class {
1893
1893
  const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
1894
1894
  // Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
1895
1895
  const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
1896
- return (h(Host, { key: '458b65efb2fc1e6cf5f7c5588601add4af010de6', class: "zonos--elements" }, h("div", { key: 'ee8eb8cf4a3e0a5583f5fb15842a86adb443e421', class: "zonos--hello-dialog-footer", style: {
1896
+ return (h(Host, { key: 'f84d021e99271bd6a00da32edd35fdc5e0520c5a', class: "zonos--elements" }, h("div", { key: 'db35a5022b1ef1a70e3cace021fcc14d6e8ea987', class: "zonos--hello-dialog-footer", style: {
1897
1897
  '--zonos--primary-color': primaryColor,
1898
- } }, h("a", { key: 'fa6ab85dae56620a30275dd25c10011bf129545e', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '413b1d69091e5bf4ba639ea66e4930acc0636074', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: 'be2881c022690d5a6bcb9c38a50287a427f4fc32', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '79480397f8c59a435b1f9a4604441500991741a3', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'c23ae8fa589d754ca93680006d6a45af2b440db6', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
1898
+ } }, h("a", { key: 'bbbc50bf395e2658239e2a1a0342122b04e43a5f', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '3c80a7ba8dd9509d45bde7de20e7689f632aedc8', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: 'add64f376e48cc71f6b5672aafe7b1ef62ab2354', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'a0a5059ad4a48b2cc3ea05696aa79ffce33b4bf2', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '2608dba553f846c5016e8395dbce079beda0aa5a', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
1899
1899
  }
1900
1900
  get ele() { return getElement(this); }
1901
1901
  };
@@ -1957,12 +1957,12 @@ const ZonosVirtualScroll = class {
1957
1957
  } }, this.renderItem(i)));
1958
1958
  accHeight += itemHeight;
1959
1959
  }
1960
- return (h(Host, { key: 'c09f341c0436d53ad245f0dc4ed54d5ead9a0e39' }, h("div", { key: 'e7f9cbb0dd33d0fab1bffd01672e9f5a3bc11f04',
1960
+ return (h(Host, { key: '0f132a5b60586fb22d1d5536aa7abef6199e0748' }, h("div", { key: 'a947229cd3d53b79312855cf8ddf8c9985035e1e',
1961
1961
  // to capture scroll action
1962
1962
  class: "scroller", style: {
1963
1963
  height: `${this.totalHeight}px`,
1964
1964
  width: `${W}px`,
1965
- } }), h("div", { key: '93071acbc731dda4e9a1f453aa76526cd1639191',
1965
+ } }), h("div", { key: '63013fe7bc53d76152fda74e7b6ef054e7c3a9ef',
1966
1966
  // to display items
1967
1967
  class: "item-container", ref: el => (this.container = el), style: {
1968
1968
  height: `${this.totalHeight}px`,