@zonos/elements 1.3.140 → 1.3.142

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 (232) hide show
  1. package/dist/cjs/{CheckoutConfig-165db6b6.js → CheckoutConfig-eaaf62a1.js} +1 -1
  2. package/dist/cjs/{cart-e1b59d03.js → cart-199b0751.js} +7 -7
  3. package/dist/cjs/{getBorderRadius-f72d8edf.js → getBorderRadius-f97c99ad.js} +1 -1
  4. package/dist/cjs/{handleFetch-4a90f091.js → handleFetch-864d3c53.js} +5 -5
  5. package/dist/cjs/{index-d56e0a8b.js → index-b678ce0c.js} +42 -8
  6. package/dist/cjs/index.cjs.js +38 -9
  7. package/dist/cjs/{isDarkColor-dd6d723b.js → isDarkColor-434d71dd.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{paypal-86cc51e4.js → paypal-4f1ee604.js} +5 -5
  10. package/dist/cjs/zonos-address_7.cjs.entry.js +6 -6
  11. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  14. package/dist/cjs/zonos-card.cjs.entry.js +3 -3
  15. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +10 -10
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -9
  17. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  20. package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
  21. package/dist/cjs/zonos-country-select_4.cjs.entry.js +6 -6
  22. package/dist/cjs/zonos-elements.cjs.js +2 -2
  23. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +7 -7
  24. package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
  25. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  26. package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
  27. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  28. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  29. package/dist/cjs/zonos-notification_3.cjs.entry.js +7 -7
  30. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  31. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  33. package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
  34. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  35. package/dist/cjs/{zonosStore-293bb3ba.js → zonosStore-8971eb65.js} +1 -1
  36. package/dist/collection/collection-manifest.json +2 -2
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +1 -1
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-currency-toggle/zonos-currency-toggle.js +2 -2
  40. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +1 -1
  41. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +1 -1
  42. package/dist/collection/components/store/checkout/paypal.js +1 -1
  43. package/dist/collection/components/utils/api/getCountries.js +1 -1
  44. package/dist/collection/components/utils/api/getLocalization.js +1 -1
  45. package/dist/collection/components/utils/handleFetch.js +2 -2
  46. package/dist/collection/components/utils/isValidSelector.js +1 -1
  47. package/dist/collection/components/utils/jsonParse.js +1 -1
  48. package/dist/collection/components/utils/logging/log.js +1 -1
  49. package/dist/collection/components/utils/logging/sendErrorLog.js +1 -1
  50. package/dist/collection/environment.js +1 -1
  51. package/dist/collection/scripts/_zonosBase.js +29 -0
  52. package/dist/collection/types/stripe/Apperance.js +0 -58
  53. package/dist/esm/{CheckoutConfig-930107d4.js → CheckoutConfig-262008fe.js} +1 -1
  54. package/dist/esm/{cart-709f053f.js → cart-cf87ec6f.js} +7 -7
  55. package/dist/esm/{getBorderRadius-bdd709e7.js → getBorderRadius-4aca63d4.js} +1 -1
  56. package/dist/esm/{handleFetch-22cb914b.js → handleFetch-badf4543.js} +5 -5
  57. package/dist/esm/{index-86b8247e.js → index-986b5ff2.js} +42 -8
  58. package/dist/esm/index.js +39 -10
  59. package/dist/esm/{isDarkColor-c6924924.js → isDarkColor-4915739f.js} +1 -1
  60. package/dist/esm/loader.js +2 -2
  61. package/dist/esm/{paypal-77a60c44.js → paypal-b7124cc4.js} +5 -5
  62. package/dist/esm/zonos-address_7.entry.js +6 -6
  63. package/dist/esm/zonos-badge.entry.js +2 -2
  64. package/dist/esm/zonos-banner.entry.js +2 -2
  65. package/dist/esm/zonos-button_3.entry.js +4 -4
  66. package/dist/esm/zonos-card.entry.js +3 -3
  67. package/dist/esm/zonos-cart-items_13.entry.js +10 -10
  68. package/dist/esm/zonos-checkout.entry.js +9 -9
  69. package/dist/esm/zonos-collapse.entry.js +2 -2
  70. package/dist/esm/zonos-component.entry.js +1 -1
  71. package/dist/esm/zonos-controller.entry.js +6 -6
  72. package/dist/esm/zonos-country-flag.entry.js +6 -6
  73. package/dist/esm/zonos-country-select_4.entry.js +6 -6
  74. package/dist/esm/zonos-elements.js +3 -3
  75. package/dist/esm/zonos-hello-dialog.entry.js +7 -7
  76. package/dist/esm/zonos-hello.entry.js +6 -6
  77. package/dist/esm/zonos-input.entry.js +3 -3
  78. package/dist/esm/zonos-language-select_2.entry.js +6 -6
  79. package/dist/esm/zonos-link.entry.js +1 -1
  80. package/dist/esm/zonos-logo.entry.js +2 -2
  81. package/dist/esm/zonos-notification_3.entry.js +7 -7
  82. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  83. package/dist/esm/zonos-text.entry.js +2 -2
  84. package/dist/esm/zonos-toggle.entry.js +2 -2
  85. package/dist/esm/zonos-tooltip.entry.js +1 -1
  86. package/dist/esm/zonos-v-stack.entry.js +2 -2
  87. package/dist/esm/{zonosStore-c493c4fe.js → zonosStore-708637e7.js} +1 -1
  88. package/dist/esm-es5/{CheckoutConfig-930107d4.js → CheckoutConfig-262008fe.js} +1 -1
  89. package/dist/esm-es5/{cart-709f053f.js → cart-cf87ec6f.js} +1 -1
  90. package/dist/esm-es5/{getBorderRadius-bdd709e7.js → getBorderRadius-4aca63d4.js} +1 -1
  91. package/dist/esm-es5/index-986b5ff2.js +2 -0
  92. package/dist/esm-es5/index.js +1 -1
  93. package/dist/esm-es5/{isDarkColor-c6924924.js → isDarkColor-4915739f.js} +1 -1
  94. package/dist/esm-es5/loader.js +1 -1
  95. package/dist/esm-es5/{paypal-77a60c44.js → paypal-b7124cc4.js} +1 -1
  96. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  97. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  98. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  99. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  100. package/dist/esm-es5/zonos-card.entry.js +1 -1
  101. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  102. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  103. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  104. package/dist/esm-es5/zonos-component.entry.js +1 -1
  105. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  106. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  107. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  108. package/dist/esm-es5/zonos-elements.js +1 -1
  109. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  110. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  111. package/dist/esm-es5/zonos-input.entry.js +1 -1
  112. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  113. package/dist/esm-es5/zonos-link.entry.js +1 -1
  114. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  115. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  116. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  117. package/dist/esm-es5/zonos-text.entry.js +1 -1
  118. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  119. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  120. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  121. package/dist/esm-es5/{zonosStore-c493c4fe.js → zonosStore-708637e7.js} +1 -1
  122. package/dist/scripts/index.d.ts +5 -9
  123. package/dist/scripts/index.js +1 -1
  124. package/dist/scripts/loadZonos.js +1 -1
  125. package/dist/scripts/zonos.js +1 -1
  126. package/dist/types/components/store/checkout/cart.d.ts +2 -3
  127. package/dist/types/components/store/checkout/stripe.d.ts +2 -2
  128. package/dist/types/components/store/hello/localization.d.ts +0 -1
  129. package/dist/types/components/store/translationStore.d.ts +1 -1
  130. package/dist/types/components/store/zonosStore.d.ts +1 -1
  131. package/dist/types/components/utils/api/checkItemRestrictions.d.ts +3 -3
  132. package/dist/types/components/utils/api/getLocaleMessages.d.ts +3 -3
  133. package/dist/types/components/utils/changeDeepProperty.d.ts +2 -2
  134. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +2 -1
  135. package/dist/types/components/utils/createCustomEvent.d.ts +3 -3
  136. package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +3 -3
  137. package/dist/types/components/utils/hello/getCurrentHelloLocalePage.d.ts +1 -1
  138. package/dist/types/components/utils/hello/initHello.d.ts +2 -2
  139. package/dist/types/components/utils/resetToSelectedTab.d.ts +1 -1
  140. package/dist/types/components.d.ts +2 -2
  141. package/dist/types/environment.d.ts +2 -2
  142. package/dist/types/scripts/_stripe.d.ts +1 -1
  143. package/dist/types/scripts/_zonosBase.d.ts +1 -0
  144. package/dist/types/stencil-public-runtime.d.ts +6 -0
  145. package/dist/types/styles/stripe/defaultVariable.d.ts +1 -1
  146. package/dist/types/types/global.d.ts +0 -5
  147. package/dist/types/types/stripe/Apperance.d.ts +1 -2
  148. package/dist/types/utils/formattedUrl.d.ts +1 -1
  149. package/dist/zonos-elements/index.esm.js +1 -1
  150. package/dist/zonos-elements/{p-e205ef1c.system.entry.js → p-0197a9bf.system.entry.js} +1 -1
  151. package/dist/zonos-elements/{p-be2feba6.entry.js → p-076388d3.entry.js} +1 -1
  152. package/dist/zonos-elements/{p-0c027d2e.entry.js → p-0920500d.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-87ed2e17.system.entry.js → p-0b5f4ca7.system.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-a58731ec.system.js → p-0cda2818.system.js} +1 -1
  155. package/dist/zonos-elements/p-0d2cf216.entry.js +1 -0
  156. package/dist/zonos-elements/{p-3dd503fd.system.entry.js → p-0e54432c.system.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-b7307c61.js → p-1460f917.js} +1 -1
  158. package/dist/zonos-elements/{p-9589bd08.entry.js → p-1e3ea4ae.entry.js} +1 -1
  159. package/dist/zonos-elements/p-21b538ea.system.js +1 -0
  160. package/dist/zonos-elements/{p-22d69480.system.entry.js → p-232963d3.system.entry.js} +1 -1
  161. package/dist/zonos-elements/p-272052bd.system.entry.js +1 -0
  162. package/dist/zonos-elements/{p-0fc96872.system.entry.js → p-2761ad55.system.entry.js} +1 -1
  163. package/dist/zonos-elements/{p-bc8b22ad.entry.js → p-28295342.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-b9efc660.entry.js → p-2949faf3.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-04a6a167.entry.js → p-2b8cddb7.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-ad1d6ea2.entry.js → p-2c19f5e2.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-f07c01c5.system.entry.js → p-2cfc00b8.system.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-289ded20.system.entry.js → p-2d514c1d.system.entry.js} +1 -1
  169. package/dist/zonos-elements/{p-1c4ff7b2.system.entry.js → p-2e152517.system.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-4319600a.system.entry.js → p-33e1d25e.system.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-10efff62.system.js → p-36dfc7ac.system.js} +1 -1
  172. package/dist/zonos-elements/{p-7a60deef.system.entry.js → p-381874b0.system.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-00d4bff1.entry.js → p-39cac2c1.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-64a04391.system.entry.js → p-3cb4468f.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-b832ec52.entry.js → p-3cf30d83.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-afffdfc2.js → p-3d82e70e.js} +1 -1
  177. package/dist/zonos-elements/{p-9b59704a.entry.js → p-44dd4269.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-edc16f69.js → p-4b685549.js} +1 -1
  179. package/dist/zonos-elements/{p-ad4bc6a2.entry.js → p-545c05ce.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-8368a79e.entry.js → p-58a09715.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-d35376d3.js → p-6271e108.js} +2 -2
  182. package/dist/zonos-elements/{p-5c32689e.entry.js → p-65069140.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-8f9affb3.system.entry.js → p-673b4402.system.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-5b90dd6d.entry.js → p-675f60b4.entry.js} +1 -1
  185. package/dist/zonos-elements/p-680d3694.js +2 -0
  186. package/dist/zonos-elements/{p-f2867195.entry.js → p-68d79b58.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-896d62a4.system.entry.js → p-6b490b0a.system.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-d633ced9.entry.js → p-72256333.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-10d6fe23.js → p-766dd01f.js} +1 -1
  190. package/dist/zonos-elements/{p-7ef573f0.entry.js → p-7c5c0a85.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-bb418544.system.js → p-7c643376.system.js} +1 -1
  192. package/dist/zonos-elements/p-866bb93e.system.js +1 -0
  193. package/dist/zonos-elements/{p-f8ca3e71.entry.js → p-8c487480.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-fce202ab.entry.js → p-9306a835.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-ffe4a999.system.entry.js → p-983f23a1.system.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-35b8dcde.entry.js → p-9b720cf4.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-cd1fd09e.entry.js → p-9dec2b74.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-ee1e1d94.system.entry.js → p-a13d5957.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-dc09df19.system.entry.js → p-a2bce31d.system.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-cf72603f.system.entry.js → p-a8bd492d.system.entry.js} +1 -1
  201. package/dist/zonos-elements/{p-d10ffd69.js → p-b0174a8f.js} +1 -1
  202. package/dist/zonos-elements/{p-fd061229.system.js → p-b50667b6.system.js} +1 -1
  203. package/dist/zonos-elements/{p-46a5ec52.system.js → p-c0164a3c.system.js} +1 -1
  204. package/dist/zonos-elements/{p-6b0aa1bb.system.js → p-c1b098de.system.js} +1 -1
  205. package/dist/zonos-elements/{p-010f5797.system.entry.js → p-d198421b.system.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-7acf6802.entry.js → p-d381288e.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-896ab1ed.system.entry.js → p-d5a3851d.system.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-25c7e4fa.system.entry.js → p-ded984d9.system.entry.js} +1 -1
  209. package/dist/zonos-elements/{p-0aee2e4c.system.entry.js → p-e6554a6f.system.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-c78dd680.system.js → p-e9964a5a.system.js} +1 -1
  211. package/dist/zonos-elements/{p-461624ce.system.entry.js → p-ebdd9b64.system.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-01ad5be8.system.entry.js → p-f295030e.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-3a26cae5.entry.js → p-fc4658a6.entry.js} +1 -1
  214. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  215. package/dist/zonos-elements/zonos-elements.js +1 -1
  216. package/package.json +68 -67
  217. package/dist/collection/__mocks__/vercel-app/loadZonos.js +0 -492
  218. package/dist/collection/__mocks__/vercel-app/localization.js +0 -1
  219. package/dist/collection/__mocks__/vercel-app/zonos-hello.entry.js +0 -1
  220. package/dist/collection/__mocks__/zonos-url/index.js +0 -1
  221. package/dist/collection/__mocks__/zonos-url/loadZonos.js +0 -492
  222. package/dist/collection/__mocks__/zonos-url/localization.js +0 -2899
  223. package/dist/collection/__mocks__/zonos-url/zonos-hello.entry.js +0 -1
  224. package/dist/esm-es5/index-86b8247e.js +0 -2
  225. package/dist/zonos-elements/p-26b24d0b.system.js +0 -1
  226. package/dist/zonos-elements/p-49e4ca08.system.entry.js +0 -1
  227. package/dist/zonos-elements/p-5b7da777.js +0 -2
  228. package/dist/zonos-elements/p-6b6cd6c3.system.js +0 -1
  229. package/dist/zonos-elements/p-e6c31531.entry.js +0 -1
  230. /package/dist/esm-es5/{handleFetch-22cb914b.js → handleFetch-badf4543.js} +0 -0
  231. /package/dist/zonos-elements/{p-860e46ab.js → p-a5b294d7.js} +0 -0
  232. /package/dist/zonos-elements/{p-febc72e7.system.js → p-bfcfd29b.system.js} +0 -0
@@ -32,4 +32,4 @@ export type ITranslationKey = keyof typeof stringsBase;
32
32
  * // No variables:
33
33
  * translate('Above de minimis threshold for')
34
34
  */
35
- export declare const translate: <T extends "Shipping" | "Email" | "Name" | "Quantity" | "Guaranteed" | "Customer" | "Country" | "Failure" | "Success" | "Hide" | "Payment" | " (Duties due at door)" | " (Duties prepaid)" | "Above de minimis threshold for" | "Add promotional code" | "Address" | "Address line 1" | "Address line 2" | "An unexpected error occurred when processing PayPal order." | "Apply" | "Are you sure?" | "Back" | "Billing" | "Billing address" | "Cancel" | "Card number copied to clipboard" | "Cart subtotal" | "City" | "Click to copy the card number. Use any future expiration date and three number CVC." | "Close" | "Contact" | "Continue to shipping" | "Couldn't place order" | "Customer information" | "Delivery" | "Delivery options" | "Discounts" | "Don't close" | "Due at delivery" | "Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders." | "Duties and taxes will be applied to items and shipping." | "Duties and taxes will be charged upon delivery." | "Duties will apply to all orders." | "Duties, taxes, and fees" | "Error creating Checkout" | "Error updating Checkout" | "Estimated [amount]" | "Expected delivery" | "Failed to create PayPal order. Please try again, or consider using an alternative method." | "First name" | "Go to payment" | "Hide non-prepaid options" | "Invalid promo code" | "It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?" | "It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?" | "Keep shopping" | "Know about duties and taxes before you buy. Shop with confidence!" | "Last name" | "Learn more." | "Missing required fields. Make sure all fields are completed." | "No countries found" | "No shipment rating selected. Please go back to the \"Shipping\" step and select a shipment rating to proceed." | "No shipping method selected" | "No shipping methods found - please review and update your address details by selecting the \"Customer\" tab above. If you continue to encounter issues, contact our support team for assistance." | "No shipping methods found - try editing your address or contacting support if the error persists" | "Nothing due at delivery" | "Nothing due at the door" | "OK" | "Order complete!" | "Order total" | "Orders to [countryName] must be over [threshold] to ship." | "Pay [orderTotal]" | "Pay [organizationName]" | "Payment failed" | "Payment failed. Please try another payment method." | "Payment method" | "Payment processing. We'll update you when payment is received." | "Phone number" | "Please ensure your text uses the Latin alphabet only (A-Z, a-z)." | "Please enter a valid email address." | "Postal code" | "Powered by" | "Prepay duties and taxes at checkout" | "Proceed with order" | "Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions." | "Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions." | "Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions." | "Product prices already include duties. No additional duties will be added at checkout, with rare exceptions." | "Product prices already include fees. No additional fees will be added at checkout, with rare exceptions." | "Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions." | "Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions." | "Reload" | "Restricted item" | "Restricted items found" | "Return to cart" | "Return to merchant site" | "Search countries" | "See duty and tax thresholds" | "Select a country" | "Select a language" | "Session timed out" | "Shipping address same as billing" | "Shipping method" | "Shopping cart expired" | "Show" | "Show non-prepaid options" | "Something went wrong." | "Spend [threshold] duty free." | "Spend [threshold] tax free." | "State" | "State/Province" | "Taxes and fees" | "Taxes will apply to all orders." | "Test cards" | "Test mode" | "The following items are unable to be shipped to your country and are not included in your cart total." | "The item you're looking for is currently unavailable in our inventory. Please check back later or contact support for assistance with availability." | "The low-value GST law passed July 1st, 2018 applies to this retailer." | "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists" | "There's been an error updating your checkout session. Please reload and try again or contact support if the error persists" | "To ensure delivery all address details must be in Latin characters." | "Translated address" | "Unable to check inventory. Please try again." | "Unable to retrieve the checkout session at the moment. Please try again or contact our support team." | "Update address" | "Update your address" | "We couldn't complete your payment. Please verify the payment details and try again." | "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time." | "Welcome to [storeName]" | "Welcome!" | "What you entered" | "Would you like to close checkout and return to the site?" | "You are being sent back to the shop to re-add items to your cart." | "You may incur additional fees from the shipping carrier by not prepaying." | "You will be redirected back to the merchant's site in a few seconds." | "You're all set!" | "Your checkout session has expired. Please reload the page to continue." | "Your order has been successfully placed." | "Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us." | "Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction." | "[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy." | "[percentage] GST due on any order above [threshold]." | "business days" | "click to learn more" | "days" | "restricted items" | "weeks">(...[key, replacement]: TranslateParams<T>) => string;
35
+ export declare const translate: <T extends keyof typeof stringsBase>(...[key, replacement]: TranslateParams<T>) => string;
@@ -65,7 +65,7 @@ declare const zonosStoreDispose: () => void, zonosStore: ZonosStore;
65
65
  /**
66
66
  * Get theme from media query if theme is SYSTEM, otherwise return the theme
67
67
  */
68
- declare const getZonosStoreTheme: (theme: ElementsUiTheme) => Exclude<ElementsUiTheme, 'SYSTEM'>;
68
+ declare const getZonosStoreTheme: (theme: ElementsUiTheme) => Exclude<ElementsUiTheme, "SYSTEM">;
69
69
  /**
70
70
  * Init setting from zonos setting
71
71
  */
@@ -3,11 +3,11 @@ export declare const checkItemRestrictions: ({ items, shipFrom, shipTo, }: Check
3
3
  action: import("src/types/generated/graphql.internal.types").ItemRestrictionAction | null;
4
4
  id: string;
5
5
  itemDescription: string | null;
6
- itemRestrictions: ({
6
+ itemRestrictions: Array<{
7
7
  hsCode: string;
8
8
  id: string;
9
9
  note: string;
10
- sources: (string | null)[] | null;
10
+ sources: Array<string | null> | null;
11
11
  type: import("src/types/generated/graphql.internal.types").ItemRestrictionType;
12
- } | null)[] | null;
12
+ } | null> | null;
13
13
  }[]>;
@@ -4,8 +4,8 @@ export declare const getLocaleMessages: ({ countryCode, localeTo, storeId, }: {
4
4
  localeTo?: string;
5
5
  storeId: number;
6
6
  }) => Promise<{
7
- countryCodes: string[] | null;
8
- countryCodesPageMessageLinks: {
7
+ countryCodes: Array<string> | null;
8
+ countryCodesPageMessageLinks: Array<{
9
9
  id: number;
10
10
  message: {
11
11
  id: number;
@@ -14,7 +14,7 @@ export declare const getLocaleMessages: ({ countryCode, localeTo, storeId, }: {
14
14
  textFrom: string;
15
15
  textTo: string;
16
16
  };
17
- }[];
17
+ }>;
18
18
  id: number;
19
19
  pageName: import("src/types/generated/graphql.frontend.types").Locale_PageName_Enum;
20
20
  }[]>;
@@ -1,4 +1,4 @@
1
- import type { IDeepKeyof, IDeepPropertyType } from "../../types/utils/deep/IDeepKeyof";
1
+ import type { IDeepKeyof, IDeepPropertyType, IRecursiveDepth } from "../../types/utils/deep/IDeepKeyof";
2
2
  /**
3
3
  * Will change a nested property on an object, and return a copy of the object with only that property changed.
4
4
  *
@@ -37,7 +37,7 @@ import type { IDeepKeyof, IDeepPropertyType } from "../../types/utils/deep/IDeep
37
37
  },
38
38
  };
39
39
  */
40
- export declare const changeDeepProperty: <T extends Record<string, unknown>, P extends IDeepKeyof<T, Depth>, Depth extends 0 | 1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 = 4>({ obj, propertyPath, value, }: {
40
+ export declare const changeDeepProperty: <T extends Record<string, unknown>, P extends IDeepKeyof<T, Depth>, Depth extends IRecursiveDepth = 4>({ obj, propertyPath, value, }: {
41
41
  obj: T;
42
42
  propertyPath: P;
43
43
  value: IDeepPropertyType<T, P, Depth>;
@@ -1,3 +1,4 @@
1
+ import type { IRecursiveDepth } from "../../types/utils/deep/IDeepKeyof";
1
2
  import type { IDeepKeyofAtIndex, IDeepPropertyTypeAtIndex } from "../../types/utils/deep/IDeepKeyofAtIndex";
2
3
  /**
3
4
  * Will change a nested property on an object (with array), and return a copy of the object with only that property changed.
@@ -60,7 +61,7 @@ import type { IDeepKeyofAtIndex, IDeepPropertyTypeAtIndex } from "../../types/ut
60
61
  },
61
62
  };
62
63
  */
63
- export declare const changeDeepPropertyAtIndex: <T extends object, P extends IDeepKeyofAtIndex<T, Depth>, Depth extends 0 | 1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 = 4>({ index, obj, propertyPath, value, }: {
64
+ export declare const changeDeepPropertyAtIndex: <T extends object, P extends IDeepKeyofAtIndex<T, Depth>, Depth extends IRecursiveDepth = 4>({ index, obj, propertyPath, value, }: {
64
65
  index: number;
65
66
  obj: T;
66
67
  propertyPath: P;
@@ -7,6 +7,6 @@ export type CustomEventMap = {
7
7
  /**
8
8
  * Strongly typed custom event creation for all available events in zonos-checkout project
9
9
  */
10
- export declare const createCustomEvent: <T extends (string & {
11
- _placeholder?: undefined;
12
- }) | keyof CustomEventMap>(eventName: T, detail?: T extends keyof CustomEventMap ? CustomEventMap[T] : unknown) => CustomEvent<T extends keyof CustomEventMap ? CustomEventMap[T] : unknown>;
10
+ export declare const createCustomEvent: <T extends keyof CustomEventMap | (string & {
11
+ _placeholder?: never;
12
+ })>(eventName: T, detail?: T extends keyof CustomEventMap ? CustomEventMap[T] : unknown) => CustomEvent<T extends keyof CustomEventMap ? CustomEventMap[T] : unknown>;
@@ -4,11 +4,11 @@ export declare const detectItemRestrictions: (newProducts: Product[]) => Promise
4
4
  action: import("../../../types/generated/graphql.internal.types").ItemRestrictionAction | null;
5
5
  id: string;
6
6
  itemDescription: string | null;
7
- itemRestrictions: ({
7
+ itemRestrictions: Array<{
8
8
  hsCode: string;
9
9
  id: string;
10
10
  note: string;
11
- sources: (string | null)[] | null;
11
+ sources: Array<string | null> | null;
12
12
  type: import("../../../types/generated/graphql.internal.types").ItemRestrictionType;
13
- } | null)[] | null;
13
+ } | null> | null;
14
14
  }[]>;
@@ -1,2 +1,2 @@
1
1
  import { type Page } from "../../store/zonosStore";
2
- export declare const getCurrentHelloLocalePage: () => Page | '';
2
+ export declare const getCurrentHelloLocalePage: () => Page | "";
@@ -1,7 +1,7 @@
1
1
  import type { HelloMobileLocation, HelloSettingFragment } from "../../../types/generated/graphql.internal.types";
2
- export declare const initHello: (helloSettings: Omit<Partial<HelloSettingFragment>, 'mobileLocation'> & {
2
+ export declare const initHello: (helloSettings: Omit<Partial<HelloSettingFragment>, "mobileLocation"> & {
3
3
  desktopLocation?: HelloMobileLocation | null;
4
4
  mobileLocation: HelloMobileLocation | null;
5
5
  notFoundElementFallback: HelloMobileLocation | null;
6
- visibilityStatus?: 'ENABLED' | 'DISABLED';
6
+ visibilityStatus?: "ENABLED" | "DISABLED";
7
7
  }) => Promise<void>;
@@ -3,7 +3,7 @@ import type { TabItem, TabItems } from "../../components";
3
3
  * Reset any done tabs after selected tab to undone. This is to force user to go through all tabs again
4
4
  */
5
5
  export declare const resetToSelectedTab: ({ selectedTab, tabList, }: {
6
- selectedTab: TabItem['value'];
6
+ selectedTab: TabItem["value"];
7
7
  tabList: TabItems;
8
8
  }) => {
9
9
  "customer-info": TabItem;
@@ -380,7 +380,7 @@ export namespace Components {
380
380
  /**
381
381
  * For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
382
382
  */
383
- "setToFinishStep": (forcePaymentStatus?: PaymentIntent['status']) => Promise<void>;
383
+ "setToFinishStep": (forcePaymentStatus?: PaymentIntent["status"]) => Promise<void>;
384
384
  }
385
385
  interface ZonosCheckoutFinish {
386
386
  /**
@@ -436,7 +436,7 @@ export namespace Components {
436
436
  /**
437
437
  * Set selected tab. Only set the tab if it's clickable
438
438
  */
439
- "setTabSelected": (tabValue: TabItem['value']) => Promise<void>;
439
+ "setTabSelected": (tabValue: TabItem["value"]) => Promise<void>;
440
440
  /**
441
441
  * Color of the tab progress bar and label, override the secondary color of the appearance settings
442
442
  */
@@ -8,7 +8,7 @@ export declare const inGithubActions: boolean;
8
8
  export declare const inCloudflare: boolean;
9
9
  export declare const inVercel: boolean;
10
10
  export declare const isVercelProd: boolean;
11
- declare const envClientSchema: z.ZodObject<{
11
+ declare const _envClientSchema: z.ZodObject<{
12
12
  NEXT_PUBLIC_FLAG_URL: z.ZodString;
13
13
  NEXT_PUBLIC_RELEASE_DATE: z.ZodString;
14
14
  NEXT_PUBLIC_ZONOS_API_KEY: z.ZodString;
@@ -42,7 +42,7 @@ declare const envClientSchema: z.ZodObject<{
42
42
  NEXT_PUBLIC_ZONOS_ROUTE_URL: string;
43
43
  NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL: string;
44
44
  }>;
45
- export interface Env extends z.infer<typeof envClientSchema> {
45
+ export interface Env extends z.infer<typeof _envClientSchema> {
46
46
  }
47
47
  export declare const env: Readonly<{
48
48
  NEXT_PUBLIC_FLAG_URL: string;
@@ -7,7 +7,7 @@ export type LoadStripe = (...args: Parameters<StripeConstructor>) => Promise<Str
7
7
  export declare const zonosStripeFindScript: () => HTMLScriptElement | null;
8
8
  export declare const injectScript: (params: null | LoadParams) => HTMLScriptElement | null;
9
9
  export declare const zonosStripeLoadScript: (params: null | LoadParams) => Promise<StripeConstructor | null>;
10
- export declare const initStripe: (maybeStripe: StripeConstructor | null, args: [publishableKey: string, options?: import("@stripe/stripe-js").StripeConstructorOptions | undefined], startTime: number) => Stripe | null;
10
+ export declare const initStripe: (maybeStripe: StripeConstructor | null, args: Parameters<StripeConstructor>, startTime: number) => Stripe | null;
11
11
  export declare const validateLoadParams: (params: {
12
12
  advancedFraudSignals: boolean;
13
13
  }) => LoadParams | void;
@@ -255,6 +255,7 @@ export declare abstract class Zonos {
255
255
  static cartId: string | null;
256
256
  private static zonosController;
257
257
  static init: (params: LoadZonosParams) => Promise<void>;
258
+ private static injectCustomScriptForHostedCheckout;
258
259
  static displayCurrency: () => void;
259
260
  static openHelloDialog: (value?: boolean) => void;
260
261
  static showNotification: (notification: NotificationInit) => void;
@@ -1015,6 +1015,8 @@ export declare namespace JSXBase {
1015
1015
  autoPlay?: boolean;
1016
1016
  autoplay?: boolean | string;
1017
1017
  controls?: boolean;
1018
+ controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1019
+ controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1018
1020
  crossOrigin?: string;
1019
1021
  crossorigin?: string;
1020
1022
  loop?: boolean;
@@ -1564,6 +1566,10 @@ export declare namespace JSXBase {
1564
1566
  onSubmitCapture?: (event: Event) => void;
1565
1567
  onInvalid?: (event: Event) => void;
1566
1568
  onInvalidCapture?: (event: Event) => void;
1569
+ onBeforeToggle?: (event: Event) => void;
1570
+ onBeforeToggleCapture?: (event: Event) => void;
1571
+ onToggle?: (event: Event) => void;
1572
+ onToggleCapture?: (event: Event) => void;
1567
1573
  onLoad?: (event: Event) => void;
1568
1574
  onLoadCapture?: (event: Event) => void;
1569
1575
  onError?: (event: Event) => void;
@@ -3,4 +3,4 @@ import type { ElementsUiStyle, ElementsUiTheme } from "../../types/generated/gra
3
3
  export declare const defaultVariable: ({ borderStyle, theme, }: {
4
4
  borderStyle?: ElementsUiStyle;
5
5
  theme: ElementsUiTheme;
6
- }) => Appearance['variables'];
6
+ }) => Appearance["variables"];
@@ -1,5 +1,4 @@
1
1
  /* eslint-disable no-relative-import-paths/no-relative-import-paths */
2
- import type { BrowserOptions } from '@sentry/browser';
3
2
  import type { StripeConstructor } from '@stripe/stripe-js';
4
3
 
5
4
  /** Need to use relative path so that this declaration file can be correctly bundled */
@@ -17,9 +16,6 @@ declare global {
17
16
 
18
17
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
19
18
  interface Window {
20
- Sentry?: {
21
- init: (config: BrowserOptions) => void;
22
- };
23
19
  Stripe?: StripeConstructor;
24
20
  Zonos: Zonos;
25
21
  /**
@@ -34,7 +30,6 @@ declare global {
34
30
  * A flag to determine if the current page is a BigCommerce page
35
31
  */
36
32
  stencilBootstrap?: unknown;
37
- sentryOnLoad?: () => void;
38
33
  }
39
34
 
40
35
  namespace NodeJS {
@@ -1,6 +1,5 @@
1
1
  import type { Appearance } from '@stripe/stripe-js';
2
- declare const supportedPropertyNames: readonly ["-moz-osx-font-smoothing", "-webkit-font-smoothing", "-webkit-text-fill-color", "backgroundColor", "border", "borderBottom", "borderBottomColor", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStyle", "borderBottomWidth", "borderColor", "borderLeft", "borderLeftColor", "borderLeftStyle", "borderLeftWidth", "borderRadius", "borderRight", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderStyle", "borderTop", "borderTopColor", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStyle", "borderTopWidth", "borderWidth", "boxShadow", "color", "fill", "fontFamily", "fontSize", "fontVariant", "fontVariation", "fontWeight", "letterSpacing", "lineHeight", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "opacity", "outline", "outlineOffset", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "textDecoration", "textShadow", "textTransform", "transition"];
3
- type SupportedPropertyName = (typeof supportedPropertyNames)[number];
2
+ type SupportedPropertyName = '-moz-osx-font-smoothing' | '-webkit-font-smoothing' | '-webkit-text-fill-color' | 'backgroundColor' | 'border' | 'borderBottom' | 'borderBottomColor' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderBottomStyle' | 'borderBottomWidth' | 'borderColor' | 'borderLeft' | 'borderLeftColor' | 'borderLeftStyle' | 'borderLeftWidth' | 'borderRadius' | 'borderRight' | 'borderRightColor' | 'borderRightStyle' | 'borderRightWidth' | 'borderStyle' | 'borderTop' | 'borderTopColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderTopStyle' | 'borderTopWidth' | 'borderWidth' | 'boxShadow' | 'color' | 'fill' | 'fontFamily' | 'fontSize' | 'fontVariant' | 'fontVariation' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'margin' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginTop' | 'opacity' | 'outline' | 'outlineOffset' | 'padding' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'textDecoration' | 'textShadow' | 'textTransform' | 'transition';
4
3
  /**
5
4
  * @ref https://stripe.com/docs/elements/appearance-api?platform=web#all-rules
6
5
  * @example
@@ -4,6 +4,6 @@ export declare const formattedUrl: ({ branchName, inCI: _inCI, inVercel: _inVerc
4
4
  inVercel: boolean;
5
5
  isVercelPreview: boolean;
6
6
  packageVersion: string;
7
- type: 'major' | 'full' | 'vercel-git';
7
+ type: "major" | "full" | "vercel-git";
8
8
  url?: string;
9
9
  }) => string | undefined;
@@ -1 +1 @@
1
- import{l as e,h as n,a as o}from"./p-860e46ab.js";import{s as t,c as s}from"./p-b7307c61.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b7307c61.js";const r=["jsdelivr","cdnjs","unpkg","vercel"],i="jsdelivr",l=e=>{const n=r.indexOf(e);return r[n+1]||null},a=()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const o=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),t="https://v1.3.140.js.zonos.com";if(!o&&(t.includes("test.")||t.includes("test-")))return t;if(!o&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!o)return null;if("dev-elements"===o)return"https://dev.elements.zonos.com";const s=`https://${o}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),s},u="https://js.stripe.com/v3",m=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,w="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let p=null;const f=Promise.resolve().then((()=>{return e=null,null!==p||(p=new Promise(((n,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(w),window.Stripe)n(window.Stripe);else try{let s=(()=>{const e=document.querySelectorAll(`script[src^="${u}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&m.test(o.src))return o}return null})();s&&e?console.warn(w):s||(s=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${u}${n}`;const s=document.head||document.body;return s?(s.appendChild(t),t):(o("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==s||s.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):t(new Error("Stripe.js not available"))})),null==s||s.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else n(null)}))),p;var e}));let h=!1;var v;f.catch((e=>{h||console.warn(e)}));const y=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),z="https://v1.3.140.js.zonos.com",j=y||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.140",g="https://fonts.googleapis.com",S=/^https:\/\/fonts\.googleapis\.com/;class O{}v=O,O.doneInit=!1,O.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),O.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),O._paypalMockResponse=null,O.isBigCommerce=!1,O.releaseDate="1734113749964",O.isLegacyCheckout=!1,O.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",O.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),O.isNpm=!0,O.zonosQaUrl=null,O.zonosQaUrlApi=null,O.version="v1.3.140",O.modeAlerted=!1,O.cartData=null,O.paypal=null,O.getCurrentTimestamp=()=>(new Date).getTime(),O.zonosController=null,O.init=async r=>{const{appearance:i,checkoutSettings:c,currencyConverter:l,helloSettings:d,onCountryChange:u,overrideCurrencyFormat:m,storeId:w,zonosApiKey:p}=r;if(v.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),v.doneInit)return;if(e(`====== ZONOS DEBUG MODE: on (${v.version}) ======`),v.zonosApiKey=p,v.storeId=w,v.isNpm){e("====== ZONOS LOADING FROM NPM ======");const s=a();if(s&&!window.isZonosPreview){e(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${s} ======`,"info");const n=document.createElement("script");return n.src=`${s}/dist/scripts/zonos.js`,document.head.appendChild(n),n.addEventListener("load",(()=>{window.Zonos.isNpm=v.isNpm,window.Zonos.isBigCommerce=v.isBigCommerce,window.Zonos.isLegacyCheckout=v.isLegacyCheckout,window.Zonos.init(r)})),n.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${s}`)})),void(window.isZonosPreview=!0)}if(!p&&!v.cartId)return void o("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!v.cartData&&v.cartId){e("Initialize cart data");const n=await t(v.cartId);if(!n)return void o("Failed to get cart data");v.cartData=n.cartData,v.zonosApiKey=n.zonosApiKey}const i=await(async()=>{if(!window.location.search.includes("zonosTestMode=1")||!window.Zonos.zonosApiKey)return null;if(e("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return e("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:t,json:s}=await n("/api/get-test-public-credential");if(t.length||!s)return o("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",t),null;const r=s.publicCredential;return r?(e(`[ZONOS - loadZonos] Retrieve new test public token ${r}`,"info"),r):(o("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();i&&(v.zonosApiKey=i)}const f=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(v.cartId&&v.cartData||f){e("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const n=document.createElement("button");n.style.display="none",n.id=`${s}`,document.body.appendChild(n)}e("init zonos"),v.injectZonosCdn(),v.injectZonosCss(),v.injectFonts(),v.injectController({config:{appearance:i,checkoutSettings:c,currencyConverter:l,helloSettings:d,onCountryChange:u,overrideCurrencyFormat:m}}),v.doneInit=!0},O.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},O.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},O.showNotification=e=>{var n;null===(n=v.zonosController)||void 0===n||n.showNotification(e)},O.updateOrganizationName=e=>{var n;null===(n=v.zonosController)||void 0===n||n.updateOrganizationName(e)},O.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},O.injectController=({config:n})=>{var t;if(document.querySelector("zonos-controller"))return;if(null===(t=n.checkoutSettings)||void 0===t?void 0:t.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;v.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{v.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=v.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async n=>{const{detail:t}=n;e("loading Stripe");const r=await(async(...e)=>{h=!0;const n=Date.now();return f.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(t.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):o("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),v.zonosController=s,e("Zonos controller injected!")},O.injectScript=({cdnType:n,isModule:t,theRestUrl:s})=>{const r=`${v.getZonosUrl(n)}/${s}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");t?c.type="module":c.noModule=!0,c.src=r,c.crossOrigin="anonymous",c.onerror=()=>{o(`Failed to load ${c.src}`);const e=l(n);e&&v.injectScript({cdnType:e,isModule:t,theRestUrl:s})},i.appendChild(c)},O.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return j;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.140";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.140";case"vercel":return z}};return v.isNpm&&a()||n()},O.injectZonosCdn=()=>{v.injectScript({cdnType:i,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),v.injectScript({cdnType:i,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},O.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const t=v.getZonosUrl(e),s=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${z}/`,s.appendChild(r);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${n}`,i.onerror=()=>{o(`Failed to load ${i.href}`);const t=l(e);t&&v.injectStylesheet({cdnType:t,theRestUrl:n})},s.appendChild(i)},O.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(v.injectStylesheet({cdnType:i,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},O.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!S.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=g,n.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${g}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,n.appendChild(t),e("Zonos font injected!")},O.setupGoogleFont=e=>{var n;null===(n=v.zonosController)||void 0===n||n.setupGoogleFont(e)},O.injectSupportGoogleFont=n=>{var o;e(`[FONT] injecting ${n}`);const t=null===(o=n.match(/family=(.*?):/))||void 0===o?void 0:o[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${g}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=g,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${t} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=n,s.appendChild(r),e(`[FONT] ${t} font injected!`)};export{O as Zonos}
1
+ import{l as e,h as n,a as t}from"./p-a5b294d7.js";import{s as o,c as s}from"./p-1460f917.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-1460f917.js";const i=["jsdelivr","cdnjs","unpkg","vercel"],r="jsdelivr",l=e=>{const n=i.indexOf(e);return i[n+1]||null},u=()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const t=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.142.js.zonos.com";if(!t&&(o.includes("test.")||o.includes("test-")))return o;if(!t&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const s=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s},a="https://js.stripe.com/v3",m=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,p="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let w=null;const f=Promise.resolve().then((()=>{return e=null,null!==w||(w=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(p),window.Stripe)n(window.Stripe);else try{let s=(()=>{const e=document.querySelectorAll(`script[src^="${a}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&m.test(t.src))return t}return null})();s&&e?console.warn(p):s||(s=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${a}${n}`;const s=document.head||document.body;return s?(s.appendChild(o),o):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==s||s.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==s||s.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),w;var e}));let h=!1;var v;f.catch((e=>{h||console.warn(e)}));const y=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),z="https://v1.3.142.js.zonos.com",S=y||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.142",g="https://fonts.googleapis.com",j=/^https:\/\/fonts\.googleapis\.com/;class O{}v=O,O.doneInit=!1,O.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),O.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),O._paypalMockResponse=null,O.isBigCommerce=!1,O.releaseDate="1734472646609",O.isLegacyCheckout=!1,O.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",O.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),O.isNpm=!0,O.zonosQaUrl=null,O.zonosQaUrlApi=null,O.version="v1.3.142",O.modeAlerted=!1,O.cartData=null,O.paypal=null,O.getCurrentTimestamp=()=>(new Date).getTime(),O.zonosController=null,O.init=async i=>{const{appearance:r,checkoutSettings:c,currencyConverter:d,helloSettings:l,onCountryChange:a,overrideCurrencyFormat:m,storeId:p,zonosApiKey:w}=i;if(v.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),v.doneInit)return;if(e(`====== ZONOS DEBUG MODE: on (${v.version}) ======`),v.zonosApiKey=w,v.storeId=p,v.isNpm){e("====== ZONOS LOADING FROM NPM ======");const s=u();if(s&&!window.isZonosPreview){e(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${s} ======`,"info");const n=document.createElement("script");return n.src=`${s}/dist/scripts/zonos.js`,document.head.appendChild(n),n.addEventListener("load",(()=>{window.Zonos.isNpm=v.isNpm,window.Zonos.isBigCommerce=v.isBigCommerce,window.Zonos.isLegacyCheckout=v.isLegacyCheckout,window.Zonos.init(i)})),n.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${s}`)})),void(window.isZonosPreview=!0)}if(!w&&!v.cartId)return void t("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!v.cartData&&v.cartId){e("Initialize cart data");const n=await o(v.cartId);if(!n)return void t("Failed to get cart data");v.cartData=n.cartData,v.zonosApiKey=n.zonosApiKey}const r=await(async()=>{if(!window.location.search.includes("zonosTestMode=1")||!window.Zonos.zonosApiKey)return null;if(e("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return e("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:s}=await n("/api/get-test-public-credential");if(o.length||!s)return t("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const i=s.publicCredential;return i?(e(`[ZONOS - loadZonos] Retrieve new test public token ${i}`,"info"),i):(t("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();r&&(v.zonosApiKey=r)}const f=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(v.cartId&&v.cartData||f){e("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const n=document.createElement("button");n.style.display="none",n.id=`${s}`,document.body.appendChild(n)}e("init zonos"),v.injectCustomScriptForHostedCheckout(),v.injectZonosCdn(),v.injectZonosCss(),v.injectFonts(),v.injectController({config:{appearance:r,checkoutSettings:c,currencyConverter:d,helloSettings:l,onCountryChange:a,overrideCurrencyFormat:m}}),v.doneInit=!0},O.injectCustomScriptForHostedCheckout=()=>{const n=v.cartData,t=(null==n?void 0:n.metadata)||[],o=t.find((e=>"customHeaderScript"===e.key)),s=t.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||s)){if(o){e("Injecting custom header script");const n=document.createElement("script");n.textContent=o.value,document.head.appendChild(n)}if(s){e("Injecting custom footer script");const n=document.createElement("script");n.textContent=s.value,document.body.appendChild(n)}}else e("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},O.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},O.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},O.showNotification=e=>{var n;null===(n=v.zonosController)||void 0===n||n.showNotification(e)},O.updateOrganizationName=e=>{var n;null===(n=v.zonosController)||void 0===n||n.updateOrganizationName(e)},O.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},O.injectController=({config:n})=>{var o;if(document.querySelector("zonos-controller"))return;if(null===(o=n.checkoutSettings)||void 0===o?void 0:o.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;v.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{v.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=v.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const i=await(async(...e)=>{h=!0;const n=Date.now();return f.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(o.publishableKey);i?(window.Zonos.stripe=i,s.initCheckoutElement(i)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),v.zonosController=s,e("Zonos controller injected!")},O.injectScript=({cdnType:n,isModule:o,theRestUrl:s})=>{const i=`${v.getZonosUrl(n)}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const r=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{t(`Failed to load ${c.src}`);const e=l(n);e&&v.injectScript({cdnType:e,isModule:o,theRestUrl:s})},r.appendChild(c)},O.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return S;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.142";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.142";case"vercel":return z}};return v.isNpm&&u()||n()},O.injectZonosCdn=()=>{v.injectScript({cdnType:r,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),v.injectScript({cdnType:r,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},O.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=v.getZonosUrl(e),s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${z}/`,s.appendChild(i);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{t(`Failed to load ${r.href}`);const o=l(e);o&&v.injectStylesheet({cdnType:o,theRestUrl:n})},s.appendChild(r)},O.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(v.injectStylesheet({cdnType:r,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},O.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${g}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!j.test(t.href))return t}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=g,n.appendChild(t);const o=document.createElement("link");o.rel="stylesheet",o.href=`${g}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,n.appendChild(o),e("Zonos font injected!")},O.setupGoogleFont=e=>{var n;null===(n=v.zonosController)||void 0===n||n.setupGoogleFont(e)},O.injectSupportGoogleFont=n=>{var t;e(`[FONT] injecting ${n}`);const o=null===(t=n.match(/family=(.*?):/))||void 0===t?void 0:t[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${g}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=g,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const i=document.createElement("link");i.rel="stylesheet",i.href=n,s.appendChild(i),e(`[FONT] ${o} font injected!`)};export{O as Zonos}
@@ -1 +1 @@
1
- System.register(["./p-fd061229.system.js","./p-10efff62.system.js","./p-23e7c655.system.js","./p-6b6cd6c3.system.js","./p-c5d1217f.system.js"],(function(o){"use strict";var s,e,i,t,n,r,a,l,d;return{setters:[function(o){s=o.r;e=o.c;i=o.h;t=o.H},function(o){n=o.d;r=o.z},function(o){a=o.c},function(o){l=o.g},function(o){d=o.i}],execute:function(){var h=":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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";var c=h;var p=o("zonos_shipping_rich_radio",function(){function o(o){var i=this;s(this,o);this.radioSelected=e(this,"radioSelected",7);this.handleRichRadioSelect=function(o){var s;(s=i.radioSelected)===null||s===void 0?void 0:s.emit(o)};this.getRadioItemStyleVariables=function(){var o=i.borderColor||r.appearance.colorSecondary;var s=d(o)?"var(--zonos-elements-".concat(o,")"):o;return{"--zonos--border-radius":l({overrideBorderStyle:i.borderStyle}),"--zonos--selected-border-color":s||"unset"}};this.items=undefined;this.borderColor=undefined;this.borderStyle=undefined;this.theme=undefined;this.selectedItem=null}o.prototype.render=function(){var o=this;var s;return i(t,{key:"34abb7026ed7d382870f912b5e5c5631e4f06f76",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":n()})},(s=this.items)===null||s===void 0?void 0:s.map((function(s){var e;var t=((e=o.selectedItem)===null||e===void 0?void 0:e.value)===s.value;return i("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",t&&"selected"]),onClick:function(){return o.handleRichRadioSelect(s)}},i("input",{checked:t,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:s.value}),i("div",{class:"zonos--shipping-info"},i("div",{class:"zonos--shipping-detail"},i("zonos-text",{class:"zonos--shipping-label",type:"label"},s.label),(s.sublabel||s.caption)&&i("div",{class:"zonos--sub-detail"},s.sublabel&&i("zonos-text",{textColor:"gray-800"},s.sublabel),s.caption&&i("zonos-text",{textColor:"gray-600"},s.caption))),i("zonos-text",{type:"semiBoldLabel"},s.price)))})))};return o}());p.style=c}}}));
1
+ System.register(["./p-b50667b6.system.js","./p-36dfc7ac.system.js","./p-23e7c655.system.js","./p-21b538ea.system.js","./p-c5d1217f.system.js"],(function(o){"use strict";var s,e,i,t,n,r,a,l,d;return{setters:[function(o){s=o.r;e=o.c;i=o.h;t=o.H},function(o){n=o.d;r=o.z},function(o){a=o.c},function(o){l=o.g},function(o){d=o.i}],execute:function(){var h=":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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";var c=h;var p=o("zonos_shipping_rich_radio",function(){function o(o){var i=this;s(this,o);this.radioSelected=e(this,"radioSelected",7);this.handleRichRadioSelect=function(o){var s;(s=i.radioSelected)===null||s===void 0?void 0:s.emit(o)};this.getRadioItemStyleVariables=function(){var o=i.borderColor||r.appearance.colorSecondary;var s=d(o)?"var(--zonos-elements-".concat(o,")"):o;return{"--zonos--border-radius":l({overrideBorderStyle:i.borderStyle}),"--zonos--selected-border-color":s||"unset"}};this.items=undefined;this.borderColor=undefined;this.borderStyle=undefined;this.theme=undefined;this.selectedItem=null}o.prototype.render=function(){var o=this;var s;return i(t,{key:"34abb7026ed7d382870f912b5e5c5631e4f06f76",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":n()})},(s=this.items)===null||s===void 0?void 0:s.map((function(s){var e;var t=((e=o.selectedItem)===null||e===void 0?void 0:e.value)===s.value;return i("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",t&&"selected"]),onClick:function(){return o.handleRichRadioSelect(s)}},i("input",{checked:t,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:s.value}),i("div",{class:"zonos--shipping-info"},i("div",{class:"zonos--shipping-detail"},i("zonos-text",{class:"zonos--shipping-label",type:"label"},s.label),(s.sublabel||s.caption)&&i("div",{class:"zonos--sub-detail"},s.sublabel&&i("zonos-text",{textColor:"gray-800"},s.sublabel),s.caption&&i("zonos-text",{textColor:"gray-600"},s.caption))),i("zonos-text",{type:"semiBoldLabel"},s.price)))})))};return o}());p.style=c}}}));
@@ -1 +1 @@
1
- import{r as o,h as e,H as s,F as t}from"./p-5b7da777.js";import{l as n,s as i,a as c,b as r,c as a,i as d,d as h,e as l,f as u,g as m,h as z,j as p,k,m as g,n as w,t as f,o as b,p as v,q as y,r as C,u as x,v as S,w as O,x as A,y as I,z as T,A as j,B as D}from"./p-afffdfc2.js";import{p as B,s as P,a as L,b as E}from"./p-d35376d3.js";import{z as _,g as $,m as R}from"./p-edc16f69.js";import{h as U,l as N,a as H,s as M,g as F,b as W,j as Z}from"./p-860e46ab.js";import{g as q,c as G}from"./p-7b999a40.js";import{i as K}from"./p-81a54668.js";import{c as V}from"./p-b4b7f705.js";import{g as Y}from"./p-d10ffd69.js";import{i as Q}from"./p-10d6fe23.js";import{s as J}from"./p-96d77739.js";import{c as X,s as oo,d as eo}from"./p-b7307c61.js";import{R as so}from"./p-08e7107d.js";const to=o=>{const e=o.items.map((o=>({amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""})))||[];return{adjustments:o.adjustments,cartItems:e}},no=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(o&&N("Checkout: not shippable country"),1)),io=()=>{const o="userAgentData"in window.navigator?window.navigator.userAgentData:null,e=(()=>{const o="connection"in window.navigator?window.navigator.connection:null,e="mozConnection"in window.navigator?window.navigator.mozConnection:null,s="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return o||e||s})();return{connectionDownlink:null==e?void 0:e.downlink,connectionEffectiveType:null==e?void 0:e.effectiveType,connectionRtt:null==e?void 0:e.rtt,connectionSaveData:null==e?void 0:e.saveData,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}},co='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',ro=class{constructor(e){o(this,e),this.onChangeLocaleListener=()=>{},this.isRedirectAfterOrder=!1,this.applyStripeTheme=async()=>{var o,e,s,t;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||_.appearance.theme;await d({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:B()})},this.handleCartExpiredCheck=()=>{var o;if(q())return N("Not checking for cart expiration in test mode"),!1;if(!_.checkoutSettings.cartExpiration||!(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.createdAt))return!1;const e=new Date(window.Zonos.cartData.createdAt).getTime(),s=(new Date).getTime(),t=Math.floor((s-e)/6e4);return N(`Cart has been created for ${t} minutes`),!!(_.checkoutSettings.cartExpiration&&t>_.checkoutSettings.cartExpiration)&&(this.isCartExpired=!0,!0)},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${X}`),s=!!window.Zonos.cartData,t=new URL(window.location.href).searchParams,n=t.get("payment_intent_client_secret"),i=t.get("zonosCheckoutSessionId");if(!e)return N("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(N("Payment intent exist, checking stripe payment intent status"),!n)return N("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:s};const{error:c,status:r}=await h({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(N(c?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,l.checkoutSessionId=i,u.clientSecret=n,this.setToFinishStep(r),{shouldAllowOrder:!1}):s?(N("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(N("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.defaultAddressParams=null,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null}async initCartInfoHandler(o){m({adjustments:l.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,s;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,P("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||z(),l.step="customer-info",p(),k(),null===(s=(e=_.checkoutSettings).onClose)||void 0===s||s.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if(window.Zonos.cartData){if(N("tempCartUUID is provided, start building cart"),this.handleCartExpiredCheck())return;const{adjustments:o,cartItems:e}=to(window.Zonos.cartData);await m({adjustments:o,cartItems:e})}else if("function"==typeof _.checkoutSettings.createCartId){N('"createCartId" is provided, start building cart');const o=await _.checkoutSettings.createCartId();window.Zonos.cartId=o;const e=await oo(o),s=null==e?void 0:e.cartData;if(!s)return void H("Failed to build cart, please try again.");if(window.Zonos.cartData=s,this.handleCartExpiredCheck())return;const{adjustments:t,cartItems:n}=to(s);await m({adjustments:t,cartItems:n})}else if(_.checkoutSettings.buildCartDetail&&n.selectedCountryCode){N("build cart detail");const o=await _.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency}),e=o.filter((o=>o.amount>=0)),s=o.filter((o=>o.amount<0)).map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await m({adjustments:s,cartItems:e})}if(!u.clientSecret){const o=await g();if(N(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===_.checkoutSettings.successBehavior||!!l.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=Z(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;N(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const s=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>s)return N(`=== Existing placed order info is older than ${s}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,N("=== Showing order duplication confirmation","warn")}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,l.checkoutSessionId&&U("/api/zonos-elements/update-checkout-session-metadata",{body:{id:l.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=_.checkoutSettings.placeOrderButtonSelector;if(N(`attach checkout ${o}`),!o&&!window.Zonos.cartData)return;const e=[o,`#${eo}`,`#${X}`].filter(Boolean);document.querySelectorAll(e.join(",")).forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(N(`attached event to button ${o}`,"info",{button:e}),e.addEventListener("click",(async o=>{var e;if(!window.Zonos.isLegacyCheckout&&(!no()||((o=!0)=>!n.localizationLoaded||!!n.isDisabledCountry&&(o&&N("Checkout: disabled country"),!0))()))return;o.preventDefault(),o.stopPropagation(),N("zonos checkout button clicked");const{shouldAllowOrder:s}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(s){u.isFetchingSession=!0,this.open=!0;try{const o=await this.buildCartAndInit();if(this.isCartExpired)throw new Error("This shopping cart is expired");if(!o)throw new Error("Error building cart");w({isPreview:this.preview,sessionTimeout:54e5});const{enabled:e}=await(async()=>{const{errors:o,json:e}=await U("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();l.shouldHideDiscountInput=!e,P("zonos-checkout-start"),f("checkout_open"),this.handleOrderDuplication(),window.Zonos.isLegacyCheckout&&(async()=>{const{elapsedTime:o}=F(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:W},io()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};U("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})()}catch(o){if(u.isFetchingSession=!1,H(o),this.isCartExpired)return;M({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:W,cartId:window.Zonos.cartId,checkoutSessionBody:b(),href:window.location.href,storeBaseUrl:null===(e=window.Zonos.cartData)||void 0===e?void 0:e.storeBaseUrl}}),v({messages:[y("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:y("Error creating Checkout")})}}}),{capture:!0,passive:!1}),_.checkoutSettings.disablePlaceOrderButtonActivation||e.removeAttribute("disabled"),e.setAttribute("data-zonos-checkout-attached","true"),e.matches(eo)&&(e.dispatchEvent(G("click")),r(),e.remove()),e.matches(`#${X}`)&&(e.dispatchEvent(G("click")),e.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);N("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const s=o.get(e);return s&&"undefined"!==s?s:null},s=C(o)||n.selectedCountryCode,t=e("customerCity"),i=e("customerEmail")||"",c=e("customerAddress1"),r=e("customerAddress2")||"",a=e("customerName"),d=e("customerPhone"),h=e("customerZip")||"",l=e("customerState")||"";c&&a&&d&&s?this.defaultAddressParams={address:{city:t||"",country:s,line1:c,line2:r,postal_code:h,state:l},email:i,name:a,phone:d}:N("Missing required query params so it can not be prefilled","info",[!c&&"line1",!a&&"name",!d&&"phone",!s&&"country"].filter(Boolean).join(", "))}async init(){u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:e})=>{if(!window.Zonos.isBigCommerce)return;const s=new MutationObserver((async()=>{const t=document.querySelector(o),n=i();if(!t&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==e||e(n),void s.disconnect()}const d=document.querySelector('select[name="shippingAddress.countryCode"]'),h=document.querySelector("#checkout-shipping-continue");d&&h&&(s.disconnect(),h.addEventListener("click",(async o=>{var e,s;const t=d.value;if(!t)return;if(c(t),!no(!1))return void r();const n=document.querySelector("form");if(!n)return;const i=new FormData(n),h=document.querySelector("input#addressLine1Input"),l={address1:null!==(e=i.get("shippingAddress.address1"))&&void 0!==e?e:h&&h.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(s=i.get("shippingAddress.stateOrProvince"))&&void 0!==s?s:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((o=>null==o)))return H("One or more shipping address field is missing",Object.entries(l)),void M({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:_.storeId}});a({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));s.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:eo,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(N("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):N("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){x(o)}async handleCustomerInfoContinue(){this.submitLoading=!0,await S();const o=setInterval((()=>{!l.landedCostData&&u.isFetchingLandedCost||(l.landedCostData&&(L({currency:l.currency}),O()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{O(),this.submitLoading=!1}),500)}handleInventoryCheckDialogConfirm(){l.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){E.paypalErrorMessage=null,u.hasPaymentError=!1,this.submitLoading=!0,l.inventoryCheckErrorMessage=null;try{l.inventoryCheckErrorMessage=await A()}catch(o){l.inventoryCheckErrorMessage=y("Unable to check inventory. Please try again.")}if(l.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await I(),O(),k()}catch(o){H(o),P("zonos-checkout-payment-fail"),u.hasPaymentError=!0,u.shouldInventoryRefund&&(T(),u.shouldInventoryRefund=!1)}this.submitLoading=!1}}async handleFinishClick(){if(j(),this.preview)return l.step="customer-info",void await this.init();if(z(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=K(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=K(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=$(this.appearanceSettingsOverride.theme))}handleAddressChange(){j()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,s=document.documentElement;if(this.open)e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",s.style.overflow&&s.setAttribute(o,s.style.overflow),s.style.overflow="hidden";else{const t=e.getAttribute(o),n=s.getAttribute(o);t?(e.removeAttribute(o),e.style.overflow=t):e.style.removeProperty("overflow"),n?(s.removeAttribute(o),s.style.overflow=n):s.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=K(this.mobile),this.isIframed=window.self!==window.top,N(`iframed: ${this.isIframed}`),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=D("selectedLocale",(()=>{this.applyStripeTheme()})),N(`mobile: ${this.isMobile}`)}disconnectedCallback(){j(),z(),this.onChangeLocaleListener()}render(){var o,i,c,r;const a="finish"!==l.step&&"error"!==l.step&&!u.stripeElements||u.isFetchingSession,{colorPrimary:d,colorSecondary:h,logoUrl:m,style:z}=R(_.appearance,this.appearanceSettingsOverride||null),p="ENABLED"===_.appearance.zonosAttribution,k=_.appearance.theme,g=d&&Q(d)?"DARK":"LIGHT",w=this.isMobile?k:g,f=this.isMobile?void 0:h,{customMessages:b}=n,v=null===(o=b.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,C=this.getCurrentLocalePageEnum(),x=b.filter((o=>o.pageName===C)),S=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${_.organizationName} logo`,src:o}))},O=q(),A=()=>{const o=new URLSearchParams(window.location.search),s=o.get("zonosQaUrl"),t=o.get("zonosDebug"),n=o.get("zonosE2ETest");return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},S(),O&&e("zonos-badge",{badgeColor:"orange",size:"small"},y("Test mode")),"1"===t&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),s&&e("zonos-badge",{badgeColor:"purple",size:"small"},s),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),x.map((o=>e("zonos-custom-message",{icon:co,message:o.message}))))},I=()=>l.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:y("Your checkout session has expired. Please reload the page to continue."),restStateTitle:y("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},y("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":Y({overrideBorderStyle:z})}},"finish"!==l.step&&"error"!==l.step&&e(t,null,e("div",{class:"zonos--left","data-theme":w,style:J({"--zonos--primary-color":this.isMobile?void 0:d})},!this.isMobile&&A(),"customer-info"===l.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress||this.defaultAddressParams,isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:f}),"shipping"===l.step&&e("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:f}),"payment"===l.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:f})),e("div",{class:"zonos--right","data-theme":k},this.isMobile&&A(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:so}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:f}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:co,message:v})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:co,message:v}))))),("finish"===l.step||"error"===l.step)&&e("div",{class:"zonos--done","data-theme":k},e("div",{class:"zonos--header"},S(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:so}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:k})),e("zonos-checkout-finish",{borderRadius:z,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":k,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:V(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?I():e("zonos-dialog",{borderStyle:z,"data-theme":k,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},I()),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:y("Don't close"),dialogConfirmBtnText:y("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:y("Would you like to close checkout and return to the site?"),dialogTitle:y("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:y("Return to merchant site"),dialogConfirmBtnText:y("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(i=this.placedOrderInfo)||void 0===i?void 0:i.zonosOrderNumber)?y("It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):y("It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(c=this.placedOrderInfo)||void 0===c?void 0:c.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:y("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:y("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:y("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:y("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:y("You are being sent back to the shop to re-add items to your cart."),dialogTitle:y("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],open:["handleOpenChange"]}}};ro.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{ro as zonos_checkout}
1
+ import{r as o,h as e,H as s,F as t}from"./p-680d3694.js";import{l as n,s as i,a as c,b as r,c as a,i as d,d as h,e as l,f as u,g as m,h as z,j as p,k,m as g,n as w,t as f,o as b,p as v,q as y,r as C,u as x,v as S,w as O,x as A,y as I,z as T,A as j,B as D}from"./p-3d82e70e.js";import{p as B,s as P,a as L,b as E}from"./p-6271e108.js";import{z as _,g as $,m as R}from"./p-4b685549.js";import{h as U,l as N,a as H,s as M,g as F,b as W,j as Z}from"./p-a5b294d7.js";import{g as q,c as G}from"./p-7b999a40.js";import{i as K}from"./p-81a54668.js";import{c as V}from"./p-b4b7f705.js";import{g as Y}from"./p-b0174a8f.js";import{i as Q}from"./p-766dd01f.js";import{s as J}from"./p-96d77739.js";import{c as X,s as oo,d as eo}from"./p-1460f917.js";import{R as so}from"./p-08e7107d.js";const to=o=>{const e=o.items.map((o=>({amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""})))||[];return{adjustments:o.adjustments,cartItems:e}},no=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(o&&N("Checkout: not shippable country"),1)),io=()=>{const o="userAgentData"in window.navigator?window.navigator.userAgentData:null,e=(()=>{const o="connection"in window.navigator?window.navigator.connection:null,e="mozConnection"in window.navigator?window.navigator.mozConnection:null,s="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return o||e||s})();return{connectionDownlink:null==e?void 0:e.downlink,connectionEffectiveType:null==e?void 0:e.effectiveType,connectionRtt:null==e?void 0:e.rtt,connectionSaveData:null==e?void 0:e.saveData,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}},co='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',ro=class{constructor(e){o(this,e),this.onChangeLocaleListener=()=>{},this.isRedirectAfterOrder=!1,this.applyStripeTheme=async()=>{var o,e,s,t;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||_.appearance.theme;await d({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:B()})},this.handleCartExpiredCheck=()=>{var o;if(q())return N("Not checking for cart expiration in test mode"),!1;if(!_.checkoutSettings.cartExpiration||!(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.createdAt))return!1;const e=new Date(window.Zonos.cartData.createdAt).getTime(),s=(new Date).getTime(),t=Math.floor((s-e)/6e4);return N(`Cart has been created for ${t} minutes`),!!(_.checkoutSettings.cartExpiration&&t>_.checkoutSettings.cartExpiration)&&(this.isCartExpired=!0,!0)},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${X}`),s=!!window.Zonos.cartData,t=new URL(window.location.href).searchParams,n=t.get("payment_intent_client_secret"),i=t.get("zonosCheckoutSessionId");if(!e)return N("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(N("Payment intent exist, checking stripe payment intent status"),!n)return N("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:s};const{error:c,status:r}=await h({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(N(c?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,l.checkoutSessionId=i,u.clientSecret=n,this.setToFinishStep(r),{shouldAllowOrder:!1}):s?(N("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(N("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.defaultAddressParams=null,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null}async initCartInfoHandler(o){m({adjustments:l.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,s;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,P("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||z(),l.step="customer-info",p(),k(),null===(s=(e=_.checkoutSettings).onClose)||void 0===s||s.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if(window.Zonos.cartData){if(N("tempCartUUID is provided, start building cart"),this.handleCartExpiredCheck())return;const{adjustments:o,cartItems:e}=to(window.Zonos.cartData);await m({adjustments:o,cartItems:e})}else if("function"==typeof _.checkoutSettings.createCartId){N('"createCartId" is provided, start building cart');const o=await _.checkoutSettings.createCartId();window.Zonos.cartId=o;const e=await oo(o),s=null==e?void 0:e.cartData;if(!s)return void H("Failed to build cart, please try again.");if(window.Zonos.cartData=s,this.handleCartExpiredCheck())return;const{adjustments:t,cartItems:n}=to(s);await m({adjustments:t,cartItems:n})}else if(_.checkoutSettings.buildCartDetail&&n.selectedCountryCode){N("build cart detail");const o=await _.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency}),e=o.filter((o=>o.amount>=0)),s=o.filter((o=>o.amount<0)).map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await m({adjustments:s,cartItems:e})}if(!u.clientSecret){const o=await g();if(N(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===_.checkoutSettings.successBehavior||!!l.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=Z(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;N(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const s=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>s)return N(`=== Existing placed order info is older than ${s}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,N("=== Showing order duplication confirmation","warn")}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,l.checkoutSessionId&&U("/api/zonos-elements/update-checkout-session-metadata",{body:{id:l.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=_.checkoutSettings.placeOrderButtonSelector;if(N(`attach checkout ${o}`),!o&&!window.Zonos.cartData)return;const e=[o,`#${eo}`,`#${X}`].filter(Boolean);document.querySelectorAll(e.join(",")).forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(N(`attached event to button ${o}`,"info",{button:e}),e.addEventListener("click",(async o=>{var e;if(!window.Zonos.isLegacyCheckout&&(!no()||((o=!0)=>!n.localizationLoaded||!!n.isDisabledCountry&&(o&&N("Checkout: disabled country"),!0))()))return;o.preventDefault(),o.stopPropagation(),N("zonos checkout button clicked");const{shouldAllowOrder:s}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(s){u.isFetchingSession=!0,this.open=!0;try{const o=await this.buildCartAndInit();if(this.isCartExpired)throw new Error("This shopping cart is expired");if(!o)throw new Error("Error building cart");w({isPreview:this.preview,sessionTimeout:54e5});const{enabled:e}=await(async()=>{const{errors:o,json:e}=await U("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();l.shouldHideDiscountInput=!e,P("zonos-checkout-start"),f("checkout_open"),this.handleOrderDuplication(),window.Zonos.isLegacyCheckout&&(async()=>{const{elapsedTime:o}=F(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:W},io()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};U("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})()}catch(o){if(u.isFetchingSession=!1,H(o),this.isCartExpired)return;M({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:W,cartId:window.Zonos.cartId,checkoutSessionBody:b(),href:window.location.href,storeBaseUrl:null===(e=window.Zonos.cartData)||void 0===e?void 0:e.storeBaseUrl}}),v({messages:[y("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:y("Error creating Checkout")})}}}),{capture:!0,passive:!1}),_.checkoutSettings.disablePlaceOrderButtonActivation||e.removeAttribute("disabled"),e.setAttribute("data-zonos-checkout-attached","true"),e.matches(eo)&&(e.dispatchEvent(G("click")),r(),e.remove()),e.matches(`#${X}`)&&(e.dispatchEvent(G("click")),e.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);N("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const s=o.get(e);return s&&"undefined"!==s?s:null},s=C(o)||n.selectedCountryCode,t=e("customerCity"),i=e("customerEmail")||"",c=e("customerAddress1"),r=e("customerAddress2")||"",a=e("customerName"),d=e("customerPhone"),h=e("customerZip")||"",l=e("customerState")||"";c&&a&&d&&s?this.defaultAddressParams={address:{city:t||"",country:s,line1:c,line2:r,postal_code:h,state:l},email:i,name:a,phone:d}:N("Missing required query params so it can not be prefilled","info",[!c&&"line1",!a&&"name",!d&&"phone",!s&&"country"].filter(Boolean).join(", "))}async init(){u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:e})=>{if(!window.Zonos.isBigCommerce)return;const s=new MutationObserver((async()=>{const t=document.querySelector(o),n=i();if(!t&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==e||e(n),void s.disconnect()}const d=document.querySelector('select[name="shippingAddress.countryCode"]'),h=document.querySelector("#checkout-shipping-continue");d&&h&&(s.disconnect(),h.addEventListener("click",(async o=>{var e,s;const t=d.value;if(!t)return;if(c(t),!no(!1))return void r();const n=document.querySelector("form");if(!n)return;const i=new FormData(n),h=document.querySelector("input#addressLine1Input"),l={address1:null!==(e=i.get("shippingAddress.address1"))&&void 0!==e?e:h&&h.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(s=i.get("shippingAddress.stateOrProvince"))&&void 0!==s?s:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((o=>null==o)))return H("One or more shipping address field is missing",Object.entries(l)),void M({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:_.storeId}});a({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));s.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:eo,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(N("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):N("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){x(o)}async handleCustomerInfoContinue(){this.submitLoading=!0,await S();const o=setInterval((()=>{!l.landedCostData&&u.isFetchingLandedCost||(l.landedCostData&&(L({currency:l.currency}),O()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{O(),this.submitLoading=!1}),500)}handleInventoryCheckDialogConfirm(){l.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){E.paypalErrorMessage=null,u.hasPaymentError=!1,this.submitLoading=!0,l.inventoryCheckErrorMessage=null;try{l.inventoryCheckErrorMessage=await A()}catch(o){l.inventoryCheckErrorMessage=y("Unable to check inventory. Please try again.")}if(l.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await I(),O(),k()}catch(o){H(o),P("zonos-checkout-payment-fail"),u.hasPaymentError=!0,u.shouldInventoryRefund&&(T(),u.shouldInventoryRefund=!1)}this.submitLoading=!1}}async handleFinishClick(){if(j(),this.preview)return l.step="customer-info",void await this.init();if(z(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=K(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=K(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=$(this.appearanceSettingsOverride.theme))}handleAddressChange(){j()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,s=document.documentElement;if(this.open)e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",s.style.overflow&&s.setAttribute(o,s.style.overflow),s.style.overflow="hidden";else{const t=e.getAttribute(o),n=s.getAttribute(o);t?(e.removeAttribute(o),e.style.overflow=t):e.style.removeProperty("overflow"),n?(s.removeAttribute(o),s.style.overflow=n):s.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=K(this.mobile),this.isIframed=window.self!==window.top,N(`iframed: ${this.isIframed}`),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=D("selectedLocale",(()=>{this.applyStripeTheme()})),N(`mobile: ${this.isMobile}`)}disconnectedCallback(){j(),z(),this.onChangeLocaleListener()}render(){var o,i,c,r;const a="finish"!==l.step&&"error"!==l.step&&!u.stripeElements||u.isFetchingSession,{colorPrimary:d,colorSecondary:h,logoUrl:m,style:z}=R(_.appearance,this.appearanceSettingsOverride||null),p="ENABLED"===_.appearance.zonosAttribution,k=_.appearance.theme,g=d&&Q(d)?"DARK":"LIGHT",w=this.isMobile?k:g,f=this.isMobile?void 0:h,{customMessages:b}=n,v=null===(o=b.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,C=this.getCurrentLocalePageEnum(),x=b.filter((o=>o.pageName===C)),S=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${_.organizationName} logo`,src:o}))},O=q(),A=()=>{const o=new URLSearchParams(window.location.search),s=o.get("zonosQaUrl"),t=o.get("zonosDebug"),n=o.get("zonosE2ETest");return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},S(),O&&e("zonos-badge",{badgeColor:"orange",size:"small"},y("Test mode")),"1"===t&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),s&&e("zonos-badge",{badgeColor:"purple",size:"small"},s),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),x.map((o=>e("zonos-custom-message",{icon:co,message:o.message}))))},I=()=>l.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:y("Your checkout session has expired. Please reload the page to continue."),restStateTitle:y("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},y("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":Y({overrideBorderStyle:z})}},"finish"!==l.step&&"error"!==l.step&&e(t,null,e("div",{class:"zonos--left","data-theme":w,style:J({"--zonos--primary-color":this.isMobile?void 0:d})},!this.isMobile&&A(),"customer-info"===l.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress||this.defaultAddressParams,isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:f}),"shipping"===l.step&&e("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:f}),"payment"===l.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:f})),e("div",{class:"zonos--right","data-theme":k},this.isMobile&&A(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:so}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:f}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:co,message:v})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:co,message:v}))))),("finish"===l.step||"error"===l.step)&&e("div",{class:"zonos--done","data-theme":k},e("div",{class:"zonos--header"},S(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:so}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:k})),e("zonos-checkout-finish",{borderRadius:z,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":k,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:V(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?I():e("zonos-dialog",{borderStyle:z,"data-theme":k,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},I()),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:y("Don't close"),dialogConfirmBtnText:y("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:y("Would you like to close checkout and return to the site?"),dialogTitle:y("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:y("Return to merchant site"),dialogConfirmBtnText:y("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(i=this.placedOrderInfo)||void 0===i?void 0:i.zonosOrderNumber)?y("It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):y("It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(c=this.placedOrderInfo)||void 0===c?void 0:c.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:y("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:y("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:y("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:y("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:y("You are being sent back to the shop to re-add items to your cart."),dialogTitle:y("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],open:["handleOpenChange"]}}};ro.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{ro as zonos_checkout}