@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
@@ -0,0 +1 @@
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 c,d as h}from"./p-ce98e472.js";import{s as p,r as u,t as m,q as f,l as z}from"./p-09aabce0.js";import{z as b,g,f as y}from"./p-b2a0ab4a.js";import{l as v,i as k,s as x}from"./p-41dd1cb8.js";import{a as w,s as C}from"./p-63a383f4.js";import{c as I}from"./p-b4b7f705.js";import{l as A}from"./p-0a377722.js";import{c as E,s as j}from"./p-6b361d2b.js";import{g as S}from"./p-1f894984.js";import"./p-5762e217.js";import"./p-57fa64d7.js";import"./p-1d42cd20.js";const D=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.shortAddressCodeErrorMessage="",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(c,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);A(`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;A("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 E.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(!w({companyName:a.companyName,countryCode:t}))return null;const e=j[t];return o("div",{class:"zonos--tax-id-input"},o("zonos-stripe-input",{inputLabel:m(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))}renderShortAddressCodeInput(){var s;if("billing"===this.type)return null;const t=null===(s=a.stripeAddressEventData)||void 0===s?void 0:s.value.address.country;return t&&C({countryCode:t})?o("div",{class:"zonos--short-address-code-input"},o("zonos-stripe-input",{inputLabel:m("Short address code"),inputPlaceholder:"RRRD2929",inputValue:a.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:s=>{a.shortAddressCode=s.detail}}),this.shortAddressCodeErrorMessage&&o("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage)):null}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:m("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=[f("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:"5dc571d7c5e706ae9cb90de70deee22847e5ba7e",class:I(["zonos--address","zonos--elements",`zonos--${this.type}-address`])},this.titleText&&o("zonos-text",{key:"a7c9f730bc9b64aa2c6e8cc24701e638481eac19",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("slot",{key:"3078529c201c7947ffc833485d46184bc79ab1d1",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),o("div",{key:"b4a9850ac30ad9c483e05743ff41b7de9756d826",class:"zonos--address-component"}))}get el(){return i(this)}static get watchers(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}}};D.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,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";const L=class{constructor(o){s(this,o),this.confirmClicked=t(this,"confirmClicked",7),this.cancelClicked=t(this,"cancelClicked",7),this.dialogTitle=m("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=S(),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||m("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)}};L.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 N=s=>/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/.test(s),Z=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=h.isStagingMode,this.clientSecret=a.clientSecret,this.retriesInitializeLink=0,this.setCustomEmailInputToLinkEvent=s=>{const t=N(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(h.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&&(A("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe}),x({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&&x({endpoint:"stripe-link-authentication-init-error",errors:[s.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}}))}}watchDefaultEmail(s,t){var o,e;A("Default email is changed","info",{newDefaultEmail:s,oldDefaultEmail:t}),t!==s&&(s||(a.stripeLinkEventData=null),h.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,A("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=h.isStagingMode,this.clientSecret=a.clientSecret,o(e,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":S()}},this.titleText&&o("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),(()=>{var s;return h.isStagingMode?o("zonos-stripe-input",{inputLabel:m("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=N(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"},m("Please enter a valid email address.")))}get el(){return i(this)}static get watchers(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}}};Z.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 B=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})))}};B.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{D as zonos_address,L as zonos_confirm_dialog,Z as zonos_link_authentication,B as zonos_loading_overlay}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{a(n.next(o))}catch(o){r(o)}}function l(o){try{a(n["throw"](o))}catch(o){r(o)}}function a(o){o.done?t(o.value):i(o.value).then(s,l)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(o){return function(e){return a([o,e])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=e.call(o,t)}catch(o){l=[6,o];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-989d3af9.system.js","./p-c6e3d747.system.js","./p-74e258ff.system.js","./p-d45285aa.system.js","./p-23e7c655.system.js","./p-01174496.system.js","./p-bc7bf53e.system.js","./p-d938f42f.system.js"],(function(o){"use strict";var e,t,n,i,r,s,l,a,h,d,u,f,c,w,g,v,m,p,z,b,x,y;return{setters:[function(o){e=o.r;t=o.h;n=o.H;i=o.a},function(o){r=o.d},function(o){s=o.l;l=o.i;a=o.t;h=o.g;d=o.j;u=o.k;f=o.m;c=o.n;w=o.d},function(o){g=o.z;v=o.g;m=o.m},function(o){p=o.c},function(o){z=o.h;b=o.l},function(o){x=o.g},function(o){y=o.l}],execute:function(){var k=this;var _=function(o){return __awaiter(k,[o],void 0,(function(o){var e,t,n,i,r;var s=o.items,l=o.shipFrom,a=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,z("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),i=n.errors,r=n.json;if(i.length||!r){b("Error fetching item restrictions: ".concat((e=i.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var L=function(o){return __awaiter(k,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=s.selectedCountryCode;if(!e){b("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,_({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var O=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var T=function(){var o=g.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,i=o.productListUrlPattern;if(O(e)){return"cart"}if(O(n)){return"productDetail"}if(O(i)){return"productList"}if(O(t)){return"home"}return""};var E=function(){var o,e;var t=g.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){y("Hello could not check item restrictions - must provide title and description selectors.")}var a=r&&l(r)&&document.querySelectorAll(r)||[];var h=i&&l(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){y("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&l(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var f=[];for(var c=0;c<a.length;c++){var w=a[c];var v=h[c];var m=u[c];if(w&&v){var p={cartButtonNode:m||null,description:((o=v.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=w.textContent)===null||e===void 0?void 0:e.trim())||""};f.push(p)}}return f};var j=":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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var D=j;var S=3e3;var I=o("zonos_hello",function(){function o(o){var t=this;e(this,o);this.showPeekMessage=false;this.zonosStoreHelloSettings=g.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false;this.getHelloPeekMessage=function(o){var e=g.currentHelloPage==="productDetail"||g.currentHelloPage==="productList";if(e&&t.allRestrictedItems.length){var n=a("click to learn more");var i=g.currentHelloPage==="productDetail"?a("Restricted item"):a("Restricted items found");return"".concat(i," - ").concat(n)}switch(g.currentHelloPage){case"cart":return a("Prepay duties and taxes at checkout");case"productList":case"productDetail":return a("See duty and tax thresholds");default:return a("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=g.currentHelloPage==="productDetail"||g.currentHelloPage==="productList";if(!e||g.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,L(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(g.organizationName);var o=g.helloSettings,e=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(e==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var o=t.allRestrictedItems.some((function(o){return t.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){t.showPeekMessage=false}),S)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(o){var e,n;var i=t.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(e=o.cartButtonNode)===null||e===void 0?void 0:e.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=E();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=r((function(){var o=g.helloSettings.productTitleElementSelector;if(o){var e=E();if(t.allFoundProducts.length!==e.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o;var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true});(o=t.observerWatcher)===null||o===void 0?void 0:o.push(e)};this.watchPriceChange=function(){var o;var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true});(o=t.observerWatcher)===null||o===void 0?void 0:o.push(e)};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var o=t.initialUrl&&new URL(t.initialUrl);var e=o&&h(o.searchParams);if(e!==s.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;g.currentHelloPage=T();var n=new URL(window.location.href);var i=h(n.searchParams);if(!i){d(s.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){t.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&o==="relative"){var e=x(t.helloRef);return e}};this.shouldRenderHello=function(o){if(o===void 0){o=true}if(!s.localizationLoaded){return false}var e=g.helloSettings.showForCountries;if(o){if(!s.isShippableCountry){y("Hello: not shippable country - Show for countries: ".concat(e))}}if(e==="ONLY_SHIPPABLE"){return s.isShippableCountry}if(e==="ALL"){return true}return e===null||e===void 0?void 0:e.includes(s.selectedCountryCode||"")}}o.prototype.showDialogHandler=function(o){var e;if(o){var t=(e=this.helloElement)===null||e===void 0?void 0:e.parentElement;if(t&&t.parentElement===document.body){t.style.zIndex="2147483647";document.body.appendChild(t)}}};o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,s.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(g.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.disconnectedCallback=function(){var o;(o=this.observerWatcher)===null||o===void 0?void 0:o.forEach((function(o){return o.disconnect()}))};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(g.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!s.exchangeRate){y("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}u();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,f(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,c(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,w({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(s.selectedCountryCode&&typeof g.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=g.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||g.helloSettings.mobileLocation;var e=g.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!o}}default:case!t:{var r=!g.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop();var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=v(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,i;var r=(e=g.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return o&&new RegExp(o).test(window.location.href)}));if(r){y("Hello is excluded on this url","warn");return null}var l=s.selectedCountryCode,a=s.targetCurrency;var h=this.getHelloLocation(),d=h.isOnLeft,u=h.isOnTop,f=h.shouldFloat;var c=m(g.appearance,this.appearanceSettingsOverride||null);var w=c.theme;var v=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(g.organizationName);var z=this.shouldRenderHello()&&!!l;if(z&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:a})}return t(n,{class:"zonos--hello zonos--elements","data-theme":w},z&&t("div",{class:p(["zonos--hello-wrapper",f&&"zonos--hello-widget-float"])},t("button",{class:p(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",u&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",f&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)},type:"button"},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),t("div",{class:p(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",u&&"zonos--hello-widget-top",f&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:v,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o.prototype,"helloElement",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}());I.style=D}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{a(n.next(o))}catch(o){r(o)}}function l(o){try{a(n["throw"](o))}catch(o){r(o)}}function a(o){o.done?t(o.value):i(o.value).then(s,l)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(o){return function(e){return a([o,e])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=e.call(o,t)}catch(o){l=[6,o];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-989d3af9.system.js","./p-c6e3d747.system.js","./p-ae26aec5.system.js","./p-d45285aa.system.js","./p-23e7c655.system.js","./p-01174496.system.js","./p-bc7bf53e.system.js","./p-d938f42f.system.js"],(function(o){"use strict";var e,t,n,i,r,s,l,a,h,d,u,f,c,w,g,v,m,p,z,b,x,y;return{setters:[function(o){e=o.r;t=o.h;n=o.H;i=o.a},function(o){r=o.d},function(o){s=o.l;l=o.i;a=o.t;h=o.g;d=o.j;u=o.k;f=o.m;c=o.n;w=o.d},function(o){g=o.z;v=o.g;m=o.m},function(o){p=o.c},function(o){z=o.h;b=o.l},function(o){x=o.g},function(o){y=o.l}],execute:function(){var k=this;var _=function(o){return __awaiter(k,[o],void 0,(function(o){var e,t,n,i,r;var s=o.items,l=o.shipFrom,a=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,z("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),i=n.errors,r=n.json;if(i.length||!r){b("Error fetching item restrictions: ".concat((e=i.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var L=function(o){return __awaiter(k,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=s.selectedCountryCode;if(!e){b("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,_({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var O=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var T=function(){var o=g.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,i=o.productListUrlPattern;if(O(e)){return"cart"}if(O(n)){return"productDetail"}if(O(i)){return"productList"}if(O(t)){return"home"}return""};var E=function(){var o,e;var t=g.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){y("Hello could not check item restrictions - must provide title and description selectors.")}var a=r&&l(r)&&document.querySelectorAll(r)||[];var h=i&&l(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){y("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&l(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var f=[];for(var c=0;c<a.length;c++){var w=a[c];var v=h[c];var m=u[c];if(w&&v){var p={cartButtonNode:m||null,description:((o=v.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=w.textContent)===null||e===void 0?void 0:e.trim())||""};f.push(p)}}return f};var j=":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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var D=j;var S=3e3;var I=o("zonos_hello",function(){function o(o){var t=this;e(this,o);this.showPeekMessage=false;this.zonosStoreHelloSettings=g.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false;this.getHelloPeekMessage=function(o){var e=g.currentHelloPage==="productDetail"||g.currentHelloPage==="productList";if(e&&t.allRestrictedItems.length){var n=a("click to learn more");var i=g.currentHelloPage==="productDetail"?a("Restricted item"):a("Restricted items found");return"".concat(i," - ").concat(n)}switch(g.currentHelloPage){case"cart":return a("Prepay duties and taxes at checkout");case"productList":case"productDetail":return a("See duty and tax thresholds");default:return a("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=g.currentHelloPage==="productDetail"||g.currentHelloPage==="productList";if(!e||g.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,L(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(g.organizationName);var o=g.helloSettings,e=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(e==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var o=t.allRestrictedItems.some((function(o){return t.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){t.showPeekMessage=false}),S)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(o){var e,n;var i=t.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(e=o.cartButtonNode)===null||e===void 0?void 0:e.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=E();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=r((function(){var o=g.helloSettings.productTitleElementSelector;if(o){var e=E();if(t.allFoundProducts.length!==e.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o;var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true});(o=t.observerWatcher)===null||o===void 0?void 0:o.push(e)};this.watchPriceChange=function(){var o;var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true});(o=t.observerWatcher)===null||o===void 0?void 0:o.push(e)};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var o=t.initialUrl&&new URL(t.initialUrl);var e=o&&h(o.searchParams);if(e!==s.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;g.currentHelloPage=T();var n=new URL(window.location.href);var i=h(n.searchParams);if(!i){d(s.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){t.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&o==="relative"){var e=x(t.helloRef);return e}};this.shouldRenderHello=function(o){if(o===void 0){o=true}if(!s.localizationLoaded){return false}var e=g.helloSettings.showForCountries;if(o){if(!s.isShippableCountry){y("Hello: not shippable country - Show for countries: ".concat(e))}}if(e==="ONLY_SHIPPABLE"){return s.isShippableCountry}if(e==="ALL"){return true}return e===null||e===void 0?void 0:e.includes(s.selectedCountryCode||"")}}o.prototype.showDialogHandler=function(o){var e;if(o){var t=(e=this.helloElement)===null||e===void 0?void 0:e.parentElement;if(t&&t.parentElement===document.body){t.style.zIndex="2147483647";document.body.appendChild(t)}}};o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,s.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(g.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.disconnectedCallback=function(){var o;(o=this.observerWatcher)===null||o===void 0?void 0:o.forEach((function(o){return o.disconnect()}))};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(g.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!s.exchangeRate){y("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}u();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,f(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,c(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,w({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(s.selectedCountryCode&&typeof g.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=g.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||g.helloSettings.mobileLocation;var e=g.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!o}}default:case!t:{var r=!g.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop();var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=v(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,i;var r=(e=g.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return o&&new RegExp(o).test(window.location.href)}));if(r){y("Hello is excluded on this url","warn");return null}var l=s.selectedCountryCode,a=s.targetCurrency;var h=this.getHelloLocation(),d=h.isOnLeft,u=h.isOnTop,f=h.shouldFloat;var c=m(g.appearance,this.appearanceSettingsOverride||null);var w=c.theme;var v=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(g.organizationName);var z=this.shouldRenderHello()&&!!l;if(z&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:a})}return t(n,{class:"zonos--hello zonos--elements","data-theme":w},z&&t("div",{class:p(["zonos--hello-wrapper",f&&"zonos--hello-widget-float"])},t("button",{class:p(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",u&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",f&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)},type:"button"},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),t("div",{class:p(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",u&&"zonos--hello-widget-top",f&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:v,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o.prototype,"helloElement",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}());I.style=D}}}));
@@ -0,0 +1 @@
1
+ import{r as o,c as s,h as i,H as e,a as t}from"./p-ab41bab5.js";import{f as r,z as n}from"./p-b2a0ab4a.js";import{c as a}from"./p-b4b7f705.js";import{g as l}from"./p-1f894984.js";import{g as d}from"./p-41299ffb.js";import{i as h}from"./p-ae393255.js";import"./p-0a377722.js";import"./p-57fa64d7.js";import"./p-786d1c24.js";const p=class{constructor(i){o(this,i),this.radioSelected=s(this,"radioSelected",7),this.selectedItem=null,this.handleRichRadioSelect=o=>{var s;null===(s=this.radioSelected)||void 0===s||s.emit(o)},this.getRadioItemStyleVariables=()=>{const o=this.borderColor||n.appearance.colorSecondary,s=this.isMobile?"--zonos-elements-gray-0":n.appearance.colorPrimary,i=s&&o?d({backgroundColor:h(s)?window.getComputedStyle(this.ele).getPropertyValue(`--zonos-elements-${s.replace("--zonos-elements-","")}`):s,color:o}):o;return{"--zonos--border-radius":l({overrideBorderStyle:this.borderStyle}),"--zonos--selected-border-color":i||"unset"}}}render(){var o;return i(e,{key:"8d77a01ba101899adb41904a820ba5f4985bc52d",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":r()})},null===(o=this.items)||void 0===o?void 0:o.map((o=>{var s;const e=(null===(s=this.selectedItem)||void 0===s?void 0:s.value)===o.value;return i("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",e&&"selected"]),onClick:()=>this.handleRichRadioSelect(o)},i("input",{checked:e,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:o.value}),i("div",{class:"zonos--shipping-info"},i("div",{class:"zonos--shipping-detail"},i("zonos-text",{class:"zonos--shipping-label",type:"label"},o.label),(o.sublabel||o.caption)&&i("div",{class:"zonos--sub-detail"},o.sublabel&&i("zonos-text",{textColor:"gray-800"},o.sublabel),o.caption&&i("zonos-text",{textColor:"gray-600"},o.caption))),i("zonos-text",{type:"semiBoldLabel"},o.price)))})))}get ele(){return t(this)}};p.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 input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";export{p as zonos_shipping_rich_radio}
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(t,o,s){if(s||arguments.length===2)for(var e=0,n=o.length,a;e<n;e++){if(a||!(e in o)){if(!a)a=Array.prototype.slice.call(o,0,e);a[e]=o[e]}}return t.concat(a||Array.prototype.slice.call(o))};System.register(["./p-989d3af9.system.js","./p-775c1122.system.js","./p-b2ae8eb7.system.js","./p-d45285aa.system.js","./p-23e7c655.system.js","./p-1aa93d1e.system.js","./p-74e258ff.system.js","./p-01174496.system.js","./p-d938f42f.system.js","./p-909e2bc3.system.js","./p-23d497e3.system.js"],(function(t){"use strict";var o,s,e,n,a,i,r,h,c;return{setters:[function(t){o=t.r;s=t.d;e=t.h;n=t.H},function(t){a=t.d},function(t){i=t.c},function(t){r=t.f},function(t){h=t.c},function(t){c=t.s},function(){},function(){},function(){},function(){},function(){}],execute:function(){var f=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}";var l=f;var m=t("zonos_collect_cart_items",function(){function t(t){o(this,t);this.errorImages=[]}t.prototype.render=function(){var t=this;var o=s("./assets/empty-item.jpeg");var r=a.items.filter((function(t){return!t.isRestricted}));return e(n,{key:"2f5507537492851b67a5204ab68ce2f938899f23",class:"zonos--collect-cart-items zonos--elements"},e("table",{key:"e648cda9d4c111ecde60291f420178e4e4230b50",class:"zonos--cart-table"},e("tbody",{key:"b266291e61d0df5c0ea3ae8240a3bfb6147edbb4"},r.map((function(s){var n=s.imageUrl;var a=i(s.name);return e("tr",{class:"zonos--collect-cart-item"},e("td",{class:"zonos--column zonos--cart-item-image"},n&&!t.errorImages.includes(n)?e("img",{alt:s.name,onError:function(){t.errorImages=__spreadArray(__spreadArray([],t.errorImages,true),[n],false)},src:s.imageUrl,style:{"min-width":"40px"},width:40}):e("img",{alt:s.name,src:o,width:40})),e("td",{class:"zonos--column zonos--cart-item-name"},e("div",null,a.map((function(t){return e("zonos-text",{type:"semiBoldLabel"},t)})))))})))))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());m.style=l;var d=":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:row;flex-direction:row;gap:var(--spacing, 24px)}";var p=d;var u=t("zonos_h_stack",function(){function t(t){o(this,t);this.spacing=24}t.prototype.render=function(){return e(n,{key:"443aa77bfbf4c0c84c33d0ef7652caec001968c3",style:{"--spacing":"".concat(this.spacing,"px"),"--zonos--font-family":r()}},e("slot",{key:"3366df34b9f0f3549e556cff1e47878c2f6cd124"}))};return t}());u.style=p;var y=":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:inline-block;background:var(--zonos-elements-gray-200);border-radius:var(--zonos-elements-radius-12);width:var(--zonos--skeleton-width);height:var(--zonos--skeleton-height);min-height:var(--zonos--skeleton-height);max-width:100%}";var b=y;var g=t("zonos_skeleton",function(){function t(t){o(this,t);this.skeletonWidth="100%";this.skeletonHeight="14px"}t.prototype.render=function(){return e(n,{key:"096e505180d901c1523567f89cdbcca7869a0895",class:h(["zonos--elements zonos--skeleton"]),style:c({"--zonos--skeleton-height":this.skeletonHeight,"--zonos--skeleton-width":this.skeletonWidth})})};return t}());g.style=b}}}));
1
+ var __spreadArray=this&&this.__spreadArray||function(t,o,s){if(s||arguments.length===2)for(var e=0,n=o.length,a;e<n;e++){if(a||!(e in o)){if(!a)a=Array.prototype.slice.call(o,0,e);a[e]=o[e]}}return t.concat(a||Array.prototype.slice.call(o))};System.register(["./p-989d3af9.system.js","./p-dca14319.system.js","./p-b2ae8eb7.system.js","./p-d45285aa.system.js","./p-23e7c655.system.js","./p-1aa93d1e.system.js","./p-ae26aec5.system.js","./p-01174496.system.js","./p-d938f42f.system.js","./p-909e2bc3.system.js","./p-23d497e3.system.js"],(function(t){"use strict";var o,s,e,n,a,i,r,h,c;return{setters:[function(t){o=t.r;s=t.d;e=t.h;n=t.H},function(t){a=t.d},function(t){i=t.c},function(t){r=t.f},function(t){h=t.c},function(t){c=t.s},function(){},function(){},function(){},function(){},function(){}],execute:function(){var f=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}";var l=f;var m=t("zonos_collect_cart_items",function(){function t(t){o(this,t);this.errorImages=[]}t.prototype.render=function(){var t=this;var o=s("./assets/empty-item.jpeg");var r=a.items.filter((function(t){return!t.isRestricted}));return e(n,{key:"2f5507537492851b67a5204ab68ce2f938899f23",class:"zonos--collect-cart-items zonos--elements"},e("table",{key:"e648cda9d4c111ecde60291f420178e4e4230b50",class:"zonos--cart-table"},e("tbody",{key:"b266291e61d0df5c0ea3ae8240a3bfb6147edbb4"},r.map((function(s){var n=s.imageUrl;var a=i(s.name);return e("tr",{class:"zonos--collect-cart-item"},e("td",{class:"zonos--column zonos--cart-item-image"},n&&!t.errorImages.includes(n)?e("img",{alt:s.name,onError:function(){t.errorImages=__spreadArray(__spreadArray([],t.errorImages,true),[n],false)},src:s.imageUrl,style:{"min-width":"40px"},width:40}):e("img",{alt:s.name,src:o,width:40})),e("td",{class:"zonos--column zonos--cart-item-name"},e("div",null,a.map((function(t){return e("zonos-text",{type:"semiBoldLabel"},t)})))))})))))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());m.style=l;var d=":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:row;flex-direction:row;gap:var(--spacing, 24px)}";var p=d;var u=t("zonos_h_stack",function(){function t(t){o(this,t);this.spacing=24}t.prototype.render=function(){return e(n,{key:"443aa77bfbf4c0c84c33d0ef7652caec001968c3",style:{"--spacing":"".concat(this.spacing,"px"),"--zonos--font-family":r()}},e("slot",{key:"3366df34b9f0f3549e556cff1e47878c2f6cd124"}))};return t}());u.style=p;var y=":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:inline-block;background:var(--zonos-elements-gray-200);border-radius:var(--zonos-elements-radius-12);width:var(--zonos--skeleton-width);height:var(--zonos--skeleton-height);min-height:var(--zonos--skeleton-height);max-width:100%}";var b=y;var g=t("zonos_skeleton",function(){function t(t){o(this,t);this.skeletonWidth="100%";this.skeletonHeight="14px"}t.prototype.render=function(){return e(n,{key:"096e505180d901c1523567f89cdbcca7869a0895",class:h(["zonos--elements zonos--skeleton"]),style:c({"--zonos--skeleton-height":this.skeletonHeight,"--zonos--skeleton-width":this.skeletonWidth})})};return t}());g.style=b}}}));
@@ -1 +1 @@
1
- System.register(["./p-989d3af9.system.js","./p-74e258ff.system.js","./p-d45285aa.system.js","./p-c9e433c0.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(e){"use strict";var o,t,n,s,a,l,i,c;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){s=e.u;a=e.t;l=e.l},function(e){i=e.f},function(e){c=e.l},function(){},function(){}],execute:function(){var r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var d=":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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var f=d;var h=e("zonos_language_select",function(){function e(e){var t=this;o(this,e);this.handleOnClose=function(){};this.languageSelected=function(e){void s(e);t.handleOnClose()}}e.prototype.render=function(){var e=this;var o=l.selectedLocale;return t(n,{key:"748efbe1de696c0e1f52cef03d86f211c1e5f505",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("div",{key:"97dd3f26dd5aff625b26a08125737f915bfbd112",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"8c00e1cf6d7addf5b817e07c1fb1b492cfb5775f",handleOnClose:function(){return e.handleOnClose()},label:a("Select a language")}),t("div",{key:"0260631e4303d5cee5035f31667203e4e3417a76",class:"zonos--language-select-content"},c.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===o&&t("zonos-icon",{content:r,size:16}))})))))};return e}());h.style=f;var g='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-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" clip-rule="evenodd"/><path fill="#4D505A" fill-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" clip-rule="evenodd"/></svg>';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 .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var p=u;var m=e("zonos_select_dialog_header",function(){function e(e){o(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"a1b9179c608e89ae29416a7c1cb93a5e15c9b029",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("zonos-v-stack",{key:"736354e40352c79c5b1d27207c424fc6ee82f7f4",class:"zonos--select-dialog-header-wrapper",spacing:8},t("div",{key:"700c0321bb2ea565ff861b833f51f3418ad61e4f",class:"zonos--select-dialog-header"},t("zonos-text",{key:"a45fb7507453949a1f3c687ae73635bb8b3f9282",type:"boldLabel"},this.label),t("zonos-button",{key:"a6b210caedc6248d8ab112bb10d888455d6fc6da",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close select dialog",content:g,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),t("slot",{key:"3bfbcd7c5bab9f11e4ed936dcd3b99da553709a0"})))};return e}());m.style=p}}}));
1
+ System.register(["./p-989d3af9.system.js","./p-ae26aec5.system.js","./p-d45285aa.system.js","./p-c9e433c0.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(e){"use strict";var o,t,n,s,a,l,i,c;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){s=e.u;a=e.t;l=e.l},function(e){i=e.f},function(e){c=e.l},function(){},function(){}],execute:function(){var r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var d=":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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var f=d;var h=e("zonos_language_select",function(){function e(e){var t=this;o(this,e);this.handleOnClose=function(){};this.languageSelected=function(e){void s(e);t.handleOnClose()}}e.prototype.render=function(){var e=this;var o=l.selectedLocale;return t(n,{key:"748efbe1de696c0e1f52cef03d86f211c1e5f505",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("div",{key:"97dd3f26dd5aff625b26a08125737f915bfbd112",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"8c00e1cf6d7addf5b817e07c1fb1b492cfb5775f",handleOnClose:function(){return e.handleOnClose()},label:a("Select a language")}),t("div",{key:"0260631e4303d5cee5035f31667203e4e3417a76",class:"zonos--language-select-content"},c.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===o&&t("zonos-icon",{content:r,size:16}))})))))};return e}());h.style=f;var g='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-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" clip-rule="evenodd"/><path fill="#4D505A" fill-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" clip-rule="evenodd"/></svg>';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 .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var p=u;var m=e("zonos_select_dialog_header",function(){function e(e){o(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"a1b9179c608e89ae29416a7c1cb93a5e15c9b029",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("zonos-v-stack",{key:"736354e40352c79c5b1d27207c424fc6ee82f7f4",class:"zonos--select-dialog-header-wrapper",spacing:8},t("div",{key:"700c0321bb2ea565ff861b833f51f3418ad61e4f",class:"zonos--select-dialog-header"},t("zonos-text",{key:"a45fb7507453949a1f3c687ae73635bb8b3f9282",type:"boldLabel"},this.label),t("zonos-button",{key:"a6b210caedc6248d8ab112bb10d888455d6fc6da",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close select dialog",content:g,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),t("slot",{key:"3bfbcd7c5bab9f11e4ed936dcd3b99da553709a0"})))};return e}());m.style=p}}}));
@@ -0,0 +1 @@
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-ce98e472.js";import{t as S,l as _,s as I,c as D}from"./p-09aabce0.js";import{r as A}from"./p-ada8841a.js";import{c as B}from"./p-0ef2a242.js";import{c as j}from"./p-b4b7f705.js";import{z as M,h as O,g as T,f as E}from"./p-b2a0ab4a.js";import{D as N,T as P,h as Z}from"./p-eea7ac64.js";import{s as $,c as F,a as R}from"./p-dd19d9d8.js";import{h as H,s as U,j as V,g as G,i as X,a as Y}from"./p-41dd1cb8.js";import{c as W}from"./p-595f5dd2.js";import{g as q}from"./p-1f894984.js";import{l as K,b as J}from"./p-0a377722.js";import{l as Q}from"./p-97aceb11.js";import{p as oo}from"./p-8e98a7c8.js";import{i as so}from"./p-57fa64d7.js";import{g as to}from"./p-41299ffb.js";import{i as eo}from"./p-ae393255.js";import{u as no}from"./p-fc776473.js";import{c as io}from"./p-0c64dbbb.js";import{s as ao,a as ro}from"./p-63a383f4.js";import{e as lo}from"./p-6b361d2b.js";import"./p-786d1c24.js";import"./p-5762e217.js";import"./p-1d42cd20.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=B(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},A({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"},A({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"},A({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?A({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?A({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?A({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=M.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?A({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:A({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?A({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"},A({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"},A({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 H(`/api/zonos-elements/get-order?${e.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(s=(o=M.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}=M.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||M.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}=M.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 K("=== 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 M.checkoutSettings.onOrderSuccess&&await this.getPullOrder()}},this.getPullOrder=async(o=0)=>{var s,t;0===o&&K("=== 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(K(`=== Polling order (${o} attemps)`,"info"),n&&!i||n&&o>=l||a){if(K("=== Order info found","info"),i&&n&&!a)return void U({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:J,checkoutSessionId:I.checkoutSessionId||"",orderId:n.id,storeId:M.storeId}});o>10&&U({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}&orderId=${n.id}`,errors:[`Order found after ${o} attempts`],metadata:{allLogs:J,checkoutSessionId:I.checkoutSessionId||"",orderId:n.id,storeId:M.storeId}}),this.order=n}else n&&a||!(o<l)?U({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}`,errors:[`Order not found after ${l} attempts`],metadata:{allLogs:J,checkoutSessionId:I.checkoutSessionId||"",storeId:M.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.useOverrideSuccessNotification=()=>{const{successPageSubtitleText:o,successPageTitleText:s}=M.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!"),K("=== 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"),U({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]}" status: ${e} - checkout session: ${I.checkoutSessionId}`],metadata:{allLogs:J,credentialToken:window.Zonos.zonosApiKey}});else{this.saveOrderIdForDuplicationIssue(),$("zonos-checkout-success"),m({checkoutSessionId:I.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=W("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=V(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=G();return t(e,{key:"7b18913d8ebe7be5cbe9ee7d520b643c342c409d",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":q({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=X(this.mobile)}componentWillLoad(){this.isMobile=X(this.mobile)}render(){var o;const s=null===(o=Q.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 oo();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=G(),i=r.isStagingMode||Y(),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}=M.appearance,s=o&&so(o)?"DARK":"LIGHT",e=this.isMobile?M.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}):K("Checkout session is not found")},size:"lg",variant:this.submitBtnType},S("Pay [orderTotal]",{orderTotal:A({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||M.appearance.colorSecondary,n=this.backgroundColor||M.appearance.colorPrimary||"",i=n&&s?to({backgroundColor:eo(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.shortAddressCodeErrorMessage="",this.invalidShippingCharacterList=null,this.invalidBillingCharacterList=null,this.openAddressValidationDialog=!1,this.isEmailError=!1,this.recordedFormTypeUsed=!1,this.selectedCountryCode=_.selectedCountryCode,this.genericSettings=M.genericSettings,this.addressFormRenderType=r.addressFormRenderType,this.exceededCharacterLimitErrorFieldList=[],this.handleInvalidCharacters=async()=>{if("ALL"===M.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),K("==> isValidBilling","info",l,{address:d.stripeBillingAddressEventData,errors:d.customBillingAddressErrors}),K("==> isValidShipping","info",c,{address:d.stripeAddressEventData,errors:d.customAddressErrors}),K("==> 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}),{error:u,valid:m}=(({shippingCountry:o,shortAddressCode:s})=>ao({countryCode:o})?s?"SA"!==o||/^[A-Za-z]{4}\s*[0-9]{4}$/.test(s)?{error:null,valid:!0}:{error:"Invalid short address code format. Must be 4 letters and 4 numbers.",valid:!1}:{error:"Short address code is required.",valid:!1}:{error:null,valid:!0})({shippingCountry:this.shippingCountry,shortAddressCode:d.shortAddressCode});this.taxIdErrorMessage=p?"":S(h),this.shortAddressCodeErrorMessage=m?"":S(u);const f=this.validateAddressLength({address:d.stripeAddressEventData,type:"shipping"}),z=this.validateAddressLength({address:d.stripeBillingAddressEventData,type:"billing"});return this.exceededCharacterLimitErrorFieldList=[...f,...z],!(!(l&&c&&r&&p&&m)||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||U({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&&(no({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,shortAddressCodeErrorMessage:this.shortAddressCodeErrorMessage,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"===M.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=io({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=[O("genericSettings",(()=>{this.genericSettings=M.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=T(M.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":E()}},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=X(this.mobile)}componentWillLoad(){this.isMobile=X(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:M.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},A({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=M.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:A({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",{isMobile:this.isMobile,items:this.serviceLevelsAll,onRadioSelected:o=>this.handleRadioSelected(o),selectedItem:this.selectedShippingMethod}):t(n,null,t("zonos-shipping-rich-radio",{isMobile:this.isMobile,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",{isMobile:this.isMobile,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 +1 @@
1
- import{r as o,h as e,H as t,a as s}from"./p-ab41bab5.js";import{d as i}from"./p-5762e217.js";import{l,i as n,t as r,g as h,j as a,k as d,m as c,n as m,d as p}from"./p-21fb6b39.js";import{z as g,g as w,m as z}from"./p-b2a0ab4a.js";import{c as f}from"./p-b4b7f705.js";import{h as u,l as b}from"./p-41dd1cb8.js";import{g as v}from"./p-5883217a.js";import{l as x}from"./p-0a377722.js";const y=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},k=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:l}=g.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const r=i&&n(i)&&document.querySelectorAll(i)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===l,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=h[t];if(s&&i){const l={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(l)}}return c},L=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=g.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===g.currentHelloPage||"productList"===g.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===g.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(g.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==g.currentHelloPage&&"productList"!==g.currentHelloPage||"DISABLED"===g.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=l;if(!e)return b("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:l,json:n}=await u("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return l.length||!n?(b(`Error fetching item restrictions: ${null===(s=l.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(g.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=g.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=k();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=i((()=>{const{productTitleElementSelector:o}=g.helloSettings;if(o){const o=k();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==l.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,g.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=g.helloSettings;return y(o)?"cart":y(t)?"productDetail":y(s)?"productList":y(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(l.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return v(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!l.localizationLoaded)return!1;const{showForCountries:e}=g.helloSettings;return o&&(l.isShippableCountry||x(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?l.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(l.selectedCountryCode||""))}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return l.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&g.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==g.helloSettings.currencyBehavior&&(l.exchangeRate?d():x("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return p({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||l.selectedCountryCode&&"function"==typeof g.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=g.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||g.helloSettings.mobileLocation,e=g.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!g.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=g.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return x("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=l,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=z(g.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(g.organizationName);const p=this.shouldRenderHello()&&!!i;return p&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":c},p&&e("div",{class:f(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:f(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:f(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};L.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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{L as zonos_hello}
1
+ import{r as o,h as e,H as t,a as s}from"./p-ab41bab5.js";import{d as i}from"./p-5762e217.js";import{l,i as n,t as r,g as h,j as a,k as d,m as c,n as m,d as p}from"./p-09aabce0.js";import{z as g,g as w,m as z}from"./p-b2a0ab4a.js";import{c as f}from"./p-b4b7f705.js";import{h as u,l as b}from"./p-41dd1cb8.js";import{g as v}from"./p-5883217a.js";import{l as x}from"./p-0a377722.js";const y=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},k=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:l}=g.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const r=i&&n(i)&&document.querySelectorAll(i)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===l,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=h[t];if(s&&i){const l={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(l)}}return c},L=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=g.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===g.currentHelloPage||"productList"===g.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===g.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(g.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==g.currentHelloPage&&"productList"!==g.currentHelloPage||"DISABLED"===g.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=l;if(!e)return b("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:l,json:n}=await u("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return l.length||!n?(b(`Error fetching item restrictions: ${null===(s=l.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(g.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=g.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=k();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=i((()=>{const{productTitleElementSelector:o}=g.helloSettings;if(o){const o=k();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==l.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,g.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=g.helloSettings;return y(o)?"cart":y(t)?"productDetail":y(s)?"productList":y(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(l.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return v(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!l.localizationLoaded)return!1;const{showForCountries:e}=g.helloSettings;return o&&(l.isShippableCountry||x(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?l.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(l.selectedCountryCode||""))}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return l.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&g.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==g.helloSettings.currencyBehavior&&(l.exchangeRate?d():x("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return p({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||l.selectedCountryCode&&"function"==typeof g.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=g.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||g.helloSettings.mobileLocation,e=g.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!g.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=g.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return x("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=l,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=z(g.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(g.organizationName);const p=this.shouldRenderHello()&&!!i;return p&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":c},p&&e("div",{class:f(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:f(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:f(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};L.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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{L as zonos_hello}