@zonos/elements 1.3.274 → 1.3.275

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 (270) hide show
  1. package/dist/cjs/{cart-660e115c.js → cart-73d7ecdc.js} +4 -4
  2. package/dist/cjs/{cleanHtmlMarkdown-31da84b7.js → cleanHtmlMarkdown-57147de7.js} +180 -356
  3. package/dist/cjs/{collect-286a9d04.js → collect-32ea7a37.js} +3 -3
  4. package/dist/cjs/{debounce-7990f5ea.js → debounce-9a712c79.js} +1 -1
  5. package/dist/cjs/{getBorderRadius-fc683d94.js → getBorderRadius-4da24d7c.js} +1 -1
  6. package/dist/cjs/{getContrastColor-d5134ef3.js → getContrastColor-2fb235b8.js} +2 -2
  7. package/dist/cjs/{hasInclusivePrice-b35e81aa.js → hasInclusivePrice-38ebedfb.js} +1 -1
  8. package/dist/cjs/index.cjs.js +7 -7
  9. package/dist/cjs/{invoice-f032089f.js → invoice-df662cd1.js} +3 -3
  10. package/dist/cjs/{isContrastColor-76592c92.js → isContrastColor-ef24b7aa.js} +1 -1
  11. package/dist/cjs/{isDarkColor-5d6ca405.js → isDarkColor-ebc74b4d.js} +1 -1
  12. package/dist/cjs/{localization-f4a64f6f.js → localization-09e91031.js} +1 -1
  13. package/dist/cjs/{paypal-125259ab.js → paypal-11acb15f.js} +5 -5
  14. package/dist/cjs/{placeTestOrder-02001a99.js → placeTestOrder-e0f80338.js} +2 -2
  15. package/dist/cjs/{renderCheckoutCurrency-cad156a7.js → renderCheckoutCurrency-d902f973.js} +2 -2
  16. package/dist/cjs/{submitGtag-4906b161.js → submitGtag-74762255.js} +1 -1
  17. package/dist/cjs/{throttle-02c2e917.js → throttle-34f7abf1.js} +2 -2
  18. package/dist/cjs/{updateCheckoutSessionAttributes-47d73942.js → updateCheckoutSessionAttributes-f595319d.js} +1 -1
  19. package/dist/cjs/zonos-address-display_8.cjs.entry.js +444 -202
  20. package/dist/cjs/zonos-address_4.cjs.entry.js +7 -7
  21. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +6 -6
  22. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  25. package/dist/cjs/zonos-card_5.cjs.entry.js +8 -8
  26. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +15 -15
  27. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +3 -3
  28. package/dist/cjs/zonos-checkout.cjs.entry.js +10 -10
  29. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  30. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
  31. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +11 -11
  32. package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
  33. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  34. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  35. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1514 -1692
  36. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  37. package/dist/cjs/zonos-hello.cjs.entry.js +3 -3
  38. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +7 -7
  40. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +11 -11
  41. package/dist/cjs/zonos-invoice.cjs.entry.js +9 -9
  42. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  43. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  44. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +6 -6
  45. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
  46. package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
  47. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  48. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  49. package/dist/esm/{cart-23e29950.js → cart-c3cd0036.js} +4 -4
  50. package/dist/esm/{cleanHtmlMarkdown-5f7856f2.js → cleanHtmlMarkdown-87d195f6.js} +180 -356
  51. package/dist/esm/{collect-a235299d.js → collect-a7a4696c.js} +3 -3
  52. package/dist/esm/{debounce-58e4ff3e.js → debounce-c8d67b17.js} +1 -1
  53. package/dist/esm/{getBorderRadius-d23f47a6.js → getBorderRadius-dc982fe6.js} +1 -1
  54. package/dist/esm/{getContrastColor-f0bd5b65.js → getContrastColor-af895b60.js} +2 -2
  55. package/dist/esm/{hasInclusivePrice-5e106f84.js → hasInclusivePrice-93a88196.js} +1 -1
  56. package/dist/esm/index.js +7 -7
  57. package/dist/esm/{invoice-78f069c7.js → invoice-5a07bb03.js} +3 -3
  58. package/dist/esm/{isContrastColor-fbddacb6.js → isContrastColor-089de6ac.js} +1 -1
  59. package/dist/esm/{isDarkColor-566f04c5.js → isDarkColor-039ef212.js} +1 -1
  60. package/dist/esm/{localization-17546792.js → localization-a185c345.js} +1 -1
  61. package/dist/esm/{paypal-5bc6b0d0.js → paypal-cc558697.js} +5 -5
  62. package/dist/esm/{placeTestOrder-e842854a.js → placeTestOrder-92847316.js} +2 -2
  63. package/dist/esm/{renderCheckoutCurrency-e3953f67.js → renderCheckoutCurrency-34aaa81e.js} +2 -2
  64. package/dist/esm/{submitGtag-c7ea1f2a.js → submitGtag-dc54f5b9.js} +1 -1
  65. package/dist/esm/{throttle-f09d0659.js → throttle-44bfb6b5.js} +2 -2
  66. package/dist/esm/{updateCheckoutSessionAttributes-40e301a4.js → updateCheckoutSessionAttributes-e0a282d9.js} +1 -1
  67. package/dist/esm/zonos-address-display_8.entry.js +444 -202
  68. package/dist/esm/zonos-address_4.entry.js +7 -7
  69. package/dist/esm/zonos-airwallex-payment.entry.js +6 -6
  70. package/dist/esm/zonos-badge.entry.js +1 -1
  71. package/dist/esm/zonos-banner.entry.js +1 -1
  72. package/dist/esm/zonos-button_3.entry.js +3 -3
  73. package/dist/esm/zonos-card_5.entry.js +8 -8
  74. package/dist/esm/zonos-cart-items_12.entry.js +15 -15
  75. package/dist/esm/zonos-checkbox_2.entry.js +3 -3
  76. package/dist/esm/zonos-checkout.entry.js +10 -10
  77. package/dist/esm/zonos-collapse.entry.js +1 -1
  78. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
  79. package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
  80. package/dist/esm/zonos-collect.entry.js +9 -9
  81. package/dist/esm/zonos-controller.entry.js +6 -6
  82. package/dist/esm/zonos-country-flag.entry.js +2 -2
  83. package/dist/esm/zonos-country-select_4.entry.js +1514 -1692
  84. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  85. package/dist/esm/zonos-hello.entry.js +3 -3
  86. package/dist/esm/zonos-input.entry.js +2 -2
  87. package/dist/esm/zonos-invoice-cart-items_2.entry.js +7 -7
  88. package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
  89. package/dist/esm/zonos-invoice.entry.js +9 -9
  90. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  91. package/dist/esm/zonos-logo.entry.js +1 -1
  92. package/dist/esm/zonos-policy-consent_2.entry.js +6 -6
  93. package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
  94. package/dist/esm/zonos-stripe-input.entry.js +3 -3
  95. package/dist/esm/zonos-text.entry.js +1 -1
  96. package/dist/esm/zonos-v-stack.entry.js +1 -1
  97. package/dist/esm-es5/{cart-23e29950.js → cart-c3cd0036.js} +1 -1
  98. package/dist/esm-es5/cleanHtmlMarkdown-87d195f6.js +1 -0
  99. package/dist/esm-es5/{collect-a235299d.js → collect-a7a4696c.js} +1 -1
  100. package/dist/esm-es5/{debounce-58e4ff3e.js → debounce-c8d67b17.js} +1 -1
  101. package/dist/esm-es5/{getBorderRadius-d23f47a6.js → getBorderRadius-dc982fe6.js} +1 -1
  102. package/dist/esm-es5/{getContrastColor-f0bd5b65.js → getContrastColor-af895b60.js} +1 -1
  103. package/dist/esm-es5/{hasInclusivePrice-5e106f84.js → hasInclusivePrice-93a88196.js} +1 -1
  104. package/dist/esm-es5/index.js +1 -1
  105. package/dist/esm-es5/{invoice-78f069c7.js → invoice-5a07bb03.js} +1 -1
  106. package/dist/esm-es5/{isContrastColor-fbddacb6.js → isContrastColor-089de6ac.js} +1 -1
  107. package/dist/esm-es5/{isDarkColor-566f04c5.js → isDarkColor-039ef212.js} +1 -1
  108. package/dist/esm-es5/{localization-17546792.js → localization-a185c345.js} +1 -1
  109. package/dist/esm-es5/{paypal-5bc6b0d0.js → paypal-cc558697.js} +1 -1
  110. package/dist/esm-es5/{placeTestOrder-e842854a.js → placeTestOrder-92847316.js} +1 -1
  111. package/dist/esm-es5/{renderCheckoutCurrency-e3953f67.js → renderCheckoutCurrency-34aaa81e.js} +1 -1
  112. package/dist/esm-es5/{submitGtag-c7ea1f2a.js → submitGtag-dc54f5b9.js} +1 -1
  113. package/dist/esm-es5/throttle-44bfb6b5.js +1 -0
  114. package/dist/esm-es5/{updateCheckoutSessionAttributes-40e301a4.js → updateCheckoutSessionAttributes-e0a282d9.js} +1 -1
  115. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  116. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  117. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  118. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  119. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  120. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  121. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  122. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  123. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  124. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  125. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  126. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  127. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  128. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  129. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  130. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  131. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  132. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  133. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  134. package/dist/esm-es5/zonos-input.entry.js +1 -1
  135. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  136. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  137. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  138. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  139. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  140. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  141. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  142. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  143. package/dist/esm-es5/zonos-text.entry.js +1 -1
  144. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  145. package/dist/scripts/analyticsRelayOnInit.js +1 -1
  146. package/dist/scripts/blurCurrencyOnInit.js +1 -1
  147. package/dist/scripts/index.js +1 -1
  148. package/dist/scripts/loadZonos.js +1 -1
  149. package/dist/scripts/zonos.js +1 -1
  150. package/dist/zonos-elements/index.esm.js +1 -1
  151. package/dist/zonos-elements/{p-d25759fb.system.js → p-03c357f5.system.js} +1 -1
  152. package/dist/zonos-elements/{p-41619f29.js → p-043e9a84.js} +1 -1
  153. package/dist/zonos-elements/{p-59b10526.entry.js → p-08e78d79.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-c846a5f3.system.entry.js → p-0ad6a92b.system.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-b59fc3fa.system.entry.js → p-0e1f13ff.system.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-306e5499.system.entry.js → p-12396d79.system.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-c6823974.system.entry.js → p-15097876.system.entry.js} +1 -1
  158. package/dist/zonos-elements/{p-9f5fb332.js → p-1735a69b.js} +1 -1
  159. package/dist/zonos-elements/p-1906c8f7.js +1 -0
  160. package/dist/zonos-elements/{p-055ef910.entry.js → p-1992fd91.entry.js} +1 -1
  161. package/dist/zonos-elements/p-1de258c3.js +1 -0
  162. package/dist/zonos-elements/{p-abd485df.entry.js → p-216d31ca.entry.js} +1 -1
  163. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  164. package/dist/zonos-elements/{p-a1a05de4.system.entry.js → p-29c1703c.system.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-e9afd736.system.entry.js → p-2b2122bc.system.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-9574695a.system.js → p-2bdfa429.system.js} +1 -1
  167. package/dist/zonos-elements/{p-33910e8b.js → p-2c0a627d.js} +1 -1
  168. package/dist/zonos-elements/p-30e9a6d7.system.js +1 -0
  169. package/dist/zonos-elements/{p-33d4be28.js → p-34d6eb83.js} +1 -1
  170. package/dist/zonos-elements/p-35fd0fdb.js +1 -0
  171. package/dist/zonos-elements/p-387f33ae.js +1 -0
  172. package/dist/zonos-elements/p-38d2da0d.entry.js +1 -0
  173. package/dist/zonos-elements/{p-08b48608.entry.js → p-391ea5c2.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-1a4083be.system.js → p-3980e553.system.js} +1 -1
  175. package/dist/zonos-elements/p-3b479012.js +1 -0
  176. package/dist/zonos-elements/{p-896fb969.js → p-3d28353a.js} +1 -1
  177. package/dist/zonos-elements/{p-328fd90e.entry.js → p-3e058b4e.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-86a9f048.system.entry.js → p-3e914f69.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-62c68aee.system.js → p-3ea7643b.system.js} +1 -1
  180. package/dist/zonos-elements/{p-f53c8a9f.entry.js → p-3f8050ab.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-daf57db3.system.entry.js → p-3fa307d1.system.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-0a54dae6.system.entry.js → p-429ab545.system.entry.js} +1 -1
  183. package/dist/zonos-elements/p-4900096c.system.entry.js +1 -0
  184. package/dist/zonos-elements/{p-f053975e.system.js → p-496accce.system.js} +1 -1
  185. package/dist/zonos-elements/{p-12a05647.entry.js → p-4efd7178.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-9cd41234.system.entry.js → p-51b537a6.system.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-4b371b65.entry.js → p-5427bf51.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-ad961f5d.entry.js → p-577b543c.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-10571f94.system.entry.js → p-5aee5de5.system.entry.js} +1 -1
  190. package/dist/zonos-elements/p-5c30d04b.js +1 -0
  191. package/dist/zonos-elements/{p-8e77a3cd.system.entry.js → p-5ce8b3c3.system.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-dcef2202.entry.js → p-5d4201d5.entry.js} +1 -1
  193. package/dist/zonos-elements/{p-80df7e0b.system.entry.js → p-6146bfaa.system.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-e548b8ec.entry.js → p-62609f19.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-97917371.system.entry.js → p-70fd21c4.system.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-013575f2.entry.js → p-785d6f43.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-1f31f5a0.system.entry.js → p-79f58524.system.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-4df08fc4.js → p-7bdce9d4.js} +1 -1
  199. package/dist/zonos-elements/{p-e8cb382e.entry.js → p-819f182e.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-14018649.system.js → p-863cfab2.system.js} +2 -2
  201. package/dist/zonos-elements/{p-4a960329.system.entry.js → p-8873d332.system.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-c83bc4b3.entry.js → p-8c54aaec.entry.js} +1 -1
  203. package/dist/zonos-elements/{p-49d8a10f.entry.js → p-9295b932.entry.js} +1 -1
  204. package/dist/zonos-elements/{p-f0eb6317.system.entry.js → p-93c6c2df.system.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-d5e66ea6.entry.js → p-96972001.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-3eba657b.system.entry.js → p-99e8743e.system.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-42948a52.js → p-9cb80484.js} +1 -1
  208. package/dist/zonos-elements/{p-31577ebd.entry.js → p-9d80357b.entry.js} +1 -1
  209. package/dist/zonos-elements/p-a1bd3a53.system.js +1 -0
  210. package/dist/zonos-elements/p-a1f59d6d.system.entry.js +1 -0
  211. package/dist/zonos-elements/{p-6c19310e.system.entry.js → p-a2353242.system.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-e8ec88a9.system.entry.js → p-a33e1549.system.entry.js} +1 -1
  213. package/dist/zonos-elements/p-a3c116d6.system.js +1 -0
  214. package/dist/zonos-elements/{p-5aa35d1c.system.entry.js → p-a3d3ce5d.system.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-27e50593.system.entry.js → p-a44591f6.system.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-2197d6ab.js → p-a7028453.js} +1 -1
  217. package/dist/zonos-elements/p-a9d01bfa.entry.js +1 -0
  218. package/dist/zonos-elements/{p-ccd14aa5.entry.js → p-ac762358.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-0b59076d.system.entry.js → p-b376aba7.system.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-cc508de8.entry.js → p-b5f67807.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-8c4761d1.system.entry.js → p-b9034a75.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-9b003a15.system.entry.js → p-b9359002.system.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-91b921a4.system.js → p-be233925.system.js} +1 -1
  224. package/dist/zonos-elements/{p-919c5500.entry.js → p-c68a7f3e.entry.js} +1 -1
  225. package/dist/zonos-elements/p-cc6ad18a.js +1 -0
  226. package/dist/zonos-elements/{p-c1463da7.entry.js → p-d1e84608.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-bf8c98ab.system.js → p-d1f2e532.system.js} +1 -1
  228. package/dist/zonos-elements/{p-171d0f9f.system.js → p-d62dab88.system.js} +1 -1
  229. package/dist/zonos-elements/{p-2a1247f4.system.entry.js → p-d6d18115.system.entry.js} +1 -1
  230. package/dist/zonos-elements/{p-5d65be06.system.js → p-d706852e.system.js} +1 -1
  231. package/dist/zonos-elements/{p-df55536b.entry.js → p-daab3824.entry.js} +1 -1
  232. package/dist/zonos-elements/{p-7d9d2407.system.js → p-dab78981.system.js} +1 -1
  233. package/dist/zonos-elements/{p-990d1495.system.entry.js → p-db65c60b.system.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-e9c8a235.js → p-e3376f43.js} +1 -1
  235. package/dist/zonos-elements/{p-45d74be2.system.js → p-e562d953.system.js} +1 -1
  236. package/dist/zonos-elements/{p-c13d2e3f.entry.js → p-e5f25b27.entry.js} +1 -1
  237. package/dist/zonos-elements/{p-bc919de1.system.js → p-e977562b.system.js} +1 -1
  238. package/dist/zonos-elements/{p-1678d8b4.system.entry.js → p-e9e3c951.system.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-46e72a90.entry.js → p-ee70bd2e.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-a968ccba.entry.js → p-ee920b9b.entry.js} +1 -1
  241. package/dist/zonos-elements/{p-3dc3596b.js → p-f1aea919.js} +1 -1
  242. package/dist/zonos-elements/p-f29bcf8b.system.js +1 -0
  243. package/dist/zonos-elements/{p-f72642de.entry.js → p-f59514e9.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-52bd7be3.system.js → p-f61c0eef.system.js} +1 -1
  245. package/dist/zonos-elements/{p-9c3276c8.entry.js → p-f97da77c.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-df6fbf3f.entry.js → p-fb830355.entry.js} +1 -1
  247. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  248. package/package.json +12 -35
  249. package/dist/esm-es5/cleanHtmlMarkdown-5f7856f2.js +0 -1
  250. package/dist/esm-es5/throttle-f09d0659.js +0 -1
  251. package/dist/zonos-elements/p-14d6542f.system.js +0 -1
  252. package/dist/zonos-elements/p-18af6aaa.system.js +0 -1
  253. package/dist/zonos-elements/p-1a105d6e.system.entry.js +0 -1
  254. package/dist/zonos-elements/p-3b28fc76.js +0 -1
  255. package/dist/zonos-elements/p-539bc46c.js +0 -1
  256. package/dist/zonos-elements/p-5dd86dd9.system.js +0 -1
  257. package/dist/zonos-elements/p-7eb47eb0.entry.js +0 -1
  258. package/dist/zonos-elements/p-8af57c2a.js +0 -1
  259. package/dist/zonos-elements/p-90d22087.system.js +0 -1
  260. package/dist/zonos-elements/p-9581bffb.js +0 -1
  261. package/dist/zonos-elements/p-ac8cfdc0.js +0 -1
  262. package/dist/zonos-elements/p-b5c01288.system.entry.js +0 -1
  263. package/dist/zonos-elements/p-cd34ecf2.js +0 -1
  264. package/dist/zonos-elements/p-e643346a.entry.js +0 -1
  265. package/dist/zonos-elements/p-f1cc659c.js +0 -1
  266. /package/dist/cjs/{zonosStore-45a87908.js → zonosStore-fee716c9.js} +0 -0
  267. /package/dist/esm/{zonosStore-8e19daff.js → zonosStore-b7d3f9b0.js} +0 -0
  268. /package/dist/esm-es5/{zonosStore-8e19daff.js → zonosStore-b7d3f9b0.js} +0 -0
  269. /package/dist/zonos-elements/{p-3e7ee89d.system.js → p-47a1d469.system.js} +0 -0
  270. /package/dist/zonos-elements/{p-701d9a7c.js → p-9a417eeb.js} +0 -0
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function c(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):r(e.value).then(s,c)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(o){return a([e,o])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=o.call(e,t)}catch(e){c=[6,e];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,r=o.length,i;n<r;n++){if(i||!(n in o)){if(!i)i=Array.prototype.slice.call(o,0,n);i[n]=o[n]}}return e.concat(i||Array.prototype.slice.call(o))};System.register(["./p-7261e245.system.js","./p-bf8c98ab.system.js","./p-14018649.system.js","./p-171d0f9f.system.js","./p-3e7ee89d.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-18af6aaa.system.js","./p-d938f42f.system.js","./p-40a4c8a2.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-14d6542f.system.js","./p-7d9d2407.system.js","./p-1aa93d1e.system.js","./p-2770ba48.system.js","./p-5d65be06.system.js","./p-bc919de1.system.js","./p-f053975e.system.js"],(function(e){"use strict";var o,t,n,r,i,s,c,a,u,d,l,f,h,v,m,g,p,w,z,k,y,b,_,C,x,S,T,I,A,O,U,E,L,P,B,N,D,j,R,F,M,H,Z,K,V,G,Q,W,Y,q,J,X,$,ee,oe,te,ne,re,ie,se,ce,ae,ue,de,le,fe,he,ve,me,ge,pe,we,ze,ke,ye,be,_e,Ce,xe,Se,Te,Ie,Ae;return{setters:[function(e){o=e.r;t=e.h;n=e.F;r=e.a},function(e){i=e.s;s=e.a;c=e.b;a=e.i;u=e.c;d=e.d;l=e.e;f=e.f;h=e.p;v=e.g;m=e.h;g=e.j;p=e.k;w=e.l;z=e.t;k=e.m;y=e.n;b=e.o;_=e.q;C=e.r;x=e.u;S=e.v;T=e.w;I=e.x;A=e.y;O=e.z;U=e.A;E=e.B;L=e.C;P=e.D;B=e.E;N=e.F;D=e.G;j=e.H;R=e.I},function(e){F=e.p;M=e.s;H=e.a;Z=e.b},function(e){K=e.f;V=e.a;G=e.b;Q=e.i;W=e.l;Y=e.c;q=e.g;J=e.s;X=e.V;$=e.d;ee=e.t;oe=e.e;te=e.h},function(e){ne=e.z;re=e.g;ie=e.m},function(e){se=e.b},function(e){ce=e.h;ae=e.g;ue=e.j;de=e.l;le=e.b;fe=e.s;he=e.a;ve=e.i},function(e){me=e.u},function(e){ge=e.l;pe=e.g;we=e.b},function(e){ze=e._;ke=e.c;ye=e.a;be=e.d;_e=e.g},function(e){Ce=e.c},function(e){xe=e.c},function(e){Se=e.g},function(e){Te=e.i},function(e){Ie=e.s},function(e){Ae=e.R},function(){},function(){},function(){}],execute:function(){var Oe=this;var Ue=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,ce("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=n.sent(),o=e.errors,t=e.json;if(o.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var Ee=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o,t,n,r;var i=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:if(i.length===0){return[2,null]}return[4,ce("/api/zonos-elements/select-variance-test",{body:{testKeys:i},method:"POST"})];case 1:o=e.sent(),t=o.errors,n=o.json;if(t.length||!n){return[2,null]}r=K(n);return[2,r]}}))}))};var Le=function(e){var o=e.cartId,t=e.checkoutSessionId,n=e.customerAddress1,r=e.customerAddress2,i=e.customerCity,s=e.customerCountry,c=e.customerEmail,a=e.customerFirstName,u=e.customerLastName,d=e.customerPhone,l=e.customerState,f=e.customerZip,h=e.hostedCheckoutUrl,v=e.isTestMode,m=e.isVariantTest;var g=new URLSearchParams;g.set("tempCartUUID",o);if(a){g.set("customerFirstName",a)}if(u){g.set("customerLastName",u)}if(c){g.set("customerEmail",c)}if(d){g.set("customerPhone",d)}if(f){g.set("customerZip",f)}if(i){g.set("customerCity",i)}if(l){g.set("customerState",l)}if(s){g.set("zCountry",s)}if(n){g.set("customerAddress1",n)}if(r){g.set("customerAddress2",r)}if(v){g.set("zonosTestMode","1")}if(t){g.set("zonosCheckoutSessionId",t)}if(m){g.set("zonosVariantTest","1")}return"".concat(h,"?").concat(g.toString())};var Pe="isInternationalCheckout";var Be=function(){var e=new URLSearchParams;e.set(Pe,"true");var o=new URLSearchParams(window.location.search);var t=o.get("zonosQaUrl");if(t){e.set("zonosQaUrl",t)}var n=o.get("zonosQaUrlApi");if(n){e.set("zonosQaUrlApi",n)}if(ae()){e.set("zonosTestMode","1")}return"cart.php?".concat(e.toString())};var Ne=function(e){var o=e===void 0?{}:e,t=o.action;var n=new URL("/login.php",window.location.origin);if(t){n.searchParams.set("action",t)}var r=new URLSearchParams(window.location.search);var i=r.get("zonosQaUrl");if(i){n.searchParams.set("zonosQaUrl",i)}var s=r.get("zonosQaUrlApi");if(s){n.searchParams.set("zonosQaUrlApi",s)}if(ae()){n.searchParams.set("zonosTestMode","1")}n.searchParams.set("from",Be());return n.toString()};var De=function(e){var o=new URL(e,window.location.origin);var t=new URLSearchParams(window.location.search).get("zonosQaUrl");if(t){o.searchParams.set("zonosQaUrl",t)}if(ae()){o.searchParams.set("zonosTestMode","1")}return o.toString()};var je={customerGroupId:null,shouldBypass:false};var Re=function(e){return __awaiter(Oe,void 0,void 0,(function(){var o,t,n,r,i,s,c,a,u,d,l,f;return __generator(this,(function(h){switch(h.label){case 0:if(!window.Zonos.isBigCommerce){return[2,{conclusive:true,result:je}]}i=(o=ne.genericSettings)===null||o===void 0?void 0:o.bigcommerceBypassCustomerGroupIds;if(!(i===null||i===void 0?void 0:i.length)){if(ne.loadedConfig){return[2,{conclusive:true,result:je}]}return[2,{conclusive:false,result:je}]}if(!e)return[3,1];c=e.checkoutId;return[3,3];case 1:return[4,V()];case 2:c=h.sent();h.label=3;case 3:s=c;if(!s){ge("BigCommerce bypass check: no active cart yet, will retry on next call","info");return[2,{conclusive:false,result:je}]}if(!e)return[3,4];u=e.checkout;return[3,6];case 4:return[4,G(s)];case 5:u=h.sent();h.label=6;case 6:a=u;if(!a){ge("BigCommerce bypass check: failed to fetch checkout data, will retry","info");return[2,{conclusive:false,result:je}]}d=(r=(n=(t=a.customer)===null||t===void 0?void 0:t.customerGroup)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:null;if(d===null){ge("BigCommerce bypass check: no customer group found (guest user)","info");return[2,{conclusive:true,result:je}]}l=i.includes(d);f={customerGroupId:d,shouldBypass:l};if(l){ge("BigCommerce bypass check: customer group ".concat(String(d)," is in bypass list; caller should keep the user on BC native checkout"),"info")}else{ge("BigCommerce bypass check: customer group ".concat(String(d)," is not in bypass list"),"info")}return[2,{conclusive:true,result:f}]}}))}))};var Fe=null;var Me=function(e){var o=Re(e);var t=o.then((function(e){var o=e.conclusive,n=e.result;if(!o&&Fe===t){Fe=null}return n}));Fe=t;return t};var He=function(){var e;if(!window.Zonos.isBigCommerce){return}var o=(e=ne.genericSettings)===null||e===void 0?void 0:e.bigcommerceBypassCustomerGroupIds;if(!(o===null||o===void 0?void 0:o.length)){return}void Me()};var Ze=function(){var e=[];for(var o=0;o<arguments.length;o++){e[o]=arguments[o]}return __awaiter(Oe,__spreadArray([],e,true),void 0,(function(e){if(e===void 0){e={}}return __generator(this,(function(o){if(e.forceRefresh||!Fe){return[2,Me(e.preFetched)]}return[2,Fe]}))}))};var Ke={guestCheckoutType:null};var Ve=60*60*1e3;var Ge="zonos--bc-checkout-settings";var Qe=function(e){try{var o=window.localStorage.getItem(Ge);if(!o){return null}var t=ue(o);if(!t){return null}if(t.storeHash!==e){return null}if(t.expiresAt<Date.now()){return null}return{guestCheckoutType:t.guestCheckoutType}}catch(e){return null}};var We=function(e,o){try{var t={expiresAt:Date.now()+Ve,guestCheckoutType:o.guestCheckoutType,storeHash:e};window.localStorage.setItem(Ge,JSON.stringify(t))}catch(e){}};var Ye=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o,t,n,r,i,s;return __generator(this,(function(c){switch(c.label){case 0:if(!window.Zonos.isBigCommerce){return[2,Ke]}o=(e=ne.checkoutSettings.bigCommerceConfig)===null||e===void 0?void 0:e.storeHash;if(!o){ge("BigCommerce checkout settings: no storeHash provided — skipping fetch","info");return[2,Ke]}t=Qe(o);if(t){return[2,t]}return[4,ce("/api/bigcommerce/checkout-settings",{body:{storeHash:o},method:"POST"})];case 1:n=c.sent(),r=n.errors,i=n.json;if(r.length||!i){ge("BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior","info");return[2,Ke]}s={guestCheckoutType:i.guestCheckoutType};We(o,s);return[2,s]}}))}))};var qe={redirectUrl:null,shouldForceLogin:false};var Je=null;var Xe=function(){if(!Je){var e=Ye().then((function(o){var t=o.guestCheckoutType;if(!t){if(Je===e){Je=null}return false}return t==="no_guest_checkout"})).catch((function(){if(Je===e){Je=null}return false}));Je=e}return Je};var $e=function(){if(!window.Zonos.isBigCommerce){return}void Xe()};var eo=function(){var e=[];for(var o=0;o<arguments.length;o++){e[o]=arguments[o]}return __awaiter(Oe,__spreadArray([],e,true),void 0,(function(e){var o,t,n,r,i;var s=e===void 0?{}:e,c=s.preFetched;return __generator(this,(function(e){switch(e.label){case 0:if(!window.Zonos.isBigCommerce){return[2,qe]}return[4,Xe()];case 1:o=e.sent();if(!o){return[2,qe]}if(!c)return[3,2];n=c.checkoutId;return[3,4];case 2:return[4,V()];case 3:n=e.sent();e.label=4;case 4:t=n;if(!t){return[2,qe]}if(!c)return[3,5];i=c.checkout;return[3,7];case 5:return[4,G(t)];case 6:i=e.sent();e.label=7;case 7:r=i;if(!r){ge("BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue","info");return[2,qe]}if(Q(r)){return[2,qe]}ge("BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php","info");return[2,{redirectUrl:Ne(),shouldForceLogin:true}]}}))}))};var oo="data-zonos-login-from-rewritten";var to='a[href*="login.php?action=create_account"]:not(['+oo+"])";var no=function(){var e=document.querySelectorAll(to);if(!e.length){return}var o=Ne({action:"create_account"});e.forEach((function(e){e.setAttribute("href",o);e.setAttribute(oo,"true")}))};var ro=function(){if(!window.Zonos.isBigCommerce){return}if(!window.location.pathname.includes("/login.php")){return}no();var e=new MutationObserver((function(){no()}));e.observe(document.body,{childList:true,subtree:true});setTimeout((function(){return e.disconnect()}),1e4)};var io=function(e,o){if(!e.address1||!e.countryCode){return null}var t=[e.firstName,e.lastName].filter(Boolean).join(" ").trim();return{address:{city:e.city||"",country:e.countryCode,line1:e.address1,line2:e.address2||"",postal_code:e.postalCode||"",state:e.stateOrProvinceCode||e.stateOrProvince||""},email:o,name:t,phone:e.phone||""}};var so=function(e){return[e.address.line1,e.address.line2||"",e.address.postal_code,e.address.country].join("|").toLowerCase()};var co=function(e,o){var t,n,r,i;if(!((t=e===null||e===void 0?void 0:e.customer)===null||t===void 0?void 0:t.id)){return[]}var s=o.isShippable,c=o.selectedCountryCode;var a=e.customer.email||"";var u=(r=(n=e.consignments)===null||n===void 0?void 0:n.flatMap((function(e){return e.shippingAddress?[e.shippingAddress]:[]})))!==null&&r!==void 0?r:[];var d=(i=e.customer.addresses)!==null&&i!==void 0?i:[];var l=new Set;var f=[];for(var h=0,v=__spreadArray(__spreadArray([],d,true),u,true);h<v.length;h++){var m=v[h];var g=io(m,a);if(!g){continue}if(!s(g.address.country)){continue}var p=so(g);if(l.has(p)){continue}l.add(p);f.push(g)}if(!c){return f}return f.map((function(e,o){return{index:o,option:e}})).sort((function(e,o){var t=e.option.address.country===c;var n=o.option.address.country===c;if(t===n){return e.index-o.index}return t?-1:1})).map((function(e){return e.option}))};var ao=function(e){if(e===void 0){e=true}if(!W.localizationLoaded){return true}if(W.isDisabledCountry){if(e){ge("Checkout: disabled country")}return true}return false};var uo=function(e,o){if(e===void 0){e=true}var t;if(!W.localizationLoaded){return false}if(o){var n=!!((t=W.shippingZoneCountries)===null||t===void 0?void 0:t[o])&&!ne.disabledCountries.includes(o);if(e&&!n){ge("Checkout: ".concat(o," is not a shippable country: ").concat(n))}return n}if(!W.isShippableCountry){if(e){ge("Checkout: not shippable country")}return false}return true};var lo='select[name="shippingAddress.countryCode"]';var fo=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o,t,n,r,i,c,a,u,d,l,f,h,v,m,g,p,w,z;var k=e.onInternationalCheckoutSelected,y=e.onLoggedInInternationalAddressDetected;return __generator(this,(function(e){switch(e.label){case 0:return[4,V()];case 1:f=e.sent();if(!f){return[2,"noAction"]}return[4,G(f)];case 2:h=e.sent();v={checkout:h,checkoutId:f};return[4,Ze({preFetched:v})];case 3:m=e.sent().shouldBypass;if(m){return[2,"noAction"]}g=(t=(o=h===null||h===void 0?void 0:h.consignments)===null||o===void 0?void 0:o[0])===null||t===void 0?void 0:t.shippingAddress;if(!(g===null||g===void 0?void 0:g.countryCode)){return[2,"noAction"]}p=g.countryCode;if(!uo(false,p)){return[2,"noAction"]}ge(y?"Logged-in user has international shipping address: ".concat(p,", prompting user to choose checkout"):"Logged-in user has international shipping address: ".concat(p,", redirecting automatically (legacy behavior)"),"info");if(!y)return[3,5];return[4,y()];case 4:w=e.sent();if(w==="stay"){ge("User opted to stay on BigCommerce native checkout despite international default address","info");return[2,"optedOut"]}e.label=5;case 5:return[4,eo({preFetched:v})];case 6:z=e.sent();if(z.shouldForceLogin&&z.redirectUrl){window.location.href=z.redirectUrl;return[2,"redirected"]}if(!k)return[3,8];return[4,k()];case 7:e.sent();e.label=8;case 8:Y({isInitializing:false,newSelectedCountryCode:p});s({address1:(n=g.address1)!==null&&n!==void 0?n:"",address2:(r=g.address2)!==null&&r!==void 0?r:"",city:(i=g.city)!==null&&i!==void 0?i:"",countryCode:p,firstName:(c=g.firstName)!==null&&c!==void 0?c:"",lastName:(a=g.lastName)!==null&&a!==void 0?a:"",phone:(u=g.phone)!==null&&u!==void 0?u:"",postalCode:(d=g.postalCode)!==null&&d!==void 0?d:"",state:(l=g.stateOrProvince)!==null&&l!==void 0?l:""});window.location.href=De("/");return[2,"redirected"]}}))}))};var ho=function(e){var o=e.domesticRedirectedBtnSelector,t=e.onInternationalCheckoutSelected,n=e.onLoggedInInternationalAddressDetected,r=e.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var c=function(e){return __awaiter(Oe,void 0,void 0,(function(){var o,n,r,i,c,a,u,d,l,f;return __generator(this,(function(h){switch(h.label){case 0:n=document.querySelector(((o=ne.genericSettings)===null||o===void 0?void 0:o.bigcommerceDomesticCheckoutCountrySelector)||lo);r=(n===null||n===void 0?void 0:n.value)||e;if(!r){return[2,false]}if(!uo(false,r)){return[2,false]}return[4,V()];case 1:i=h.sent();if(!i)return[3,3];return[4,G(i)];case 2:a=h.sent();return[3,4];case 3:a=null;h.label=4;case 4:c=a;u={checkout:c,checkoutId:i};return[4,Ze({forceRefresh:true,preFetched:u})];case 5:d=h.sent().shouldBypass;if(d){ge("Bypass customer group detected on BC checkout, stopping interval","info");return[2,true]}return[4,eo({preFetched:u})];case 6:l=h.sent();if(l.shouldForceLogin&&l.redirectUrl){window.location.href=l.redirectUrl;return[2,true]}if(!t)return[3,8];return[4,t()];case 7:h.sent();h.label=8;case 8:Y({isInitializing:false,newSelectedCountryCode:r});f={address1:"",address2:"",city:"",countryCode:r,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};s({address1:f.address1,address2:f.address2,city:f.city,countryCode:f.countryCode,firstName:f.firstName,lastName:f.lastName,phone:f.phone,postalCode:f.postalCode,state:f.stateOrProvince});window.location.href=De("/");return[2,true]}}))}))};var a=false;var u=false;var d=false;var l=false;var f=false;var h=new MutationObserver((function(){return __awaiter(Oe,void 0,void 0,(function(){var e,s,v,m,g,p,w,z,k,y;var b=this;return __generator(this,(function(_){switch(_.label){case 0:s=document.querySelector(o);v=i();if(!s&&v){m=document.createElement("button");m.style.display="none";m.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(m);r===null||r===void 0?void 0:r(v);h.disconnect();return[2]}g=window.location.pathname.includes("/checkout")&&window.Zonos.isBigCommerce;if(!g){h.disconnect();return[2]}if(!(!l&&!d))return[3,5];d=true;f=true;_.label=1;case 1:_.trys.push([1,3,4,5]);return[4,fo({onInternationalCheckoutSelected:t,onLoggedInInternationalAddressDetected:n})];case 2:p=_.sent();if(p==="redirected"){h.disconnect();return[2]}if(p==="optedOut"){l=true}return[3,5];case 3:w=_.sent();de("Error checking logged-in user shipping address",w);return[3,5];case 4:d=false;f=false;return[7];case 5:z=document.querySelector(((e=ne.genericSettings)===null||e===void 0?void 0:e.bigcommerceDomesticCheckoutCountrySelector)||lo);if(!z){return[2]}ge("Domestic checkout found - Listening for shipping country change","info",{value:z.value});if(u){return[2]}u=true;h.disconnect();k=setInterval((function(){return __awaiter(b,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){switch(t.label){case 0:if(a||f){return[2]}a=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,c()];case 2:e=t.sent();if(e){clearInterval(k);return[2]}a=false;return[3,4];case 3:o=t.sent();a=false;return[3,4];case 4:return[2]}}))}))}),1e3);y=setInterval((function(){var e;if(!window.bcStripeElements){clearInterval(y);return}var o=(e=window.bcStripeElements)===null||e===void 0?void 0:e.getElement("address");if(!o){return}clearInterval(y);o.on("change",(function(e){var o=e.value.address.country;if(o&&!f){void c(o)}}))}),500);return[2]}}))}))}));h.observe(document.body,{childList:true,subtree:true})};var vo=function(){var e=new URLSearchParams(window.location.search);ge("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return""}return t};var t=q(e)||W.selectedCountryCode||"US";var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerPhone");var u=o("customerZip");var d=o("customerState");var l=o("customerFirstName");var f=o("customerLastName");return{customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:l,customerLastName:f,customerName:c,customerPhone:a,customerState:d,customerZip:u}};var mo=0;var go=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o;var t;return __generator(this,(function(n){switch(n.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}ge("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});e={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,ce("/api/zonos-elements/log-bulk-load-data",{body:e,method:"POST"})];case 1:o=n.sent().errors;if(o.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,e.data);mo++;if(mo>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var po=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){e=pe().elapsedTime;o={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:e,metadata:Object.assign({allLogs:we},le()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};void ce("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var wo=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o;var t=e.loadTime;return __generator(this,(function(e){o={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:we},le()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};void ce("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var zo=function(e){return(e===null||e===void 0?void 0:e.filter((function(e){if(e.expiresAt&&e.expiresAt<Date.now()||!e.expiresAt){return false}return true})))||[]};var ko=function(e){var o;var t=(o=J.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){return o.testKey===e}));return(t===null||t===void 0?void 0:t.selectedVariantKey)||null};var yo=function(e){return ne.enabledVariantTestKeys.includes(e)};var bo=function(e){var o=e.baseTestObj,t=e.mergeTestObj;return o.map((function(e){var o=e.testKey;var n=t.find((function(e){var t=e.testKey;return t===o}));return{expiresAt:(n===null||n===void 0?void 0:n.expiresAt)||Date.now()+X,selectedVariantKey:(n===null||n===void 0?void 0:n.selectedVariantKey)||null,testKey:o}}))};var _o=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o,t,n,r,i;var s=e.cartId,c=e.retries;return __generator(this,(function(e){switch(e.label){case 0:o=ae();return[4,ce("/api/zonos-elements/get-temp-cart",{body:{isTestMode:o,options:{noOnlineStoreSettings:true},tempCartUUID:s},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=e.sent(),n=t.errors,r=t.json;i=!r||n.length;if(!(i&&c))return[3,3];ge("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:c});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,_o({cartId:s,retries:c-1})];case 3:if(i){return[2,null]}return[2,r]}}))}))};var Co=function(e){return __awaiter(Oe,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:o=ze(e),t=o.isDgsCartId,n=o.isLegacyCartId;if(!n&&!t){de("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,_o({cartId:e,retries:5})];case 1:r=i.sent();ge("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){de("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;return[2,{cartData:r.cartData,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var xo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var So=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";var To=So;var Io=90*60*1e3;var Ao=6*60*60*1e3;var Oo=e("zonos_checkout",function(){function e(e){var t=this;o(this,e);this.storeUnsubscribeList=[];this.isRedirectAfterOrder=false;this.preview=false;this.hiddenMode=false;this.mobile=false;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.isOverlayLoading=false;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.shouldShowFedexShippingConsentDialog=false;this.detectedDomesticCheckoutDialogOpen=false;this.redirectToDomesticCheckoutDialogOpen=false;this.loggedInIntlAddressConfirmDialogOpen=false;this.loggedInIntlAddressResolver=null;this.clientSecret=c.clientSecret;this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:r=((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme)||ne.appearance.theme;return[4,a({overrideBorderRadius:(o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?r:undefined,paypalEnabled:F()})];case 1:i.sent();return[2]}}))}))};this.checkStripePaymentIntentStatus=function(e){return __awaiter(t,[e],void 0,(function(e){var o,t,n,r,i,s,a,d,l;var f=e.triggeredButton;return __generator(this,(function(e){switch(e.label){case 0:o=f===null||f===void 0?void 0:f.matches("#".concat(ke));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;r=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!o){ge("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}ge("Payment intent exist, checking stripe payment intent status");if(!r){ge("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,u({clientSecret:r})];case 1:s=e.sent(),a=s.error,d=s.status;l=new URLSearchParams(window.location.search).get("redirect_status");if(l){if(!a){ge("Payment intent is succeeded or in a good state to move forward, show success screen")}else{ge("Payment intent failed, show status from error")}this.open=true;J.checkoutSessionId=i;c.clientSecret=r;void this.setToFinishStep(d);return[2,{shouldAllowOrder:false}]}if(!t){ge("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}ge("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.initializeTestKeys=function(){J.enabledVariantTestKeys=zo(J.enabledVariantTestKeys||[]);var e=ne.enabledVariantTestKeys.map((function(e){var o;var t=(o=J.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){var t=o.testKey;return t===e}));return{expiresAt:(t===null||t===void 0?void 0:t.expiresAt)||Date.now()+X,selectedVariantKey:(t===null||t===void 0?void 0:t.selectedVariantKey)||null,testKey:e}}));$(e);return{allSelected:false}};this.shouldAllowHostedVsNativeTest=function(){if(typeof ne.checkoutSettings.createCartId!=="function"){return false}var e=ne.enabledVariantTestKeys.includes("hosted_vs_native");if(!e){return false}return true};this.registerTestHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:e=this.shouldAllowHostedVsNativeTest();if(!e){return[2]}ge("[TEST] - Registering hosted vs native test");o=ko("hosted_vs_native");if(o){ge("[TEST] - Hosted vs native test already has variant selected: ".concat(o));return[2]}return[4,Ee({testKeys:["hosted_vs_native"]})];case 1:t=r.sent();if(!t){ge("[TEST] - Failed to get selection for hosted vs native test");return[2]}n=bo({baseTestObj:J.enabledVariantTestKeys||[],mergeTestObj:t});$(n);return[2]}}))}))};this.handleHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r,i,s,c;return __generator(this,(function(a){switch(a.label){case 0:o=this.shouldAllowHostedVsNativeTest();if(!o){return[2,{redirected:false}]}t=ko("hosted_vs_native");ge("[TEST] - hosted_vs_native: ".concat(t));if(typeof ne.checkoutSettings.createCartId!=="function"){ge("[TEST] - createCartId is not provided, skipping hosted vs native test");return[2,{redirected:false}]}if(t!=="hosted"){ge("[TEST] - Hosted vs native test is enabled for native, skipping");return[2,{redirected:false}]}if(!((e=ne.genericSettings)===null||e===void 0?void 0:e.hostedCheckoutUrl)){ge("[TEST] - Hosted checkout URL is not provided");return[2,{redirected:false}]}ge('"createCartId" is provided, start building cart');return[4,ne.checkoutSettings.createCartId()];case 1:n=a.sent();i=null;if(typeof n==="object"){r=n.cartId;i=n.shippingData||null}else{r=n}s=vo();c=Le(Object.assign(Object.assign({cartId:r,checkoutSessionId:J.checkoutSessionId||undefined,hostedCheckoutUrl:ne.genericSettings.hostedCheckoutUrl,isTestMode:ae(),isVariantTest:true},s),i));ge("[TEST] - Redirecting to: ".concat(c));window.open(c,"_blank");return[2,{redirected:true}]}}))}))};this.formatDate=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleDateString()};this.formatTime=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(d.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var e=d.selectedLandedCost;if(!e){return null}var o=e.landedCost.amountSubtotals;if(!o){return null}var t=(o.discounts||0)+o.items+o.landedCostTotal+o.shipping;return{settlementAmount:t}};this.prefillBigCommerceCustomerAddresses=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:if(!window.Zonos.isBigCommerce){return[2]}if(this.defaultCustomerProfileAddress.length){return[2]}e=Array.isArray(this.defaultAddress)&&this.defaultAddress.length>0||!Array.isArray(this.defaultAddress)&&typeof this.defaultAddress==="object"&&this.defaultAddress!==null;if(e){return[2]}return[4,V()];case 1:o=r.sent();if(!o){return[2]}return[4,G(o)];case 2:t=r.sent();if(!Q(t)){return[2]}n=co(t,{isShippable:function(e){return uo(false,e)},selectedCountryCode:W.selectedCountryCode||undefined});if(!n.length){return[2]}if(this.defaultCustomerProfileAddress.length){return[2]}this.defaultCustomerProfileAddress=n;ge("Prefilled ".concat(String(n.length)," BigCommerce customer address(es) for logged-in shopper"),"info");return[2]}}))}))};this.getDefaultAddress=function(){if(t.defaultCustomerProfileAddress.length){return t.defaultCustomerProfileAddress}if(Array.isArray(t.defaultAddress)&&t.defaultAddress.length){return t.defaultAddress}if(!Array.isArray(t.defaultAddress)&&typeof t.defaultAddress==="object"){return[t.defaultAddress]}return t.defaultAddressParams};this.handleHostedOpenWindowCallback=function(e){var o;var t=(o=ne.genericSettings)===null||o===void 0?void 0:o.hostedCheckoutUrl;if(!origin){return}var n=["dev.checkout.elements.zonos.com"].some((function(o){return e.origin.includes(o)}));if(e.origin!==t&&!n){return}switch(e.data.type){case"zonos-checkout-session-update":J.checkoutSessionId=e.data.checkoutSessionId;break}};this.captureParamsRedirectedForVariantTest=function(){var e=new URL(window.location.href);var o=e.searchParams.get("zonosVariantTest")==="1";if(!o){return}var t=e.searchParams.get("zonosCheckoutSessionId");if(t){J.checkoutSessionId=t}var n=J.enabledVariantTestKeys||[];if(window.Zonos.isLegacyCheckout){var r=ko("hosted_vs_native");if(!r){n.push({expiresAt:Date.now()+X,selectedVariantKey:"hosted",testKey:"hosted_vs_native"});$(n)}else{$(n.map((function(e){if(e.testKey==="hosted_vs_native"){return Object.assign(Object.assign({},e),{selectedVariantKey:"hosted"})}return e})))}}e.searchParams.delete("zonosCheckoutSessionId");e.searchParams.delete("zonosVariantTest");window.history.replaceState({},"",e.toString())}}e.prototype.initCartInfoHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=e.detail;void l({adjustments:d.adjustments,cartItems:o});return[2]}))}))};e.prototype.handleKeyPress=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(e.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};e.prototype.closeDialogHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(e===null||e===void 0?void 0:e.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;M({event:"zonos-checkout-close",metadata:{checkoutSessionId:J.checkoutSessionId}});this.open=this.forceDialogOpen||false;if(!this.preview&&d.step==="finish"){f()}if(!this.preview){h()}d.step="customer-info";v();m();(t=(o=ne.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(o);return[2]}))}))};e.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,c,i,s,s,a,u,i,f,h,v,m;return __generator(this,(function(w){switch(w.label){case 0:if(!(typeof ne.checkoutSettings.createCartId==="function"))return[3,4];ge('"createCartId" is provided, start building cart');d.customMessage=[];return[4,ne.checkoutSettings.createCartId()];case 1:e=w.sent();o=void 0;if(typeof e==="object"){ge("object detected, use cartId and prefill address from createCartId","info",e);o=e.cartId;this.useShippingDataFromCreateCartId(e.shippingData);d.customerAuthenticationToken=e.customerAuthenticationToken||null;d.customMessage=Array.isArray(e.customMessage)?e.customMessage.filter((function(e){return typeof e==="string"})):[]}else{o=e}window.Zonos.cartId=o;return[4,Co(o)];case 2:t=w.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){de("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;r=se(n),i=r.adjustments,s=r.cartItems;return[4,l({adjustments:i,cartItems:s})];case 3:w.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];ge("tempCartUUID is provided, start building cart");c=se(window.Zonos.cartData),i=c.adjustments,s=c.cartItems;return[4,l({adjustments:i,cartItems:s})];case 5:w.sent();return[3,9];case 6:if(!(ne.checkoutSettings.buildCartDetail&&W.selectedCountryCode))return[3,9];ge("build cart detail");return[4,ne.checkoutSettings.buildCartDetail({countryCode:W.selectedCountryCode,currencyCode:W.targetCurrency})];case 7:s=w.sent();a=s.filter((function(e){return e.amount>=0}));u=s.filter((function(e){return e.amount<0}));ge("cartItems","info",{cartItems:s});i=u.map((function(e){return{amount:e.amount,currencyCode:e.currencyCode,description:e.name||e.description||"",productId:e.productId||null,sku:e.sku||null,type:"CART_TOTAL"}}));return[4,l({adjustments:i,cartItems:a})];case 8:w.sent();w.label=9;case 9:if(!!J.checkoutSessionId)return[3,11];return[4,g()];case 10:f=w.sent();ge("stripeStoreInitCheckoutSession: ".concat(f));if(!f){return[2,false]}w.label=11;case 11:if(!d.isStagingMode){void p()}return[4,this.applyStripeTheme()];case 12:w.sent();h=ne.checkoutSettings,v=h.successBehavior,m=h.successRedirectUrl;this.isRedirectAfterOrder=v==="REDIRECT_TO_SUCCESS_PAGE"||v==="CLOSE_MODAL"&&!!m||!!d.externalConfirmationPageURL;return[2,true]}}))}))};e.prototype.reloadCheckoutSession=function(){window.location.reload()};e.prototype.handleOrderDuplication=function(){var e=ue(localStorage.getItem("zonos--placed-order-info"));if(!e){localStorage.removeItem("zonos--placed-order-info");return}var o=Date.now()-e.time;ge("=== Existing placed order info: ".concat(e.orderId," - ").concat(this.formatDate(e.time)," - elapsed in hh:ss format: ").concat(new Date(o).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||Ao;if(o>t){ge("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=e;ge("=== Showing order duplication confirmation","warn")};e.prototype.recordCheckoutInfo=function(){if(!J.checkoutSessionId){return}void me({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:J.checkoutSessionId})};e.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!J.checkoutSessionId){return}void me({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:J.checkoutSessionId})};e.prototype.markTheSessionAsAbandonedCart=function(){if(!J.checkoutSessionId){return}void me({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:J.checkoutSessionId})};e.prototype.handleCancelOrderDuplication=function(){var e;this.placedOrderInfo=null;if(this.isLegacyCheckout){var o=((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||ne.onlineStoreSettings.url;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}void this.closeDialogHandler({confirmed:true})};e.prototype.attachCheckout=function(){var e=this;var o=ne.checkoutSettings.placeOrderButtonSelector;var t=ne.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;var n=!!document.querySelector("#".concat(ke));ge("attach checkout ".concat(o));ge("attach checkout to always trigger international checkout selector: ".concat(t));if(!o&&!t&&!window.Zonos.cartData&&!n){return}var r=[o,t,"#".concat(be),"#".concat(ke),"#".concat(ye)].filter(Boolean);var i=document.querySelectorAll(r.join(","));i.forEach((function(n){var r=n.getAttribute("data-zonos-checkout-attached");if(r){return}ge("attached event to button ".concat(o),"info",{button:n});n.addEventListener("click",(function(o){return __awaiter(e,void 0,void 0,(function(){var e,r,i,s,a,u,l,f,h,v,m,g,p,b,_,C,x,S;return __generator(this,(function(T){switch(T.label){case 0:i=performance.now();s=t&&n.matches(t);a=n.matches("#".concat(ye));u=n.matches("#".concat(be))||n.matches("#".concat(ke));if(!window.Zonos.isLegacyCheckout&&(!uo()||ao())&&!s&&!a&&!u){return[2]}o.preventDefault();o.stopPropagation();ge("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:o.target})];case 1:l=T.sent().shouldAllowOrder;if(!l){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void go()}),2e3)}if(!yo("hosted_vs_native"))return[3,4];this.isOverlayLoading=true;return[4,this.registerTestHostedVsNative()];case 2:T.sent();return[4,this.handleHostedVsNative()];case 3:f=T.sent().redirected;this.isOverlayLoading=false;if(f){return[2]}T.label=4;case 4:if(!window.Zonos.isBigCommerce)return[3,7];return[4,Ze()];case 5:h=T.sent().shouldBypass;if(h){ge("Bypass customer group detected, redirecting to BigCommerce native checkout","info");window.location.href=De("/checkout");return[2]}return[4,eo()];case 6:v=T.sent();if(v.shouldForceLogin&&v.redirectUrl){window.location.href=v.redirectUrl;return[2]}T.label=7;case 7:c.isFetchingSession=true;this.open=true;T.label=8;case 8:T.trys.push([8,11,,12]);return[4,this.buildCartAndInit()];case 9:m=T.sent();if(!m){throw new Error("Error building cart")}(e=window.opener)===null||e===void 0?void 0:e.postMessage({checkoutSessionId:J.checkoutSessionId,type:"zonos-checkout-session-update"},"*");w({isPreview:this.preview,sessionTimeout:Io});M({event:"zonos-checkout-start",metadata:{checkoutSessionId:J.checkoutSessionId}});g=J.checkoutSessionId;void z({checkoutSessionId:g,eventName:"checkout_open"});return[4,Ue()];case 10:p=T.sent().enabled;d.shouldHideDiscountInput=!p;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void po()}else{b=performance.now();_=b-i;void wo({loadTime:_})}this.recordCheckoutInfo();C=!!_e();if(C){this.markTheSessionAsAbandonedCart()}return[3,12];case 11:x=T.sent();if(x instanceof Error){S=x.message;if(S==="Cart is expired."){this.isCartExpired=true}}c.isFetchingSession=false;de(x);if(this.isCartExpired){c.isFetchingSession=true;return[2]}void fe({endpoint:"Error creating Checkout",errors:[x instanceof Error?x.toString():"Unknown error"],metadata:{allLogs:we,cartId:window.Zonos.cartId,checkoutSessionBody:k(),href:window.location.href,storeBaseUrl:((r=window.Zonos.cartData)===null||r===void 0?void 0:r.storeBaseUrl)||ne.onlineStoreSettings.url}});y({messages:[ee("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:ee("Error creating Checkout")});return[3,12];case 12:return[2]}}))}))}),{capture:true,passive:false});if(!ne.checkoutSettings.disablePlaceOrderButtonActivation){n.removeAttribute("disabled")}n.setAttribute("data-zonos-checkout-attached","true");if(n.matches("#".concat(be))){n.dispatchEvent(xe("click"));b();n.remove()}if(n.matches("#".concat(ke))){n.dispatchEvent(xe("click"));n.remove()}}))};e.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};e.prototype.useShippingDataFromCreateCartId=function(e){if(!e){return}ge("shipping data from createCartId result","info",Object.entries(e));var o=e.customerAddress1,t=e.customerAddress2,n=e.customerCity,r=e.customerCountry,i=e.customerEmail,s=e.customerFirstName,c=e.customerLastName,a=e.customerName,u=e.customerPhone,d=e.customerState,l=e.customerZip;var f=new URLSearchParams(window.location.search);var h=r||q(f)||W.selectedCountryCode;this.applyPrefillAddress({customerAddress1:o,customerAddress2:t,customerCity:n,customerCountry:h,customerEmail:i,customerFirstName:s,customerLastName:c,customerName:a,customerPhone:u,customerState:d,customerZip:l})};e.prototype.useLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);ge("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return null}return t};var t=q(e)||W.selectedCountryCode;var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerFirstName");var u=o("customerLastName");var d=o("customerPhone");var l=o("customerZip");var f=o("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:a,customerLastName:u,customerName:c,customerPhone:d,customerState:f,customerZip:l})};e.prototype.applyPrefillAddress=function(e){var o=e.customerAddress1||"";var t=e.customerCountry||"";var n=e.customerAddress2||"";var r=e.customerCity||"";var i=e.customerEmail||"";var s=e.customerFirstName&&e.customerLastName?"".concat(e.customerFirstName," ").concat(e.customerLastName):e.customerName||"";var c=e.customerPhone||"";var a=e.customerZip||"";var u=e.customerState||"";if(!o||!s||!c||!t){ge("Missing required query params so it can not be prefilled","info",[!o&&"line1",!s&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&W.shippingZoneCountries&&!(t in W.shippingZoneCountries)){ge('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:r||"",country:t,line1:o,line2:n,postal_code:a,state:u},email:i,name:s,phone:c}];ge("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:e})};e.prototype.overrideStagingModeChanged=function(){d.isStagingMode=!!this.overrideStagingMode};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e;var o=this;return __generator(this,(function(t){c.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;d.isStagingMode=he();if(typeof this.overrideStagingMode!=="undefined"){d.isStagingMode=this.overrideStagingMode}He();$e();ro();this.handleBigcommerceInternationalResumeFlag();void this.prefillBigCommerceCustomerAddresses();ho({domesticRedirectedBtnSelector:be,onInternationalCheckoutSelected:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.detectedDomesticCheckoutDialogOpen=true;return[4,new Promise((function(e){return setTimeout(e,2e3)}))];case 1:e.sent();return[2]}}))}))},onLoggedInInternationalAddressDetected:function(){return new Promise((function(e){o.loggedInIntlAddressResolver=e;o.loggedInIntlAddressConfirmDialogOpen=true}))},onShippingAddressSessionFound:function(e){o.defaultAddress=[{address:{city:e.city,country:e.countryCode,line1:e.address1,line2:e.address2,postal_code:e.postalCode,state:e.state},email:"",name:"".concat(e.firstName," ").concat(e.lastName),phone:e.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}e=setInterval((function(){c.stripe=window.Zonos.stripe;o.stripe=window.Zonos.stripe;if(!o.stripe){ge("waiting for stripe to be loaded");return}if(o.storybookPaymentStatusOverride){clearInterval(e);return}ge("init checkout");if(o.preview||o.forceDialogOpen){void o.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){o.attachCheckout()}else if(window){o.attachCheckout();var t=new MutationObserver((function(){o.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};e.prototype.handleBigcommerceInternationalResumeFlag=function(){if(!window.Zonos.isBigCommerce){return}var e=new URL(window.location.href);if(e.searchParams.get(Pe)!=="true"){return}e.searchParams.delete(Pe);window.history.replaceState({},"",e.toString());var o=Date.now();var t=setInterval((function(){if(!W.localizationLoaded||!W.selectedCountryCode){if(Date.now()-o>15e3){clearInterval(t);ge("BigCommerce international checkout resume flag: localization did not initialize within 15s","info")}return}var e=document.querySelector("#".concat(ye));if(e){clearInterval(t);e.dispatchEvent(xe("click"));return}if(Date.now()-o>15e3){clearInterval(t);ge("BigCommerce international checkout resume flag: trigger button did not mount within 15s","info")}}),200)};e.prototype.setToFinishStep=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){d.step="finish";this.storybookPaymentStatusOverride=e;return[2]}))}))};e.prototype.mockCheckoutSession=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){_(e);return[2]}))}))};e.prototype.triggerCheckoutInternational=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=document.querySelector("#".concat(ye));if(e){e.dispatchEvent(xe("click"))}return[2]}))}))};e.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,a;var u=this;return __generator(this,(function(l){switch(l.label){case 0:M({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:J.checkoutSessionId}});r=J.checkoutSessionId;void z({checkoutSessionId:r,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,C()];case 1:i=l.sent().isRequestNotReady;if(i&&d.addressFormRenderType==="stripe"){void fe({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:(o=(e=c.stripeAddressEventData)===null||e===void 0?void 0:e.value)===null||o===void 0?void 0:o.address,billingAddress:(n=(t=c.stripeBillingAddressEventData)===null||t===void 0?void 0:t.value)===null||n===void 0?void 0:n.address,cartId:window.Zonos.cartId}})}s=function(e){if(d.step!=="customer-info"){clearInterval(e);return}if(!c.isFetchingLandedCost){if(d.landedCostData){void Z({currency:d.currency});x()}u.submitLoading=false;if(e){clearInterval(e)}}};s();a=setInterval((function(){s(a)}),20);setTimeout((function(){clearInterval(a)}),1e4);return[2]}}))}))};e.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){x();return[2]}))}))};e.prototype.handleInventoryCheckDialogConfirm=function(){d.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};e.prototype.handleCartExpiredDialogConfirm=function(){var e;this.isCartExpired=false;if(this.isLegacyCheckout){var o=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};e.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,a,u,l,f;return __generator(this,(function(h){switch(h.label){case 0:e=c.checkoutSettlementCurrency==="USD";if(e&&c.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;o=S();h.label=1;case 1:h.trys.push([1,,18,19]);H.paypalErrorMessage=null;c.hasPaymentError=false;this.submitLoading=true;d.inventoryCheckErrorMessage=null;return[4,T()];case 2:t=h.sent();if(!t){c.hasPaymentError=true;c.customErrorMessage=ee("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:c.checkoutSettlementCurrency});this.submitLoading=false;return[2]}h.label=3;case 3:h.trys.push([3,5,,6]);n=d;return[4,I()];case 4:n.inventoryCheckErrorMessage=h.sent();return[3,6];case 5:r=h.sent();d.inventoryCheckErrorMessage=ee("Unable to check inventory. Please try again.");return[3,6];case 6:if(d.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i=R();if(!(i>0))return[3,8];return[4,A()];case 7:s=h.sent();if(!s.success){c.hasPaymentError=true;c.customErrorMessage=s.error||ee("Unable to apply store credit. Please try again.");this.submitLoading=false;return[2]}h.label=8;case 8:if(!O())return[3,14];h.label=9;case 9:h.trys.push([9,12,,13]);return[4,U()];case 10:a=h.sent();if(!a.valid){c.hasPaymentError=true;c.customErrorMessage=a.errorMessage;this.submitLoading=false;return[2]}return[4,E()];case 11:u=h.sent();if(!u.success){c.hasPaymentError=true;c.customErrorMessage=u.error||ee("Unable to place order with store credit. Please try again.");this.submitLoading=false;return[2]}x();m();return[3,13];case 12:l=h.sent();de(l);M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:J.checkoutSessionId}});c.hasPaymentError=true;return[3,13];case 13:this.submitLoading=false;return[2];case 14:h.trys.push([14,16,,17]);return[4,L()];case 15:h.sent();x();m();return[3,17];case 16:f=h.sent();de(f);M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:J.checkoutSessionId}});c.hasPaymentError=true;if(c.shouldInventoryRefund){void P();c.shouldInventoryRefund=false}return[3,17];case 17:this.submitLoading=false;return[3,19];case 18:if(o){B.locked=false}return[7];case 19:return[2]}}))}))};e.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:N();if(!this.preview)return[3,2];d.step="customer-info";return[4,this.init()];case 1:r.sent();return[2];case 2:f();h();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){e=window.Zonos.cartData.storeBaseUrl||ne.onlineStoreSettings.url;if(window.parent){window.parent.location.href=e}window.location.href=e;return[2]}o=window.location.href;t=o.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};e.prototype.handleWindowResize=function(){this.isMobile=ve(this.mobile);void this.applyStripeTheme();ge("mobile: ".concat(this.isMobile))};e.prototype.handleMobileChange=function(){this.isMobile=ve(this.mobile);void this.applyStripeTheme();ge("mobile: ".concat(this.isMobile))};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=re(this.appearanceSettingsOverride.theme)}};e.prototype.handleAddressChange=function(){N()};e.prototype.handleCustomerProfileChange=function(){var e,o;if(!this.customerProfile){ge("No customer profile","info");this.defaultCustomerProfileAddress=[];return}ge("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((o=(e=c.customerProfile)===null||e===void 0?void 0:e.locations)===null||o===void 0?void 0:o.map((function(e){var o;return{address:{city:e.locality,country:e.countryCode,line1:e.line1,line2:e.line2||"",postal_code:e.postalCode,state:e.administrativeArea},email:e.email||((o=c.customerProfile)===null||o===void 0?void 0:o.email)||"",name:e.name||"",phone:e.phone||""}})))||[]};e.prototype.handleClientSecretChange=function(){ge("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};e.prototype.handleOpenChange=function(){var e="data-zonos-overflow-origin";var o=document.body;var t=document.documentElement;if(this.open){window.Zonos.openHelloDialog(false);if(o.style.overflow){o.setAttribute(e,o.style.overflow)}o.style.overflow="hidden";if(t.style.overflow){t.setAttribute(e,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var n=o.getAttribute(e);var r=t.getAttribute(e);if(n){o.removeAttribute(e);o.style.overflow=n}else{o.style.removeProperty("overflow")}if(r){t.removeAttribute(e);t.style.overflow=r}else{t.style.removeProperty("overflow")}}};e.prototype.componentWillLoad=function(){var e=this;void this.init();this.isMobile=ve(this.mobile);this.isIframed=window.self!==window.top;ge("iframed: ".concat(this.isIframed));if(window.Zonos.isLegacyCheckout){this.captureParamsRedirectedForVariantTest()}this.handleAppearanceSettingsOverrideChange();this.storeUnsubscribeList=[oe("selectedLocale",(function(){void e.applyStripeTheme()})),D("selectedShippingOption",(function(){var o,t,n,r;var i=d.selectedShippingOption;if(((o=ne.genericSettings)===null||o===void 0?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&((n=(t=i===null||i===void 0?void 0:i.shippingProfile)===null||t===void 0?void 0:t.serviceLevel.code)===null||n===void 0?void 0:n.toLowerCase().startsWith("fedex."))&&((r=c.stripeAddressEventData)===null||r===void 0?void 0:r.value.address.country)==="CA"){e.shouldShowFedexShippingConsentDialog=true}})),j("stripeAddressEventData",(function(o){var t;if(!window.Zonos.isBigCommerce||!o||e.redirectToDomesticCheckoutDialogOpen||!((t=ne.genericSettings)===null||t===void 0?void 0:t.isBigcommerceDomesticCheckoutRedirectEnabled)||ne.sourceCurrency!=="USD"){return}if(!e.open){return}if(window.location.pathname.includes("/checkout")){return}var n=o.value.address.country;if(n&&ne.disabledCountries.includes(n)){e.redirectToDomesticCheckoutDialogOpen=true;ge("Domestic country ".concat(n," selected in international checkout, redirecting to BigCommerce domestic checkout"),"info");setTimeout((function(){window.location.href=De("/checkout")}),2e3)}}))];this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);ge("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){N();f();h();this.storeUnsubscribeList.forEach((function(e){return e()}));window.removeEventListener("message",this.handleHostedOpenWindowCallback)};e.prototype.render=function(){var e=this;var o,i,s,a;this.customerProfile=c.customerProfile;this.clientSecret=c.clientSecret;if(c.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret}var u=d.step!=="finish"&&d.step!=="error"&&!c.stripeElements||c.isFetchingSession;var l=ie(ne.appearance,this.appearanceSettingsOverride||null),f=l.colorPrimary,h=l.colorSecondary,v=l.logoUrl,m=l.style;var g=ne.appearance.zonosAttribution==="ENABLED";var p=ne.appearance.theme;var w=f&&Te(f)?"DARK":"LIGHT";var z=this.isMobile?p:w;var k=!this.isMobile?h:undefined;var y=W.customMessages;var b=(o=y.find((function(e){return e.pageName==="checkout_default"})))===null||o===void 0?void 0:o.message;var _=this.getCurrentLocalePageEnum();var C=y.filter((function(e){return e.pageName===_}));var x=this.getBaseCurrencySettlementInfo();var S=function(){var o=e.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(ne.organizationName," logo"),src:o}))};var T=ae();var I=function(){var o=new URLSearchParams(window.location.search);var n=o.get("zonosQaUrl");var r=o.get("zonosDebug");var i=o.get("zonosE2ETest");var s=e.overrideStagingMode||he();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},S(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},ee("Test mode")),s&&t("zonos-badge",{badgeColor:"red",size:"small"},ee("Staging mode")),r==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:e.isMobile?"--zonos-elements-gray-0":null}),C.map((function(e){return t("zonos-custom-message",{icon:xo,message:e.message})})))};var A=function(){if(d.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:ee("Your checkout session has expired. Please reload the page to continue."),restStateTitle:ee("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},ee("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":Se({overrideBorderStyle:m})}},d.step!=="finish"&&d.step!=="error"&&t(n,null,t("div",{class:"zonos--left","data-theme":z,style:Ie({"--zonos--primary-color":!e.isMobile?f:undefined})},!e.isMobile&&I(),d.step==="customer-info"&&t("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:k}),d.step==="shipping"&&t("zonos-shipping",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:k}),d.step==="payment"&&t("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:e.sent();return[2]}}))}))},submitBtnColor:k})),t("div",{class:"zonos--right","data-theme":p},e.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!e.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:Ae}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),t("zonos-collapse",{collapsed:e.collapseReviewMobile&&e.isMobile},t("zonos-cart-items",null),e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:k}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:xo,message:b})))),t("zonos-cart-restricted-items",null),!e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:xo,message:b}))))),(d.step==="finish"||d.step==="error")&&t("div",{class:"zonos--done","data-theme":p},t("div",{class:"zonos--header"},S(),!e.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:Ae}),noBackground:true,onClick:function(){return e.handleFinishClick()},theme:p})),t("zonos-checkout-finish",{borderRadius:m,onCloseClick:function(){return e.handleFinishClick()},overrideNotification:d.step==="error"&&!!d.error?Object.assign(Object.assign({},d.error),{type:"error"}):undefined,storybookForceStatus:e.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":p,mobile:e.isMobile,slot:!e.isMobile?"dialog-footer":undefined}))};return t(r,{class:Ce(["zonos--checkout zonos--elements",d.step==="payment"&&"zonos--processing-payment",g&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?A():t("zonos-dialog",{borderStyle:m,class:"zonos--checkout-dialog","data-theme":p,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialogHandler()},open:this.open,width:"1200px"},A()),t("zonos-dialog",{isLoading:true,loadingText:ee("You will be redirected to international checkout shortly."),loadingTitle:ee("We detected that you are shipping to an international address."),noClickOutside:true,noCloseButton:true,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),t("zonos-dialog",{isLoading:true,loadingText:ee("You will be redirected to domestic checkout shortly."),loadingTitle:ee("We detected that you are shipping to a domestic address."),noClickOutside:true,noCloseButton:true,open:this.redirectToDomesticCheckoutDialogOpen,width:"450px"}),t("zonos-confirm-dialog",{class:"zonos--logged-in-intl-address-dialog",dialogCancelBtnText:ee("Stay on this page"),dialogConfirmBtnText:ee("Continue to international checkout"),dialogIntent:"info",dialogOpen:this.loggedInIntlAddressConfirmDialogOpen,dialogSubtitle:ee("Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?"),dialogTitle:ee("International shipping address detected"),dialogWidth:480,onCancelClicked:function(){var o;e.loggedInIntlAddressConfirmDialogOpen=false;(o=e.loggedInIntlAddressResolver)===null||o===void 0?void 0:o.call(e,"stay");e.loggedInIntlAddressResolver=null},onConfirmClicked:function(){var o;e.loggedInIntlAddressConfirmDialogOpen=false;(o=e.loggedInIntlAddressResolver)===null||o===void 0?void 0:o.call(e,"redirect");e.loggedInIntlAddressResolver=null}}),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:ee("Don't close"),dialogConfirmBtnText:ee("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:ee("Would you like to close checkout and return to the site?"),dialogTitle:ee("Are you sure?"),onCancelClicked:function(){e.confirmDialogOpen=false},onConfirmClicked:function(){return e.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:ee("Return to merchant site"),dialogConfirmBtnText:ee("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((i=this.placedOrderInfo)===null||i===void 0?void 0:i.zonosOrderNumber)?ee("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):ee("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((s=this.placedOrderInfo)===null||s===void 0?void 0:s.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:ee("Are you sure?"),dialogWidth:530,onCancelClicked:function(){e.handleCancelOrderDuplication()},onConfirmClicked:function(){e.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:ee("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:t(n,null,ee("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),t("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},ee("View GAA Form."))),dialogTitle:ee("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:function(){return e.shouldShowFedexShippingConsentDialog=false}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:ee("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:ee("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return e.handleInventoryCheckDialogConfirm()}}),x&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:ee("Cancel"),dialogConfirmBtnText:ee("Pay [orderTotal]",{orderTotal:te({amount:x.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:ee("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:ee("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){e.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return e.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:ee("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:ee("You are being sent back to the shop to re-add items to your cart."),dialogTitle:ee("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return e.handleCartExpiredDialogConfirm()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}());Oo.style=To}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function c(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):r(e.value).then(s,c)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(o){return a([e,o])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=o.call(e,t)}catch(e){c=[6,e];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,r=o.length,i;n<r;n++){if(i||!(n in o)){if(!i)i=Array.prototype.slice.call(o,0,n);i[n]=o[n]}}return e.concat(i||Array.prototype.slice.call(o))};System.register(["./p-7261e245.system.js","./p-d1f2e532.system.js","./p-863cfab2.system.js","./p-d62dab88.system.js","./p-47a1d469.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-a3c116d6.system.js","./p-d938f42f.system.js","./p-40a4c8a2.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-30e9a6d7.system.js","./p-dab78981.system.js","./p-1aa93d1e.system.js","./p-2770ba48.system.js","./p-d706852e.system.js","./p-e977562b.system.js","./p-496accce.system.js"],(function(e){"use strict";var o,t,n,r,i,s,c,a,u,d,l,h,f,v,m,g,p,w,z,k,y,b,_,C,x,S,T,I,A,O,U,E,L,P,B,N,D,j,R,F,M,H,Z,K,V,G,Q,W,Y,q,J,X,$,ee,oe,te,ne,re,ie,se,ce,ae,ue,de,le,he,fe,ve,me,ge,pe,we,ze,ke,ye,be,_e,Ce,xe,Se,Te,Ie,Ae;return{setters:[function(e){o=e.r;t=e.h;n=e.F;r=e.a},function(e){i=e.s;s=e.a;c=e.b;a=e.i;u=e.c;d=e.d;l=e.e;h=e.f;f=e.p;v=e.g;m=e.h;g=e.j;p=e.k;w=e.l;z=e.t;k=e.m;y=e.n;b=e.o;_=e.q;C=e.r;x=e.u;S=e.v;T=e.w;I=e.x;A=e.y;O=e.z;U=e.A;E=e.B;L=e.C;P=e.D;B=e.E;N=e.F;D=e.G;j=e.H;R=e.I},function(e){F=e.p;M=e.s;H=e.a;Z=e.b},function(e){K=e.f;V=e.a;G=e.b;Q=e.i;W=e.l;Y=e.c;q=e.g;J=e.s;X=e.V;$=e.d;ee=e.t;oe=e.e;te=e.h},function(e){ne=e.z;re=e.g;ie=e.m},function(e){se=e.b},function(e){ce=e.h;ae=e.g;ue=e.j;de=e.l;le=e.b;he=e.s;fe=e.a;ve=e.i},function(e){me=e.u},function(e){ge=e.l;pe=e.g;we=e.b},function(e){ze=e._;ke=e.c;ye=e.a;be=e.d;_e=e.g},function(e){Ce=e.c},function(e){xe=e.c},function(e){Se=e.g},function(e){Te=e.i},function(e){Ie=e.s},function(e){Ae=e.R},function(){},function(){},function(){}],execute:function(){var Oe=this;var Ue=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,ce("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=n.sent(),o=e.errors,t=e.json;if(o.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var Ee=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o,t,n,r;var i=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:if(i.length===0){return[2,null]}return[4,ce("/api/zonos-elements/select-variance-test",{body:{testKeys:i},method:"POST"})];case 1:o=e.sent(),t=o.errors,n=o.json;if(t.length||!n){return[2,null]}r=K(n);return[2,r]}}))}))};var Le=function(e){var o=e.cartId,t=e.checkoutSessionId,n=e.customerAddress1,r=e.customerAddress2,i=e.customerCity,s=e.customerCountry,c=e.customerEmail,a=e.customerFirstName,u=e.customerLastName,d=e.customerPhone,l=e.customerState,h=e.customerZip,f=e.hostedCheckoutUrl,v=e.isTestMode,m=e.isVariantTest;var g=new URLSearchParams;g.set("tempCartUUID",o);if(a){g.set("customerFirstName",a)}if(u){g.set("customerLastName",u)}if(c){g.set("customerEmail",c)}if(d){g.set("customerPhone",d)}if(h){g.set("customerZip",h)}if(i){g.set("customerCity",i)}if(l){g.set("customerState",l)}if(s){g.set("zCountry",s)}if(n){g.set("customerAddress1",n)}if(r){g.set("customerAddress2",r)}if(v){g.set("zonosTestMode","1")}if(t){g.set("zonosCheckoutSessionId",t)}if(m){g.set("zonosVariantTest","1")}return"".concat(f,"?").concat(g.toString())};var Pe="isInternationalCheckout";var Be=function(){var e=new URLSearchParams;e.set(Pe,"true");var o=new URLSearchParams(window.location.search);var t=o.get("zonosQaUrl");if(t){e.set("zonosQaUrl",t)}var n=o.get("zonosQaUrlApi");if(n){e.set("zonosQaUrlApi",n)}if(ae()){e.set("zonosTestMode","1")}return"cart.php?".concat(e.toString())};var Ne=function(e){var o=e===void 0?{}:e,t=o.action;var n=new URL("/login.php",window.location.origin);if(t){n.searchParams.set("action",t)}var r=new URLSearchParams(window.location.search);var i=r.get("zonosQaUrl");if(i){n.searchParams.set("zonosQaUrl",i)}var s=r.get("zonosQaUrlApi");if(s){n.searchParams.set("zonosQaUrlApi",s)}if(ae()){n.searchParams.set("zonosTestMode","1")}n.searchParams.set("from",Be());return n.toString()};var De=function(e){var o=new URL(e,window.location.origin);var t=new URLSearchParams(window.location.search).get("zonosQaUrl");if(t){o.searchParams.set("zonosQaUrl",t)}if(ae()){o.searchParams.set("zonosTestMode","1")}return o.toString()};var je={customerGroupId:null,shouldBypass:false};var Re=function(e){return __awaiter(Oe,void 0,void 0,(function(){var o,t,n,r,i,s,c,a,u,d,l,h;return __generator(this,(function(f){switch(f.label){case 0:if(!window.Zonos.isBigCommerce){return[2,{conclusive:true,result:je}]}i=(o=ne.genericSettings)===null||o===void 0?void 0:o.bigcommerceBypassCustomerGroupIds;if(!(i===null||i===void 0?void 0:i.length)){if(ne.loadedConfig){return[2,{conclusive:true,result:je}]}return[2,{conclusive:false,result:je}]}if(!e)return[3,1];c=e.checkoutId;return[3,3];case 1:return[4,V()];case 2:c=f.sent();f.label=3;case 3:s=c;if(!s){ge("BigCommerce bypass check: no active cart yet, will retry on next call","info");return[2,{conclusive:false,result:je}]}if(!e)return[3,4];u=e.checkout;return[3,6];case 4:return[4,G(s)];case 5:u=f.sent();f.label=6;case 6:a=u;if(!a){ge("BigCommerce bypass check: failed to fetch checkout data, will retry","info");return[2,{conclusive:false,result:je}]}d=(r=(n=(t=a.customer)===null||t===void 0?void 0:t.customerGroup)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:null;if(d===null){ge("BigCommerce bypass check: no customer group found (guest user)","info");return[2,{conclusive:true,result:je}]}l=i.includes(d);h={customerGroupId:d,shouldBypass:l};if(l){ge("BigCommerce bypass check: customer group ".concat(String(d)," is in bypass list; caller should keep the user on BC native checkout"),"info")}else{ge("BigCommerce bypass check: customer group ".concat(String(d)," is not in bypass list"),"info")}return[2,{conclusive:true,result:h}]}}))}))};var Fe=null;var Me=function(e){var o=Re(e);var t=o.then((function(e){var o=e.conclusive,n=e.result;if(!o&&Fe===t){Fe=null}return n}));Fe=t;return t};var He=function(){var e;if(!window.Zonos.isBigCommerce){return}var o=(e=ne.genericSettings)===null||e===void 0?void 0:e.bigcommerceBypassCustomerGroupIds;if(!(o===null||o===void 0?void 0:o.length)){return}void Me()};var Ze=function(){var e=[];for(var o=0;o<arguments.length;o++){e[o]=arguments[o]}return __awaiter(Oe,__spreadArray([],e,true),void 0,(function(e){if(e===void 0){e={}}return __generator(this,(function(o){if(e.forceRefresh||!Fe){return[2,Me(e.preFetched)]}return[2,Fe]}))}))};var Ke={guestCheckoutType:null};var Ve=60*60*1e3;var Ge="zonos--bc-checkout-settings";var Qe=function(e){try{var o=window.localStorage.getItem(Ge);if(!o){return null}var t=ue(o);if(!t){return null}if(t.storeHash!==e){return null}if(t.expiresAt<Date.now()){return null}return{guestCheckoutType:t.guestCheckoutType}}catch(e){return null}};var We=function(e,o){try{var t={expiresAt:Date.now()+Ve,guestCheckoutType:o.guestCheckoutType,storeHash:e};window.localStorage.setItem(Ge,JSON.stringify(t))}catch(e){}};var Ye=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o,t,n,r,i,s;return __generator(this,(function(c){switch(c.label){case 0:if(!window.Zonos.isBigCommerce){return[2,Ke]}o=(e=ne.checkoutSettings.bigCommerceConfig)===null||e===void 0?void 0:e.storeHash;if(!o){ge("BigCommerce checkout settings: no storeHash provided — skipping fetch","info");return[2,Ke]}t=Qe(o);if(t){return[2,t]}return[4,ce("/api/bigcommerce/checkout-settings",{body:{storeHash:o},method:"POST"})];case 1:n=c.sent(),r=n.errors,i=n.json;if(r.length||!i){ge("BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior","info");return[2,Ke]}s={guestCheckoutType:i.guestCheckoutType};We(o,s);return[2,s]}}))}))};var qe={redirectUrl:null,shouldForceLogin:false};var Je=null;var Xe=function(){if(!Je){var e=Ye().then((function(o){var t=o.guestCheckoutType;if(!t){if(Je===e){Je=null}return false}return t==="no_guest_checkout"})).catch((function(){if(Je===e){Je=null}return false}));Je=e}return Je};var $e=function(){if(!window.Zonos.isBigCommerce){return}void Xe()};var eo=function(){var e=[];for(var o=0;o<arguments.length;o++){e[o]=arguments[o]}return __awaiter(Oe,__spreadArray([],e,true),void 0,(function(e){var o,t,n,r,i;var s=e===void 0?{}:e,c=s.preFetched;return __generator(this,(function(e){switch(e.label){case 0:if(!window.Zonos.isBigCommerce){return[2,qe]}return[4,Xe()];case 1:o=e.sent();if(!o){return[2,qe]}if(!c)return[3,2];n=c.checkoutId;return[3,4];case 2:return[4,V()];case 3:n=e.sent();e.label=4;case 4:t=n;if(!t){return[2,qe]}if(!c)return[3,5];i=c.checkout;return[3,7];case 5:return[4,G(t)];case 6:i=e.sent();e.label=7;case 7:r=i;if(!r){ge("BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue","info");return[2,qe]}if(Q(r)){return[2,qe]}ge("BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php","info");return[2,{redirectUrl:Ne(),shouldForceLogin:true}]}}))}))};var oo="data-zonos-login-from-rewritten";var to='a[href*="login.php?action=create_account"]:not(['+oo+"])";var no=function(){var e=document.querySelectorAll(to);if(!e.length){return}var o=Ne({action:"create_account"});e.forEach((function(e){e.setAttribute("href",o);e.setAttribute(oo,"true")}))};var ro=function(){if(!window.Zonos.isBigCommerce){return}if(!window.location.pathname.includes("/login.php")){return}no();var e=new MutationObserver((function(){no()}));e.observe(document.body,{childList:true,subtree:true});setTimeout((function(){return e.disconnect()}),1e4)};var io=function(e,o){if(!e.address1||!e.countryCode){return null}var t=[e.firstName,e.lastName].filter(Boolean).join(" ").trim();return{address:{city:e.city||"",country:e.countryCode,line1:e.address1,line2:e.address2||"",postal_code:e.postalCode||"",state:e.stateOrProvinceCode||e.stateOrProvince||""},email:o,name:t,phone:e.phone||""}};var so=function(e){return[e.address.line1,e.address.line2||"",e.address.postal_code,e.address.country].join("|").toLowerCase()};var co=function(e,o){var t,n,r,i;if(!((t=e===null||e===void 0?void 0:e.customer)===null||t===void 0?void 0:t.id)){return[]}var s=o.isShippable,c=o.selectedCountryCode;var a=e.customer.email||"";var u=(r=(n=e.consignments)===null||n===void 0?void 0:n.flatMap((function(e){return e.shippingAddress?[e.shippingAddress]:[]})))!==null&&r!==void 0?r:[];var d=(i=e.customer.addresses)!==null&&i!==void 0?i:[];var l=new Set;var h=[];for(var f=0,v=__spreadArray(__spreadArray([],d,true),u,true);f<v.length;f++){var m=v[f];var g=io(m,a);if(!g){continue}if(!s(g.address.country)){continue}var p=so(g);if(l.has(p)){continue}l.add(p);h.push(g)}if(!c){return h}return h.map((function(e,o){return{index:o,option:e}})).sort((function(e,o){var t=e.option.address.country===c;var n=o.option.address.country===c;if(t===n){return e.index-o.index}return t?-1:1})).map((function(e){return e.option}))};var ao=function(e){if(e===void 0){e=true}if(!W.localizationLoaded){return true}if(W.isDisabledCountry){if(e){ge("Checkout: disabled country")}return true}return false};var uo=function(e,o){if(e===void 0){e=true}var t;if(!W.localizationLoaded){return false}if(o){var n=!!((t=W.shippingZoneCountries)===null||t===void 0?void 0:t[o])&&!ne.disabledCountries.includes(o);if(e&&!n){ge("Checkout: ".concat(o," is not a shippable country: ").concat(n))}return n}if(!W.isShippableCountry){if(e){ge("Checkout: not shippable country")}return false}return true};var lo='select[name="shippingAddress.countryCode"]';var ho=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o,t,n,r,i,c,a,u,d,l,h,f,v,m,g,p,w,z;var k=e.onInternationalCheckoutSelected,y=e.onLoggedInInternationalAddressDetected;return __generator(this,(function(e){switch(e.label){case 0:return[4,V()];case 1:h=e.sent();if(!h){return[2,"noAction"]}return[4,G(h)];case 2:f=e.sent();v={checkout:f,checkoutId:h};return[4,Ze({preFetched:v})];case 3:m=e.sent().shouldBypass;if(m){return[2,"noAction"]}g=(t=(o=f===null||f===void 0?void 0:f.consignments)===null||o===void 0?void 0:o[0])===null||t===void 0?void 0:t.shippingAddress;if(!(g===null||g===void 0?void 0:g.countryCode)){return[2,"noAction"]}p=g.countryCode;if(!uo(false,p)){return[2,"noAction"]}ge(y?"Logged-in user has international shipping address: ".concat(p,", prompting user to choose checkout"):"Logged-in user has international shipping address: ".concat(p,", redirecting automatically (legacy behavior)"),"info");if(!y)return[3,5];return[4,y()];case 4:w=e.sent();if(w==="stay"){ge("User opted to stay on BigCommerce native checkout despite international default address","info");return[2,"optedOut"]}e.label=5;case 5:return[4,eo({preFetched:v})];case 6:z=e.sent();if(z.shouldForceLogin&&z.redirectUrl){window.location.href=z.redirectUrl;return[2,"redirected"]}if(!k)return[3,8];return[4,k()];case 7:e.sent();e.label=8;case 8:Y({isInitializing:false,newSelectedCountryCode:p});s({address1:(n=g.address1)!==null&&n!==void 0?n:"",address2:(r=g.address2)!==null&&r!==void 0?r:"",city:(i=g.city)!==null&&i!==void 0?i:"",countryCode:p,firstName:(c=g.firstName)!==null&&c!==void 0?c:"",lastName:(a=g.lastName)!==null&&a!==void 0?a:"",phone:(u=g.phone)!==null&&u!==void 0?u:"",postalCode:(d=g.postalCode)!==null&&d!==void 0?d:"",state:(l=g.stateOrProvince)!==null&&l!==void 0?l:""});window.location.href=De("/");return[2,"redirected"]}}))}))};var fo=function(e){var o=e.domesticRedirectedBtnSelector,t=e.onInternationalCheckoutSelected,n=e.onLoggedInInternationalAddressDetected,r=e.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var c=function(e){return __awaiter(Oe,void 0,void 0,(function(){var o,n,r,i,c,a,u,d,l,h;return __generator(this,(function(f){switch(f.label){case 0:n=document.querySelector(((o=ne.genericSettings)===null||o===void 0?void 0:o.bigcommerceDomesticCheckoutCountrySelector)||lo);r=(n===null||n===void 0?void 0:n.value)||e;if(!r){return[2,false]}if(!uo(false,r)){return[2,false]}return[4,V()];case 1:i=f.sent();if(!i)return[3,3];return[4,G(i)];case 2:a=f.sent();return[3,4];case 3:a=null;f.label=4;case 4:c=a;u={checkout:c,checkoutId:i};return[4,Ze({forceRefresh:true,preFetched:u})];case 5:d=f.sent().shouldBypass;if(d){ge("Bypass customer group detected on BC checkout, stopping interval","info");return[2,true]}return[4,eo({preFetched:u})];case 6:l=f.sent();if(l.shouldForceLogin&&l.redirectUrl){window.location.href=l.redirectUrl;return[2,true]}if(!t)return[3,8];return[4,t()];case 7:f.sent();f.label=8;case 8:Y({isInitializing:false,newSelectedCountryCode:r});h={address1:"",address2:"",city:"",countryCode:r,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};s({address1:h.address1,address2:h.address2,city:h.city,countryCode:h.countryCode,firstName:h.firstName,lastName:h.lastName,phone:h.phone,postalCode:h.postalCode,state:h.stateOrProvince});window.location.href=De("/");return[2,true]}}))}))};var a=false;var u=false;var d=false;var l=false;var h=false;var f=new MutationObserver((function(){return __awaiter(Oe,void 0,void 0,(function(){var e,s,v,m,g,p,w,z,k,y;var b=this;return __generator(this,(function(_){switch(_.label){case 0:s=document.querySelector(o);v=i();if(!s&&v){m=document.createElement("button");m.style.display="none";m.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(m);r===null||r===void 0?void 0:r(v);f.disconnect();return[2]}g=window.location.pathname.includes("/checkout")&&window.Zonos.isBigCommerce;if(!g){f.disconnect();return[2]}if(!(!l&&!d))return[3,5];d=true;h=true;_.label=1;case 1:_.trys.push([1,3,4,5]);return[4,ho({onInternationalCheckoutSelected:t,onLoggedInInternationalAddressDetected:n})];case 2:p=_.sent();if(p==="redirected"){f.disconnect();return[2]}if(p==="optedOut"){l=true}return[3,5];case 3:w=_.sent();de("Error checking logged-in user shipping address",w);return[3,5];case 4:d=false;h=false;return[7];case 5:z=document.querySelector(((e=ne.genericSettings)===null||e===void 0?void 0:e.bigcommerceDomesticCheckoutCountrySelector)||lo);if(!z){return[2]}ge("Domestic checkout found - Listening for shipping country change","info",{value:z.value});if(u){return[2]}u=true;f.disconnect();k=setInterval((function(){return __awaiter(b,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){switch(t.label){case 0:if(a||h){return[2]}a=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,c()];case 2:e=t.sent();if(e){clearInterval(k);return[2]}a=false;return[3,4];case 3:o=t.sent();a=false;return[3,4];case 4:return[2]}}))}))}),1e3);y=setInterval((function(){var e;if(!window.bcStripeElements){clearInterval(y);return}var o=(e=window.bcStripeElements)===null||e===void 0?void 0:e.getElement("address");if(!o){return}clearInterval(y);o.on("change",(function(e){var o=e.value.address.country;if(o&&!h){void c(o)}}))}),500);return[2]}}))}))}));f.observe(document.body,{childList:true,subtree:true})};var vo=function(){var e=new URLSearchParams(window.location.search);ge("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return""}return t};var t=q(e)||W.selectedCountryCode||"US";var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerPhone");var u=o("customerZip");var d=o("customerState");var l=o("customerFirstName");var h=o("customerLastName");return{customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:l,customerLastName:h,customerName:c,customerPhone:a,customerState:d,customerZip:u}};var mo=0;var go=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o;var t;return __generator(this,(function(n){switch(n.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}ge("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});e={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,ce("/api/zonos-elements/log-bulk-load-data",{body:e,method:"POST"})];case 1:o=n.sent().errors;if(o.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,e.data);mo++;if(mo>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var po=function(){return __awaiter(Oe,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){e=pe().elapsedTime;o={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:e,metadata:Object.assign({allLogs:we},le()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};void ce("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var wo=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o;var t=e.loadTime;return __generator(this,(function(e){o={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:we},le()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};void ce("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var zo=function(e){return(e===null||e===void 0?void 0:e.filter((function(e){if(e.expiresAt&&e.expiresAt<Date.now()||!e.expiresAt){return false}return true})))||[]};var ko=function(e){var o;var t=(o=J.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){return o.testKey===e}));return(t===null||t===void 0?void 0:t.selectedVariantKey)||null};var yo=function(e){return ne.enabledVariantTestKeys.includes(e)};var bo=function(e){var o=e.baseTestObj,t=e.mergeTestObj;return o.map((function(e){var o=e.testKey;var n=t.find((function(e){var t=e.testKey;return t===o}));return{expiresAt:(n===null||n===void 0?void 0:n.expiresAt)||Date.now()+X,selectedVariantKey:(n===null||n===void 0?void 0:n.selectedVariantKey)||null,testKey:o}}))};var _o=function(e){return __awaiter(Oe,[e],void 0,(function(e){var o,t,n,r,i;var s=e.cartId,c=e.retries;return __generator(this,(function(e){switch(e.label){case 0:o=ae();return[4,ce("/api/zonos-elements/get-temp-cart",{body:{isTestMode:o,options:{noOnlineStoreSettings:true},tempCartUUID:s},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=e.sent(),n=t.errors,r=t.json;i=!r||n.length;if(!(i&&c))return[3,3];ge("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:c});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,_o({cartId:s,retries:c-1})];case 3:if(i){return[2,null]}return[2,r]}}))}))};var Co=function(e){return __awaiter(Oe,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:o=ze(e),t=o.isDgsCartId,n=o.isLegacyCartId;if(!n&&!t){de("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,_o({cartId:e,retries:5})];case 1:r=i.sent();ge("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){de("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;return[2,{cartData:r.cartData,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var xo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var So=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";var To=So;var Io=90*60*1e3;var Ao=6*60*60*1e3;var Oo=e("zonos_checkout",function(){function e(e){var t=this;o(this,e);this.storeUnsubscribeList=[];this.isRedirectAfterOrder=false;this.preview=false;this.hiddenMode=false;this.mobile=false;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.isOverlayLoading=false;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.shouldShowFedexShippingConsentDialog=false;this.detectedDomesticCheckoutDialogOpen=false;this.redirectToDomesticCheckoutDialogOpen=false;this.loggedInIntlAddressConfirmDialogOpen=false;this.loggedInIntlAddressResolver=null;this.clientSecret=c.clientSecret;this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:r=((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme)||ne.appearance.theme;return[4,a({overrideBorderRadius:(o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?r:undefined,paypalEnabled:F()})];case 1:i.sent();return[2]}}))}))};this.checkStripePaymentIntentStatus=function(e){return __awaiter(t,[e],void 0,(function(e){var o,t,n,r,i,s,a,d,l;var h=e.triggeredButton;return __generator(this,(function(e){switch(e.label){case 0:o=h===null||h===void 0?void 0:h.matches("#".concat(ke));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;r=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!o){ge("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}ge("Payment intent exist, checking stripe payment intent status");if(!r){ge("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,u({clientSecret:r})];case 1:s=e.sent(),a=s.error,d=s.status;l=new URLSearchParams(window.location.search).get("redirect_status");if(l){if(!a){ge("Payment intent is succeeded or in a good state to move forward, show success screen")}else{ge("Payment intent failed, show status from error")}this.open=true;J.checkoutSessionId=i;c.clientSecret=r;void this.setToFinishStep(d);return[2,{shouldAllowOrder:false}]}if(!t){ge("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}ge("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.initializeTestKeys=function(){J.enabledVariantTestKeys=zo(J.enabledVariantTestKeys||[]);var e=ne.enabledVariantTestKeys.map((function(e){var o;var t=(o=J.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){var t=o.testKey;return t===e}));return{expiresAt:(t===null||t===void 0?void 0:t.expiresAt)||Date.now()+X,selectedVariantKey:(t===null||t===void 0?void 0:t.selectedVariantKey)||null,testKey:e}}));$(e);return{allSelected:false}};this.shouldAllowHostedVsNativeTest=function(){if(typeof ne.checkoutSettings.createCartId!=="function"){return false}var e=ne.enabledVariantTestKeys.includes("hosted_vs_native");if(!e){return false}return true};this.registerTestHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:e=this.shouldAllowHostedVsNativeTest();if(!e){return[2]}ge("[TEST] - Registering hosted vs native test");o=ko("hosted_vs_native");if(o){ge("[TEST] - Hosted vs native test already has variant selected: ".concat(o));return[2]}return[4,Ee({testKeys:["hosted_vs_native"]})];case 1:t=r.sent();if(!t){ge("[TEST] - Failed to get selection for hosted vs native test");return[2]}n=bo({baseTestObj:J.enabledVariantTestKeys||[],mergeTestObj:t});$(n);return[2]}}))}))};this.handleHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r,i,s,c;return __generator(this,(function(a){switch(a.label){case 0:o=this.shouldAllowHostedVsNativeTest();if(!o){return[2,{redirected:false}]}t=ko("hosted_vs_native");ge("[TEST] - hosted_vs_native: ".concat(t));if(typeof ne.checkoutSettings.createCartId!=="function"){ge("[TEST] - createCartId is not provided, skipping hosted vs native test");return[2,{redirected:false}]}if(t!=="hosted"){ge("[TEST] - Hosted vs native test is enabled for native, skipping");return[2,{redirected:false}]}if(!((e=ne.genericSettings)===null||e===void 0?void 0:e.hostedCheckoutUrl)){ge("[TEST] - Hosted checkout URL is not provided");return[2,{redirected:false}]}ge('"createCartId" is provided, start building cart');return[4,ne.checkoutSettings.createCartId()];case 1:n=a.sent();i=null;if(typeof n==="object"){r=n.cartId;i=n.shippingData||null}else{r=n}s=vo();c=Le(Object.assign(Object.assign({cartId:r,checkoutSessionId:J.checkoutSessionId||undefined,hostedCheckoutUrl:ne.genericSettings.hostedCheckoutUrl,isTestMode:ae(),isVariantTest:true},s),i));ge("[TEST] - Redirecting to: ".concat(c));window.open(c,"_blank");return[2,{redirected:true}]}}))}))};this.formatDate=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleDateString()};this.formatTime=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(d.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var e=d.selectedLandedCost;if(!e){return null}var o=e.landedCost.amountSubtotals;if(!o){return null}var t=(o.discounts||0)+o.items+o.landedCostTotal+o.shipping;return{settlementAmount:t}};this.prefillBigCommerceCustomerAddresses=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:if(!window.Zonos.isBigCommerce){return[2]}if(this.defaultCustomerProfileAddress.length){return[2]}e=Array.isArray(this.defaultAddress)&&this.defaultAddress.length>0||!Array.isArray(this.defaultAddress)&&typeof this.defaultAddress==="object"&&this.defaultAddress!==null;if(e){return[2]}return[4,V()];case 1:o=r.sent();if(!o){return[2]}return[4,G(o)];case 2:t=r.sent();if(!Q(t)){return[2]}n=co(t,{isShippable:function(e){return uo(false,e)},selectedCountryCode:W.selectedCountryCode||undefined});if(!n.length){return[2]}if(this.defaultCustomerProfileAddress.length){return[2]}this.defaultCustomerProfileAddress=n;ge("Prefilled ".concat(String(n.length)," BigCommerce customer address(es) for logged-in shopper"),"info");return[2]}}))}))};this.getDefaultAddress=function(){if(t.defaultCustomerProfileAddress.length){return t.defaultCustomerProfileAddress}if(Array.isArray(t.defaultAddress)&&t.defaultAddress.length){return t.defaultAddress}if(!Array.isArray(t.defaultAddress)&&typeof t.defaultAddress==="object"){return[t.defaultAddress]}return t.defaultAddressParams};this.handleHostedOpenWindowCallback=function(e){var o;var t=(o=ne.genericSettings)===null||o===void 0?void 0:o.hostedCheckoutUrl;if(!origin){return}var n=["dev.checkout.elements.zonos.com"].some((function(o){return e.origin.includes(o)}));if(e.origin!==t&&!n){return}switch(e.data.type){case"zonos-checkout-session-update":J.checkoutSessionId=e.data.checkoutSessionId;break}};this.captureParamsRedirectedForVariantTest=function(){var e=new URL(window.location.href);var o=e.searchParams.get("zonosVariantTest")==="1";if(!o){return}var t=e.searchParams.get("zonosCheckoutSessionId");if(t){J.checkoutSessionId=t}var n=J.enabledVariantTestKeys||[];if(window.Zonos.isLegacyCheckout){var r=ko("hosted_vs_native");if(!r){n.push({expiresAt:Date.now()+X,selectedVariantKey:"hosted",testKey:"hosted_vs_native"});$(n)}else{$(n.map((function(e){if(e.testKey==="hosted_vs_native"){return Object.assign(Object.assign({},e),{selectedVariantKey:"hosted"})}return e})))}}e.searchParams.delete("zonosCheckoutSessionId");e.searchParams.delete("zonosVariantTest");window.history.replaceState({},"",e.toString())}}e.prototype.initCartInfoHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=e.detail;void l({adjustments:d.adjustments,cartItems:o});return[2]}))}))};e.prototype.handleKeyPress=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(e.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};e.prototype.closeDialogHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(e===null||e===void 0?void 0:e.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;M({event:"zonos-checkout-close",metadata:{checkoutSessionId:J.checkoutSessionId}});this.open=this.forceDialogOpen||false;if(!this.preview&&d.step==="finish"){h()}if(!this.preview){f()}d.step="customer-info";v();m();(t=(o=ne.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(o);return[2]}))}))};e.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,c,i,s,s,a,u,i,h,f,v,m;return __generator(this,(function(w){switch(w.label){case 0:if(!(typeof ne.checkoutSettings.createCartId==="function"))return[3,4];ge('"createCartId" is provided, start building cart');d.customMessage=[];return[4,ne.checkoutSettings.createCartId()];case 1:e=w.sent();o=void 0;if(typeof e==="object"){ge("object detected, use cartId and prefill address from createCartId","info",e);o=e.cartId;this.useShippingDataFromCreateCartId(e.shippingData);d.customerAuthenticationToken=e.customerAuthenticationToken||null;d.customMessage=Array.isArray(e.customMessage)?e.customMessage.filter((function(e){return typeof e==="string"})):[]}else{o=e}window.Zonos.cartId=o;return[4,Co(o)];case 2:t=w.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){de("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;r=se(n),i=r.adjustments,s=r.cartItems;return[4,l({adjustments:i,cartItems:s})];case 3:w.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];ge("tempCartUUID is provided, start building cart");c=se(window.Zonos.cartData),i=c.adjustments,s=c.cartItems;return[4,l({adjustments:i,cartItems:s})];case 5:w.sent();return[3,9];case 6:if(!(ne.checkoutSettings.buildCartDetail&&W.selectedCountryCode))return[3,9];ge("build cart detail");return[4,ne.checkoutSettings.buildCartDetail({countryCode:W.selectedCountryCode,currencyCode:W.targetCurrency})];case 7:s=w.sent();a=s.filter((function(e){return e.amount>=0}));u=s.filter((function(e){return e.amount<0}));ge("cartItems","info",{cartItems:s});i=u.map((function(e){return{amount:e.amount,currencyCode:e.currencyCode,description:e.name||e.description||"",productId:e.productId||null,sku:e.sku||null,type:"CART_TOTAL"}}));return[4,l({adjustments:i,cartItems:a})];case 8:w.sent();w.label=9;case 9:if(!!J.checkoutSessionId)return[3,11];return[4,g()];case 10:h=w.sent();ge("stripeStoreInitCheckoutSession: ".concat(h));if(!h){return[2,false]}w.label=11;case 11:if(!d.isStagingMode){void p()}return[4,this.applyStripeTheme()];case 12:w.sent();f=ne.checkoutSettings,v=f.successBehavior,m=f.successRedirectUrl;this.isRedirectAfterOrder=v==="REDIRECT_TO_SUCCESS_PAGE"||v==="CLOSE_MODAL"&&!!m||!!d.externalConfirmationPageURL;return[2,true]}}))}))};e.prototype.reloadCheckoutSession=function(){window.location.reload()};e.prototype.handleOrderDuplication=function(){var e=ue(localStorage.getItem("zonos--placed-order-info"));if(!e){localStorage.removeItem("zonos--placed-order-info");return}var o=Date.now()-e.time;ge("=== Existing placed order info: ".concat(e.orderId," - ").concat(this.formatDate(e.time)," - elapsed in hh:ss format: ").concat(new Date(o).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||Ao;if(o>t){ge("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=e;ge("=== Showing order duplication confirmation","warn")};e.prototype.recordCheckoutInfo=function(){if(!J.checkoutSessionId){return}void me({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:J.checkoutSessionId})};e.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!J.checkoutSessionId){return}void me({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:J.checkoutSessionId})};e.prototype.markTheSessionAsAbandonedCart=function(){if(!J.checkoutSessionId){return}void me({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:J.checkoutSessionId})};e.prototype.handleCancelOrderDuplication=function(){var e;this.placedOrderInfo=null;if(this.isLegacyCheckout){var o=((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||ne.onlineStoreSettings.url;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}void this.closeDialogHandler({confirmed:true})};e.prototype.attachCheckout=function(){var e=this;var o=ne.checkoutSettings.placeOrderButtonSelector;var t=ne.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;var n=!!document.querySelector("#".concat(ke));ge("attach checkout ".concat(o));ge("attach checkout to always trigger international checkout selector: ".concat(t));if(!o&&!t&&!window.Zonos.cartData&&!n){return}var r=[o,t,"#".concat(be),"#".concat(ke),"#".concat(ye)].filter(Boolean);var i=document.querySelectorAll(r.join(","));i.forEach((function(n){var r=n.getAttribute("data-zonos-checkout-attached");if(r){return}ge("attached event to button ".concat(o),"info",{button:n});n.addEventListener("click",(function(o){return __awaiter(e,void 0,void 0,(function(){var e,r,i,s,a,u,l,h,f,v,m,g,p,b,_,C,x,S;return __generator(this,(function(T){switch(T.label){case 0:i=performance.now();s=t&&n.matches(t);a=n.matches("#".concat(ye));u=n.matches("#".concat(be))||n.matches("#".concat(ke));if(!window.Zonos.isLegacyCheckout&&(!uo()||ao())&&!s&&!a&&!u){return[2]}o.preventDefault();o.stopPropagation();ge("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:o.target})];case 1:l=T.sent().shouldAllowOrder;if(!l){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void go()}),2e3)}if(!yo("hosted_vs_native"))return[3,4];this.isOverlayLoading=true;return[4,this.registerTestHostedVsNative()];case 2:T.sent();return[4,this.handleHostedVsNative()];case 3:h=T.sent().redirected;this.isOverlayLoading=false;if(h){return[2]}T.label=4;case 4:if(!window.Zonos.isBigCommerce)return[3,7];return[4,Ze()];case 5:f=T.sent().shouldBypass;if(f){ge("Bypass customer group detected, redirecting to BigCommerce native checkout","info");window.location.href=De("/checkout");return[2]}return[4,eo()];case 6:v=T.sent();if(v.shouldForceLogin&&v.redirectUrl){window.location.href=v.redirectUrl;return[2]}T.label=7;case 7:c.isFetchingSession=true;this.open=true;T.label=8;case 8:T.trys.push([8,11,,12]);return[4,this.buildCartAndInit()];case 9:m=T.sent();if(!m){throw new Error("Error building cart")}(e=window.opener)===null||e===void 0?void 0:e.postMessage({checkoutSessionId:J.checkoutSessionId,type:"zonos-checkout-session-update"},"*");w({isPreview:this.preview,sessionTimeout:Io});M({event:"zonos-checkout-start",metadata:{checkoutSessionId:J.checkoutSessionId}});g=J.checkoutSessionId;void z({checkoutSessionId:g,eventName:"checkout_open"});return[4,Ue()];case 10:p=T.sent().enabled;d.shouldHideDiscountInput=!p;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void po()}else{b=performance.now();_=b-i;void wo({loadTime:_})}this.recordCheckoutInfo();C=!!_e();if(C){this.markTheSessionAsAbandonedCart()}return[3,12];case 11:x=T.sent();if(x instanceof Error){S=x.message;if(S==="Cart is expired."){this.isCartExpired=true}}c.isFetchingSession=false;de(x);if(this.isCartExpired){c.isFetchingSession=true;return[2]}void he({endpoint:"Error creating Checkout",errors:[x instanceof Error?x.toString():"Unknown error"],metadata:{allLogs:we,cartId:window.Zonos.cartId,checkoutSessionBody:k(),href:window.location.href,storeBaseUrl:((r=window.Zonos.cartData)===null||r===void 0?void 0:r.storeBaseUrl)||ne.onlineStoreSettings.url}});y({messages:[ee("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:ee("Error creating Checkout")});return[3,12];case 12:return[2]}}))}))}),{capture:true,passive:false});if(!ne.checkoutSettings.disablePlaceOrderButtonActivation){n.removeAttribute("disabled")}n.setAttribute("data-zonos-checkout-attached","true");if(n.matches("#".concat(be))){n.dispatchEvent(xe("click"));b();n.remove()}if(n.matches("#".concat(ke))){n.dispatchEvent(xe("click"));n.remove()}}))};e.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};e.prototype.useShippingDataFromCreateCartId=function(e){if(!e){return}ge("shipping data from createCartId result","info",Object.entries(e));var o=e.customerAddress1,t=e.customerAddress2,n=e.customerCity,r=e.customerCountry,i=e.customerEmail,s=e.customerFirstName,c=e.customerLastName,a=e.customerName,u=e.customerPhone,d=e.customerState,l=e.customerZip;var h=new URLSearchParams(window.location.search);var f=r||q(h)||W.selectedCountryCode;this.applyPrefillAddress({customerAddress1:o,customerAddress2:t,customerCity:n,customerCountry:f,customerEmail:i,customerFirstName:s,customerLastName:c,customerName:a,customerPhone:u,customerState:d,customerZip:l})};e.prototype.useLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);ge("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return null}return t};var t=q(e)||W.selectedCountryCode;var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerFirstName");var u=o("customerLastName");var d=o("customerPhone");var l=o("customerZip");var h=o("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:a,customerLastName:u,customerName:c,customerPhone:d,customerState:h,customerZip:l})};e.prototype.applyPrefillAddress=function(e){var o=e.customerAddress1||"";var t=e.customerCountry||"";var n=e.customerAddress2||"";var r=e.customerCity||"";var i=e.customerEmail||"";var s=e.customerFirstName&&e.customerLastName?"".concat(e.customerFirstName," ").concat(e.customerLastName):e.customerName||"";var c=e.customerPhone||"";var a=e.customerZip||"";var u=e.customerState||"";if(!o||!s||!c||!t){ge("Missing required query params so it can not be prefilled","info",[!o&&"line1",!s&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&W.shippingZoneCountries&&!(t in W.shippingZoneCountries)){ge('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:r||"",country:t,line1:o,line2:n,postal_code:a,state:u},email:i,name:s,phone:c}];ge("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:e})};e.prototype.overrideStagingModeChanged=function(){d.isStagingMode=!!this.overrideStagingMode};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e;var o=this;return __generator(this,(function(t){c.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;d.isStagingMode=fe();if(typeof this.overrideStagingMode!=="undefined"){d.isStagingMode=this.overrideStagingMode}He();$e();ro();this.handleBigcommerceInternationalResumeFlag();void this.prefillBigCommerceCustomerAddresses();fo({domesticRedirectedBtnSelector:be,onInternationalCheckoutSelected:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.detectedDomesticCheckoutDialogOpen=true;return[4,new Promise((function(e){return setTimeout(e,2e3)}))];case 1:e.sent();return[2]}}))}))},onLoggedInInternationalAddressDetected:function(){return new Promise((function(e){o.loggedInIntlAddressResolver=e;o.loggedInIntlAddressConfirmDialogOpen=true}))},onShippingAddressSessionFound:function(e){o.defaultAddress=[{address:{city:e.city,country:e.countryCode,line1:e.address1,line2:e.address2,postal_code:e.postalCode,state:e.state},email:"",name:"".concat(e.firstName," ").concat(e.lastName),phone:e.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}e=setInterval((function(){c.stripe=window.Zonos.stripe;o.stripe=window.Zonos.stripe;if(!o.stripe){ge("waiting for stripe to be loaded");return}if(o.storybookPaymentStatusOverride){clearInterval(e);return}ge("init checkout");if(o.preview||o.forceDialogOpen){void o.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){o.attachCheckout()}else if(window){o.attachCheckout();var t=new MutationObserver((function(){o.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};e.prototype.handleBigcommerceInternationalResumeFlag=function(){if(!window.Zonos.isBigCommerce){return}var e=new URL(window.location.href);if(e.searchParams.get(Pe)!=="true"){return}e.searchParams.delete(Pe);window.history.replaceState({},"",e.toString());var o=Date.now();var t=setInterval((function(){if(!W.localizationLoaded||!W.selectedCountryCode){if(Date.now()-o>15e3){clearInterval(t);ge("BigCommerce international checkout resume flag: localization did not initialize within 15s","info")}return}var e=document.querySelector("#".concat(ye));if(e){clearInterval(t);e.dispatchEvent(xe("click"));return}if(Date.now()-o>15e3){clearInterval(t);ge("BigCommerce international checkout resume flag: trigger button did not mount within 15s","info")}}),200)};e.prototype.setToFinishStep=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){d.step="finish";this.storybookPaymentStatusOverride=e;return[2]}))}))};e.prototype.mockCheckoutSession=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){_(e);return[2]}))}))};e.prototype.triggerCheckoutInternational=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=document.querySelector("#".concat(ye));if(e){e.dispatchEvent(xe("click"))}return[2]}))}))};e.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,a;var u=this;return __generator(this,(function(l){switch(l.label){case 0:M({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:J.checkoutSessionId}});r=J.checkoutSessionId;void z({checkoutSessionId:r,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,C()];case 1:i=l.sent().isRequestNotReady;if(i&&d.addressFormRenderType==="stripe"){void he({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:(o=(e=c.stripeAddressEventData)===null||e===void 0?void 0:e.value)===null||o===void 0?void 0:o.address,billingAddress:(n=(t=c.stripeBillingAddressEventData)===null||t===void 0?void 0:t.value)===null||n===void 0?void 0:n.address,cartId:window.Zonos.cartId}})}s=function(e){if(d.step!=="customer-info"){clearInterval(e);return}if(!c.isFetchingLandedCost){if(d.landedCostData){void Z({currency:d.currency});x()}u.submitLoading=false;if(e){clearInterval(e)}}};s();a=setInterval((function(){s(a)}),20);setTimeout((function(){clearInterval(a)}),1e4);return[2]}}))}))};e.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){x();return[2]}))}))};e.prototype.handleInventoryCheckDialogConfirm=function(){d.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};e.prototype.handleCartExpiredDialogConfirm=function(){var e;this.isCartExpired=false;if(this.isLegacyCheckout){var o=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};e.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,a,u,l,h;return __generator(this,(function(f){switch(f.label){case 0:e=c.checkoutSettlementCurrency==="USD";if(e&&c.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;o=S();f.label=1;case 1:f.trys.push([1,,18,19]);H.paypalErrorMessage=null;c.hasPaymentError=false;this.submitLoading=true;d.inventoryCheckErrorMessage=null;return[4,T()];case 2:t=f.sent();if(!t){c.hasPaymentError=true;c.customErrorMessage=ee("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:c.checkoutSettlementCurrency});this.submitLoading=false;return[2]}f.label=3;case 3:f.trys.push([3,5,,6]);n=d;return[4,I()];case 4:n.inventoryCheckErrorMessage=f.sent();return[3,6];case 5:r=f.sent();d.inventoryCheckErrorMessage=ee("Unable to check inventory. Please try again.");return[3,6];case 6:if(d.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i=R();if(!(i>0))return[3,8];return[4,A()];case 7:s=f.sent();if(!s.success){c.hasPaymentError=true;c.customErrorMessage=s.error||ee("Unable to apply store credit. Please try again.");this.submitLoading=false;return[2]}f.label=8;case 8:if(!O())return[3,14];f.label=9;case 9:f.trys.push([9,12,,13]);return[4,U()];case 10:a=f.sent();if(!a.valid){c.hasPaymentError=true;c.customErrorMessage=a.errorMessage;this.submitLoading=false;return[2]}return[4,E()];case 11:u=f.sent();if(!u.success){c.hasPaymentError=true;c.customErrorMessage=u.error||ee("Unable to place order with store credit. Please try again.");this.submitLoading=false;return[2]}x();m();return[3,13];case 12:l=f.sent();de(l);M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:J.checkoutSessionId}});c.hasPaymentError=true;return[3,13];case 13:this.submitLoading=false;return[2];case 14:f.trys.push([14,16,,17]);return[4,L()];case 15:f.sent();x();m();return[3,17];case 16:h=f.sent();de(h);M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:J.checkoutSessionId}});c.hasPaymentError=true;if(c.shouldInventoryRefund){void P();c.shouldInventoryRefund=false}return[3,17];case 17:this.submitLoading=false;return[3,19];case 18:if(o){B.locked=false}return[7];case 19:return[2]}}))}))};e.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:N();if(!this.preview)return[3,2];d.step="customer-info";return[4,this.init()];case 1:r.sent();return[2];case 2:h();f();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){e=window.Zonos.cartData.storeBaseUrl||ne.onlineStoreSettings.url;if(window.parent){window.parent.location.href=e}window.location.href=e;return[2]}o=window.location.href;t=o.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};e.prototype.handleWindowResize=function(){this.isMobile=ve(this.mobile);void this.applyStripeTheme();ge("mobile: ".concat(this.isMobile))};e.prototype.handleMobileChange=function(){this.isMobile=ve(this.mobile);void this.applyStripeTheme();ge("mobile: ".concat(this.isMobile))};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=re(this.appearanceSettingsOverride.theme)}};e.prototype.handleAddressChange=function(){N()};e.prototype.handleCustomerProfileChange=function(){var e,o;if(!this.customerProfile){ge("No customer profile","info");this.defaultCustomerProfileAddress=[];return}ge("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((o=(e=c.customerProfile)===null||e===void 0?void 0:e.locations)===null||o===void 0?void 0:o.map((function(e){var o;return{address:{city:e.locality,country:e.countryCode,line1:e.line1,line2:e.line2||"",postal_code:e.postalCode,state:e.administrativeArea},email:e.email||((o=c.customerProfile)===null||o===void 0?void 0:o.email)||"",name:e.name||"",phone:e.phone||""}})))||[]};e.prototype.handleClientSecretChange=function(){ge("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};e.prototype.handleOpenChange=function(){var e="data-zonos-overflow-origin";var o=document.body;var t=document.documentElement;if(this.open){window.Zonos.openHelloDialog(false);if(o.style.overflow){o.setAttribute(e,o.style.overflow)}o.style.overflow="hidden";if(t.style.overflow){t.setAttribute(e,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var n=o.getAttribute(e);var r=t.getAttribute(e);if(n){o.removeAttribute(e);o.style.overflow=n}else{o.style.removeProperty("overflow")}if(r){t.removeAttribute(e);t.style.overflow=r}else{t.style.removeProperty("overflow")}}};e.prototype.componentWillLoad=function(){var e=this;void this.init();this.isMobile=ve(this.mobile);this.isIframed=window.self!==window.top;ge("iframed: ".concat(this.isIframed));if(window.Zonos.isLegacyCheckout){this.captureParamsRedirectedForVariantTest()}this.handleAppearanceSettingsOverrideChange();this.storeUnsubscribeList=[oe("selectedLocale",(function(){void e.applyStripeTheme()})),D("selectedShippingOption",(function(){var o,t,n,r;var i=d.selectedShippingOption;if(((o=ne.genericSettings)===null||o===void 0?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&((n=(t=i===null||i===void 0?void 0:i.shippingProfile)===null||t===void 0?void 0:t.serviceLevel.code)===null||n===void 0?void 0:n.toLowerCase().startsWith("fedex."))&&((r=c.stripeAddressEventData)===null||r===void 0?void 0:r.value.address.country)==="CA"){e.shouldShowFedexShippingConsentDialog=true}})),j("stripeAddressEventData",(function(o){var t;if(!window.Zonos.isBigCommerce||!o||e.redirectToDomesticCheckoutDialogOpen||!((t=ne.genericSettings)===null||t===void 0?void 0:t.isBigcommerceDomesticCheckoutRedirectEnabled)||ne.sourceCurrency!=="USD"){return}if(!e.open){return}if(window.location.pathname.includes("/checkout")){return}var n=o.value.address.country;if(n&&ne.disabledCountries.includes(n)){e.redirectToDomesticCheckoutDialogOpen=true;ge("Domestic country ".concat(n," selected in international checkout, redirecting to BigCommerce domestic checkout"),"info");setTimeout((function(){window.location.href=De("/checkout")}),2e3)}}))];this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);ge("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){N();h();f();this.storeUnsubscribeList.forEach((function(e){return e()}));window.removeEventListener("message",this.handleHostedOpenWindowCallback)};e.prototype.render=function(){var e=this;var o,i,s,a;this.customerProfile=c.customerProfile;this.clientSecret=c.clientSecret;if(c.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret}var u=d.step!=="finish"&&d.step!=="error"&&!c.stripeElements||c.isFetchingSession;var l=ie(ne.appearance,this.appearanceSettingsOverride||null),h=l.colorPrimary,f=l.colorSecondary,v=l.logoUrl,m=l.style;var g=ne.appearance.zonosAttribution==="ENABLED";var p=ne.appearance.theme;var w=h&&Te(h)?"DARK":"LIGHT";var z=this.isMobile?p:w;var k=!this.isMobile?f:undefined;var y=W.customMessages;var b=(o=y.find((function(e){return e.pageName==="checkout_default"})))===null||o===void 0?void 0:o.message;var _=this.getCurrentLocalePageEnum();var C=y.filter((function(e){return e.pageName===_}));var x=this.getBaseCurrencySettlementInfo();var S=function(){var o=e.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(ne.organizationName," logo"),src:o}))};var T=ae();var I=function(){var o=new URLSearchParams(window.location.search);var n=o.get("zonosQaUrl");var r=o.get("zonosDebug");var i=o.get("zonosE2ETest");var s=e.overrideStagingMode||fe();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},S(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},ee("Test mode")),s&&t("zonos-badge",{badgeColor:"red",size:"small"},ee("Staging mode")),r==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:e.isMobile?"--zonos-elements-gray-0":null}),C.map((function(e){return t("zonos-custom-message",{icon:xo,message:e.message})})))};var A=function(){if(d.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:ee("Your checkout session has expired. Please reload the page to continue."),restStateTitle:ee("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},ee("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":Se({overrideBorderStyle:m})}},d.step!=="finish"&&d.step!=="error"&&t(n,null,t("div",{class:"zonos--left","data-theme":z,style:Ie({"--zonos--primary-color":!e.isMobile?h:undefined})},!e.isMobile&&I(),d.step==="customer-info"&&t("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:k}),d.step==="shipping"&&t("zonos-shipping",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:k}),d.step==="payment"&&t("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:e.sent();return[2]}}))}))},submitBtnColor:k})),t("div",{class:"zonos--right","data-theme":p},e.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!e.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:Ae}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),t("zonos-collapse",{collapsed:e.collapseReviewMobile&&e.isMobile},t("zonos-cart-items",null),e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:k}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:xo,message:b})))),t("zonos-cart-restricted-items",null),!e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:xo,message:b}))))),(d.step==="finish"||d.step==="error")&&t("div",{class:"zonos--done","data-theme":p},t("div",{class:"zonos--header"},S(),!e.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:Ae}),noBackground:true,onClick:function(){return e.handleFinishClick()},theme:p})),t("zonos-checkout-finish",{borderRadius:m,onCloseClick:function(){return e.handleFinishClick()},overrideNotification:d.step==="error"&&!!d.error?Object.assign(Object.assign({},d.error),{type:"error"}):undefined,storybookForceStatus:e.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":p,mobile:e.isMobile,slot:!e.isMobile?"dialog-footer":undefined}))};return t(r,{class:Ce(["zonos--checkout zonos--elements",d.step==="payment"&&"zonos--processing-payment",g&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?A():t("zonos-dialog",{borderStyle:m,class:"zonos--checkout-dialog","data-theme":p,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialogHandler()},open:this.open,width:"1200px"},A()),t("zonos-dialog",{isLoading:true,loadingText:ee("You will be redirected to international checkout shortly."),loadingTitle:ee("We detected that you are shipping to an international address."),noClickOutside:true,noCloseButton:true,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),t("zonos-dialog",{isLoading:true,loadingText:ee("You will be redirected to domestic checkout shortly."),loadingTitle:ee("We detected that you are shipping to a domestic address."),noClickOutside:true,noCloseButton:true,open:this.redirectToDomesticCheckoutDialogOpen,width:"450px"}),t("zonos-confirm-dialog",{class:"zonos--logged-in-intl-address-dialog",dialogCancelBtnText:ee("Stay on this page"),dialogConfirmBtnText:ee("Continue to international checkout"),dialogIntent:"info",dialogOpen:this.loggedInIntlAddressConfirmDialogOpen,dialogSubtitle:ee("Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?"),dialogTitle:ee("International shipping address detected"),dialogWidth:480,onCancelClicked:function(){var o;e.loggedInIntlAddressConfirmDialogOpen=false;(o=e.loggedInIntlAddressResolver)===null||o===void 0?void 0:o.call(e,"stay");e.loggedInIntlAddressResolver=null},onConfirmClicked:function(){var o;e.loggedInIntlAddressConfirmDialogOpen=false;(o=e.loggedInIntlAddressResolver)===null||o===void 0?void 0:o.call(e,"redirect");e.loggedInIntlAddressResolver=null}}),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:ee("Don't close"),dialogConfirmBtnText:ee("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:ee("Would you like to close checkout and return to the site?"),dialogTitle:ee("Are you sure?"),onCancelClicked:function(){e.confirmDialogOpen=false},onConfirmClicked:function(){return e.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:ee("Return to merchant site"),dialogConfirmBtnText:ee("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((i=this.placedOrderInfo)===null||i===void 0?void 0:i.zonosOrderNumber)?ee("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):ee("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((s=this.placedOrderInfo)===null||s===void 0?void 0:s.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:ee("Are you sure?"),dialogWidth:530,onCancelClicked:function(){e.handleCancelOrderDuplication()},onConfirmClicked:function(){e.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:ee("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:t(n,null,ee("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),t("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},ee("View GAA Form."))),dialogTitle:ee("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:function(){return e.shouldShowFedexShippingConsentDialog=false}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:ee("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:ee("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return e.handleInventoryCheckDialogConfirm()}}),x&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:ee("Cancel"),dialogConfirmBtnText:ee("Pay [orderTotal]",{orderTotal:te({amount:x.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:ee("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:ee("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){e.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return e.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:ee("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:ee("You are being sent back to the shop to re-add items to your cart."),dialogTitle:ee("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return e.handleCartExpiredDialogConfirm()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}());Oo.style=To}}}));
@@ -1 +1 @@
1
- import{r as o,d as e,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as a,t as n,h as l}from"./p-41619f29.js";import{z as r}from"./p-701d9a7c.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{h as c,T as m,D as g}from"./p-539bc46c.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-6b361d2b.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";const b=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=a.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isDomesticCountry=()=>{var o,e;const{selectedCountryCode:t}=a;return!!t&&!!(null===(e=null===(o=r.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===e?void 0:e.includes(t))},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(o),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const o=a.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e?n("Spend up to [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a;if(this.isDomesticCountry())return null;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend up to [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${n("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${n("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`]:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${n("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${n("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:n("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${n("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:n("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${n("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:n("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:n("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:n("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:n("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:o,inclusivePriceMessage:e,taxDeMinimisMessage:i})=>{if(c()&&e)switch(e.inclusiveType){case"DUTIES_FEES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},e.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},e.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,e.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(a.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(a.countryLandedCost);default:return f.includes(a.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(a.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o,e;const{selectedCountryCode:s}=a,l=this.getAdditionalDutyTaxMessage(),c=null!==(o=this.animateFromLeftOverride)&&void 0!==o?o:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:g}=a,f=n("Welcome to [storeName]",{storeName:r.organizationName}),b=(null===(e=g.find((o=>"hello_default"===o.pageName)))||void 0===e?void 0:e.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),p=h(b),v=this.getCurrentPageEnum(),z=g.filter((o=>o.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"18729a31c9a2a29e5f7a49dde7630c3899cd245c",class:"zonos--elements"},t("div",{key:"cedfa2485f68f41aa099bc8a88446c2aa95a9262",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"3dd21da6f9eab3b1597e59fc93330a6601698d7d"},t("div",{key:"48f98dac07ec1bc299df9fe69ddf74f98cd5a51c",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"9f5a1133b3326b287d8ed62625d416b4d4e5f41c",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<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>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"0eb3b34b3f0b869a8039640c7ac3ef706f1bde20",spacing:24},t("zonos-country-flag",{key:"3d39e4fc432736b35bab328da59e043591891f66",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"7e14d107cafcdf9c153813b486c28511c341ed5e",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"a1069a846e7e0118e4be0908f82a147b12df815e",type:"boldSubheader"},f),t("zonos-text",{key:"2f238d337eeb6034c9fbccf1540e7ab981d8b269",innerHTML:p,textColor:"gray-800"})),t("zonos-v-stack",{key:"19d806fe8fb23ac05a9c4093e90beda94fdc1388",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),(x||w||C||!!(null==l?void 0:l.length))&&t("zonos-card",{key:"eda99f84ee5318ed6fd4bb26d2ac66a92742a05d",spacing:"12px"},t("zonos-v-stack",{key:"86e170fd626ee23c67e35dfad72a28355031920e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==l?void 0:l.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"94875c94b85a19a91390862d7e8ec4c978feb583",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"3a1c43cee0f8f7fb95523e90d21b6a799bdf704c"},t("zonos-country-select",{key:"914e3e1db72458aca439ca37b8e861c49730f332",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"26f01ac1caac824eab2a8ae73cc5a1de843b354c"},t("zonos-language-select",{key:"6318c9bc7824e90314d036973bba1a3175a4d4a8",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.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--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-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
1
+ import{r as e,d as o,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as a,t as n,h as l}from"./p-043e9a84.js";import{z as r}from"./p-9a417eeb.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{h as c,T as m,D as g}from"./p-1de258c3.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-6b361d2b.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";const b=({href:e,text:o})=>`<zonos-link href="${e}" target="_blank" rel="noopener noreferrer">${o}</zonos-link>`,p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){e(this,i),this.closeDialog=o(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=e=>{!e.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async e=>{this.showCountrySelect=e},this.setShowLanguageSelect=async e=>{this.showLanguageSelect=e},this.hasTaxId=()=>{var e;return null===(e=a.countryLandedCost)||void 0===e?void 0:e.hasTaxId},this.isDomesticCountry=()=>{var e,o;const{selectedCountryCode:t}=a;return!!t&&!!(null===(o=null===(e=r.genericSettings)||void 0===e?void 0:e.domesticCountries)||void 0===o?void 0:o.includes(t))},this.isNoThresholdCountry=e=>!(!e||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(e),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const e=a.countryLandedCost;if(!(null==e?void 0:e.allowLowValueOrders)&&"GB"===(null==e?void 0:e.countryCode))return n("Duties will apply to all orders.");const o=(null==e?void 0:e.dutyDeminimus)?l({amount:e.dutyDeminimus}):null;return o?n("Spend up to [threshold] duty free.",{threshold:o}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:e}=a;if(this.isDomesticCountry())return null;if(!(null==e?void 0:e.allowLowValueOrders)&&"GB"===(null==e?void 0:e.countryCode))return n("Taxes will apply to all orders.");const o=(null==e?void 0:e.vatTaxDeminimus)?l({amount:e.vatTaxDeminimus}):null;return o&&!this.isNoThresholdCountry(null==e?void 0:e.countryCode)?n("Spend up to [threshold] tax free.",{threshold:o}):n("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=e=>[`${n("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`],this.getUkDutyTaxMessage=e=>e.allowLowValueOrders?[`${n("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`]:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:e.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=e=>c()?[]:[`${n("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`],this.getNewZealandDutyTaxMessge=e=>c()?null:[`${n("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:n("Learn more.")})}`],this.getNorwayDutyTaxMessage=e=>c()?null:[`${n("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:n("Learn more.")})}`],this.getSingaporeDutyTaxMessage=e=>c()?null:[`${n("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:n("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const e=a.inclusivePricingConfigurations,o=null==e?void 0:e.find(Boolean),t=null==o?void 0:o.configurations[m],s=null==o?void 0:o.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:n("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:n("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:n("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:e,inclusivePriceMessage:o,taxDeMinimisMessage:i})=>{if(c()&&o)switch(o.inclusiveType){case"DUTIES_FEES":return t(s,null,o.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},o.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,o.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},o.message)),e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},e)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,o.message))}return t(s,null,e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},e)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(a.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(a.countryLandedCost);default:return f.includes(a.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(a.countryLandedCost):null}}}globalClickHandler(e){this.clickOutsideDialogHandler(e)}isOpenHandler(e){e||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var e,o;const{selectedCountryCode:s}=a,l=this.getAdditionalDutyTaxMessage(),c=null!==(e=this.animateFromLeftOverride)&&void 0!==e?e:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const e=this.dialogRef.getBoundingClientRect();return e.top>=window.innerHeight-e.bottom})(),{customMessages:g}=a,f=n("Welcome to [storeName]",{storeName:r.organizationName}),b=(null===(o=g.find((e=>"hello_default"===e.pageName)))||void 0===o?void 0:o.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),p=h(b),v=this.getCurrentPageEnum(),z=g.filter((e=>e.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"18729a31c9a2a29e5f7a49dde7630c3899cd245c",class:"zonos--elements"},t("div",{key:"cedfa2485f68f41aa099bc8a88446c2aa95a9262",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:e=>e&&(this.dialogRef=e)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"3dd21da6f9eab3b1597e59fc93330a6601698d7d"},t("div",{key:"48f98dac07ec1bc299df9fe69ddf74f98cd5a51c",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"9f5a1133b3326b287d8ed62625d416b4d4e5f41c",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<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>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"0eb3b34b3f0b869a8039640c7ac3ef706f1bde20",spacing:24},t("zonos-country-flag",{key:"3d39e4fc432736b35bab328da59e043591891f66",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"7e14d107cafcdf9c153813b486c28511c341ed5e",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"a1069a846e7e0118e4be0908f82a147b12df815e",type:"boldSubheader"},f),t("zonos-text",{key:"2f238d337eeb6034c9fbccf1540e7ab981d8b269",innerHTML:p,textColor:"gray-800"})),t("zonos-v-stack",{key:"19d806fe8fb23ac05a9c4093e90beda94fdc1388",spacing:8},this.restrictedItems.map((e=>{var o;return e&&t("zonos-banner",{bannerTitle:e.name,intent:"error"},null===(o=e.itemRestrictions)||void 0===o?void 0:o.map((e=>t("zonos-text",{textColor:"red-800"},null==e?void 0:e.note))))})),(x||w||C||!!(null==l?void 0:l.length))&&t("zonos-card",{key:"eda99f84ee5318ed6fd4bb26d2ac66a92742a05d",spacing:"12px"},t("zonos-v-stack",{key:"86e170fd626ee23c67e35dfad72a28355031920e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==l?void 0:l.map((e=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:e})))))),z.map((e=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:e.message})))))),t("zonos-hello-dialog-footer",{key:"94875c94b85a19a91390862d7e8ec4c978feb583",appearanceSettings:this.appearanceSettings,setShowCountrySelect:e=>this.setShowCountrySelect(e),setShowLanguageSelect:e=>this.setShowLanguageSelect(e)})),this.showCountrySelect&&t("div",{key:"3a1c43cee0f8f7fb95523e90d21b6a799bdf704c"},t("zonos-country-select",{key:"914e3e1db72458aca439ca37b8e861c49730f332",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"26f01ac1caac824eab2a8ae73cc5a1de843b354c"},t("zonos-language-select",{key:"6318c9bc7824e90314d036973bba1a3175a4d4a8",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.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--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-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
@@ -1 +1 @@
1
- System.register(["./p-7261e245.system.js","./p-3e7ee89d.system.js","./p-23e7c655.system.js","./p-14d6542f.system.js","./p-d938f42f.system.js"],(function(o){"use strict";var t,e,s,n,a,l,i,r;return{setters:[function(o){t=o.r;e=o.d;s=o.h;n=o.a;a=o.g},function(o){l=o.f},function(o){i=o.c},function(o){r=o.g},function(){}],execute:function(){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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var h=d;var p=o("zonos_input",function(){function o(o){t(this,o);this.inputChange=e(this,"inputChange",7);this.inputValue="";this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return s(n,{key:"c4745840fd40940032af2a46f2dab9d0d3096265",class:i(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--zonos--border-radius":r(),"--zonos--font-family":l()}},s("div",{key:"7044d3e1877088b30016193eabf24ee36b0ad3c3",class:i(["zonos--label-wrapper",this.isDisabled&&"disabled"])},s("input",{key:"6ec2033248f6176c9d5baab8b0a4e74201a6761c",class:i(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:function(t){var e=t.target;o.inputChange.emit(e.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),s("label",{key:"5d6eb65016ffb43f57a21520286eb9e46ef99913",class:"zonos--floated-label","data-label":this.inputLabel})))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"]}},enumerable:false,configurable:true});return o}());p.style=h}}}));
1
+ System.register(["./p-7261e245.system.js","./p-47a1d469.system.js","./p-23e7c655.system.js","./p-30e9a6d7.system.js","./p-d938f42f.system.js"],(function(o){"use strict";var t,e,s,n,a,l,i,r;return{setters:[function(o){t=o.r;e=o.d;s=o.h;n=o.a;a=o.g},function(o){l=o.f},function(o){i=o.c},function(o){r=o.g},function(){}],execute:function(){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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var h=d;var p=o("zonos_input",function(){function o(o){t(this,o);this.inputChange=e(this,"inputChange",7);this.inputValue="";this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return s(n,{key:"c4745840fd40940032af2a46f2dab9d0d3096265",class:i(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--zonos--border-radius":r(),"--zonos--font-family":l()}},s("div",{key:"7044d3e1877088b30016193eabf24ee36b0ad3c3",class:i(["zonos--label-wrapper",this.isDisabled&&"disabled"])},s("input",{key:"6ec2033248f6176c9d5baab8b0a4e74201a6761c",class:i(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:function(t){var e=t.target;o.inputChange.emit(e.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),s("label",{key:"5d6eb65016ffb43f57a21520286eb9e46ef99913",class:"zonos--floated-label","data-label":this.inputLabel})))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"]}},enumerable:false,configurable:true});return o}());p.style=h}}}));
@@ -1,4 +1,4 @@
1
- import{z as e,c as o}from"./p-701d9a7c.js";import{t as n,v as t,E as r,A as a,b as i,d as s,x as c,y as u,J as l,z as d,B as p,u as f,h as y,I as v}from"./p-33910e8b.js";import{t as b,s as h}from"./p-41619f29.js";import{h as m,g as w,l as j,j as P}from"./p-41dd1cb8.js";import{i as k}from"./p-cd34ecf2.js";import{l as I}from"./p-0a377722.js";import{i as O,e as E,s as S}from"./p-896fb969.js";
1
+ import{z as e,c as o}from"./p-9a417eeb.js";import{t as n,v as t,E as r,A as a,b as i,d as s,x as c,y as u,J as l,z as d,B as p,u as f,h as y,I as v}from"./p-2c0a627d.js";import{t as b,s as h}from"./p-043e9a84.js";import{h as m,g as w,l as j,j as P}from"./p-41dd1cb8.js";import{i as k}from"./p-5c30d04b.js";import{l as I}from"./p-0a377722.js";import{i as O,e as E,s as S}from"./p-3d28353a.js";
2
2
  /*!
3
3
  * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
4
4
  * Copyright 2020-present, PayPal, Inc. All rights reserved.