@zonos/elements 1.3.246 → 1.3.247

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 (281) hide show
  1. package/dist/cjs/ShortAddressCode-bec338b0.js +7 -0
  2. package/dist/cjs/{cart-52cf3366.js → cart-97a2d20a.js} +35 -6
  3. package/dist/cjs/getContrastColor-30848800.js +37 -0
  4. package/dist/cjs/{hasInclusivePrice-dbb82df8.js → hasInclusivePrice-134b0250.js} +1 -1
  5. package/dist/cjs/index.cjs.js +9 -7
  6. package/dist/cjs/{invoice-972f1ab3.js → invoice-05a10ee1.js} +2 -2
  7. package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-edd4804c.js} +2 -2
  8. package/dist/cjs/isContrastColor-09f5924a.js +12 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{localization-b1075a8c.js → localization-00e73920.js} +180 -0
  11. package/dist/cjs/{paypal-e339cc8c.js → paypal-0b4b352b.js} +4 -12
  12. package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-07b46688.js} +2 -2
  13. package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-dd3b0609.js} +2 -2
  14. package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
  15. package/dist/cjs/zonos-address-display_9.cjs.entry.js +35 -5
  16. package/dist/cjs/zonos-address_4.cjs.entry.js +37 -7
  17. package/dist/cjs/zonos-card_5.cjs.entry.js +4 -3
  18. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +65 -44
  19. package/dist/cjs/zonos-checkout.cjs.entry.js +6 -5
  20. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  21. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -6
  22. package/dist/cjs/zonos-collect.cjs.entry.js +5 -4
  23. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  24. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-elements.cjs.js +1 -1
  27. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  28. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  30. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -6
  31. package/dist/cjs/zonos-invoice.cjs.entry.js +5 -4
  32. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  33. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +18 -4
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +22 -3
  37. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
  38. package/dist/collection/components/store/checkout/stripe.js +32 -5
  39. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  40. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  41. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  42. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  43. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  44. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  45. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  46. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  47. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  48. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  49. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  55. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  56. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  57. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  58. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  59. package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
  60. package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
  61. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
  62. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  63. package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
  64. package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
  65. package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
  66. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  67. package/dist/collection/types/generated/graphql.internal.types.js +135 -0
  68. package/dist/collection/types/index.js +1 -0
  69. package/dist/esm/ShortAddressCode-7620e622.js +5 -0
  70. package/dist/esm/{cart-7f4704dc.js → cart-99ec4a3d.js} +35 -6
  71. package/dist/esm/getContrastColor-28c18704.js +35 -0
  72. package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  73. package/dist/esm/index.js +8 -7
  74. package/dist/esm/{invoice-d3d256fb.js → invoice-44e97c22.js} +2 -2
  75. package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +2 -2
  76. package/dist/esm/isContrastColor-69778cea.js +10 -0
  77. package/dist/esm/loader.js +1 -1
  78. package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
  79. package/dist/esm/{paypal-61270b79.js → paypal-56534e48.js} +4 -11
  80. package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +2 -2
  81. package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +2 -2
  82. package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
  83. package/dist/esm/zonos-address-display_9.entry.js +35 -5
  84. package/dist/esm/zonos-address_4.entry.js +37 -7
  85. package/dist/esm/zonos-card_5.entry.js +4 -3
  86. package/dist/esm/zonos-cart-items_12.entry.js +65 -44
  87. package/dist/esm/zonos-checkout.entry.js +6 -5
  88. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  89. package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
  90. package/dist/esm/zonos-collect.entry.js +5 -4
  91. package/dist/esm/zonos-controller.entry.js +2 -2
  92. package/dist/esm/zonos-country-flag.entry.js +1 -1
  93. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  94. package/dist/esm/zonos-elements.js +1 -1
  95. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  96. package/dist/esm/zonos-hello.entry.js +1 -1
  97. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  98. package/dist/esm/zonos-invoice-finish_5.entry.js +7 -6
  99. package/dist/esm/zonos-invoice.entry.js +5 -4
  100. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  101. package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
  102. package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
  103. package/dist/esm-es5/cart-99ec4a3d.js +1 -0
  104. package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
  105. package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  106. package/dist/esm-es5/index.js +1 -1
  107. package/dist/esm-es5/{invoice-d3d256fb.js → invoice-44e97c22.js} +1 -1
  108. package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +1 -1
  109. package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
  110. package/dist/esm-es5/loader.js +1 -1
  111. package/dist/esm-es5/localization-853b48a9.js +1 -0
  112. package/dist/esm-es5/paypal-56534e48.js +17 -0
  113. package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +1 -1
  114. package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +1 -1
  115. package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
  116. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
  117. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  118. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  119. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  120. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  121. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  122. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  123. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  124. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  125. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  126. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  127. package/dist/esm-es5/zonos-elements.js +1 -1
  128. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  129. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  130. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  131. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  132. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  133. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  134. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  135. package/dist/scripts/index.d.ts +50 -4
  136. package/dist/scripts/index.js +1 -1
  137. package/dist/scripts/loadZonos.js +1 -1
  138. package/dist/scripts/zonos.js +1 -1
  139. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
  140. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
  141. package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
  142. package/dist/types/components/store/checkout/stripe.d.ts +4 -0
  143. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  144. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  145. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  146. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  147. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  148. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  149. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  150. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  151. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  152. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  153. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  154. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  155. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  156. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  157. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  158. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  159. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  160. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  161. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  162. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  163. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +8 -0
  164. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
  165. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  166. package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
  167. package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
  168. package/dist/types/components.d.ts +32 -0
  169. package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
  170. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  171. package/dist/types/types/checkout/api/CreateParty.d.ts +1 -0
  172. package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
  173. package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
  174. package/dist/types/types/generated/graphql.internal.types.d.ts +157 -30
  175. package/dist/types/types/generated/graphql.internal.types.ts +194 -37
  176. package/dist/types/types/index.d.ts +1 -0
  177. package/dist/zonos-elements/index.esm.js +1 -1
  178. package/dist/zonos-elements/p-08365fdb.system.js +1 -0
  179. package/dist/zonos-elements/p-09aabce0.js +1 -0
  180. package/dist/zonos-elements/p-0c201c39.system.entry.js +1 -0
  181. package/dist/zonos-elements/p-0cb5f151.system.entry.js +1 -0
  182. package/dist/zonos-elements/{p-367c13db.system.entry.js → p-10355cf6.system.entry.js} +1 -1
  183. package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
  184. package/dist/zonos-elements/{p-288aab46.js → p-1b86711b.js} +1 -1
  185. package/dist/zonos-elements/p-1d42cd20.js +1 -0
  186. package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
  187. package/dist/zonos-elements/p-2c10b067.system.entry.js +1 -0
  188. package/dist/zonos-elements/p-2e8f842c.entry.js +1 -0
  189. package/dist/zonos-elements/{p-67820c21.system.entry.js → p-2f55895c.system.entry.js} +1 -1
  190. package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
  191. package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-382601a9.system.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
  193. package/dist/zonos-elements/p-3e2f175c.entry.js +1 -0
  194. package/dist/zonos-elements/{p-cee69784.entry.js → p-403b9fca.entry.js} +1 -1
  195. package/dist/zonos-elements/p-41299ffb.js +1 -0
  196. package/dist/zonos-elements/p-443e1f30.system.js +1 -0
  197. package/dist/zonos-elements/{p-a79f3685.js → p-46ece7ae.js} +1 -1
  198. package/dist/zonos-elements/p-48d55793.system.js +1 -0
  199. package/dist/zonos-elements/p-5295d36e.entry.js +1 -0
  200. package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-53a9da45.entry.js} +1 -1
  201. package/dist/zonos-elements/p-63a383f4.js +1 -0
  202. package/dist/zonos-elements/{p-a3411f20.entry.js → p-64870563.entry.js} +1 -1
  203. package/dist/zonos-elements/p-655ec440.system.js +1 -0
  204. package/dist/zonos-elements/{p-415c2a90.system.js → p-678331f0.system.js} +1 -1
  205. package/dist/zonos-elements/p-695e0803.system.entry.js +1 -0
  206. package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
  207. package/dist/zonos-elements/p-6e3cf6eb.entry.js +1 -0
  208. package/dist/zonos-elements/p-6f430d6f.system.entry.js +1 -0
  209. package/dist/zonos-elements/p-71185d24.system.js +1 -0
  210. package/dist/zonos-elements/p-786d1c24.js +1 -0
  211. package/dist/zonos-elements/p-794d29dc.entry.js +1 -0
  212. package/dist/zonos-elements/{p-87206522.system.entry.js → p-7b400b5f.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-3a88a130.entry.js → p-83377e23.entry.js} +1 -1
  215. package/dist/zonos-elements/p-8defdf0d.system.js +17 -0
  216. package/dist/zonos-elements/p-8e98a7c8.js +1 -0
  217. package/dist/zonos-elements/{p-2889a485.system.entry.js → p-95348ebf.system.entry.js} +1 -1
  218. package/dist/zonos-elements/p-9a066833.system.entry.js +1 -0
  219. package/dist/zonos-elements/p-aa6c2348.system.entry.js +1 -0
  220. package/dist/zonos-elements/p-ada8841a.js +1 -0
  221. package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
  222. package/dist/zonos-elements/p-af85846e.system.js +1 -0
  223. package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
  224. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  225. package/dist/zonos-elements/p-c75b7c47.entry.js +1 -0
  226. package/dist/zonos-elements/p-caff391d.system.entry.js +1 -0
  227. package/dist/zonos-elements/p-ce98e472.js +1 -0
  228. package/dist/zonos-elements/{p-3f46d83e.entry.js → p-d0411b2d.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
  230. package/dist/zonos-elements/p-dca14319.system.js +1 -0
  231. package/dist/zonos-elements/p-dd19d9d8.js +17 -0
  232. package/dist/zonos-elements/{p-e0809901.system.js → p-df6e62f8.system.js} +1 -1
  233. package/dist/zonos-elements/p-df90bccf.entry.js +1 -0
  234. package/dist/zonos-elements/p-e07aaf09.system.js +1 -0
  235. package/dist/zonos-elements/p-e458f737.entry.js +1 -0
  236. package/dist/zonos-elements/p-eea7ac64.js +1 -0
  237. package/dist/zonos-elements/p-f6f1d779.system.entry.js +1 -0
  238. package/dist/zonos-elements/p-f8eb618b.entry.js +1 -0
  239. package/dist/zonos-elements/p-fe96e239.system.js +1 -0
  240. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  241. package/package.json +1 -1
  242. package/dist/esm-es5/cart-7f4704dc.js +0 -1
  243. package/dist/esm-es5/localization-401ec6d4.js +0 -1
  244. package/dist/esm-es5/paypal-61270b79.js +0 -17
  245. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
  246. package/dist/zonos-elements/p-01b0a2e2.js +0 -1
  247. package/dist/zonos-elements/p-095f43ec.entry.js +0 -1
  248. package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
  249. package/dist/zonos-elements/p-21fb6b39.js +0 -1
  250. package/dist/zonos-elements/p-2601538e.entry.js +0 -1
  251. package/dist/zonos-elements/p-276faa43.js +0 -1
  252. package/dist/zonos-elements/p-27874c22.entry.js +0 -1
  253. package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
  254. package/dist/zonos-elements/p-2d2c627a.system.js +0 -1
  255. package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
  256. package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
  257. package/dist/zonos-elements/p-518b501c.system.entry.js +0 -1
  258. package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
  259. package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
  260. package/dist/zonos-elements/p-6c29de12.entry.js +0 -1
  261. package/dist/zonos-elements/p-74e258ff.system.js +0 -1
  262. package/dist/zonos-elements/p-775c1122.system.js +0 -1
  263. package/dist/zonos-elements/p-7a6ab319.system.entry.js +0 -1
  264. package/dist/zonos-elements/p-85430ec1.js +0 -1
  265. package/dist/zonos-elements/p-872f9c22.system.entry.js +0 -1
  266. package/dist/zonos-elements/p-95524f54.js +0 -1
  267. package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-a0a62b7e.js +0 -17
  269. package/dist/zonos-elements/p-a556ec07.system.js +0 -17
  270. package/dist/zonos-elements/p-a6489088.js +0 -1
  271. package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
  272. package/dist/zonos-elements/p-bd10e82a.system.entry.js +0 -1
  273. package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
  274. package/dist/zonos-elements/p-c6aa780e.entry.js +0 -1
  275. package/dist/zonos-elements/p-d1effb76.system.js +0 -1
  276. package/dist/zonos-elements/p-e7543082.system.js +0 -1
  277. package/dist/zonos-elements/p-e7df8394.entry.js +0 -1
  278. package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
  279. package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
  280. package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
  281. package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as o,d as s,h as t,H as e,F as n,c as i,a}from"./p-ab41bab5.js";import{d as r,E as l,F as c,G as h,b as d,y as p,c as u,t as m,H as f,I as z,r as g,J as b,K as y,z as x,L as v,D as w,M as k,N as C,O as L}from"./p-a6489088.js";import{t as S,l as _,s as I,c as D}from"./p-21fb6b39.js";import{r as B}from"./p-95524f54.js";import{c as A}from"./p-0ef2a242.js";import{c as j}from"./p-b4b7f705.js";import{z as O,h as T,g as E,f as M}from"./p-b2a0ab4a.js";import{D as N,T as P,h as Z}from"./p-85430ec1.js";import{s as $,c as F,a as R,i as H}from"./p-a0a62b7e.js";import{h as U,s as V,j as G,g as X,i as Y,a as W}from"./p-41dd1cb8.js";import{c as q}from"./p-595f5dd2.js";import{g as K}from"./p-1f894984.js";import{l as J,b as Q}from"./p-0a377722.js";import{l as oo}from"./p-97aceb11.js";import{p as so}from"./p-276faa43.js";import{i as to,t as eo}from"./p-57fa64d7.js";import{i as no}from"./p-ae393255.js";import{u as io}from"./p-fc776473.js";import{c as ao}from"./p-0c64dbbb.js";import{s as ro}from"./p-01b0a2e2.js";import{e as lo}from"./p-6b361d2b.js";import"./p-5762e217.js";const co=class{constructor(s){o(this,s),this.errorImages=[]}render(){const o=s("./assets/empty-item.jpeg"),n=r.items.filter((o=>!o.isRestricted));return t(e,{key:"52911cfab4b2da9d65c840cd692e638c9dc732c5",class:"zonos--cart-items zonos--elements"},t("table",{key:"428a62423a7fcf0721f420c9fdceac4bd928a6eb",class:"zonos--cart-table"},t("tbody",{key:"41a438eeb79635ba00a241fa9771b9c33c7fe7ff"},n.map((s=>{const e=s.imageUrl,n=A(s.name),i=s.amount*s.quantity;return t("tr",{class:"zonos--cart-item"},t("td",{class:"zonos--column zonos--cart-item-image"},e&&!this.errorImages.includes(e)?t("img",{alt:s.name,onError:()=>{this.errorImages=[...this.errorImages,e]},src:s.imageUrl,style:{"min-width":"40px"},width:40}):t("img",{alt:s.name,src:o,width:40})),t("td",{class:"zonos--column zonos--cart-item-name"},t("div",null,n.map((o=>t("zonos-text",{type:"label"},o)))),t("zonos-text",{textColor:"gray-600",type:"caption"},S("Quantity"),": ",s.quantity)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"semiBoldLabel",weight:600},B({amount:i,isForeign:!1}))))})))))}static get assetsDirs(){return["assets"]}};co.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}";const ho=class{constructor(s){o(this,s),this.hide=!1,this.errorImages=[],this.internalCollapsed=!0,this.firstRender=!0}componentDidLoad(){this.firstRender=!0}render(){var o;const n=s("./assets/empty-item.jpeg"),i=(null===(o=r.exchangeRate)||void 0===o?void 0:o.rate)||1,a=r.restrictedItems.length;return this.hide||0===a?null:(this.firstRender&&(this.internalCollapsed=l(),this.firstRender=!1),t(e,{class:j(["zonos--cart-restricted-items","zonos--elements",this.internalCollapsed&&"collapsed"])},t("button",{class:j(["zonos--cart-title-collapse-trigger",this.internalCollapsed&&"collapsed"]),onClick:()=>{this.internalCollapsed=!this.internalCollapsed}},t("div",{class:"zonos--title-wrapper"},t("zonos-text",{textColor:"red-600",type:"label"},`${S(this.internalCollapsed?"Show":"Hide")} ${a} ${S("restricted items")}`),t("zonos-icon",{content:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n',iconColor:"red-600"}))),t("zonos-collapse",{collapsed:this.internalCollapsed},t("zonos-banner",{bannerTitle:S("The following items are unable to be shipped to your country and are not included in your cart total."),intent:"error"}),t("table",{class:"zonos--cart-table"},t("tbody",null,r.restrictedItems.map(((o,s)=>{var e,a;const r=o.imageUrl;return t("tr",{class:"zonos--cart-item"},t("td",{class:"zonos--column zonos--cart-item-image"},r&&!this.errorImages.includes(r)?t("img",{alt:(null===(e=o.matchedItem)||void 0===e?void 0:e.name)||o.name||`Restricted item ${s+1}`,onError:()=>{this.errorImages=[...this.errorImages,r]},src:r,style:{"min-width":"40px"},width:40}):t("img",{alt:o.name||`Restricted item ${s+1}`,src:n,width:40})),t("td",{class:"zonos--column zonos--cart-item-name"},t("zonos-text",{type:"label"},(null===(a=o.matchedItem)||void 0===a?void 0:a.name)||o.name),t("zonos-text",{type:"caption"},o.restriction.reason)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:o.amount*o.quantity*i,isForeign:!1}))))})))))))}static get assetsDirs(){return["assets"]}};ho.style=':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{overflow:auto;position:relative}:host zonos-banner{margin-bottom:12px}:host .zonos--cart-title-collapse-trigger{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-0);width:100%;border:none;cursor:pointer;margin-bottom:16px;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}:host .zonos--cart-title-collapse-trigger zonos-icon{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}:host .zonos--cart-title-collapse-trigger.collapsed{margin-bottom:0}:host .zonos--cart-title-collapse-trigger.collapsed zonos-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host .zonos--cart-title-collapse-trigger::before,:host .zonos--cart-title-collapse-trigger::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}:host .zonos--cart-title-collapse-trigger .zonos--title-wrapper{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--cart-table{opacity:0.5;width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}:host(.collapsed){-ms-flex-negative:0;flex-shrink:0}';const po=class{constructor(s){o(this,s),this.loading=!1,this.getInclusivePriceType=()=>{var o,s;const t=_.inclusivePricingConfigurations.find(Boolean),e="ENABLED"===(null===(o=null==t?void 0:t.configurations[N])||void 0===o?void 0:o.status),n="ENABLED"===(null===(s=null==t?void 0:t.configurations[P])||void 0===s?void 0:s.status);return e&&n?"DUTY_TAX_AND_FEE":e?"DUTY_AND_FEE":n?"TAX":null},this.getCartSubtotalSubtitle=()=>{const o=this.getInclusivePriceType();return"DUTY_AND_FEE"===o?t("zonos-text",{class:"zonos--caption",type:"caption"},S("Duties and fees included")):"TAX"===o?t("zonos-text",{class:"zonos--caption",type:"caption"},S("Taxes included")):null}}render(){var o,s,i,a,p;const u="customer-info"===r.step?r.subtotal+r.adjustmentTotal:r.total,m="payment"===r.step||"shipping"===r.step,f=l()?u:0,z=l()?r.subtotal:0,g=!r.shouldHideDiscountInput&&"customer-info"!==r.step,b=null===(p=null===(a=null===(i=null===(s=null===(o=r.landedCostData)||void 0===o?void 0:o.find(Boolean))||void 0===s?void 0:s.landedCost.appliedAdjustments)||void 0===i?void 0:i.find((o=>{var s;return"PROMO_CODE"===(null===(s=o.adjustment)||void 0===s?void 0:s.source)})))||void 0===a?void 0:a.adjustment)||void 0===p?void 0:p.name,y=async()=>{r.promoCodeApplied=!0,r.promoCodeError=!1,this.loading=!0,await c(),this.loading=!1},x=async()=>{r.promoCodeError=!1,this.loading=!0,await h(),this.loading=!1};return t(e,{class:"zonos--cart-subtotal zonos--elements"},t("table",{class:"zonos--cart-table"},t("tr",{class:"zonos--row zonos--cart-subtotal"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("zonos-text",{type:"semiBoldLabel"},S("Cart subtotal")),t("zonos-text",{class:"zonos--caption",type:"caption"},this.getCartSubtotalSubtitle())),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:z,isForeign:!0})))),t("tr",{class:"zonos--row zonos--cart-shipping"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},r.selectedShippingOption&&"customer-info"!==r.step?t(n,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},r.selectedShippingOption.displayName),r.selectedShippingOptionTransitTime&&t("zonos-text",{class:"zonos--caption",type:"caption"},r.selectedShippingOptionTransitTime)):t(n,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Shipping")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("No shipping method selected")))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},r.shipping?B({amount:r.shipping,isForeign:!0}):"-")),m&&t("tr",{class:"zonos--row zonos--cart-duties"},t("td",{class:"zonos--column"}),(()=>{var o,s,e;if(Z()){const o=this.getInclusivePriceType();return o?"TAX"===o?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties and fees")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("Nothing due at the door"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees?B({amount:r.dutiesTaxesFees,isForeign:!0}):"-"))):"DUTY_AND_FEE"===o?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Taxes"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees?B({amount:r.dutiesTaxesFees,isForeign:!0}):"-"))):t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties, taxes, and fees")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("The purchase price covers duties, taxes and fees."))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},"-"))):null}return(null===(s=null===(o=O.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===s?void 0:s.includes((null===(e=d.stripeAddressEventData)||void 0===e?void 0:e.value.address.country)||"US"))?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Taxes and fees"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees||null!==r.dutiesTaxesFeesEstimate?B({amount:r.dutiesTaxesFees||r.dutiesTaxesFeesEstimate||0,isForeign:!0}):"-"))):"DAP"===r.landedCostMethod?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties, taxes, and fees")),null!==r.dutiesTaxesFeesEstimate?`${S("Estimated [amount]",{amount:B({amount:r.dutiesTaxesFeesEstimate,isForeign:!0})})}`:"-"),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},S("Due at delivery")))):t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties, taxes, and fees")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("Nothing due at the door"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees?B({amount:r.dutiesTaxesFees,isForeign:!0}):"-")))})()),g&&t("tr",{class:"zonos--row zonos--cart-promo-code"},t("td",{class:"zonos--column"}),b?t(n,null,t("td",{class:"zonos--column zonos--cart-promo-code-col"},this.loading?t("zonos-spinner",{size:16}):t("zonos-badge",{dismissHandler:()=>x()},r.promoCode)),t("td",{class:"zonos--column zonos--cart-promo-code-col"})):t("td",{class:"zonos--column zonos--cart-promo-code-col",colSpan:2},t("div",{class:"zonos--cart-promo-code-input-wrapper"},t("zonos-input",{class:"zonos--cart-promo-code-input",inputLabel:S("Add promotional code"),inputValue:r.promoCode,isError:r.promoCodeError,onInputChange:o=>r.promoCode=o.detail.trim(),onKeyDown:o=>{"Enter"===o.key&&y()}}),t("zonos-button",{loading:this.loading,onClick:()=>y(),variant:"primary"},S("Apply"))))),!!r.adjustmentTotal&&t("tr",{class:"zonos--row zonos--cart-discount"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("div",{class:"zonos--title-with-icon"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Discounts")))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:r.adjustmentTotal,isForeign:!0})))),t("tr",{class:"zonos--row zonos--cart-pay-total"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Order total"))),t("td",{class:"zonos--column zonos--cart-total-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:f,isForeign:!0}))))))}static get assetsDirs(){return["assets"]}};po.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:20px 8px;vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price,:host .zonos--cart-promo-code-col{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}:host .zonos--cart-subtotal-price zonos-text{white-space:nowrap}:host .zonos--cart-subtotal-price zonos-text,:host .zonos--cart-pay-total zonos-text{white-space:nowrap}:host .zonos--cart-promo-code-input-wrapper{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}:host .zonos--cart-promo-code-input{-ms-flex:1;flex:1}";const uo=class{constructor(s){o(this,s),this.closeClick=i(this,"closeClick",7),this.borderRadius="ROUNDED",this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=S("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,s;const t=I.checkoutSessionId,e=new URLSearchParams;e.set("checkoutSessionId",t||"");const{baseUrl:n,errors:i,json:a}=await U(`/api/zonos-elements/get-order?${e.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(s=(o=O.checkoutSettings).onOrderSuccess)||void 0===s?void 0:s.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.redirectToUrl=o=>{p(),I.checkoutSessionId=null,window.parent&&(window.parent.location.href=o),window.location.href=o},this.isRedirectBehavior=()=>{const{successBehavior:o}=O.checkoutSettings;return"REDIRECT_TO_SUCCESS_PAGE"===o||!!r.externalConfirmationPageURL},this.shouldRenderKeepShoppingButton=()=>!this.isRedirectBehavior()&&"success"===this.notificationType,this.shouldRenderCloseButtonForRedirectBehavior=()=>this.isRedirectBehavior()||"error"===this.notificationType,this.redirectToMerchantSuccessPage=()=>{var o,s,t,e;const n=r.externalConfirmationPageURL||O.checkoutSettings.successRedirectUrl,i=new URLSearchParams,a=null===(o=this.order)||void 0===o?void 0:o.id,l=(null===(e=null===(t=null===(s=this.order)||void 0===s?void 0:s.references)||void 0===t?void 0:t.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===e?void 0:e.value)||null;a&&i.set("zOrderNumber",a),l&&i.set("orderId",l);const c=i.toString(),h=n.includes("?");this.isWaitingToRedirect=!0,this.redirectToUrl(c?`${n}${h?"&":"?"}${c}`:n)},this.handleSuccessBehavior=async()=>{this.saveOrderIdForDuplicationIssue();const{successBehavior:o}=O.checkoutSettings;switch(!0){case"REDIRECT_TO_SUCCESS_PAGE"===o:case!!r.externalConfirmationPageURL:if(this.notificationTitle=S("Order complete!"),this.notificationMessages=[S("Your order has been successfully placed."),S("You will be redirected back to the merchant's site in a few seconds.")],this.isLoading=!1,this.isWaitingToRedirect=!0,this.useOverrideSuccessNotification(),await this.getPullOrder(),!this.order)return J("=== Order info not found, not redirecting, hide spinner for close button","error"),void(this.isWaitingToRedirect=!1);this.isWaitingToRedirect=!1,this.redirectToMerchantSuccessPage();break;default:this.useOverrideSuccessNotification(),this.isLoading=!1,"function"==typeof O.checkoutSettings.onOrderSuccess&&await this.getPullOrder()}},this.getPullOrder=async(o=0)=>{var s,t;0===o&&J("=== Start to poll for order info","info");const{baseUrl:e,order:n}=await this.pullOrder(),{isLegacyCheckout:i}=window.Zonos,a=!!(null===(t=null===(s=null==n?void 0:n.references)||void 0===s?void 0:s.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===t?void 0:t.value),r=I.checkoutSessionId,l=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;if(J(`=== Polling order (${o} attemps)`,"info"),n&&!i||n&&o>=l||a){if(J("=== Order info found","info"),i&&n&&!a)return void V({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}&orderId=${n.id}`,errors:[`Order found but legacy order number doesn't exist after ${l} attempts`],metadata:{allLogs:Q,checkoutSessionId:I.checkoutSessionId||"",orderId:n.id,storeId:O.storeId}});o>10&&V({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}&orderId=${n.id}`,errors:[`Order found after ${o} attempts`],metadata:{allLogs:Q,checkoutSessionId:I.checkoutSessionId||"",orderId:n.id,storeId:O.storeId}}),this.order=n}else n&&a||!(o<l)?V({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}`,errors:[`Order not found after ${l} attempts`],metadata:{allLogs:Q,checkoutSessionId:I.checkoutSessionId||"",storeId:O.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.useOverrideSuccessNotification=()=>{const{successPageSubtitleText:o,successPageTitleText:s}=O.checkoutSettings;s&&(this.notificationTitle=s),o&&(this.notificationMessages=o)},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||d.clientSecret;if(o||this.storybookForceStatus){const{error:s,messages:t,status:e}=await u({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===e||s;this.notificationType=n?"error":"success",this.notificationMessages=t||[],this.notificationTitle=S(n?"Payment failed":"You're all set!"),J("=== Payment intent retrieve status","info",{clientSecret:o,error:s,messages:t,status:e});const i=new URL(window.location.href);if(i.searchParams.delete("payment_intent_client_secret"),i.searchParams.delete("payment_intent"),i.searchParams.delete("redirect_status"),i.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",i.toString()),s&&(null==t?void 0:t.length))$("zonos-checkout-payment-fail"),V({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]}" status: ${e} - checkout session: ${I.checkoutSessionId}`],metadata:{allLogs:Q,credentialToken:window.Zonos.zonosApiKey}});else{this.saveOrderIdForDuplicationIssue(),$("zonos-checkout-success"),m({checkoutSessionId:I.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=q("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,f(),p(),I.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=S("You're all set!"),this.notificationMessages=z("succeeded").messages,this.useOverrideSuccessNotification(),await this.handleSuccessBehavior(),f(),p(),F(),I.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(R.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=S("Payment failed"),this.notificationMessages=[R.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,R.orderIdCreated&&($("zonos-checkout-success"),m({checkoutSessionId:I.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=S("You're all set!"),this.notificationMessages=z("succeeded").messages,this.useOverrideSuccessNotification(),await this.handleSuccessBehavior()),f(),p(),F(),I.checkoutSessionId=null},this.closeClickHandler=()=>{this.closeClick.emit()},this.saveOrderIdForDuplicationIssue=()=>{var o,s,t,e;const n=G(localStorage.getItem("zonos--placed-order-info")),i={cartId:window.Zonos.cartId||null,checkoutSessionId:(null==n?void 0:n.checkoutSessionId)||I.checkoutSessionId||"",orderId:(null===(o=this.order)||void 0===o?void 0:o.id)||null,time:(null==n?void 0:n.time)||Date.now(),zonosOrderNumber:(null===(e=null===(t=null===(s=this.order)||void 0===s?void 0:s.references)||void 0===t?void 0:t.find((o=>"zonosOrderNumber"===o.key)))||void 0===e?void 0:e.value)||null};localStorage.setItem("zonos--placed-order-info",JSON.stringify(i))}}componentDidLoad(){if(localStorage.removeItem("zonos--placed-order-info"),this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);r.isStagingMode?this.checkStagingOrderStatus():R.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=X();return t(e,{key:"7b18913d8ebe7be5cbe9ee7d520b643c342c409d",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":K({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"afb522b8b3b769817c00312fc9c14b4c032873ca",class:"zonos--finish-details"},t("div",{key:"c8cd43bc5269f7f252abaeb25dc98929f52b89bb",class:"zonos--group"},t("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"red-800",size:50}),t("zonos-text",{key:"1a7ead411d64fc8edf2de0383049bfd60660a315",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),t("zonos-text",{key:"0c63714bbefc4e9beb1d2cf7414e5774bab4eabe",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>t(n,null,o,t("br",null))))),this.shouldRenderCloseButtonForRedirectBehavior()&&t("zonos-button",{key:"06304d9815e2199108dfcb3dade1494f17b76137",loading:this.isWaitingToRedirect&&"error"!==this.notificationType,onClick:()=>{var o;(null===(o=this.order)||void 0===o?void 0:o.id)?this.redirectToMerchantSuccessPage():this.closeClickHandler()},size:"md",variant:"primary"},S("Close")),!window.Zonos.isLegacyCheckout&&this.shouldRenderKeepShoppingButton()&&t("zonos-button",{key:"9b809e21052fddb2149a2a1d0c22db4b10808403",onClick:()=>this.closeClickHandler(),size:"md",variant:"primary"},this.notificationActionText)),o&&"finish"===r.step&&"success"===this.notificationType&&t("div",{key:"4a278c7c4270d265c61b6b36d20864c55e1b42f1",class:"zonos--finish-button-wrapper"},t("zonos-button",{key:"fd8a876a0c5b76edd3be2d9b28da9c3963aee714",backgroundColor:"gray-0",buttonColor:"gray-1000",onClick:()=>this.closeClickHandler(),size:"lg",variant:"outline"},"New test cart"),t("zonos-button",{key:"7882981c1fe01ab6f78d8f84bcfc9aab94bffb74",onClick:()=>{const o=window.location.hostname.includes("dashboard.zonos.com");this.redirectToUrl(o?"/orders/all":"https://dashboard.zonos.com/orders/all")},size:"lg",variant:"primary"},"View order in Dashboard"))))}static get assetsDirs(){return["assets"]}};uo.style=":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 .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:20px}:host .zonos--finish-details{max-width:536px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const mo=class{constructor(s){o(this,s),this.mobile=!1,this.showLanguageDialog=!1,this.isMobile=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=Y(this.mobile)}componentWillLoad(){this.isMobile=Y(this.mobile)}render(){var o;const s=null===(o=oo.find((o=>o.code===_.selectedLocale)))||void 0===o?void 0:o.label,n="LIGHT"!==this.dataTheme||this.mobile?"gray-1000":"gray-0";return t(e,{key:"aa7fe5e0bb22626f590d93a6c8a52876523a2dfb",class:j(["zonos--elements",this.isMobile&&"mobile"])},t("div",{key:"5fb0fc90649a06e324935484d0c5c1dba31d792c",class:"zonos--checkout-footer"},t("div",{key:"e34ac7fda1d9a13830276313e4a36a7840497d7e",class:"zonos--checkout-locale-wrapper"},t("zonos-button",{key:"775156c9f331715768b1bf9c36970d0c7da02fd2",buttonColor:n,class:"zonos--checkout-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:n}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},s),t("div",{key:"e2cc31362529661507811b9f5aa68586b3bf9ea5",class:j(["zonos--checkout-footer-dialog",this.showLanguageDialog&&"zonos--checkout-footer-dialog-open"])},t("zonos-language-select",{key:"ad43b0a6bb947a69ea970485ee8d9afb5c8d1adb",handleOnClose:()=>this.toggleLanguageDialog()}))),t("div",{key:"c652833a9ce05beb22b9530003863ac0e5e9f8ea",class:"zonos--checkout-footer-icon-wrapper"},t("a",{key:"f2f8fb4ef070fe6a59a8b787e9e3e6237c2cc395",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"50b8962317bfc01bc7edbbe4c51f58476ca3c4ec",textColor:n},"Privacy policy")),t("div",{key:"7b4b70f7c0bd4ae5f385d6738f844a795261b9b9",class:"zonos--checkout-footer-logo"},t("zonos-text",{key:"8a4279a6584a376cb10e8da6b33d8006ac896d5b",textColor:n},"Powered by"),t("a",{key:"523a822b1c5b80bcb1d5dde2a7d9fce5fe476d20",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"19753e93a7820765cf208916f53adebdcdf05cf9",autoHeight:!0,content:'<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>\n<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>\n<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>\n</svg>\n',size:108}))))))}get el(){return a(this)}static get watchers(){return{mobile:["handleMobileChange"]}}};mo.style=":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{position:absolute;bottom:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24px}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a{line-height:0}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{text-decoration:none}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:4px}}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:32px;background:var(--zonos-elements-gray-0);position:relative;padding-top:24px;bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:4px}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-icon-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";const fo=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.paypalSessionFailed=i(this,"paypalSessionFailed",7),this.paypalSessionDone=i(this,"paypalSessionDone",7),this.continueLoading=!1,this.isMobile=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=d.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var s;if(!this.handleValidate())return this.showErrorBanner=!0,null===(s=d.stripeElements)||void 0===s||s.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);d.checkoutSettlementCurrency=o,$("zonos-checkout-payment-info"),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(s){const t=document.createElement("textarea");t.style.position="fixed",t.style.left="-1000px",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.value=o,t.id="zonos-copy-card-number",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}window.Zonos.showNotification({message:S("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await so();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,g()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}render(){var o;if(this.hasStripePaymentError=d.hasPaymentError,!d.stripeElements)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const s=X(),i=r.isStagingMode||W(),a="external_paypal"===(null===(o=d.stripePaymentEventData)||void 0===o?void 0:o.value.type);return t(e,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},S("Payment method")),(()=>{if(i){const{colorPrimary:o}=O.appearance,s=o&&to(o)?"DARK":"LIGHT",e=this.isMobile?O.appearance.theme:s;return t(n,null,this.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:S("No payment method needed for staging"),theme:e}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},S("Place test order"))))}return t(n,null,this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},S("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},d.customErrorMessage||S("We couldn't complete your payment. Please verify the payment details and try again.")),R.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},R.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!a&&t(n,null,t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===d.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==d.checkoutSettlementCurrency,onClick:async()=>{r.checkoutSession?await this.continueClickHandler({currencyCode:r.checkoutSession.subtotals.presentmentCurrencyCode}):J("Checkout session is not found")},size:"lg",variant:this.submitBtnType},S("Pay [orderTotal]",{orderTotal:B({amount:r.total,isForeign:!0})})),d.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==d.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===d.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},S("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:a?"block":"none"}})),s&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},S("Test cards")),t("zonos-text",{textColor:"gray-700"},S("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},S("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},S("Failure")," (****0002)")),t("zonos-notification",null)))})()))}get ele(){return a(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};fo.style=".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}";const zo=class{constructor(s){o(this,s),this.tabColor=null,this.backgroundColor=null,this.getTotalSuccessStep=()=>(Object.values(r.tabItems).filter((o=>o.isDone)).length+1)/4*100+"%",this.isTabClickable=o=>{const s=r.tabItems[o];return!!s&&(!!s.isDone||Object.values(r.tabItems).slice(0,s.index-1).every((o=>o.isDone)))}}async setTabItems(o){r.tabItems=o}async setTabSelected(o){if(this.isTabClickable(o)){r.step=o;const s=(({selectedTab:o,tabList:s})=>{const t=s[o].index,e=Object.values(s).slice(t-1,Object.keys(s).length).map((o=>o.value)),n=Object.assign({},s);return Object.values(n).forEach((o=>{e.includes(o.value)&&(o.isDone=!1)})),n})({selectedTab:o,tabList:r.tabItems});r.tabItems=s}}render(){const o=r.step,s=this.tabColor||O.appearance.colorSecondary,n=this.backgroundColor||O.appearance.colorPrimary||"",i=n&&s?(({backgroundColor:o,color:s})=>{if(o===s)return to(s)?eo(s).lighten(40).toHexString():eo(s).darken(40).toHexString();if(H({backgroundColor1:o,backgroundColor2:s}))return s;if(to(s))return"#ffffff";const t=eo(s).darken(25).toHexString(),e=eo(s).lighten(25).toHexString();return H({backgroundColor1:o,backgroundColor2:t})?t:e})({backgroundColor:no(n)?window.getComputedStyle(this.ele).getPropertyValue(`--zonos-elements-${n.replace("--zonos-elements-","")}`):n,color:s}):s;return t(e,{key:"3c7b6b5ecce353611856c14c70eec992a8024b3b",class:"zonos--elements",style:{"--zonos--color":i,"--zonos--progress-percent":this.getTotalSuccessStep()}},t("div",{key:"60e0e7895f1a5667c41baecba5533ecbafcfd11c",class:"zonos--tab-wrapper"},Object.values(r.tabItems).map(((s,e)=>{const n=s.value===o;return t("button",{"aria-label":`Tab ${s.label}`,class:j(["zonos--tab-item",s.value===o&&"selected",s.isDone&&"done"]),disabled:!this.isTabClickable(s.value),key:s.value,onClick:()=>this.setTabSelected(s.value)},t("div",{class:"zonos--tab-index"},t("zonos-text",{class:"zonos--tab-index-label",textColor:n?i:"gray-1000",type:"label"},e+1),t("zonos-icon",{class:"zonos--tab-index-done-icon",content:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>\n</svg>\n',iconColor:n?i:"gray-1000"})),t("zonos-text",{textColor:n?i:"gray-1000",type:"label"},S(s.label)))}))),t("div",{key:"fd6cbddf4abb19bedabc12b3c79c8dcb4a3bc938",class:"zonos--tab-progress"},t("div",{key:"83d85b7bcdac39b41d6e126d764242bf1076374a",class:"zonos--progress-bar-fill"})))}static get assetsDirs(){return["assets"]}get ele(){return a(this)}};zo.style=":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{margin-bottom:32px}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--zonos--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--zonos--color);height:100%;width:var(--zonos--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";const go=class{constructor(s){o(this,s),this.errorImages=[]}async handleToggleChanged(o){var s;const t=null===(s=r.exchangeRate)||void 0===s?void 0:s.targetCurrencyCode;r.displayBaseCurrency=t!==o}render(){const{exchangeRate:o}=r,s=o&&o.sourceCurrencyCode!==o.targetCurrencyCode?[{label:o.sourceCurrencyCode,value:o.sourceCurrencyCode},{label:o.targetCurrencyCode,value:o.targetCurrencyCode}]:[];return s.length?t(e,{class:"zonos--currency-toggle zonos--elements"},t("zonos-toggle",{onToggleChanged:o=>this.handleToggleChanged(o.detail),options:s,value:r.displayBaseCurrency?s[0].value:s[1].value})):null}static get assetsDirs(){return["assets"]}},bo=35,yo=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.testContinueClicked=i(this,"testContinueClicked",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.isMobile=!1,this.defaultAddress=[],this.shouldUseCustomAddressFormOverride=!1,this.showErrorBanner=!1,this.shippingCountry="",this.isCheckingForRestrictedItems=!1,this.isValidatingAddress=!1,this.taxIdErrorMessage="",this.invalidShippingCharacterList=null,this.invalidBillingCharacterList=null,this.openAddressValidationDialog=!1,this.isEmailError=!1,this.recordedFormTypeUsed=!1,this.selectedCountryCode=_.selectedCountryCode,this.genericSettings=O.genericSettings,this.addressFormRenderType=r.addressFormRenderType,this.exceededCharacterLimitErrorFieldList=[],this.handleInvalidCharacters=async()=>{if("ALL"===O.checkoutSettings.allowedCharacterSets)return{hasInvalidCharacters:!1};this.invalidShippingCharacterList=d.stripeAddressEventData?this.checkInvalidCharacters(d.stripeAddressEventData):null,this.invalidBillingCharacterList=d.stripeShippingSameAsBilling?null:this.checkInvalidCharacters(d.stripeBillingAddressEventData);const o=!!this.invalidShippingCharacterList||!!this.invalidBillingCharacterList;return o&&(this.openAddressValidationDialog=!0,this.isValidatingAddress=!0,await b({addressInvalidCharactersList:this.invalidShippingCharacterList,billingAddressInvalidCharactersList:this.invalidBillingCharacterList}),this.isValidatingAddress=!1),{hasInvalidCharacters:o}},this.transformTranslatedAddressToStripeEvent=({submitData:o,type:s})=>{const t="shippingAddress"===s?d.stripeAddressEventData:d.stripeBillingAddressEventData,e=o[s];if(!t||!e)return;const{firstName:n,lastName:i}=y({name:e.name}),a=Object.assign(Object.assign({},t),{complete:!0,value:Object.assign(Object.assign({},null==t?void 0:t.value),{address:Object.assign(Object.assign({},null==t?void 0:t.value.address),{city:e.city||(null==t?void 0:t.value.address.city)||"",line1:e.line1,line2:e.line2,postal_code:e.postal_code,state:e.state}),firstName:n,lastName:i,name:e.name})});"shippingAddress"===s?d.stripeAddressEventData=a:d.stripeBillingAddressEventData=a},this.continueClickHandler=async()=>{var o;if(null===(o=this.testContinueClicked)||void 0===o||o.emit({billingAddress:d.stripeBillingAddressEventData,sameAsBilling:d.stripeShippingSameAsBilling,shippingAddress:d.stripeAddressEventData}),!this.handleValidate())return setTimeout((()=>{var o;null===(o=this.el.querySelector("zonos-banner.zonos--error-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth",block:"center"})}),50),void(this.showErrorBanner=!0);this.showErrorBanner=!1;const{hasInvalidCharacters:s}=await this.handleInvalidCharacters();s||this.continueClicked.emit({billingAddress:d.stripeBillingAddressEventData,sameAsBilling:d.stripeShippingSameAsBilling,shippingAddress:d.stripeAddressEventData})},this.validateCustomAddressForm=o=>{const s=d.stripeShippingSameAsBilling||"shipping"===o,t=s?d.customAddressErrors:d.customBillingAddressErrors,{city:e,firstName:n,lastName:i,line1:a,phone:r,postalCode:l,state:c}=t;let h=!1;return(e||n||i||a||r||l||c)&&(h=!0),s?d.customAddressErrors=Object.assign(Object.assign({},t),{showError:h}):d.customBillingAddressErrors=Object.assign(Object.assign({},t),{showError:h}),{isValid:!h}},this.validateAddressLength=({address:o,type:s})=>{if(!o)return[];const{city:t,line1:e,postal_code:n,state:i}=o.value.address,{firstName:a,lastName:r,name:l}=o.value,{firstName:c,lastName:h}=y({firstName:a,lastName:r,name:l}),d=e.length,p=n.length,u=i.length,m=c.length,f=h.length,z="shipping"===s?"shipping":"billing",g=[];return t.length>bo&&g.push({addressType:z,fieldLabel:"City",value:t}),d>bo&&g.push({addressType:z,fieldLabel:"Address line 1",value:e}),p>bo&&g.push({addressType:z,fieldLabel:"Zip",value:n}),u>bo&&g.push({addressType:z,fieldLabel:"State/Province/Region/Prefecture",value:i}),m>bo&&g.push({addressType:z,fieldLabel:"First name",value:c}),f>bo&&g.push({addressType:z,fieldLabel:"Last name",value:h}),g},this.handleValidate=()=>{var o,s;const t=d.stripeAddressEventData,e=d.stripeBillingAddressEventData,n=d.stripeLinkEventData,i=d.stripeShippingSameAsBilling?!!(null==t?void 0:t.complete):!!(null==e?void 0:e.complete),a=!!(null==t?void 0:t.complete),r=!!(null==n?void 0:n.complete);null===(o=d.stripeAddressElement)||void 0===o||o.getValue(),null===(s=d.stripeBillingAddressElement)||void 0===s||s.getValue();const l="zonos"===this.addressFormRenderType?this.validateCustomAddressForm("billing").isValid:i,c="zonos"===this.addressFormRenderType?this.validateCustomAddressForm("shipping").isValid:a;!r&&(null==n?void 0:n.empty)&&(this.isEmailError=!0),J("==> isValidBilling","info",l,{address:d.stripeBillingAddressEventData,errors:d.customBillingAddressErrors}),J("==> isValidShipping","info",c,{address:d.stripeAddressEventData,errors:d.customAddressErrors}),J("==> isValidLink","info",r);const{error:h,valid:p}=(({companyName:o,shippingCountry:s,taxId:t})=>{if(!ro({companyName:o,countryCode:s}))return{error:null,valid:!0};return(o=>["MX","AR",...lo].includes(o))(s)?lo.includes(s)?o.trim()?t?{error:null,valid:!0}:{error:"Tax id is required",valid:!1}:{error:null,valid:!0}:t?"AR"===s?/^[0-9]{2}-?[0-9]{8}-?[0-9]$/.test(t)?{error:null,valid:!0}:{error:"Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).",valid:!1}:"MX"===s?/^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(t)?{error:null,valid:!0}:{error:"Invalid RFC format. Must be 12–13 uppercase letters and numbers only.",valid:!1}:{error:null,valid:!0}:{error:"Tax id is required",valid:!1}:{error:null,valid:!0}})({companyName:d.companyName,shippingCountry:this.shippingCountry,taxId:d.taxId});this.taxIdErrorMessage=p?"":S(h);const u=this.validateAddressLength({address:d.stripeAddressEventData,type:"shipping"}),m=this.validateAddressLength({address:d.stripeBillingAddressEventData,type:"billing"});return this.exceededCharacterLimitErrorFieldList=[...u,...m],!(!(l&&c&&r&&p)||this.exceededCharacterLimitErrorFieldList.length>0)},this.handleEmailValidation=()=>{var o;this.isEmailError&&((null===(o=d.stripeLinkEventData)||void 0===o?void 0:o.empty)||(this.isEmailError=!1))},this.prepareAddressObject=o=>{var s;const t=o.value;return{city:t.address.city||"",country:t.address.country,email:(null===(s=d.stripeLinkEventData)||void 0===s?void 0:s.value.email)||"",line1:t.address.line1||"",line2:t.address.line2||"",name:t.name||"",phone:t.phone||"",postal_code:t.address.postal_code||"",state:t.address.state||""}},this.renderExceededCharacterLimitError=o=>{const s=this.exceededCharacterLimitErrorFieldList.filter((({addressType:s})=>s===o));return s.length?t("zonos-banner",{class:"zonos--error-banner",intent:"error",slot:"below-title"},t("ul",null,s.map((({fieldLabel:o,value:s})=>t("li",{key:o},S("Address line 1"===o?"[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.":"[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.",{currentLength:s.length,fieldLabel:o,maxLength:bo})))))):null},this.renderAddressComponent=o=>{this.selectedCountryCode||V({endpoint:"NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT",errors:["No country selected when rendering address component"],metadata:{type:o},shouldPostReleaseErrorReporting:!0});const s="shipping"===o?this.defaultAddress:[];return"shipping"===o&&I.checkoutSessionId&&!this.recordedFormTypeUsed&&(io({attributes:[{key:"ZONOS_FORM_TYPE_USING",value:"zonos"===this.addressFormRenderType?"custom":"stripe"}],checkoutSessionId:I.checkoutSessionId}),this.recordedFormTypeUsed=!0),t("zonos"===this.addressFormRenderType?"zonos-custom-address":"zonos-address",{defaultAddress:s,taxIdErrorMessage:this.taxIdErrorMessage,titleText:S("shipping"===o?"Shipping address":"Billing address"),type:o},this.renderExceededCharacterLimitError(o))}}watchShowErrorBanner(){this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate())}checkInvalidCharacters(o){if(!o)return null;if(!o.complete||"ALL"===O.checkoutSettings.allowedCharacterSets)return null;const{address:s,firstName:t,lastName:e,name:n}=o.value,{city:i,country:a,line1:r,line2:l,postal_code:c,state:h}=s,d=ao({city:i,country:a,line1:r,line2:l||"",name:n||`${t} ${e}`,postal_code:c,state:h});return Object.keys(d).length?d:null}watchShouldEnabledCustomAddress(){var o,s,t;const e=this.shouldUseCustomAddressFormOverride||!!(null===(o=this.genericSettings)||void 0===o?void 0:o.shouldEnabledCustomAddress),n=!!this.selectedCountryCode&&e&&!!(null===(t=null===(s=this.genericSettings)||void 0===s?void 0:s.countryCustomAddressEnabled)||void 0===t?void 0:t.includes(this.selectedCountryCode));r.addressFormRenderType=n?"zonos":"stripe"}disconnectedCallback(){try{this.storeUnsubscribeList.forEach((o=>o()))}catch(o){}}componentWillLoad(){this.storeUnsubscribeList=[T("genericSettings",(()=>{this.genericSettings=O.genericSettings})),D("selectedCountryCode",(()=>{this.selectedCountryCode=_.selectedCountryCode})),x("addressFormRenderType",(()=>{this.addressFormRenderType=r.addressFormRenderType}))],this.watchShouldEnabledCustomAddress()}render(){var o,s,n,i,a,r;if(!d.stripeElements)return null;!this.shippingCountry&&d.stripeAddressEventData&&(this.shippingCountry=null===(o=d.stripeAddressEventData)||void 0===o?void 0:o.value.address.country),d.stripeAddressEventData&&this.shippingCountry!==d.stripeAddressEventData.value.address.country&&(this.shippingCountry=d.stripeAddressEventData.value.address.country);const l=!d.stripeShippingSameAsBilling,c=E(O.appearance.theme),h=(null===(s=this.defaultAddress.find(Boolean))||void 0===s?void 0:s.email)||(null===(a=null===(i=null===(n=d.customerProfile)||void 0===n?void 0:n.locations)||void 0===i?void 0:i.find(Boolean))||void 0===a?void 0:a.email)||(null===(r=d.customerProfile)||void 0===r?void 0:r.email);return t(e,{class:"zonos--customer-info zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},S("Customer information")),this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},S("Missing required fields. Make sure all fields are completed.")),t("zonos-link-authentication",{defaultEmail:h,isEmailError:this.isEmailError,onLinkAuthenticationChange:this.handleEmailValidation,titleText:S("Contact")}),this.renderAddressComponent("shipping"),t("zonos-checkbox",{class:"zonos--shipping-same-as-billing-cbx",isChecked:d.stripeShippingSameAsBilling,label:S("Shipping address same as billing"),onCheckboxSelected:o=>{d.stripeShippingSameAsBilling=o.detail}}),t("zonos-collapse",{collapsed:!l},this.renderAddressComponent("billing")),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},S("Continue to shipping")))),d.stripeAddressEventData&&t("zonos-address-update-dialog",{billingAddress:!d.stripeShippingSameAsBilling&&d.stripeBillingAddressEventData?this.prepareAddressObject(d.stripeBillingAddressEventData):null,"data-theme":c,dialogLoading:this.isValidatingAddress,dialogOpen:this.openAddressValidationDialog,isMobile:this.isMobile,onCloseUpdateDialog:()=>this.openAddressValidationDialog=!1,onContinueClicked:o=>{const s=o.detail;this.transformTranslatedAddressToStripeEvent({submitData:s,type:"shippingAddress"}),this.transformTranslatedAddressToStripeEvent({submitData:s,type:"billingAddress"})},shippingAddress:this.prepareAddressObject(d.stripeAddressEventData),translatedBillingAddress:d.translatedAddress.billingAddress,translatedShippingAddress:d.translatedAddress.address}))}get el(){return a(this)}static get watchers(){return{showErrorBanner:["watchShowErrorBanner"],shouldUseCustomAddressFormOverride:["watchShouldEnabledCustomAddress"],genericSettings:["watchShouldEnabledCustomAddress"],selectedCountryCode:["watchShouldEnabledCustomAddress"]}}};yo.style=".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-4px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";const xo=class{constructor(t){o(this,t),this.isErrorImageLoad=!1,this.getImageRestState=()=>s(`./assets/${this.restStateType}.png`)}render(){const o=this.getImageRestState();return t(e,{key:"2d9be86849c6ff2f039ca21676cbdf912538eb1d",class:j(["zonos--elements zonos--restState"]),style:{"--zonos--font-family":M()}},t("div",{key:"f538f05fe92eca4ee05daf72ee3387bea337c20c",class:"zonos--restState-image"},t("img",{key:"cc752b1ed3e9e656810c901df9f8b19462efc978",alt:this.restStateType,onError:()=>{this.isErrorImageLoad=!0},src:o})),t("div",{key:"4729c415dbac98876fcd907437b8df21b925dec5",class:"content"},t("zonos-text",{key:"39313c8c71d228cd1076e809146ad7ac3d877a9a",class:"title",type:"boldSubheader"},this.restStateTitle),t("zonos-text",{key:"69813bd32ae3867ebebcc511655f2052b1175945",class:"subtitle"},this.restStateSubtitle)),t("div",{key:"98b085930fd76e2ff095cc971ae4699041c1a550",class:"action"},t("slot",{key:"188318643319081914ed30aad91de5f15b014953"})))}static get assetsDirs(){return["assets"]}};xo.style=":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{height:100%;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;gap:20px}:host .zonos--restState-image{width:124px;height:124px;margin-bottom:15px}:host .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:8px}";const vo=class{constructor(s){o(this,s),this.mobile=!1,this.collapsed=!1,this.isMobile=!1}handleWindowResize(){this.isMobile=Y(this.mobile)}componentWillLoad(){this.isMobile=Y(this.mobile)}render(){const o="customer-info"===r.step?r.subtotal+r.adjustmentTotal:r.total,s=l()?o:0,n=this.isMobile?"boldSubheader":"semiBoldLabel",i=this.isMobile?"boldSubheader":"secondaryPageHeader",a=this.isMobile?"gray-1000":"gray-800";return t(e,{class:j(["zonos--review zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--title"},t("zonos-text",{textColor:a,type:n},S("Pay [organizationName]",{organizationName:O.organizationName})),(()=>this.isMobile?t("zonos-icon",this.collapsed?{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}:{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}):null)()),t("div",{class:"zonos--total-pay"},t("zonos-text",{type:i},B({amount:s,isForeign:!0}))))}static get assetsDirs(){return["assets"]}};vo.style=":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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-pack:justify;justify-content:space-between;padding:4px 0;margin-bottom:8px;background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:8px}:host(.mobile) .zonos--total-pay{margin:0}";const wo=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.selectedShippingMethod=null,this.collapsedDAPOptions=!0,this.isSelecting=!1,this.showErrorBanner=!1,this.serviceLevelsDDP=[],this.serviceLevelsDAP=[],this.serviceLevelsOther=[],this.serviceLevelsAll=[],this.displayBaseCurrency=!1,this.shippingData=[],this.handleRadioSelected=async o=>{var s;if(this.selectedShippingMethod=o.detail,!this.selectedShippingMethod)return;const t=(null===(s=r.shippingData)||void 0===s?void 0:s.find((o=>{var s;return o.id===(null===(s=this.selectedShippingMethod)||void 0===s?void 0:s.shipmentRatingId)})))||null;t&&(this.isSelecting=!0,await v(),await w({applySubtotalsOnly:!1,landedCostId:o.detail.landedCostId,selectedShippingOption:t}),this.isSelecting=!1)},this.handleValidate=()=>!!this.selectedShippingMethod,this.isOutdatedShippingData=()=>{var o;return!!(null===(o=r.shippingData)||void 0===o?void 0:o.some((o=>{var s;if(!(null===(s=this.serviceLevelsAll)||void 0===s?void 0:s.find((s=>s.shipmentRatingId===o.id))))return!0})))},this.continueClickHandler=()=>{var o;this.handleValidate()?($("zonos-checkout-shipping-info"),m({checkoutSessionId:I.checkoutSessionId,eventName:"checkout_shippingInfoCompleted",metadata:{serviceLevelId:null===(o=this.selectedShippingMethod)||void 0===o?void 0:o.value}}),this.showErrorBanner=!1,this.continueClicked.emit()):this.showErrorBanner=!0},this.getLandedCostMethodLabelSuffix=o=>{var s,t,e;return 1==("DAP"===o&&!(null===(t=null===(s=O.genericSettings)||void 0===s?void 0:s.domesticCountries)||void 0===t?void 0:t.includes((null===(e=d.stripeAddressEventData)||void 0===e?void 0:e.value.address.country)||"US")))?S(" (Duties due at door)"):""},this.initServiceLevels=()=>{var o;this.collapsedDAPOptions=!0;const s=(null===(o=r.shippingData)||void 0===o?void 0:o.flatMap((o=>{var s;const t=k(o),e=t?`${t.minTransit}-${t.maxTransit} ${t.unit}`:"",n=null===(s=r.landedCostData)||void 0===s?void 0:s.filter((s=>{var t;return(null===(t=s.landedCost)||void 0===t?void 0:t.shipmentRating.id)===o.id}));return(null==n?void 0:n.map((s=>{const t=s.subtotals.shipping,n=C(s.landedCost);return{amount:t,label:`${o.displayName}${this.getLandedCostMethodLabelSuffix(n)}`,landedCostId:s.landedCostId,method:n,price:B({amount:t,isForeign:!0}),shipmentRatingId:o.id,sublabel:e,value:s.landedCostId}})))||[]})))||[],t=s.filter((o=>"DDP"===o.method)),e=s.filter((o=>"DAP"===o.method)),n=s.filter((o=>"DAP"!==o.method&&"DDP"!==o.method));this.serviceLevelsDDP=L(t),this.serviceLevelsDAP=L(e),this.serviceLevelsOther=L(n),this.serviceLevelsAll=[...this.serviceLevelsDDP,...this.serviceLevelsDAP,...this.serviceLevelsOther],[...this.serviceLevelsDDP,...this.serviceLevelsOther].length||(this.collapsedDAPOptions=!1)},this.isCurrencyToggled=()=>this.displayBaseCurrency!==r.displayBaseCurrency&&(this.displayBaseCurrency=r.displayBaseCurrency,!0),this.preselectFirstShippingMethod=async()=>{this.initServiceLevels();const o=this.serviceLevelsAll.find((o=>{var s;return o.shipmentRatingId===(null===(s=r.selectedShippingOption)||void 0===s?void 0:s.id)}))||null;if(o)return void this.handleRadioSelected({detail:o});const s=this.serviceLevelsAll.find(Boolean);s&&this.handleRadioSelected({detail:s})}}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}componentWillLoad(){this.storeUnsubscribeList=[x("shippingData",(()=>{this.isOutdatedShippingData()&&this.preselectFirstShippingMethod()})),x("landedCostData",(()=>{this.isOutdatedShippingData()&&this.preselectFirstShippingMethod()}))],this.preselectFirstShippingMethod()}render(){this.isCurrencyToggled()&&this.initServiceLevels();const o=[...this.serviceLevelsDDP,...this.serviceLevelsOther];return this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate()),t(e,{class:"zonos--shipping zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},S("Delivery options")),this.showErrorBanner&&!!this.serviceLevelsAll.length&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},S("No shipping method selected")),t("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},S("Shipping method")),this.serviceLevelsAll.length?t("div",{class:"zonos--shipping-options-wrapper"},(()=>{var s;return"US"===(null===(s=d.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)?t("zonos-shipping-rich-radio",{items:this.serviceLevelsAll,onRadioSelected:o=>this.handleRadioSelected(o),selectedItem:this.selectedShippingMethod}):t(n,null,t("zonos-shipping-rich-radio",{items:o,onRadioSelected:o=>this.handleRadioSelected(o),selectedItem:this.selectedShippingMethod}),!!o.length&&!!this.serviceLevelsDAP.length&&t("button",{class:j(["zonos--shipping-options-collapse-trigger",this.collapsedDAPOptions&&"collapsed"]),onClick:()=>{this.collapsedDAPOptions=!this.collapsedDAPOptions}},t("div",{class:"zonos--title-wrapper"},t("zonos-text",{type:"label"},`${S(this.collapsedDAPOptions?"Show non-prepaid options":"Hide non-prepaid options")} `),t("zonos-icon",{content:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n'}))),t("zonos-collapse",{collapsed:this.collapsedDAPOptions},t("div",{class:"zonos--dap-wrapper"},t("zonos-banner",{bannerTitle:S("Duties and taxes will be charged upon delivery."),intent:"warning"},S("You may incur additional fees from the shipping carrier by not prepaying.")),t("zonos-shipping-rich-radio",{items:this.serviceLevelsDAP,onRadioSelected:o=>this.handleRadioSelected(o),selectedItem:this.selectedShippingMethod}))))})()):t("zonos-banner",{bannerTitle:r.customQuotingError?r.customQuotingError:S('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.'),class:"zonos--shipping-method-error",intent:"error"}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,loading:this.continueLoading||this.isSelecting,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},S("Go to payment")))))}};wo.style='.sc-zonos-shipping-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:-16px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:16px}.sc-zonos-shipping-h .zonos--shipping-method-error.sc-zonos-shipping{margin-top:24px}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;z-index:1;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h .zonos--shipping-options-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:transparent;width:100%;border:none;cursor:pointer;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping{margin-bottom:0}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::before,.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping .zonos--title-wrapper.sc-zonos-shipping{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}.sc-zonos-shipping-h .zonos--dap-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}';export{co as zonos_cart_items,ho as zonos_cart_restricted_items,po as zonos_cart_subtotal,uo as zonos_checkout_finish,mo as zonos_checkout_footer,fo as zonos_checkout_payment,zo as zonos_checkout_progress_tabs,go as zonos_currency_toggle,yo as zonos_customer_info,xo as zonos_rest_state,vo as zonos_review,wo as zonos_shipping}
@@ -1 +0,0 @@
1
- import{r as o,h as n,H as s,F as i}from"./p-ab41bab5.js";import{b as e,i as c,c as t,d as a,n as r,e as l,j as z,k as d,u as v,w as h,B as m,y as p,f as u}from"./p-a6489088.js";import{i as g,a as b,b as f,c as w}from"./p-a79f3685.js";import{p as x,a as y}from"./p-a0a62b7e.js";import{s as k,t as C,c as I,d as S,l as j}from"./p-21fb6b39.js";import{z as O}from"./p-b2a0ab4a.js";import{b as L}from"./p-83666056.js";import{h as T,s as U,l as E,g as P}from"./p-41dd1cb8.js";import{i as _,a as N}from"./p-1f3549c6.js";import{c as A}from"./p-b4b7f705.js";import{l as D}from"./p-0a377722.js";import{l as B}from"./p-97aceb11.js";import"./p-57fa64d7.js";import"./p-1f894984.js";const F=class{constructor(n){o(this,n),this.storeUnsubscribeList=[],this.onChangeLocaleListener=()=>{},this.mobile=!1,this.tablet=!1,this.stripe=window.Zonos.stripe,this.showLanguageDialogMobile=!1,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isMobile=!1,this.isTablet=!1,this.isOverlayLoading=!0,this.isCartCollected=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.confirmationId=null,this.clientSecret=e.clientSecret,this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret,this.getBaseCurrencySettlementInfo=()=>{const o=a.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:n}}=o;return n?{settlementAmount:(n.discounts||0)+n.items+n.landedCostTotal+n.shipping}:null},this.applyStripeTheme=async()=>{const o=O.appearance.theme;await c({overrideTheme:this.isMobile?o:void 0,paypalEnabled:x()})},this.fetchCheckoutSession=async o=>{const{json:n}=await T("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"});return n},this.checkStripePaymentIntentStatus=async()=>{var o;const n=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,i=s.get("payment_intent_client_secret"),c=s.get("zonosCheckoutSessionId");if(D("Payment intent exist, checking stripe payment intent status"),!i)return D("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:n};const{error:a,status:r}=await t({clientSecret:i});if(new URLSearchParams(window.location.search).get("redirect_status")&&c){D(a?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen");const n=await this.fetchCheckoutSession(c);return this.confirmationId=(null===(o=null==n?void 0:n.checkoutSession.landedCost)||void 0===o?void 0:o.shortId)||null,k.checkoutSessionId=c,e.clientSecret=i,this.setToFinishStep(r),{shouldAllowOrder:!1}}return n?(D("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(D("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})}}resizeListener(){this.isMobile=_(this.mobile),this.isTablet=N(this.tablet)}async setToFinishStep(o){e.stripe=window.Zonos.stripe,a.step="finish",this.storybookPaymentStatusOverride=o,this.isOverlayLoading=!1}async initInvoiceCart(){var o,n,s,i,e,c,v,h,m,p,u;if(!window.Zonos.cartData)return;const f=null===(n=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.items[0])||void 0===n?void 0:n.currencyCode;f&&(a.currency=f);const w=null===(i=null===(s=window.Zonos.cartData)||void 0===s?void 0:s.references)||void 0===i?void 0:i.checkoutSessionId,x=null===(c=null===(e=window.Zonos.cartData)||void 0===e?void 0:e.references)||void 0===c?void 0:c.landedCostId;if(!x)return void r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:O.organizationName})],title:C("Invalid session")});w?(D("Setting checkout session id from cart reference","info",w),k.checkoutSessionId=w):(D("Clear checkout session id from storage so we start from a fresh session for the invoice cart"),k.checkoutSessionId=null);const{shouldAllowOrder:y}=await this.checkStripePaymentIntentStatus();if(y){try{const{adjustments:o,cartItems:n}=L(window.Zonos.cartData);if(await l({adjustments:o,cartItems:n,landedCostId:x,shouldInitSessionOnFailure:!1}),!k.checkoutSessionId&&!w){const o=await z();if(D(`stripeStoreInitCheckoutSession: ${o}`),!o)throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential")}if((!a.checkoutSession||(null===(v=a.checkoutSession)||void 0===v?void 0:v.completedAt))&&w){const o=await this.fetchCheckoutSession(w);if(this.confirmationId=(null===(h=null==o?void 0:o.checkoutSession.landedCost)||void 0===h?void 0:h.shortId)||null,(null==o?void 0:o.checkoutSession.completedAt)&&o.checkoutSession.order)return void this.setToFinishStep("succeeded");if(null==o?void 0:o.checkoutSession.clientSecret){const{status:n}=await t({clientSecret:o.checkoutSession.clientSecret});if("processing"===n||"succeeded"===n)return void this.setToFinishStep(n)}throw U({endpoint:"INVALID_INVOICE_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:w,cartId:null===(m=window.Zonos.cartData)||void 0===m?void 0:m.id,cartLandedCostId:x}}),new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it")}if(!a.checkoutSession)throw U({endpoint:"FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this invoice cart"],metadata:{cartCheckoutSessionId:w||"N/A",cartId:null===(p=window.Zonos.cartData)||void 0===p?void 0:p.id,cartLandedCostId:x||"N/A"}}),new Error("Could not update/create checkout session for this invoice cart");d();const s=null===(u=a.checkoutSession)||void 0===u?void 0:u.landedCost;if(!s)throw new Error("Landed cost could not be found in checkout session after creating/updating them");await g(Object.assign(Object.assign({},a.checkoutSession),{id:k.checkoutSessionId||""})),b({landedCostId:s.id}),this.applyStripeTheme()}catch(o){E(o),r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:O.organizationName})],title:C("Invalid session")})}this.isOverlayLoading=!1}}toggleLanguageDialog(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile}async handleStripePaymentContinue(){var o,n,s,i;if(null===(o=e.stripeBillingAddressElement)||void 0===o||o.getValue(),null===(n=e.stripeLinkEventData)||void 0===n?void 0:n.complete)if(null===(s=e.stripeBillingAddressEventData)||void 0===s?void 0:s.complete)if("USD"!==e.checkoutSettlementCurrency||!e.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,y.paypalErrorMessage=null,e.hasPaymentError=!1,this.submitLoading=!0,a.inventoryCheckErrorMessage=null,!await v())return e.hasPaymentError=!0,e.customErrorMessage=C("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:e.checkoutSettlementCurrency}),void(this.submitLoading=!1);await f();try{return await h({noLandedCostCheck:!0}),a.step="finish",void(this.confirmationId=w.landedCostShortId||(null===(i=a.selectedLandedCost)||void 0===i?void 0:i.landedCostId)||null)}catch(o){E(o),e.hasPaymentError=!0}this.submitLoading=!1}else this.payInUsdConfirmDialogOpen=!0;else{const o=document.querySelector(".zonos--billing-address");null==o||o.scrollIntoView({behavior:"smooth"})}else{const o=document.querySelector("zonos-link-authentication");null==o||o.scrollIntoView({behavior:"smooth"})}}componentWillLoad(){e.stripe=window.Zonos.stripe,a.step="payment",this.initInvoiceCart(),this.resizeListener(),this.storeUnsubscribeList=[m("clientSecret",(()=>{this.applyStripeTheme()})),I("selectedLocale",(()=>{this.applyStripeTheme()}))],D(`mobile: ${this.isMobile}`)}disconnectedCallback(){p(),u(),this.onChangeLocaleListener(),this.storeUnsubscribeList.forEach((o=>o()))}render(){this.clientSecret=e.clientSecret,e.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret);const o=this.getBaseCurrencySettlementInfo(),{logoUrl:c,theme:t}=O.appearance,r=()=>{const o=`${c}?timestamp=${Date.now()}`;return n("div",{class:"zonos--logo"},o&&n("img",{alt:`${O.organizationName} logo`,src:o}))},l=P(),z=()=>{var o;const s=new URLSearchParams(window.location.search),e=s.get("zonosQaUrl"),c=s.get("zonosDebug"),t=null===(o=B.find((o=>o.code===j.selectedLocale)))||void 0===o?void 0:o.label;return n(i,null,n("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},n("div",{class:"zonos--logo-wrapper"},r(),l&&n("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),"1"===c&&n("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),e&&n("zonos-badge",{badgeColor:"purple",size:"small"},e)),n("div",{class:"zonos--header-right"},n("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:()=>this.toggleLanguageDialog(),variant:"outline"},t,n("zonos-icon",{"aria-label":"Language select",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"})),n("div",{class:A(["zonos--invoice-language-dialog",this.showLanguageDialogMobile&&"zonos--invoice-language-dialog-open"])},n("zonos-language-select",{handleOnClose:()=>this.toggleLanguageDialog()})))))};return n(s,{class:A(["zonos--invoice zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":t},(()=>this.isOverlayLoading||e.isFetchingSession?null:n("div",{class:"zonos--content"},"finish"!==a.step&&"error"!==a.step&&n(i,null,(this.isMobile||this.isTablet)&&z(),n("div",{class:"zonos--left","data-theme":t},!this.isMobile&&!this.isTablet&&z(),n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},C("Billing info")),n("zonos-v-stack",{spacing:16},n("zonos-link-authentication",{titleText:""}),n("zonos-address",{titleText:"",type:"billing"})),n("zonos-invoice-payment",{class:A(["zonos--invoice-container"]),continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()}})),n("div",{class:"zonos--right","data-theme":t},!this.isMobile&&n("zonos-invoice-review",{mobile:this.isMobile,tablet:this.isTablet}),n("div",{class:"zonos--order-details-container"},!this.isMobile&&n("zonos-invoice-cart-items",null),this.isMobile&&n("zonos-invoice-order-details",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onCollapseClicked:()=>{this.collapseReviewMobile=!this.collapseReviewMobile}})),n("div",{class:"flex--wrapper"},!this.isMobile&&n("zonos-v-stack",{spacing:16},n("zonos-invoice-subtotal",null)),!this.isMobile&&!this.isTablet&&n("zonos-invoice-footer",{"data-theme":t,mobile:this.isMobile,tablet:this.isTablet})))),("finish"===a.step||"error"===a.step)&&n("div",{class:"zonos--done","data-theme":t},n("div",{class:"zonos--header"},r()),n("zonos-invoice-finish",{confirmationId:this.confirmationId,overrideNotification:"error"===a.step&&a.error?Object.assign(Object.assign({},a.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),(this.isMobile||this.isTablet||"finish"===a.step||"error"===a.step)&&n("zonos-invoice-footer",{"data-theme":t,mobile:this.isMobile,tablet:this.isTablet})))(),o&&n("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:C("Cancel"),dialogConfirmBtnText:C("Pay [orderTotal]",{orderTotal:S({amount:o.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:C("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:C("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),n("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}};F.style=".sc-zonos-invoice-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-h *.sc-zonos-invoice{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-h img.sc-zonos-invoice{max-width:100%}.sc-zonos-invoice-h dl.sc-zonos-invoice,.sc-zonos-invoice-h dd.sc-zonos-invoice,.sc-zonos-invoice-h h1.sc-zonos-invoice,.sc-zonos-invoice-h h2.sc-zonos-invoice,.sc-zonos-invoice-h h3.sc-zonos-invoice,.sc-zonos-invoice-h h4.sc-zonos-invoice,.sc-zonos-invoice-h h5.sc-zonos-invoice,.sc-zonos-invoice-h h6.sc-zonos-invoice,.sc-zonos-invoice-h hr.sc-zonos-invoice,.sc-zonos-invoice-h figure.sc-zonos-invoice,.sc-zonos-invoice-h p.sc-zonos-invoice,.sc-zonos-invoice-h pre.sc-zonos-invoice{margin:0}.sc-zonos-invoice-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h *.sc-zonos-invoice{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar{width:10px}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-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-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--header.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--logo.sc-zonos-invoice{margin-bottom:0}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice zonos-checkout-finish.sc-zonos-invoice{-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{padding:0 8px 8px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--payment-error-banner.sc-zonos-invoice{margin-top:24px}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice .zonos--order-details-container.sc-zonos-invoice{overflow:auto}.sc-zonos-invoice-h .zonos--wrapper.sc-zonos-invoice{overflow:auto;max-height:100%;position:relative}.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice>*.sc-zonos-invoice{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-invoice-h .zonos--header-right.sc-zonos-invoice{display:none}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice img.sc-zonos-invoice{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-invoice-h .zonos--invoice-container.sc-zonos-invoice{overflow:visible}.mobile.sc-zonos-invoice-h,.tablet.sc-zonos-invoice-h{min-width:auto}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{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-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding-bottom:0}}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{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-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice{margin-bottom:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice{margin-top:8px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{max-height:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:auto}.mobile.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice{margin:0}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px;padding:0 16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{overflow:visible;width:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{gap:32px}.mobile.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{margin-top:0}.mobile.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:56px;top:-56px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--header-right.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:28px;top:-28px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar{width:10px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open.sc-zonos-invoice{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{F as zonos_invoice}
@@ -1 +0,0 @@
1
- System.register(["./p-2b8345d8.system.js"],(function(r){"use strict";var t,e;return{setters:[function(r){t=r.e;e=r.c}],execute:function(){var n=function(r){return e.includes(r)};var u=r("s",(function(r){var e=r.companyName,u=r.countryCode;if(t.includes(u)){return e.trim().length>0}var s=n(u);if(s){return true}return false}))}}}));
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as o,H as e,a as i}from"./p-ab41bab5.js";import{t as n}from"./p-01dada4e.js";import{b as a,t as r,K as l,B as d,q as h,d as c}from"./p-a6489088.js";import{s as p,r as u,t as f,q as m,l as z}from"./p-21fb6b39.js";import{z as b,g,f as y}from"./p-b2a0ab4a.js";import{l as v,i as k,s as w}from"./p-41dd1cb8.js";import{s as x}from"./p-01b0a2e2.js";import{c as I}from"./p-b4b7f705.js";import{l as C}from"./p-0a377722.js";import{c as A,s as E}from"./p-6b361d2b.js";import{g as j}from"./p-1f894984.js";import"./p-5762e217.js";import"./p-57fa64d7.js";const S=class{constructor(o){s(this,o),this.invalidCharacters=t(this,"invalidCharacters",7),this.taxIdChanged=t(this,"taxIdChanged",7),this.storeUnsubscribeList=[],this.isAutoCompleteAdjusted=!1,this.defaultAddress=[],this.taxIdErrorMessage="",this.stripe=window.Zonos.stripe,this.isDirtyAddress=!1,this.isAddressFilled=!1,this.checkoutSessionId=p.checkoutSessionId,this.prevCountry=null,this.prevPostalCode=null,this.trackingSent=!1,this.prefetchLandedCost=n(h,1e3)}getStripeAddressInstance(){return"billing"===this.type?{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}:{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}}updateAddressEventData({event:s,type:t}){"billing"===t?a.stripeBillingAddressEventData=s:a.stripeAddressEventData=s,"shipping"===t&&s.value.address.line1.length&&this.prefetchLandedCost()}isAddressFilledChanged(){p.checkoutSessionId&&this.isAddressFilled&&!this.trackingSent&&"shipping"===this.type&&(this.trackingSent=!0,r({checkoutSessionId:p.checkoutSessionId,eventName:"checkout_customerInfoFilled"}))}updateAddressElement({stripeAddressElement:s,type:t}){"shipping"!==t?a.stripeBillingAddressElement=s:a.stripeAddressElement=s}async watchInitStripe(){this.stripe=window.Zonos.stripe;const{stripeAddressEventData:s,stripeElements:t}=this.getStripeAddressInstance();if(!this.stripe||!t)return void v("Stripe is not initialized. Couldn't load stripe element.");const o=this.defaultAddress.map((s=>Object.assign(Object.assign({},s),{name:s.name,phone:s.phone||void 0}))),e=z.shippingZoneCountries,i=e?Object.values(e).map((s=>s.code)):[],n=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries"),a="shipping"===this.type?i:[],r=(null==s?void 0:s.value.address.country)||u(a);C(`Stripe country code: ${r}`,"info");const d=t.create("address",{allowedCountries:n?[]:a,contacts:o.length&&!s?this.defaultAddress:[],defaultValues:{address:Object.assign(Object.assign({},null==s?void 0:s.value.address),{country:r}),firstName:null==s?void 0:s.value.firstName,lastName:null==s?void 0:s.value.lastName,phone:null==s?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component")),(null==s?void 0:s.value.address)&&(this.prevCountry=s.value.address.country,this.prevPostalCode=s.value.address.postal_code),d.on("change",(s=>{const t=s.value;if(!this.isDirtyAddress&&t.address.line1.length>=3){if(this.isDirtyAddress=!0,!this.isAutoCompleteAdjusted){const s=this.el.querySelector('iframe[src*="autocomplete-suggestions"]');s&&(s.style.zIndex="3"),this.isAutoCompleteAdjusted=!0}setTimeout((()=>{if(k())this.el.scrollIntoView({behavior:"smooth",block:"end"});else{const s="shipping"===this.type?100:600,t=this.el.closest(".zonos--group"),o=this.el.getBoundingClientRect().top+s;null==t||t.scrollTo({behavior:"smooth",top:o})}}),600)}const{firstName:o,lastName:e}=l({firstName:t.firstName,lastName:t.lastName,name:t.name});this.updateAddressEventData({event:Object.assign(Object.assign({},s),{elementMode:this.type,elementType:"address",value:Object.assign(Object.assign({},t),{firstName:o,lastName:e})}),type:this.type})})),this.updateAddressElement({stripeAddressElement:d,type:this.type})}defaultAddressChanged(s,t){if(JSON.stringify(t)===JSON.stringify(s))return;C("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});const o=this.getStripeAddressInstance().stripeAddressElement;null==o||o.clear(),null==o||o.destroy(),"shipping"===this.type?a.stripeAddressEventData=null:a.stripeBillingAddressEventData=null,this.watchInitStripe()}isInTaxIdCountry(s){return A.includes(s)}renderTaxIdInput(){var s;if("billing"===this.type)return null;const t=null===(s=a.stripeAddressEventData)||void 0===s?void 0:s.value.address.country;if(!t)return null;if(!this.isInTaxIdCountry(t))return null;if(!x({companyName:a.companyName,countryCode:t}))return null;const e=E[t];return o("div",{class:"zonos--tax-id-input"},o("zonos-stripe-input",{inputLabel:f(e.friendlyName),inputPlaceholder:e.placeholder,inputValue:a.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:s=>{a.taxId=s.detail,this.taxIdChanged.emit(s.detail)}}),this.taxIdErrorMessage&&o("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))}renderCompanyNameInput(){return("billing"!==this.type||window.Zonos.isCollect||window.Zonos.isInvoice)&&("ENABLED"===b.checkoutSettings.companyFieldsStatus||window.Zonos.isCollect||window.Zonos.isInvoice)?o("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:f("Company name (optional)"),inputValue:a.companyName,onInputChange:s=>{a.companyName=s.detail}}):null}disconnectedCallback(){const s=this.getStripeAddressInstance().stripeAddressElement;null==s||s.destroy();try{this.storeUnsubscribeList.forEach((s=>s()))}catch(s){}}componentDidLoad(){const s=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!s&&s.value.address.line1.length>0,this.watchInitStripe(),this.checkoutSessionId=p.checkoutSessionId,this.storeUnsubscribeList=[m("checkoutSessionId",(()=>{this.checkoutSessionId=p.checkoutSessionId})),d("stripeElements",(()=>{"shipping"===this.type&&this.watchInitStripe()})),d("stripeElementsForBillingAddress",(()=>{"billing"===this.type&&this.watchInitStripe()}))]}render(){var s;return this.checkoutSessionId=p.checkoutSessionId,(null===(s=a.stripeAddressEventData)||void 0===s?void 0:s.complete)&&(this.isAddressFilled=!0),o(e,{key:"b02889c4677a27a8c54a411d66fb31e15af78e1a",class:I(["zonos--address","zonos--elements",`zonos--${this.type}-address`])},this.titleText&&o("zonos-text",{key:"f52beb7ed6699ec1c73ee35a3436798a1fea38c7",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("slot",{key:"7c9602892de932e8a3f90a37b53a936f39082916",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),o("div",{key:"8ea6698f5b9d3bb525942c146e2cf67fefad6ad8",class:"zonos--address-component"}))}get el(){return i(this)}static get watchers(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}}};S.style=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";const D=class{constructor(o){s(this,o),this.confirmClicked=t(this,"confirmClicked",7),this.cancelClicked=t(this,"cancelClicked",7),this.dialogTitle=f("Are you sure?"),this.dialogIntent="info",this.dialogSubtitle=null,this.dialogWidth=350,this.dialogType="confirm",this.isMobile=!1,this.noClickOutside=!1,this.clickOutsideDialogHandler=s=>{s.target!==s.currentTarget||this.noClickOutside||this.closeDialogHandler()}}handleKeyDown(s){"Escape"===s.key&&this.closeDialogHandler()}focusDialog(){this.dialogOpen&&setTimeout((()=>{var s,t;null===(t=null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector(".zonos--backdrop"))||void 0===t||t.focus()}),100)}confirmDialogHandler(){this.dialogOpen&&this.confirmClicked.emit()}closeDialogHandler(){this.dialogOpen&&this.cancelClicked.emit()}renderIcon(){switch(this.dialogIntent){case"info":return o("zonos-icon",{content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>',iconColor:"blue-800"});case"danger":return o("zonos-icon",{content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>',iconColor:"red-800"});case"warn":return o("zonos-icon",{content:'<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>',iconColor:"orange-800"})}}getButtonConfirmVariant(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}}render(){this.focusDialog();const s=j(),t=g(b.appearance.theme);return o(e,{key:"db0bfe0b8a125e806a97c9382faa938078000349",class:I([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":t,style:{"--zonos--border-radius":s,"--zonos--dialog-width":`${this.dialogWidth}px`,"--zonos--font-family":y()}},o("div",{key:"1676defad54705df4e9282bda6b5734592d0fb60",class:"zonos--backdrop",tabIndex:-1}),o("div",{key:"2a6ec6b5df7ea30304cfed5276e55618b40add93",class:I(["zonos--confirm-layout",this.dialogIntent]),onClick:s=>this.clickOutsideDialogHandler(s)},o("div",{key:"d1c8358c3fd98c27a469fe7443d1983c1c134a7c",class:"zonos--confirm-dialog",onBlur:()=>{this.focusDialog()}},o("div",{key:"137e9659aa7aec2e4604acf80809b35bce69ca79",class:"wrapper"},o("div",{key:"9c1057857ea095e7e88c8950469add2bc4c1318e",class:"icon-wrapper"},this.renderIcon()),o("div",{key:"48f0e0cd9ce62b425bae831d1387261bbd4162a1",class:"content"},o("div",{key:"0d3e681f350e5db547181beadf5c6bcf49a8bbd2",class:"title"},o("zonos-text",{key:"f16a43d2b3c9504911b1e36ba573873f80093c47",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&o("div",{key:"fd570f98bc736a68c16fedee72b1417dc6906fa6",class:"subtitle"},o("zonos-text",{key:"6785aa19dd44cf7f6fae7317e3924be6c6ee8af3",textColor:"gray-800"},this.dialogSubtitle))),o("div",{key:"4206cad3dcff0055fc5f3ea8e7c217ae33c63263",class:"footer"},"confirm"===this.dialogType&&o("zonos-button",{key:"72d1a216641d482bdbeae384963dcdff1cfc3f45",backgroundColor:"gray-0",class:"cancel-button",onClick:()=>this.closeDialogHandler(),size:"lg",withBoxShadow:!0},this.dialogCancelBtnText||f("Cancel")),o("zonos-button",{key:"a6a206eff11d1f42c33ef9113cc393d727c60f89",class:"confirm-button",onClick:()=>this.confirmDialogHandler(),size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))}static get assetsDirs(){return["assets"]}get el(){return i(this)}};D.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";const L=s=>/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/.test(s),N=class{constructor(o){s(this,o),this.linkAuthenticationChange=t(this,"linkAuthenticationChange",7),this.storeUnsubscribeList=[],this.defaultEmail=null,this.isEmailError=!1,this.stripe=a.stripe,this.isStagingMode=c.isStagingMode,this.clientSecret=a.clientSecret,this.retriesInitializeLink=0,this.setCustomEmailInputToLinkEvent=s=>{const t=L(s);a.stripeLinkEventData={complete:!!t,elementType:"linkAuthentication",empty:!s,value:{email:s}}},this.handleNormalEmailInput=s=>{var t;this.setCustomEmailInputToLinkEvent(s.detail),null===(t=this.linkAuthenticationChange)||void 0===t||t.emit()}}watchIsStagingMode(){setTimeout((()=>{this.watchInitStripe()}),0)}async watchInitStripe(){if(!this.stripe||!a.stripeElements)return;if(c.isStagingMode||!this.clientSecret)return;const s=this.defaultEmail?{email:this.defaultEmail}:void 0;try{const t=a.stripeLinkElement||a.stripeElements.create("linkAuthentication",{defaultValues:s}),o=this.el.querySelector(".zonos--link-authentication-component");if(!o)return void v("Cannot find container element for linkAuthenticationElement");t.mount(o),t.on("change",(s=>{var t;a.stripeLinkEventData=s,null===(t=this.linkAuthenticationChange)||void 0===t||t.emit()})),a.stripeLinkElement=t,this.retriesInitializeLink=0,this.retriesInitializeLink>11&&(C("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe}),w({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}}))}catch(s){s instanceof Error&&(this.retriesInitializeLink++,this.retriesInitializeLink<51&&(await new Promise((s=>setTimeout(s,500))),this.watchInitStripe()),51===this.retriesInitializeLink&&w({endpoint:"stripe-link-authentication-init-error",errors:[s.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}}))}}watchDefaultEmail(s,t){var o,e;C("Default email is changed","info",{newDefaultEmail:s,oldDefaultEmail:t}),t!==s&&(s||(a.stripeLinkEventData=null),c.isStagingMode?this.setCustomEmailInputToLinkEvent(s||""):(null===(o=a.stripeLinkElement)||void 0===o||o.clear(),null===(e=a.stripeLinkElement)||void 0===e||e.destroy(),a.stripeLinkElement=null,a.stripeLinkEventData=null,C("Reset stripe link element when default email is changed","info",{defaultEmail:s}),this.watchInitStripe()))}disconnectedCallback(){try{this.storeUnsubscribeList.forEach((s=>s()))}catch(s){}}componentDidLoad(){this.storeUnsubscribeList=[d("stripeElements",(async()=>{this.watchInitStripe()})),d("clientSecret",(async()=>{this.clientSecret=a.clientSecret})),d("stripe",(async()=>{this.stripe=a.stripe}))],this.watchInitStripe(),this.defaultEmail&&this.setCustomEmailInputToLinkEvent(this.defaultEmail)}render(){return this.isStagingMode=c.isStagingMode,this.clientSecret=a.clientSecret,o(e,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":j()}},this.titleText&&o("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),(()=>{var s;return c.isStagingMode?o("zonos-stripe-input",{inputLabel:f("Email"),inputValue:this.defaultEmail||(null===(s=a.stripeLinkEventData)||void 0===s?void 0:s.value.email)||"",isError:this.isEmailError,onBlur:()=>{var s;const t=(null===(s=a.stripeLinkEventData)||void 0===s?void 0:s.value.email)||"";if(!t)return;const o=L(t);this.isEmailError=!o},onInputChange:this.handleNormalEmailInput}):o("div",{class:`zonos--link-authentication-component ${this.isEmailError&&"zonos--input-invalid"}`})})(),this.isEmailError&&o("zonos-text",{textColor:"red-600"},f("Please enter a valid email address.")))}get el(){return i(this)}static get watchers(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}}};N.style=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";const Z=class{constructor(t){s(this,t),this.open=!1,this.size=40}render(){return o(e,{key:"13154a3c9250f15d8dca292f0673c6465bfb15e0",class:I(["zonos--elements",this.open&&"zonos--open"])},o("div",{key:"4470fccd21e58bd7959ef3e20c8775ac637cace0",class:"zonos--loading-overlay"},o("zonos-spinner",{key:"5b32b821cea982866da56176eeaafd5d8958f25d",size:this.size,spinnerColor:this.spinnerColor})))}};Z.style=":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{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";export{S as zonos_address,D as zonos_confirm_dialog,N as zonos_link_authentication,Z as zonos_loading_overlay}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,n,e,o){function s(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,a){function i(t){try{c(o.next(t))}catch(t){a(t)}}function r(t){try{c(o["throw"](t))}catch(t){a(t)}}function c(t){t.done?e(t.value):s(t.value).then(i,r)}c((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,s,a,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(t){return function(n){return c([t,n])}}function c(r){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(o=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){e.label=r[1];break}if(r[0]===6&&e.label<a[1]){e.label=a[1];a=r;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(r);break}if(a[2])e.ops.pop();e.trys.pop();continue}r=n.call(t,e)}catch(t){r=[6,t];s=0}finally{o=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,e){if(e||arguments.length===2)for(var o=0,s=n.length,a;o<s;o++){if(a||!(o in n)){if(!a)a=Array.prototype.slice.call(n,0,o);a[o]=n[o]}}return t.concat(a||Array.prototype.slice.call(n))};System.register(["./p-989d3af9.system.js","./p-d45285aa.system.js","./p-23e7c655.system.js","./p-23d497e3.system.js","./p-775c1122.system.js","./p-74e258ff.system.js","./p-01174496.system.js","./p-a556ec07.system.js","./p-d938f42f.system.js","./p-909e2bc3.system.js"],(function(t){"use strict";var n,e,o,s,a,i,r,c,h,l,p,f,y,d,m;return{setters:[function(t){n=t.r;e=t.h;o=t.H;s=t.a;a=t.c},function(t){i=t.f},function(t){r=t.c},function(t){c=t.g},function(t){h=t.b;l=t.t},function(t){p=t.s},function(t){f=t.l},function(t){y=t.d;d=t.e},function(t){m=t.l},function(){}],execute:function(){var u=":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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var g=u;var z=t("zonos_card",function(){function t(t){n(this,t);this.borderRadius=6;this.spacing="24px"}t.prototype.render=function(){var t=this.backgroundColor?"var(--zonos-elements-".concat(this.backgroundColor,")"):"transparent";var n=c({customRoundRadius:"".concat(this.borderRadius,"px"),overrideBorderStyle:"ROUNDED"});return e(o,{key:"8832966776c626c783e771fb7f9a773d2539e07f",style:{"--zonos--font-family":i()}},e("div",{key:"89c9af9275ca5b01f658081fefb7756bfcbf6d58",class:r(["styled-card"]),style:{"--zonos--background-color":t,"--zonos--border-radius":n,padding:this.spacing}},this.label&&e("header",{key:"3da688655c5a9af66397525d02224dbc431d00d0",class:"card-header",style:{padding:this.spacing}},e("zonos-text",{key:"8e9524d26e5a0a7e3149b4008efd02b5a7b9ebc6",type:"subheader"},this.label),e("h-stack",{key:"f7298bbb158686b03b2a09f5d6c089c0f4d144c4",spacing:8},this.actions)),e("slot",{key:"24888347ff25ffd21b416da4f5aae493f8044638"}),(this.footerActions||this.footerContent)&&e("footer",{key:"b6792e7345b87e9407585ed4558c7327ea3eab36",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},e("div",{key:"70ccde8e9b1988db1ba477efea5b44e812a7514d"},this.footerContent),e("h-stack",{key:"4e48425e9db7031d779da7061f0b2d92b27869a0",spacing:8},this.footerActions))))};return t}());z.style=g;var b='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19124)"/>\n</mask>\n<g mask="url(#mask0_3739_19124)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="white" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="white" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="white" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19124" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var x='<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">\n<mask id="mask0_3739_19125" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">\n<rect width="536" height="200" fill="url(#paint0_radial_3739_19125)"/>\n</mask>\n<g mask="url(#mask0_3739_19125)">\n<rect x="0.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="126.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="252.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="378.5" y="0.5" width="117" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="504.5" y="0.5" width="31" height="63" rx="9.5" stroke="black" stroke-opacity="0.08"/>\n<rect y="96" width="124" height="8" rx="4" fill="black" fill-opacity="0.08"/>\n<rect x="0.5" y="112.5" width="535" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="0.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n<rect x="272.5" y="160.5" width="263" height="39" rx="7.5" stroke="black" stroke-opacity="0.08"/>\n</g>\n<defs>\n<radialGradient id="paint0_radial_3739_19125" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(268 100) rotate(90) scale(100 268)">\n<stop offset="0.25" stop-color="white" stop-opacity="0"/>\n<stop offset="0.75" stop-color="white"/>\n</radialGradient>\n</defs>\n</svg>\n';var v=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;position:relative}:host zonos-text{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host svg{width:var(--zonos--width);height:var(--zonos--height)}";var k=v;var w=t("zonos_empty_state_payment",function(){function t(t){n(this,t);this.theme="LIGHT"}t.prototype.render=function(){if(!this.el.shadowRoot){return null}if(this.theme==="DARK"){this.el.shadowRoot.innerHTML=b}else{this.el.shadowRoot.innerHTML=x}return e(o,{class:"zonos--elements",style:{"--zonos--font-family":i(),"--zonos--height":"100%","--zonos--width":"100%"}},e("zonos-text",{type:"semiBoldLabel"},this.emptyStateText))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());w.style=k;var _=":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-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";var I=_;var j=t("zonos_notification",function(){function t(t){n(this,t);this.notificationArray=[]}t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e;var o=this;return __generator(this,(function(s){n="id-".concat(Math.random().toString(36).substring(2,9));e=Object.assign(Object.assign({},t),{id:n,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=__spreadArray(__spreadArray([],this.notificationArray,true),[e],false);setTimeout((function(){o.updateTransitionClass({id:n,transitionClass:"show"})}),50);setTimeout((function(){o.removeNotification(n)}),e.timeout);return[2]}))}))};t.prototype.updateTransitionClass=function(t){var n=t.id,e=t.transitionClass;this.notificationArray=this.notificationArray.map((function(t){if(t.id===n){return Object.assign(Object.assign({},t),{transitionClass:e})}return t}))};t.prototype.removeNotification=function(t){var n=this;this.updateTransitionClass({id:t,transitionClass:""});setTimeout((function(){n.notificationArray=n.notificationArray.filter((function(n){return n.id!==t}))}),300)};t.prototype.render=function(){var t=this;return e(o,{key:"6a790a39afc037ae56f8a53dc89c3fa899b2d659",class:r(["zonos--elements zonos--notification"]),style:{"--zonos--border-radius":c(),"--zonos--font-family":i()}},e("div",{key:"32245a784f2322fb69a65b491648a30a84b0b3d3",class:"zonos--notification-items"},this.notificationArray.map((function(n){return e("div",{"aria-hidden":"true",class:r(["zonos--notification-item",n.type,n.transitionClass]),key:n.id,onClick:function(){t.removeNotification(n.id)}},e("zonos-text",{textColor:"gray-0"},n.message))}))))};return t}());j.style=I;var S=".sc-zonos-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}.sc-zonos-payment-h .zonos--payment-component.sc-zonos-payment{margin-bottom:4px}";var O=S;var U=t("zonos_payment",function(){function t(t){n(this,t);this.stripe=h.stripe;this.stripeElements=h.stripeElements;this.isPaymentInfoFilled=false;this.trackingSent=false}t.prototype.watchIsPaymentInfoFilled=function(){var t;if(this.isPaymentInfoFilled&&!this.trackingSent){var n=p.checkoutSessionId;void l({checkoutSessionId:n,eventName:"checkout_paymentInfoFilled",metadata:{paymentMethod:(t=h.stripePaymentEventData)===null||t===void 0?void 0:t.value.type}});this.trackingSent=true}};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e;var o=this;return __generator(this,(function(s){switch(s.label){case 0:if(!this.stripeElements){return[2]}return[4,this.stripeElements.fetchUpdates()];case 1:s.sent();n=h.stripePaymentElement||this.stripeElements.create("payment",{defaultValues:{billingDetails:{address:{country:(t=h.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country}}},layout:"tabs"});e=this.el.querySelector(".zonos--payment-component");if(!e){f("Cannot find container element for paymentElement");return[2]}n.mount(e);n.on("change",(function(t){if(t.complete){o.isPaymentInfoFilled=true}h.stripePaymentEventData=t}));h.stripePaymentElement=n;return[2]}}))}))};t.prototype.componentDidLoad=function(){void this.watchInitStripe()};t.prototype.render=function(){return e(o,{key:"1fb61e01184d3a0b2dc079ae468e96175d9f6518",class:"zonos--payment zonos--elements"},this.titleText&&e("zonos-text",{key:"3860ff7fc2656ff045ce09c0de2e14aa7a22e194",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"3cabad9c095f2eeba8cfc464374ca9abfc2af5ee",class:"zonos--payment-component"}),e("div",{key:"9e2b13a0d8131a5513f99e2a6436ca3c5f03d7cf",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isPaymentInfoFilled:["watchIsPaymentInfoFilled"],stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());U.style=O;var C=".sc-zonos-paypal-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";var P=C;var T=t("zonos_paypal_payment",function(){function t(t){n(this,t);this.paypalSessionDone=a(this,"paypalSessionDone",7);this.paypalSessionFail=a(this,"paypalSessionFail",7);this.storeUnsubscribeList=[]}t.prototype.loadPaypal=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;var e=this;return __generator(this,(function(o){if(!window.Zonos.paypal){m("Paypal is not available");return[2]}t=y({onPaypalFail:function(){m("onPaypalFail");e.paypalSessionFail.emit()},onPaypalSessionDone:function(t){var n=t.orderId;m("onPaypalSessionDone","info",{orderId:n});e.paypalSessionDone.emit({orderId:n})}});if(!(t===null||t===void 0?void 0:t.length)){m("There are no paypal buttons available");return[2]}n=this.el.querySelector(".zonos--payment-paypal-container");if(!n){m("Cannot find container element for paypal buttons");return[2]}t.forEach((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,t.render(n)];case 1:e.sent();return[2]}}))}))}));return[2]}))}))};t.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[d("paypal",this.loadPaypal.bind(this))]};t.prototype.componentDidLoad=function(){void this.loadPaypal()};t.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(t){return t()}))};t.prototype.render=function(){return e(o,{key:"35387382aaa81e3f8e025e8f3503be41b86e2355",class:"zonos--paypal-payment zonos--elements"},e("div",{key:"34fad15dee67d8b913071a59d35b1c2317d4d3a0",class:"zonos--payment-paypal-container"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());T.style=P}}}));