@zonos/elements 1.3.289 → 1.3.291

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 (284) hide show
  1. package/dist/cjs/{cart-WLQb2hbe.js → cart-B6Aty-21.js} +3 -3
  2. package/dist/cjs/{collect-B92uIdsY.js → collect-Oeo5tjN5.js} +3 -3
  3. package/dist/cjs/{debounce-5sZmmlCI.js → debounce-Cd2emZPn.js} +2 -2
  4. package/dist/cjs/{debounce-Nu2lJW4A.js → debounce-vY0QYT6o.js} +1 -1
  5. package/dist/cjs/{getBorderRadius-DGZiQu09.js → getBorderRadius-CyYZw4qq.js} +1 -1
  6. package/dist/cjs/{getMissingRequiredShippingFields-5w62gTIB.js → getMissingRequiredShippingFields-D03ICqss.js} +1 -1
  7. package/dist/cjs/{hasInclusivePrice-hmV0Inld.js → hasInclusivePrice-CPCoVeU3.js} +1 -1
  8. package/dist/cjs/index.cjs.js +7 -7
  9. package/dist/cjs/{invoice-Bal1mqYR.js → invoice-Cj8W7NW0.js} +3 -3
  10. package/dist/cjs/{localization-C5HPlCNK.js → localization-BzNeXeDe.js} +25 -16
  11. package/dist/cjs/{paypal-o164C26_.js → paypal-CuKshRmZ.js} +4 -4
  12. package/dist/cjs/{placeTestOrder-C7tAipav.js → placeTestOrder-7czjwkjm.js} +2 -2
  13. package/dist/cjs/{renderCheckoutCurrency-Bpx-vrTQ.js → renderCheckoutCurrency-BH8t2b2x.js} +2 -2
  14. package/dist/cjs/{shouldShowLanguageSelect-CtwkMt8b.js → shouldShowLanguageSelect-yAbtCmd8.js} +1 -1
  15. package/dist/cjs/{submitGtag-CcEL-w5D.js → submitGtag-D79e8u6s.js} +1 -1
  16. package/dist/cjs/{throttle-BcxGntLr.js → throttle-zSVRQLC0.js} +2 -2
  17. package/dist/cjs/{updateCheckoutSessionAttributes-Dltl5RBx.js → updateCheckoutSessionAttributes-jMtfOL2m.js} +1 -1
  18. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +7 -7
  19. package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
  20. package/dist/cjs/zonos-address_4.cjs.entry.js +6 -6
  21. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +5 -5
  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 +2 -2
  25. package/dist/cjs/zonos-card_5.cjs.entry.js +6 -6
  26. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +14 -14
  27. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
  28. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -9
  29. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  30. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +4 -4
  31. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +10 -10
  32. package/dist/cjs/zonos-collect.cjs.entry.js +7 -7
  33. package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
  34. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  35. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  36. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  37. package/dist/cjs/zonos-hello.cjs.entry.js +129 -51
  38. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +6 -6
  40. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +10 -10
  41. package/dist/cjs/zonos-invoice.cjs.entry.js +7 -7
  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 +5 -5
  45. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  46. package/dist/cjs/zonos-stripe-input.cjs.entry.js +2 -2
  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/cjs/{zonosStore-BCNYr6Tk.js → zonosStore-Bx9jK82G.js} +2 -0
  50. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +17 -15
  51. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +29 -52
  52. package/dist/collection/components/store/hello/localization.js +4 -1
  53. package/dist/collection/components/store/zonosStore.js +2 -0
  54. package/dist/collection/components/utils/hello/countryOverrideStorage.js +20 -14
  55. package/dist/collection/components/utils/hello/resolveHelloFloatPlacement.js +98 -0
  56. package/dist/collection/types/generated/graphql.internal.types.js +176 -9
  57. package/dist/esm/{cart-BDc4RTBJ.js → cart-BoQp8Ema.js} +3 -3
  58. package/dist/esm/{collect-NRCK3t-M.js → collect-CdrR5OBy.js} +3 -3
  59. package/dist/esm/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +1 -1
  60. package/dist/esm/{debounce-DWPsxJsW.js → debounce-CrmpwbEE.js} +2 -2
  61. package/dist/esm/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
  62. package/dist/esm/{getMissingRequiredShippingFields-D-B-N1NH.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +1 -1
  63. package/dist/esm/{hasInclusivePrice-Bti4iudO.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
  64. package/dist/esm/index.js +7 -7
  65. package/dist/esm/{invoice-DsvQvu4a.js → invoice-S1KahJ_Z.js} +3 -3
  66. package/dist/esm/{localization-Bs6hVcKV.js → localization-BIh-4pc_.js} +25 -16
  67. package/dist/esm/{paypal-BqyEZS_u.js → paypal-DNfvnuUU.js} +4 -4
  68. package/dist/esm/{placeTestOrder-x3xwMAnW.js → placeTestOrder-CQaMKFOg.js} +2 -2
  69. package/dist/esm/{renderCheckoutCurrency-DIBdWKN1.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
  70. package/dist/esm/{shouldShowLanguageSelect-Bb9sbQ41.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
  71. package/dist/esm/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
  72. package/dist/esm/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
  73. package/dist/esm/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
  74. package/dist/esm/zonos-address-completion-dialog_7.entry.js +7 -7
  75. package/dist/esm/zonos-address-display_2.entry.js +3 -3
  76. package/dist/esm/zonos-address_4.entry.js +6 -6
  77. package/dist/esm/zonos-airwallex-payment.entry.js +5 -5
  78. package/dist/esm/zonos-badge.entry.js +1 -1
  79. package/dist/esm/zonos-banner.entry.js +1 -1
  80. package/dist/esm/zonos-button_3.entry.js +2 -2
  81. package/dist/esm/zonos-card_5.entry.js +6 -6
  82. package/dist/esm/zonos-cart-items_12.entry.js +14 -14
  83. package/dist/esm/zonos-checkbox_2.entry.js +2 -2
  84. package/dist/esm/zonos-checkout.entry.js +9 -9
  85. package/dist/esm/zonos-collapse.entry.js +1 -1
  86. package/dist/esm/zonos-collect-cart-items_3.entry.js +4 -4
  87. package/dist/esm/zonos-collect-finish_6.entry.js +10 -10
  88. package/dist/esm/zonos-collect.entry.js +7 -7
  89. package/dist/esm/zonos-controller.entry.js +5 -5
  90. package/dist/esm/zonos-country-flag.entry.js +2 -2
  91. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  92. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  93. package/dist/esm/zonos-hello.entry.js +129 -51
  94. package/dist/esm/zonos-input.entry.js +2 -2
  95. package/dist/esm/zonos-invoice-cart-items_2.entry.js +6 -6
  96. package/dist/esm/zonos-invoice-finish_5.entry.js +10 -10
  97. package/dist/esm/zonos-invoice.entry.js +7 -7
  98. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  99. package/dist/esm/zonos-logo.entry.js +1 -1
  100. package/dist/esm/zonos-policy-consent_2.entry.js +5 -5
  101. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  102. package/dist/esm/zonos-stripe-input.entry.js +2 -2
  103. package/dist/esm/zonos-text.entry.js +1 -1
  104. package/dist/esm/zonos-v-stack.entry.js +1 -1
  105. package/dist/esm/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +2 -0
  106. package/dist/esm-es5/{cart-BDc4RTBJ.js → cart-BoQp8Ema.js} +1 -1
  107. package/dist/esm-es5/{collect-NRCK3t-M.js → collect-CdrR5OBy.js} +1 -1
  108. package/dist/esm-es5/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +7 -7
  109. package/dist/esm-es5/debounce-CrmpwbEE.js +1 -0
  110. package/dist/esm-es5/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
  111. package/dist/esm-es5/{getMissingRequiredShippingFields-D-B-N1NH.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +3 -3
  112. package/dist/esm-es5/{hasInclusivePrice-Bti4iudO.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
  113. package/dist/esm-es5/index.js +4 -4
  114. package/dist/esm-es5/{invoice-DsvQvu4a.js → invoice-S1KahJ_Z.js} +1 -1
  115. package/dist/esm-es5/{localization-Bs6hVcKV.js → localization-BIh-4pc_.js} +14 -4
  116. package/dist/esm-es5/{paypal-BqyEZS_u.js → paypal-DNfvnuUU.js} +1 -1
  117. package/dist/esm-es5/{placeTestOrder-x3xwMAnW.js → placeTestOrder-CQaMKFOg.js} +1 -1
  118. package/dist/esm-es5/{renderCheckoutCurrency-DIBdWKN1.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
  119. package/dist/esm-es5/{shouldShowLanguageSelect-Bb9sbQ41.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
  120. package/dist/esm-es5/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
  121. package/dist/esm-es5/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
  122. package/dist/esm-es5/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
  123. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
  124. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  125. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  126. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  127. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  128. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  129. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  130. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  131. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  132. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  133. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  134. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  135. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  136. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  137. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  138. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  139. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  140. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  141. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  142. package/dist/esm-es5/zonos-hello.entry.js +21 -24
  143. package/dist/esm-es5/zonos-input.entry.js +1 -1
  144. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  145. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  146. package/dist/esm-es5/zonos-invoice.entry.js +3 -3
  147. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  148. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  149. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  150. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  151. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  152. package/dist/esm-es5/zonos-text.entry.js +1 -1
  153. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  154. package/dist/esm-es5/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +1 -1
  155. package/dist/scripts/index.d.ts +36 -6
  156. package/dist/scripts/index.js +1 -1
  157. package/dist/scripts/loadZonos.js +1 -1
  158. package/dist/scripts/zonos.js +1 -1
  159. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +5 -3
  160. package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +1 -1
  161. package/dist/types/components/utils/hello/resolveHelloFloatPlacement.d.ts +39 -0
  162. package/dist/types/components.d.ts +4 -6
  163. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +10 -0
  164. package/dist/types/types/generated/graphql.internal.types.d.ts +239 -11
  165. package/dist/types/types/generated/graphql.internal.types.ts +302 -15
  166. package/dist/types/types/hello/HelloConfig.d.ts +12 -0
  167. package/dist/zonos-elements/index.esm.js +1 -1
  168. package/dist/zonos-elements/{p-d9527bd7.system.entry.js → p-04bded81.system.entry.js} +45 -45
  169. package/dist/zonos-elements/{p-18021e6b.entry.js → p-06fe2939.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-058f07aa.system.entry.js → p-0a4a7742.system.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-d261f27c.system.entry.js → p-0b81f8b9.system.entry.js} +16 -16
  172. package/dist/zonos-elements/{p-c5f17bad.entry.js → p-0fca452b.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-72b6a006.system.entry.js → p-11defdca.system.entry.js} +18 -18
  174. package/dist/zonos-elements/{p-1568ab06.system.entry.js → p-1409de3b.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-2466b5f0.system.entry.js → p-17c7ea4a.system.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-8328f44d.entry.js → p-193d9722.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-22fab1ba.system.entry.js → p-195f6e38.system.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-cc5306fe.system.entry.js → p-1bac5ac1.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-128485dc.entry.js → p-1c150f26.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-c4713ff1.system.entry.js → p-23352709.system.entry.js} +4 -4
  181. package/dist/zonos-elements/{p-cc949df1.system.entry.js → p-244e0302.system.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-e9a3bc27.system.entry.js → p-249c1ee1.system.entry.js} +3 -3
  183. package/dist/zonos-elements/{p-7681798d.entry.js → p-24f3c547.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-5c08d36b.entry.js → p-2603dce0.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-b78bab27.entry.js → p-34656e6c.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-4625058a.entry.js → p-39ee1558.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-f8fd756a.system.entry.js → p-474e8a92.system.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-0ff26236.system.entry.js → p-4806b264.system.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-56159b7c.system.entry.js → p-5016d71b.system.entry.js} +58 -58
  190. package/dist/zonos-elements/{p-b96666ca.system.entry.js → p-51400242.system.entry.js} +3 -3
  191. package/dist/zonos-elements/{p-e126e9bd.system.entry.js → p-5236c676.system.entry.js} +80 -80
  192. package/dist/zonos-elements/{p-cf53f67a.entry.js → p-550d4eea.entry.js} +1 -1
  193. package/dist/zonos-elements/{p-36559431.system.entry.js → p-552fbde1.system.entry.js} +21 -21
  194. package/dist/zonos-elements/{p-a6faab6a.entry.js → p-55916c90.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-317d4665.system.entry.js → p-5b80aff2.system.entry.js} +15 -15
  196. package/dist/zonos-elements/p-69c3e367.system.entry.js +118 -0
  197. package/dist/zonos-elements/{p-3cc27e0e.system.entry.js → p-6abec43f.system.entry.js} +4 -4
  198. package/dist/zonos-elements/{p-635341d6.entry.js → p-6c41b00c.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-d451d5bc.system.entry.js → p-6db7c0b1.system.entry.js} +4 -4
  200. package/dist/zonos-elements/{p-cc17a230.entry.js → p-6e296228.entry.js} +1 -1
  201. package/dist/zonos-elements/{p-beeb9d36.system.entry.js → p-756d303f.system.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-B6X55m0b.js → p-7abqRc9V.js} +2 -2
  203. package/dist/zonos-elements/{p-3d536086.entry.js → p-82595838.entry.js} +1 -1
  204. package/dist/zonos-elements/{p-34d1545a.entry.js → p-83aa1c8c.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-CaUXHglQ.system.js → p-8PPEbm_0.system.js} +9 -9
  206. package/dist/zonos-elements/{p-b6deae2b.system.entry.js → p-92fe9a1f.system.entry.js} +2 -2
  207. package/dist/zonos-elements/{p-5eb82be3.entry.js → p-938fc1e4.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-CZl1nwqv.system.js → p-B4Ufchqh.system.js} +3 -3
  209. package/dist/zonos-elements/p-BGktDPwA.system.js +1 -0
  210. package/dist/zonos-elements/{p-D2fOB4Wn.system.js → p-Be3Hpms1.system.js} +1 -1
  211. package/dist/zonos-elements/{p-D0erXw7p.js → p-BpDCLBwW.js} +1 -1
  212. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  213. package/dist/zonos-elements/{p-CPnR_T0a.system.js → p-BuU_p5DP.system.js} +58 -58
  214. package/dist/zonos-elements/{p-CaAod213.system.js → p-CBx5nYet.system.js} +1 -1
  215. package/dist/zonos-elements/{p-UM1aYZBV.system.js → p-CEK_Wk6v.system.js} +1 -1
  216. package/dist/zonos-elements/p-CFbfEmjN.js +1 -0
  217. package/dist/zonos-elements/{p-nU86HJ5w.js → p-CUaf1cEg.js} +1 -1
  218. package/dist/zonos-elements/p-C_z9WL8a.js +1 -0
  219. package/dist/zonos-elements/p-CcJF6xhQ.js +1 -0
  220. package/dist/zonos-elements/p-Cxuiqv1I.js +1 -0
  221. package/dist/zonos-elements/p-D-bZg-Pc.js +1 -0
  222. package/dist/zonos-elements/{p-CH6tsv9B.system.js → p-D4MevhAL.system.js} +3 -3
  223. package/dist/zonos-elements/{p-BybDGrH4.system.js → p-DI2vXnXc.system.js} +3 -3
  224. package/dist/zonos-elements/{p-CQyFoOXW.system.js → p-DNc279vN.system.js} +13 -13
  225. package/dist/zonos-elements/{p-Cd9xIgx7.system.js → p-DOD2I44l.system.js} +92 -82
  226. package/dist/zonos-elements/p-DQZncB2d.system.js +9 -0
  227. package/dist/zonos-elements/{p-NL_Eiq6m.system.js → p-DS-qw_qc.system.js} +15 -15
  228. package/dist/zonos-elements/p-DZ2mevDK.js +1 -0
  229. package/dist/zonos-elements/{p-uV7m6KrY.system.js → p-DoEHepOc.system.js} +1 -1
  230. package/dist/zonos-elements/{p-D4WI0B6-.system.js → p-DuufSrhH.system.js} +4 -4
  231. package/dist/zonos-elements/{p-MHVIIOVE.js → p-DzLNk-Pf.js} +1 -1
  232. package/dist/zonos-elements/{p-DqEtY53c.js → p-FRWZayxL.js} +1 -1
  233. package/dist/zonos-elements/p-Mrz_lnC1.js +1 -0
  234. package/dist/zonos-elements/{p-CtEsvWI6.js → p-W82paT5F.js} +1 -1
  235. package/dist/zonos-elements/{p-CVQ7-7E2.system.js → p-XDxdMlQl.system.js} +22 -22
  236. package/dist/zonos-elements/{p-CuhGrJBA.system.js → p-XqkqjeNV.system.js} +1 -1
  237. package/dist/zonos-elements/{p-8cac7911.system.entry.js → p-a40fd99b.system.entry.js} +12 -12
  238. package/dist/zonos-elements/{p-b68ca96f.entry.js → p-a938c174.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-9ebe9a36.entry.js → p-acd50b0b.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-fcfac62f.system.entry.js → p-b2dd7f02.system.entry.js} +1 -1
  241. package/dist/zonos-elements/{p-0f603278.system.entry.js → p-b5882fbb.system.entry.js} +2 -2
  242. package/dist/zonos-elements/{p-e582ae2a.entry.js → p-b79036fc.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-6c6c65f0.entry.js → p-bb3546c0.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-02628b9f.entry.js → p-c1cbfdba.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-b88e521e.system.entry.js → p-c3646ae6.system.entry.js} +19 -19
  246. package/dist/zonos-elements/{p-be64d823.system.entry.js → p-c403f004.system.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-c090cc60.entry.js → p-c47ce656.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-68e0180a.entry.js → p-c5bab786.entry.js} +1 -1
  249. package/dist/zonos-elements/{p-628a0f7f.entry.js → p-c961caaf.entry.js} +1 -1
  250. package/dist/zonos-elements/p-c9QtIdJX.js +1 -0
  251. package/dist/zonos-elements/{p-CGkdA4pY.js → p-clDfq9AL.js} +1 -1
  252. package/dist/zonos-elements/p-d168023b.entry.js +1 -0
  253. package/dist/zonos-elements/{p-3e59d41c.entry.js → p-d3d0656a.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-9b6482ef.entry.js → p-d4d2b39e.entry.js} +1 -1
  255. package/dist/zonos-elements/p-d74bc3e8.entry.js +1 -0
  256. package/dist/zonos-elements/p-db87b0dd.entry.js +1 -0
  257. package/dist/zonos-elements/{p-f44631d5.entry.js → p-dea26048.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-5e074243.entry.js → p-defc2d18.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-bdba7d9e.system.entry.js → p-dfc87b10.system.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-03fbe813.system.entry.js → p-e005b6a5.system.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-02ff6f8b.system.entry.js → p-e0e9cff5.system.entry.js} +42 -42
  262. package/dist/zonos-elements/p-f8b50aa0.entry.js +1 -0
  263. package/dist/zonos-elements/{p-ClUEwqZW.system.js → p-kaOxUR9u.system.js} +6 -6
  264. package/dist/zonos-elements/p-rVp8hgWw.js +1 -0
  265. package/dist/zonos-elements/{p-i1iCWKdv.js → p-sz4L-ZnB.js} +1 -1
  266. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  267. package/package.json +1 -1
  268. package/dist/esm-es5/debounce-DWPsxJsW.js +0 -1
  269. package/dist/zonos-elements/p-037d3688.entry.js +0 -1
  270. package/dist/zonos-elements/p-0466650f.entry.js +0 -1
  271. package/dist/zonos-elements/p-163b81c0.system.entry.js +0 -121
  272. package/dist/zonos-elements/p-3ERbuo5a.js +0 -1
  273. package/dist/zonos-elements/p-97f848f6.entry.js +0 -1
  274. package/dist/zonos-elements/p-9H2p9XKE.js +0 -1
  275. package/dist/zonos-elements/p-BANhKkF2.system.js +0 -1
  276. package/dist/zonos-elements/p-BJufDgh3.js +0 -1
  277. package/dist/zonos-elements/p-BSgVcCxT.system.js +0 -9
  278. package/dist/zonos-elements/p-CpvnCfKt.js +0 -1
  279. package/dist/zonos-elements/p-CtKp6AQ4.js +0 -1
  280. package/dist/zonos-elements/p-DdpeA8cH.js +0 -1
  281. package/dist/zonos-elements/p-DkirvyAh.js +0 -1
  282. package/dist/zonos-elements/p-a6354d15.entry.js +0 -1
  283. package/dist/zonos-elements/p-opB7B9YB.js +0 -1
  284. package/dist/zonos-elements/p-t_ClFAJR.js +0 -1
@@ -1 +1 @@
1
- import{p as e,B as o,c as i,w as t,N as n,H as r,b as a}from"./p-_lt63o7c.js";export{s as setNonce}from"./p-_lt63o7c.js";import{g as l}from"./p-DQuL1Twl.js";var d=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const i=o.call(this,!1),t=this.childNodes;if(e)for(let e=0;e<t.length;e++)2!==t[e].nodeType&&i.appendChild(t[e].cloneNode(!0));return i}};(()=>{o.isDev&&!o.isTesting&&i("Running in development mode."),o.cloneNodeFix&&d(r.prototype);const s=o.scriptDataOpts?t.document&&Array.from(t.document.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)):null,a=import.meta.url,l=o.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a(JSON.parse('[["p-5c08d36b",[[257,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-037d3688",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"isOverlayLoading":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"shouldShowFedexShippingConsentDialog":[32],"detectedDomesticCheckoutDialogOpen":[32],"redirectToDomesticCheckoutDialogOpen":[32],"loggedInIntlAddressConfirmDialogOpen":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":[{"appearanceSettingsOverrideChanged":0},{"handleAppearanceSettingsOverrideChange":0}],"overrideStagingMode":[{"overrideStagingModeChanged":0}],"mobile":[{"handleMobileChange":0}],"defaultAddress":[{"handleAddressChange":0}],"customerProfile":[{"handleCustomerProfileChange":0}],"clientSecret":[{"handleClientSecretChange":0}],"stripeCustomerSessionClientSecret":[{"handleClientSecretChange":0}],"open":[{"handleOpenChange":0}]}]]],["p-68e0180a",[[2,"zonos-collect",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReview":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-a6354d15",[[2,"zonos-invoice",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-97f848f6",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"desktopLocationOverride":[1,"desktop-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"showDialog":[{"showDialogHandler":0}],"appearanceSettingsOverride":[{"handleAppearanceSettingsOverrideChange":0}]}]]],["p-cf53f67a",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"initCollectElement":[64],"initInvoiceElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-fe778437",[[257,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-eadaefdc",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-0466650f",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-9b6482ef",[[273,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":[{"iconChangeHandler":0}]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-628a0f7f",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":[{"isOpenHandler":0}]}]]],["p-5eb82be3",[[2,"zonos-airwallex-payment",{"hasError":[32],"clientSecret":[32]},null,{"clientSecret":[{"clientSecretWatcher":0}]}]]],["p-b68ca96f",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"isMobile":[4,"is-mobile"],"selectedItem":[16]}]]],["p-6c6c65f0",[[1,"zonos-store-credit",{"enabled":[4],"customAmountInput":[32]}],[1,"zonos-policy-consent"]]],["p-31ac495f",[[257,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-02628b9f",[[1,"zonos-invoice-cart-items",{"isMobile":[4,"is-mobile"],"errorImages":[32],"locale":[32]}],[1,"zonos-invoice-subtotal",{"isMobile":[4,"is-mobile"]}]]],["p-128485dc",[[257,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-8328f44d",[[257,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-4625058a",[[2,"zonos-invoice-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-invoice-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-invoice-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-invoice-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-invoice-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]]]],["p-18021e6b",[[1,"zonos-collect-cart-items",{"errorImages":[32]}],[1,"zonos-skeleton",{"skeletonWidth":[1,"skeleton-width"],"skeletonHeight":[1,"skeleton-height"],"dismissHandler":[16]}],[257,"zonos-h-stack",{"spacing":[2]}]]],["p-cc17a230",[[2,"zonos-collect-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-collect-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-collect-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-collect-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-collect-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-collect-subtotal",{"subtotals":[32]}]]],["p-3e59d41c",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":[{"onInputValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-635341d6",[[257,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"loadingTitle":[1,"loading-title"],"loadingText":[1,"loading-text"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}]]],["p-7681798d",[[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-9ebe9a36",[[257,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-34d1545a",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":[{"onInputValueChange":0}]}]]],["p-f44631d5",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-a6faab6a",[[257,"zonos-v-stack",{"spacing":[2]}]]],["p-c5f17bad",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"buffer":[2],"scrollTop":[32],"totalHeight":[32],"containerDimensions":[32]},null,{"itemHeights":[{"updateTotalHeight":0}],"fallbackItemHeight":[{"updateTotalHeight":0}]}]]],["p-5e074243",[[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-loading-overlay",{"open":[4],"spinnerColor":[1,"spinner-color"],"size":[2]}],[262,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32],"prevCountry":[32],"prevPostalCode":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"stripe":[{"watchInitStripe":0}],"defaultAddress":[{"defaultAddressChanged":0}]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32],"retriesInitializeLink":[32]},null,{"isStagingMode":[{"watchIsStagingMode":0}],"stripe":[{"watchInitStripe":0}],"clientSecret":[{"watchInitStripe":0}],"defaultEmail":[{"watchDefaultEmail":0}]}]]],["p-3d536086",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":[{"watchTranslatedShippingAddress":0}],"translatedBillingAddress":[{"watchTranslatedBillingAddress":0}]}],[262,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"defaultAddress":[{"defaultAddressChanged":0}],"line1":[{"line1Changed":0}],"city":[{"formFieldsChanged":0}],"country":[{"formFieldsChanged":0},{"countryChanged":0}],"firstName":[{"formFieldsChanged":0}],"lastName":[{"formFieldsChanged":0}],"line2":[{"formFieldsChanged":0}],"phone":[{"formFieldsChanged":0}],"postalCode":[{"formFieldsChanged":0}],"state":[{"formFieldsChanged":0}],"addressService":[{"shouldEnabledCustomAddressChanged":0}]}],[1,"zonos-address-completion-dialog",{"continueLoading":[4,"continue-loading"],"dialogOpen":[4,"dialog-open"],"isMobile":[4,"is-mobile"],"missingFields":[16],"shippingAddress":[16],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"values":[32],"showError":[32]},null,{"dialogOpen":[{"watchDialogOpen":0}]}],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":[{"suggestionsChanged":0}]}],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryCode":[{"onCountryCodeChange":0}],"countryOptions":[{"onCountryOptionsChange":0}],"selectedCountry":[{"onSelectedCountryChange":0}],"inputValue":[{"onPhoneNumberChange":0}]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":[{"watchCurrentAddress":0}]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":[{"onOptionsChange":0}],"selectedValue":[{"onSelectedValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-e582ae2a",[[1,"zonos-language-select",{"handleOnClose":[16]}],[257,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-c090cc60",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":[{"watchIsPaymentInfoFilled":0}],"stripeElements":[{"watchInitStripe":0}],"stripe":[{"watchInitStripe":0}]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}],[257,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-b78bab27",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"shortAddressCodeErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"openCompletionDialog":[32],"missingShippingFields":[32],"isEmailError":[32],"recordedFormTypeUsed":[32],"selectedCountryCode":[32],"genericSettings":[32],"addressFormRenderType":[32],"exceededCharacterLimitErrorFieldList":[32]},null,{"showErrorBanner":[{"watchShowErrorBanner":0}],"shouldUseCustomAddressFormOverride":[{"watchShouldEnabledCustomAddress":0}],"genericSettings":[{"watchShouldEnabledCustomAddress":0}],"selectedCountryCode":[{"watchShouldEnabledCustomAddress":0}]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"isMobile":[4,"is-mobile"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32],"shippingData":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32],"isImmediateRedirecting":[32]}],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[257,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
1
+ import{p as e,B as o,c as i,w as t,N as n,H as r,b as a}from"./p-_lt63o7c.js";export{s as setNonce}from"./p-_lt63o7c.js";import{g as l}from"./p-DQuL1Twl.js";var d=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const i=o.call(this,!1),t=this.childNodes;if(e)for(let e=0;e<t.length;e++)2!==t[e].nodeType&&i.appendChild(t[e].cloneNode(!0));return i}};(()=>{o.isDev&&!o.isTesting&&i("Running in development mode."),o.cloneNodeFix&&d(r.prototype);const s=o.scriptDataOpts?t.document&&Array.from(t.document.querySelectorAll("script")).find((e=>new RegExp(`/${n}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===n)):null,a=import.meta.url,l=o.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a(JSON.parse('[["p-2603dce0",[[257,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-f8b50aa0",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"isOverlayLoading":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"shouldShowFedexShippingConsentDialog":[32],"detectedDomesticCheckoutDialogOpen":[32],"redirectToDomesticCheckoutDialogOpen":[32],"loggedInIntlAddressConfirmDialogOpen":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":[{"appearanceSettingsOverrideChanged":0},{"handleAppearanceSettingsOverrideChange":0}],"overrideStagingMode":[{"overrideStagingModeChanged":0}],"mobile":[{"handleMobileChange":0}],"defaultAddress":[{"handleAddressChange":0}],"customerProfile":[{"handleCustomerProfileChange":0}],"clientSecret":[{"handleClientSecretChange":0}],"stripeCustomerSessionClientSecret":[{"handleClientSecretChange":0}],"open":[{"handleOpenChange":0}]}]]],["p-c5bab786",[[2,"zonos-collect",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReview":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-db87b0dd",[[2,"zonos-invoice",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-d168023b",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"desktopLocationOverride":[1,"desktop-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"showDialog":[{"showDialogHandler":0}],"appearanceSettingsOverride":[{"handleAppearanceSettingsOverrideChange":0}]}]]],["p-550d4eea",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"initCollectElement":[64],"initInvoiceElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-fe778437",[[257,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-eadaefdc",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-d74bc3e8",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-d4d2b39e",[[273,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":[{"iconChangeHandler":0}]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-c961caaf",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":[{"isOpenHandler":0}]}]]],["p-938fc1e4",[[2,"zonos-airwallex-payment",{"hasError":[32],"clientSecret":[32]},null,{"clientSecret":[{"clientSecretWatcher":0}]}]]],["p-a938c174",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"isMobile":[4,"is-mobile"],"selectedItem":[16]}]]],["p-bb3546c0",[[1,"zonos-store-credit",{"enabled":[4],"customAmountInput":[32]}],[1,"zonos-policy-consent"]]],["p-31ac495f",[[257,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-c1cbfdba",[[1,"zonos-invoice-cart-items",{"isMobile":[4,"is-mobile"],"errorImages":[32],"locale":[32]}],[1,"zonos-invoice-subtotal",{"isMobile":[4,"is-mobile"]}]]],["p-1c150f26",[[257,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-193d9722",[[257,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-39ee1558",[[2,"zonos-invoice-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-invoice-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-invoice-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-invoice-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-invoice-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]]]],["p-06fe2939",[[1,"zonos-collect-cart-items",{"errorImages":[32]}],[1,"zonos-skeleton",{"skeletonWidth":[1,"skeleton-width"],"skeletonHeight":[1,"skeleton-height"],"dismissHandler":[16]}],[257,"zonos-h-stack",{"spacing":[2]}]]],["p-6e296228",[[2,"zonos-collect-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-collect-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}],"tablet":[{"handleTabletChange":0}]}],[1,"zonos-collect-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":[{"handleCollapseChangeFromProp":0}],"collapseState":[{"handleCollapseChange":0}]}],[1,"zonos-collect-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-collect-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-collect-subtotal",{"subtotals":[32]}]]],["p-d3d0656a",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":[{"onInputValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-6c41b00c",[[257,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"loadingTitle":[1,"loading-title"],"loadingText":[1,"loading-text"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}]]],["p-24f3c547",[[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-acd50b0b",[[257,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-83aa1c8c",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":[{"onInputValueChange":0}]}]]],["p-dea26048",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-55916c90",[[257,"zonos-v-stack",{"spacing":[2]}]]],["p-0fca452b",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"buffer":[2],"scrollTop":[32],"totalHeight":[32],"containerDimensions":[32]},null,{"itemHeights":[{"updateTotalHeight":0}],"fallbackItemHeight":[{"updateTotalHeight":0}]}]]],["p-defc2d18",[[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-loading-overlay",{"open":[4],"spinnerColor":[1,"spinner-color"],"size":[2]}],[262,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32],"prevCountry":[32],"prevPostalCode":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"stripe":[{"watchInitStripe":0}],"defaultAddress":[{"defaultAddressChanged":0}]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32],"retriesInitializeLink":[32]},null,{"isStagingMode":[{"watchIsStagingMode":0}],"stripe":[{"watchInitStripe":0}],"clientSecret":[{"watchInitStripe":0}],"defaultEmail":[{"watchDefaultEmail":0}]}]]],["p-82595838",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":[{"watchTranslatedShippingAddress":0}],"translatedBillingAddress":[{"watchTranslatedBillingAddress":0}]}],[262,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"shortAddressCodeErrorMessage":[1,"short-address-code-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":[{"isAddressFilledChanged":0}],"isAddressFilled":[{"isAddressFilledChanged":0}],"defaultAddress":[{"defaultAddressChanged":0}],"line1":[{"line1Changed":0}],"city":[{"formFieldsChanged":0}],"country":[{"formFieldsChanged":0},{"countryChanged":0}],"firstName":[{"formFieldsChanged":0}],"lastName":[{"formFieldsChanged":0}],"line2":[{"formFieldsChanged":0}],"phone":[{"formFieldsChanged":0}],"postalCode":[{"formFieldsChanged":0}],"state":[{"formFieldsChanged":0}],"addressService":[{"shouldEnabledCustomAddressChanged":0}]}],[1,"zonos-address-completion-dialog",{"continueLoading":[4,"continue-loading"],"dialogOpen":[4,"dialog-open"],"isMobile":[4,"is-mobile"],"missingFields":[16],"shippingAddress":[16],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"values":[32],"showError":[32]},null,{"dialogOpen":[{"watchDialogOpen":0}]}],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":[{"suggestionsChanged":0}]}],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryCode":[{"onCountryCodeChange":0}],"countryOptions":[{"onCountryOptionsChange":0}],"selectedCountry":[{"onSelectedCountryChange":0}],"inputValue":[{"onPhoneNumberChange":0}]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":[{"watchCurrentAddress":0}]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":[{"onOptionsChange":0}],"selectedValue":[{"onSelectedValueChange":0}],"value":[{"onValueChange":0}]}]]],["p-b79036fc",[[1,"zonos-language-select",{"handleOnClose":[16]}],[257,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-c47ce656",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":[{"watchIsPaymentInfoFilled":0}],"stripeElements":[{"watchInitStripe":0}],"stripe":[{"watchInitStripe":0}]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}],[257,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-34656e6c",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"shortAddressCodeErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"openCompletionDialog":[32],"missingShippingFields":[32],"isEmailError":[32],"recordedFormTypeUsed":[32],"selectedCountryCode":[32],"genericSettings":[32],"addressFormRenderType":[32],"exceededCharacterLimitErrorFieldList":[32]},null,{"showErrorBanner":[{"watchShowErrorBanner":0}],"shouldUseCustomAddressFormOverride":[{"watchShouldEnabledCustomAddress":0}],"genericSettings":[{"watchShouldEnabledCustomAddress":0}],"selectedCountryCode":[{"watchShouldEnabledCustomAddress":0}]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":[{"continueLoadingWatcher":0}],"hasStripePaymentError":[{"stripePaymentErrorWatcher":0}]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":[{"handleMobileChange":0}]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"isMobile":[4,"is-mobile"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32],"shippingData":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32],"isImmediateRedirecting":[32]}],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[257,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/elements",
3
- "version": "1.3.289",
3
+ "version": "1.3.291",
4
4
  "description": "Zonos component UI for Stripe elements",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs.js",
@@ -1 +0,0 @@
1
- import{e as getDefaultExportFromCjs}from"./zonosStore-DrIOAz4M.js";import{r as requireDebounce}from"./debounce-D4ko2kvZ.js";var debounceExports=requireDebounce();var debounce=getDefaultExportFromCjs(debounceExports);export{debounce as d};
@@ -1 +0,0 @@
1
- import{r as o,h as e,F as t,a as s}from"./p-_lt63o7c.js";import{s as n,a as i,b as c,i as r,c as a,g as d,d as l,e as u,f as h,p as m,h as p,j as g,k as f,l as w,m as z,n as k,o as v,t as y,q as C,r as b,u as S,v as x,w as I,x as T,y as A,z as O,A as _,B,C as E,D as L,E as D,F as P,G as U,H as j,I as N,J as R,K as $}from"./p-DqEtY53c.js";import{p as F,s as M,a as H,b as K}from"./p-B6X55m0b.js";import{f as Z,a as V,b as W,i as G,l as Q,c as Y,d as J,g as q,s as X,V as oo,e as eo,t as to,h as so,j as no}from"./p-CGkdA4pY.js";import{z as io,g as co,m as ro}from"./p-CtEsvWI6.js";import{b as ao}from"./p-BycjkdlE.js";import{h as lo,g as uo,j as ho,l as mo,b as po,s as go,a as fo,i as wo}from"./p-DE4a-QD5.js";import{u as zo}from"./p-nU86HJ5w.js";import{l as ko,g as vo,b as yo}from"./p-BJmZPrZl.js";import{_ as Co,c as bo,d as So,a as xo,g as Io}from"./p-D5SpFsQJ.js";import{c as To}from"./p-BJHSB96f.js";import{c as Ao}from"./p-XQfWgQLB.js";import{g as Oo}from"./p-3ERbuo5a.js";import{i as _o}from"./p-YdrG78th.js";import{s as Bo}from"./p-BTIeCf3T.js";import{R as Eo}from"./p-C2QMVeWW.js";import"./p-Cye-evFK.js";import"./p-CICjAi70.js";import"./p-i1iCWKdv.js";import"./p-t_ClFAJR.js";import"./p-D0erXw7p.js";const Lo="isInternationalCheckout",Do=({action:o}={})=>{const e=new URL("/login.php",window.location.origin);o&&e.searchParams.set("action",o);const t=new URLSearchParams(window.location.search),s=t.get("zonosQaUrl");s&&e.searchParams.set("zonosQaUrl",s);const n=t.get("zonosQaUrlApi");return n&&e.searchParams.set("zonosQaUrlApi",n),uo()&&e.searchParams.set("zonosTestMode","1"),e.searchParams.set("from",(()=>{const o=new URLSearchParams;o.set(Lo,"true");const e=new URLSearchParams(window.location.search),t=e.get("zonosQaUrl");t&&o.set("zonosQaUrl",t);const s=e.get("zonosQaUrlApi");return s&&o.set("zonosQaUrlApi",s),uo()&&o.set("zonosTestMode","1"),`cart.php?${o.toString()}`})()),e.toString()},Po=o=>{const e=new URL(o,window.location.origin),t=new URLSearchParams(window.location.search),s=t.get("zonosQaUrl");return s&&e.searchParams.set("zonosQaUrl",s),"1"===t.get("zonosDebug")&&e.searchParams.set("zonosDebug","1"),uo()&&e.searchParams.set("zonosTestMode","1"),e.toString()},Uo={customerGroupId:null,shouldBypass:!1};let jo=null;const No=o=>{const e=(async o=>{var e,t,s,n;if(!window.Zonos.isBigCommerce)return{conclusive:!0,result:Uo};const i=null===(e=io.genericSettings)||void 0===e?void 0:e.bigcommerceBypassCustomerGroupIds;if(!(null==i?void 0:i.length))return io.loadedConfig?{conclusive:!0,result:Uo}:{conclusive:!1,result:Uo};const c=o?o.checkoutId:await V();if(!c)return ko("BigCommerce bypass check: no active cart yet, will retry on next call","info"),{conclusive:!1,result:Uo};const r=o?o.checkout:await W(c);if(!r)return ko("BigCommerce bypass check: failed to fetch checkout data, will retry","info"),{conclusive:!1,result:Uo};const a=null!==(n=null===(s=null===(t=r.customer)||void 0===t?void 0:t.customerGroup)||void 0===s?void 0:s.id)&&void 0!==n?n:null;if(null===a)return ko("BigCommerce bypass check: no customer group found (guest user)","info"),{conclusive:!0,result:Uo};const d=i.includes(a),l={customerGroupId:a,shouldBypass:d};return ko(d?`BigCommerce bypass check: customer group ${String(a)} is in bypass list; caller should keep the user on BC native checkout`:`BigCommerce bypass check: customer group ${String(a)} is not in bypass list`,"info"),{conclusive:!0,result:l}})(o),t=e.then((({conclusive:o,result:e})=>(o||jo!==t||(jo=null),e)));return jo=t,t},Ro=async(o={})=>o.forceRefresh||!jo?No(o.preFetched):jo,$o={guestCheckoutType:null},Fo="zonos--bc-checkout-settings",Mo={redirectUrl:null,shouldForceLogin:!1};let Ho=null;const Ko=()=>{if(!Ho){const o=(async()=>{var o;if(!window.Zonos.isBigCommerce)return $o;const e=null===(o=io.checkoutSettings.bigCommerceConfig)||void 0===o?void 0:o.storeHash;if(!e)return ko("BigCommerce checkout settings: no storeHash provided — skipping fetch","info"),$o;const t=(o=>{try{const e=window.localStorage.getItem(Fo);if(!e)return null;const t=ho(e);return t?t.storeHash!==o||t.expiresAt<Date.now()?null:{guestCheckoutType:t.guestCheckoutType}:null}catch(o){return null}})(e);if(t)return t;const{errors:s,json:n}=await lo("/api/bigcommerce/checkout-settings",{body:{storeHash:e},method:"POST"});if(s.length||!n)return ko("BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior","info"),$o;const i={guestCheckoutType:n.guestCheckoutType};return((o,e)=>{try{const t={expiresAt:Date.now()+36e5,guestCheckoutType:e.guestCheckoutType,storeHash:o};window.localStorage.setItem(Fo,JSON.stringify(t))}catch(o){}})(e,i),i})().then((({guestCheckoutType:e})=>e?"no_guest_checkout"===e:(Ho===o&&(Ho=null),!1))).catch((()=>(Ho===o&&(Ho=null),!1)));Ho=o}return Ho},Zo=async({preFetched:o}={})=>{if(!window.Zonos.isBigCommerce)return Mo;if(!await Ko())return Mo;const e=o?o.checkoutId:await V();if(!e)return Mo;const t=o?o.checkout:await W(e);return t?G(t)?Mo:(ko("BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php","info"),{redirectUrl:Do(),shouldForceLogin:!0}):(ko("BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue","info"),Mo)},Vo="data-zonos-login-from-rewritten",Wo='a[href*="login.php?action=create_account"]:not(['+Vo+"])",Go=()=>{const o=document.querySelectorAll(Wo);if(!o.length)return;const e=Do({action:"create_account"});o.forEach((o=>{o.setAttribute("href",e),o.setAttribute(Vo,"true")}))},Qo=(o,e)=>{if(!o.address1||!o.countryCode)return null;const t=[o.firstName,o.lastName].filter(Boolean).join(" ").trim();return{address:{city:o.city||"",country:o.countryCode,line1:o.address1,line2:o.address2||"",postal_code:o.postalCode||"",state:o.stateOrProvinceCode||o.stateOrProvince||""},email:e,name:t,phone:o.phone||""}},Yo=o=>[o.address.line1,o.address.line2||"",o.address.postal_code,o.address.country].join("|").toLowerCase(),Jo=(o=!0,e)=>{if(!Q.localizationLoaded)return!1;if(e){const t=Y(e);return o&&!t&&ko(`Checkout: ${e} is not a shippable country: ${t}`),t}return!!Q.isShippableCountry||(o&&ko("Checkout: not shippable country"),!1)},qo='select[name="shippingAddress.countryCode"]',Xo=({domesticRedirectedBtnSelector:o,onInternationalCheckoutSelected:e,onLoggedInInternationalAddressDetected:t,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const c=async o=>{var t;const s=document.querySelector((null===(t=io.genericSettings)||void 0===t?void 0:t.bigcommerceDomesticCheckoutCountrySelector)||qo),n=(null==s?void 0:s.value)||o;if(!n)return"noAction";if(!Jo(!1,n))return"noAction";const c=await V(),r={checkout:c?await W(c):null,checkoutId:c},{shouldBypass:a}=await Ro({forceRefresh:!0,preFetched:r});if(a)return ko("Bypass customer group detected on BC checkout, stopping interval","info"),"bypass";const d=await Zo({preFetched:r});if(d.shouldForceLogin&&d.redirectUrl)return window.location.href=d.redirectUrl,"redirected";e&&await e(),J({isInitializing:!1,newSelectedCountryCode:n,persistOverride:!1});const l={address1:"",address2:"",city:"",countryCode:n,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};return i({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),window.location.href=Po("/"),"redirected"};let r=!1,a=!1;let d=!1,l=!1,u=!1,h=!1,m=!1;const p=new MutationObserver((async()=>{var g;const f=document.querySelector(o),w=n();if(!f&&w){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(w),void p.disconnect()}if(!window.location.pathname.includes("/checkout")||!window.Zonos.isBigCommerce)return void p.disconnect();if(!h&&!u){u=!0,m=!0;try{const o=await(async({onInternationalCheckoutSelected:o,onLoggedInInternationalAddressDetected:e})=>{var t,s,n,c,r,a,d,l,u,h;const m=await V();if(!m)return"noAction";const p=await W(m),g={checkout:p,checkoutId:m},{shouldBypass:f}=await Ro({preFetched:g});if(f)return"noAction";const w=null===(s=null===(t=null==p?void 0:p.consignments)||void 0===t?void 0:t[0])||void 0===s?void 0:s.shippingAddress;if(!(null==w?void 0:w.countryCode))return"noAction";const z=w.countryCode;if(!Jo(!1,z))return"noAction";if(ko(e?`Logged-in user has international shipping address: ${z}, prompting user to choose checkout`:`Logged-in user has international shipping address: ${z}, redirecting automatically (legacy behavior)`,"info"),e&&"stay"===await e())return ko("User opted to stay on BigCommerce native checkout despite international default address","info"),"optedOut";const k=await Zo({preFetched:g});return k.shouldForceLogin&&k.redirectUrl?(window.location.href=k.redirectUrl,"redirected"):(o&&await o(),J({isInitializing:!1,newSelectedCountryCode:z,persistOverride:!1}),i({address1:null!==(n=w.address1)&&void 0!==n?n:"",address2:null!==(c=w.address2)&&void 0!==c?c:"",city:null!==(r=w.city)&&void 0!==r?r:"",countryCode:z,firstName:null!==(a=w.firstName)&&void 0!==a?a:"",lastName:null!==(d=w.lastName)&&void 0!==d?d:"",phone:null!==(l=w.phone)&&void 0!==l?l:"",postalCode:null!==(u=w.postalCode)&&void 0!==u?u:"",state:null!==(h=w.stateOrProvince)&&void 0!==h?h:""}),window.location.href=Po("/"),"redirected")})({onInternationalCheckoutSelected:e,onLoggedInInternationalAddressDetected:t});if("redirected"===o)return void p.disconnect();"optedOut"===o&&(h=!0,(o=>{a||(a=!0,document.addEventListener("click",(e=>{if(r)return;const{target:t}=e;if(!(t instanceof Element))return;const s=t.closest("#checkout-shipping-continue, #checkout-billing-continue, #checkout-payment-continue");s&&(e.preventDefault(),e.stopImmediatePropagation(),(async(o,e)=>{let t=!0;try{let o=null;try{o=await(async()=>{var o,e,t,s;const n=await V();if(n){const s=await W(n),i=null===(t=null===(e=null===(o=null==s?void 0:s.consignments)||void 0===o?void 0:o[0])||void 0===e?void 0:e.shippingAddress)||void 0===t?void 0:t.countryCode;if(i)return i}const i=document.querySelector((null===(s=io.genericSettings)||void 0===s?void 0:s.bigcommerceDomesticCheckoutCountrySelector)||qo);return(null==i?void 0:i.value)||null})()}catch(o){mo("Error resolving selected shipping country on BC continue",o)}o&&Jo(!1,o)&&e.disconnect(),"redirected"===(o?await c(o):"noAction")&&(t=!1)}catch(o){mo("Error handling BC continue international redirect",o)}t&&(r=!0,o.click(),r=!1)})(s,o))}),!0))})(p))}catch(o){mo("Error checking logged-in user shipping address",o)}finally{u=!1,m=!1}}const z=document.querySelector((null===(g=io.genericSettings)||void 0===g?void 0:g.bigcommerceDomesticCheckoutCountrySelector)||qo);if(!z)return;if(ko("Domestic checkout found - Listening for shipping country change","info",{value:z.value}),l)return;l=!0,p.disconnect();const k=setInterval((async()=>{if(!d&&!m){d=!0;try{const o=await c();if("redirected"===o||"bypass"===o)return void clearInterval(k);d=!1}catch(o){d=!1}}}),1e3),v=setInterval((()=>{var o;if(!window.bcStripeElements)return void clearInterval(v);const e=null===(o=window.bcStripeElements)||void 0===o?void 0:o.getElement("address");e&&(clearInterval(v),e.on("change",(o=>{const e=o.value.address.country;e&&!m&&c(e)})))}),500)}));p.observe(document.body,{childList:!0,subtree:!0})};let oe=0;const ee=o=>{var e;const t=null===(e=X.enabledVariantTestKeys)||void 0===e?void 0:e.find((e=>e.testKey===o));return(null==t?void 0:t.selectedVariantKey)||null},te=async({cartId:o,retries:e})=>{const t=uo(),{errors:s,json:n}=await lo("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:!0},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"}),i=!n||s.length;return i&&e?(ko("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:e}),await new Promise((o=>setTimeout(o,500))),te({cartId:o,retries:e-1})):i?null:n};var se='<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';const ne=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.isRedirectAfterOrder=!1,this.preview=!1,this.hiddenMode=!1,this.mobile=!1,this.defaultAddress=[],this.forceDialogOpen=!1,this.defaultAddressParams=[],this.defaultCustomerProfileAddress=[],this.customerProfile=null,this.open=this.forceDialogOpen,this.isOverlayLoading=!1,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.shouldShowFedexShippingConsentDialog=!1,this.detectedDomesticCheckoutDialogOpen=!1,this.redirectToDomesticCheckoutDialogOpen=!1,this.loggedInIntlAddressConfirmDialogOpen=!1,this.loggedInIntlAddressResolver=null,this.clientSecret=c.clientSecret,this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret,this.applyStripeTheme=async()=>{var o,e,t,s;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||io.appearance.theme;await r({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideSecondaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:F()})},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${bo}`),t=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,n=s.get("payment_intent_client_secret"),i=s.get("zonosCheckoutSessionId");if(!e)return ko("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(ko("Payment intent exist, checking stripe payment intent status"),!n)return ko("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:t};const{error:r,status:d}=await a({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(ko(r?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,X.checkoutSessionId=i,c.clientSecret=n,this.setToFinishStep(d),{shouldAllowOrder:!1}):t?(ko("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(ko("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.recoverCompletedOrderModificationSession=async o=>{X.checkoutSessionId=o;const{errors:e,json:t}=await d();if(e.length||!t)return!1;const{checkoutSession:s}=t;if(s.completedAt&&s.order)return this.setToFinishStep("succeeded"),!0;if(s.clientSecret){const{status:o}=await a({clientSecret:s.clientSecret});if("processing"===o||"succeeded"===o)return c.clientSecret=s.clientSecret,this.setToFinishStep(o),!0}return!1},this.initializeTestKeys=()=>{var o;X.enabledVariantTestKeys=(null==(o=X.enabledVariantTestKeys||[])?void 0:o.filter((o=>!(o.expiresAt&&o.expiresAt<Date.now()||!o.expiresAt))))||[];const e=io.enabledVariantTestKeys.map((o=>{var e;const t=null===(e=X.enabledVariantTestKeys)||void 0===e?void 0:e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+oo,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}}));return eo(e),{allSelected:!1}},this.shouldAllowHostedVsNativeTest=()=>"function"==typeof io.checkoutSettings.createCartId&&!!io.enabledVariantTestKeys.includes("hosted_vs_native"),this.registerTestHostedVsNative=async()=>{if(!this.shouldAllowHostedVsNativeTest())return;ko("[TEST] - Registering hosted vs native test");const o=ee("hosted_vs_native");if(o)return void ko(`[TEST] - Hosted vs native test already has variant selected: ${o}`);const e=await(async({testKeys:o})=>{if(0===o.length)return null;const{errors:e,json:t}=await lo("/api/zonos-elements/select-variance-test",{body:{testKeys:o},method:"POST"});return e.length||!t?null:Z(t)})({testKeys:["hosted_vs_native"]});if(!e)return void ko("[TEST] - Failed to get selection for hosted vs native test");const t=(({baseTestObj:o,mergeTestObj:e})=>o.map((({testKey:o})=>{const t=e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+oo,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}})))({baseTestObj:X.enabledVariantTestKeys||[],mergeTestObj:e});eo(t)},this.handleHostedVsNative=async()=>{var o;if(!this.shouldAllowHostedVsNativeTest())return{redirected:!1};const e=ee("hosted_vs_native");if(ko(`[TEST] - hosted_vs_native: ${e}`),"function"!=typeof io.checkoutSettings.createCartId)return ko("[TEST] - createCartId is not provided, skipping hosted vs native test"),{redirected:!1};if("hosted"!==e)return ko("[TEST] - Hosted vs native test is enabled for native, skipping"),{redirected:!1};if(!(null===(o=io.genericSettings)||void 0===o?void 0:o.hostedCheckoutUrl))return ko("[TEST] - Hosted checkout URL is not provided"),{redirected:!1};ko('"createCartId" is provided, start building cart');const t=await io.checkoutSettings.createCartId();let s,n=null;"object"==typeof t?(s=t.cartId,n=t.shippingData||null):s=t;const i=(()=>{const o=new URLSearchParams(window.location.search);ko("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:""},t=q(o)||Q.selectedCountryCode||"US",s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerPhone"),d=e("customerZip"),l=e("customerState");return{customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:e("customerFirstName"),customerLastName:e("customerLastName"),customerName:r,customerPhone:a,customerState:l,customerZip:d}})(),c=(({cartId:o,checkoutSessionId:e,customerAddress1:t,customerAddress2:s,customerCity:n,customerCountry:i,customerEmail:c,customerFirstName:r,customerLastName:a,customerPhone:d,customerState:l,customerZip:u,hostedCheckoutUrl:h,isTestMode:m,isVariantTest:p})=>{const g=new URLSearchParams;return g.set("tempCartUUID",o),r&&g.set("customerFirstName",r),a&&g.set("customerLastName",a),c&&g.set("customerEmail",c),d&&g.set("customerPhone",d),u&&g.set("customerZip",u),n&&g.set("customerCity",n),l&&g.set("customerState",l),i&&g.set("zCountry",i),t&&g.set("customerAddress1",t),s&&g.set("customerAddress2",s),m&&g.set("zonosTestMode","1"),e&&g.set("zonosCheckoutSessionId",e),p&&g.set("zonosVariantTest","1"),`${h}?${g.toString()}`})(Object.assign(Object.assign({cartId:s,checkoutSessionId:X.checkoutSessionId||void 0,hostedCheckoutUrl:io.genericSettings.hostedCheckoutUrl,isTestMode:uo(),isVariantTest:!0},i),n));return ko(`[TEST] - Redirecting to: ${c}`),window.open(c,"_blank"),{redirected:!0}},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.getBaseCurrencySettlementInfo=()=>{const o=l.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:e}}=o;return e?{settlementAmount:(e.discounts||0)+e.items+e.landedCostTotal+e.shipping}:null},this.prefillBigCommerceCustomerAddresses=async()=>{if(!window.Zonos.isBigCommerce)return;if(this.defaultCustomerProfileAddress.length)return;if(Array.isArray(this.defaultAddress)&&this.defaultAddress.length>0||!Array.isArray(this.defaultAddress)&&"object"==typeof this.defaultAddress&&null!==this.defaultAddress)return;const o=await V();if(!o)return;const e=await W(o);if(!G(e))return;const t=((o,e)=>{var t,s,n,i;if(!(null===(t=null==o?void 0:o.customer)||void 0===t?void 0:t.id))return[];const{isShippable:c,selectedCountryCode:r}=e,a=o.customer.email||"",d=null!==(n=null===(s=o.consignments)||void 0===s?void 0:s.flatMap((o=>o.shippingAddress?[o.shippingAddress]:[])))&&void 0!==n?n:[],l=null!==(i=o.customer.addresses)&&void 0!==i?i:[],u=new Set,h=[];for(const o of[...l,...d]){const e=Qo(o,a);if(!e)continue;if(!c(e.address.country))continue;const t=Yo(e);u.has(t)||(u.add(t),h.push(e))}return r?h.map(((o,e)=>({index:e,option:o}))).sort(((o,e)=>{const t=o.option.address.country===r;return t===(e.option.address.country===r)?o.index-e.index:t?-1:1})).map((o=>o.option)):h})(e,{isShippable:o=>Jo(!1,o),selectedCountryCode:Q.selectedCountryCode||void 0});t.length&&(this.defaultCustomerProfileAddress.length||(this.defaultCustomerProfileAddress=t,ko(`Prefilled ${String(t.length)} BigCommerce customer address(es) for logged-in shopper`,"info")))},this.getDefaultAddress=()=>this.defaultCustomerProfileAddress.length?this.defaultCustomerProfileAddress:Array.isArray(this.defaultAddress)&&this.defaultAddress.length?this.defaultAddress:Array.isArray(this.defaultAddress)||"object"!=typeof this.defaultAddress?this.defaultAddressParams:[this.defaultAddress],this.handleHostedOpenWindowCallback=o=>{var e;const t=null===(e=io.genericSettings)||void 0===e?void 0:e.hostedCheckoutUrl;if(!origin)return;const s=["dev.checkout.elements.zonos.com"].some((e=>o.origin.includes(e)));o.origin!==t&&!s||"zonos-checkout-session-update"!==o.data.type||(X.checkoutSessionId=o.data.checkoutSessionId)},this.captureParamsRedirectedForVariantTest=()=>{const o=new URL(window.location.href);if("1"!==o.searchParams.get("zonosVariantTest"))return;const e=o.searchParams.get("zonosCheckoutSessionId");e&&(X.checkoutSessionId=e);const t=X.enabledVariantTestKeys||[];window.Zonos.isLegacyCheckout&&(ee("hosted_vs_native")?eo(t.map((o=>"hosted_vs_native"===o.testKey?Object.assign(Object.assign({},o),{selectedVariantKey:"hosted"}):o))):(t.push({expiresAt:Date.now()+oo,selectedVariantKey:"hosted",testKey:"hosted_vs_native"}),eo(t))),o.searchParams.delete("zonosCheckoutSessionId"),o.searchParams.delete("zonosVariantTest"),window.history.replaceState({},"",o.toString())}}async initCartInfoHandler(o){u({adjustments:l.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,t;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,M({event:"zonos-checkout-close",metadata:{checkoutSessionId:X.checkoutSessionId}}),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||h(),this.preview||m(),l.step="customer-info",p(),g(),null===(t=(e=io.checkoutSettings).onClose)||void 0===t||t.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){var o;if("function"==typeof io.checkoutSettings.createCartId){ko('"createCartId" is provided, start building cart'),l.customMessage=[];const o=await io.checkoutSettings.createCartId();let e;"object"==typeof o?(ko("object detected, use cartId and prefill address from createCartId","info",o),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData),l.customerAuthenticationToken=o.customerAuthenticationToken||null,l.customMessage=Array.isArray(o.customMessage)?o.customMessage.filter((o=>"string"==typeof o)):[]):e=o,window.Zonos.cartId=e;const t=await(async o=>{const{isDgsCartId:e,isLegacyCartId:t}=Co(o);if(!t&&!e)return mo("[ZONOS - loadZonos] invalid cart id"),null;const s=await te({cartId:o,retries:5});return ko("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(mo("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(e),s=null==t?void 0:t.cartData;if(!s)return mo("Failed to build cart, please try again."),!1;window.Zonos.cartData=s;const{adjustments:n,cartItems:i}=ao(s);await u({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){ko("tempCartUUID is provided, start building cart");const e=null===(o=window.Zonos.cartData.references)||void 0===o?void 0:o.checkoutSessionId;if(e){if(ko("Setting checkout session id from cart reference","info",e),await this.recoverCompletedOrderModificationSession(e))return c.isFetchingSession=!1,!0;X.checkoutSessionId=e}else ko("Clear checkout session id from storage so we start from a fresh session for this cart"),X.checkoutSessionId=null;const{adjustments:t,cartItems:s}=ao(window.Zonos.cartData);await u({adjustments:t,cartItems:s})}else if(io.checkoutSettings.buildCartDetail&&Q.selectedCountryCode){ko("build cart detail");const o=await io.checkoutSettings.buildCartDetail({countryCode:Q.selectedCountryCode,currencyCode:Q.targetCurrency}),e=o.filter((o=>o.amount>=0)),t=o.filter((o=>o.amount<0));ko("cartItems","info",{cartItems:o});const s=t.map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await u({adjustments:s,cartItems:e})}if(!X.checkoutSessionId){const o=await f();if(ko(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}l.isStagingMode||w(),await this.applyStripeTheme();const{successBehavior:e,successRedirectUrl:t}=io.checkoutSettings;return this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===e||"CLOSE_MODAL"===e&&!!t||!!l.externalConfirmationPageURL,z()&&(l.step="payment"),!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=ho(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;ko(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>t)return ko(`=== Existing placed order info is older than ${t}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,ko("=== Showing order duplication confirmation","warn")}recordCheckoutInfo(){X.checkoutSessionId&&zo({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:X.checkoutSessionId})}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,X.checkoutSessionId&&zo({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:X.checkoutSessionId})}markTheSessionAsAbandonedCart(){X.checkoutSessionId&&zo({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:X.checkoutSessionId})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||io.onlineStoreSettings.url;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=io.checkoutSettings.placeOrderButtonSelector,e=io.checkoutSettings.alwaysTriggerInternationalCheckoutSelector,t=!!document.querySelector(`#${bo}`);if(ko(`attach checkout ${o}`,"info",{href:window.location.href}),ko(`attach checkout to always trigger international checkout selector: ${e}`),!(o||e||window.Zonos.cartData||t))return;const s=[o,e,`#${So}`,`#${bo}`,`#${xo}`].filter(Boolean);document.querySelectorAll(s.join(",")).forEach((t=>{t.getAttribute("data-zonos-checkout-attached")||(ko(`attached event to button ${o}`,"info",{button:t}),t.addEventListener("click",(async o=>{var s,n;const i=performance.now(),r=e&&t.matches(e),a=t.matches(`#${xo}`),d=t.matches(`#${So}`)||t.matches(`#${bo}`);if(!window.Zonos.isLegacyCheckout&&(!Jo()||((o=!0)=>!Q.localizationLoaded||!!Q.isDisabledCountry&&(o&&ko("Checkout: disabled country"),!0))())&&!r&&!a&&!d)return;o.preventDefault(),o.stopPropagation(),ko("zonos checkout button clicked");const{shouldAllowOrder:u}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(u){if(window.Zonos.logIntervalId||(window.Zonos.logIntervalId=setInterval((()=>{(async()=>{if(0===window.Zonos.loadTimeApiInfoList.length)return;ko("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});const o={data:[...window.Zonos.loadTimeApiInfoList],storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;const{errors:e}=await lo("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"});e.length&&(window.Zonos.loadTimeApiInfoList.push(...o.data),oe++,oe>5&&window.Zonos.logIntervalId&&clearInterval(window.Zonos.logIntervalId))})()}),2e3)),io.enabledVariantTestKeys.includes("hosted_vs_native")){this.isOverlayLoading=!0,await this.registerTestHostedVsNative();const{redirected:o}=await this.handleHostedVsNative();if(this.isOverlayLoading=!1,o)return}if(window.Zonos.isBigCommerce){const{shouldBypass:o}=await Ro();if(o)return ko("Bypass customer group detected, redirecting to BigCommerce native checkout","info"),void(window.location.href=Po("/checkout"));const e=await Zo();if(e.shouldForceLogin&&e.redirectUrl)return void(window.location.href=e.redirectUrl)}c.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");if(!window.Zonos.isLegacyCheckout){let o=null;try{o=await k()}catch(e){o=to("Unable to check inventory. Please try again.")}if(o)return l.inventoryCheckErrorMessage=o,c.isFetchingSession=!1,void(this.open=!1)}null===(s=window.opener)||void 0===s||s.postMessage({checkoutSessionId:X.checkoutSessionId,type:"zonos-checkout-session-update"},"*"),v({isPreview:this.preview,sessionTimeout:54e5}),M({event:"zonos-checkout-start",metadata:{checkoutSessionId:X.checkoutSessionId}}),y({checkoutSessionId:X.checkoutSessionId,eventName:"checkout_open"});const{enabled:o}=await(async()=>{const{errors:o,json:e}=await lo("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();if(l.shouldHideDiscountInput=!o,this.handleOrderDuplication(),window.Zonos.isLegacyCheckout)(async()=>{const{elapsedTime:o}=vo(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:yo},po()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};lo("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})();else{(async({loadTime:o})=>{const e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:yo},po()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};lo("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})({loadTime:performance.now()-i})}this.recordCheckoutInfo(),Io()&&this.markTheSessionAsAbandonedCart()}catch(o){if(o instanceof Error&&"Cart is expired."===o.message&&(this.isCartExpired=!0),c.isFetchingSession=!1,mo(o),this.isCartExpired)return void(c.isFetchingSession=!0);go({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:yo,cartId:window.Zonos.cartId,checkoutSessionBody:C(),href:window.location.href,storeBaseUrl:(null===(n=window.Zonos.cartData)||void 0===n?void 0:n.storeBaseUrl)||io.onlineStoreSettings.url}}),b({messages:[to("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:to("Error creating Checkout")})}}}),{capture:!0,passive:!1}),io.checkoutSettings.disablePlaceOrderButtonActivation||t.removeAttribute("disabled"),t.setAttribute("data-zonos-checkout-attached","true"),t.matches(`#${So}`)&&(t.dispatchEvent(Ao("click")),S(),t.remove()),t.matches(`#${bo}`)&&(t.dispatchEvent(Ao("click")),t.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;ko("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:n,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:u}=o,h=new URLSearchParams(window.location.search),m=n||q(h)||Q.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:m,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:u})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);ko("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:null},t=q(o)||Q.selectedCountryCode,s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerFirstName"),d=e("customerLastName"),l=e("customerPhone"),u=e("customerZip"),h=e("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:a,customerLastName:d,customerName:r,customerPhone:l,customerState:h,customerZip:u})}applyPrefillAddress(o){const e=o.customerAddress1||"",t=o.customerCountry||"",s=o.customerAddress2||"",n=o.customerCity||"",i=o.customerEmail||"",c=o.customerFirstName&&o.customerLastName?`${o.customerFirstName} ${o.customerLastName}`:o.customerName||"",r=o.customerPhone||"",a=o.customerZip||"",d=o.customerState||"";e&&c&&r&&t?t&&Q.shippingZoneCountries&&!(t in Q.shippingZoneCountries)?ko(`Country "${t}" is not in the shipping zone, so it can not be prefilled`,"warn"):(this.defaultAddressParams=[{address:{city:n||"",country:t,line1:e,line2:s,postal_code:a,state:d},email:i,name:c,phone:r}],ko("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):ko("Missing required query params so it can not be prefilled","info",[!e&&"line1",!c&&"name",!r&&"phone",!t&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){l.isStagingMode=!!this.overrideStagingMode}async init(){c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,l.isStagingMode=fo(),void 0!==this.overrideStagingMode&&(l.isStagingMode=this.overrideStagingMode),(()=>{var o;if(!window.Zonos.isBigCommerce)return;const e=null===(o=io.genericSettings)||void 0===o?void 0:o.bigcommerceBypassCustomerGroupIds;(null==e?void 0:e.length)&&No()})(),window.Zonos.isBigCommerce&&Ko(),(()=>{if(!window.Zonos.isBigCommerce)return;if(!window.location.pathname.includes("/login.php"))return;Go();const o=new MutationObserver((()=>{Go()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>o.disconnect()),1e4)})(),this.handleBigcommerceInternationalResumeFlag(),this.prefillBigCommerceCustomerAddresses(),Xo({domesticRedirectedBtnSelector:So,onInternationalCheckoutSelected:async()=>{this.detectedDomesticCheckoutDialogOpen=!0,await new Promise((o=>setTimeout(o,2e3)))},onLoggedInInternationalAddressDetected:()=>new Promise((o=>{this.loggedInIntlAddressResolver=o,this.loggedInIntlAddressConfirmDialogOpen=!0})),onShippingAddressSessionFound:o=>{this.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}]}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(ko("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):ko("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}handleBigcommerceInternationalResumeFlag(){if(!window.Zonos.isBigCommerce)return;const o=new URL(window.location.href);if("true"!==o.searchParams.get(Lo))return;o.searchParams.delete(Lo),window.history.replaceState({},"",o.toString());const e=Date.now(),t=setInterval((()=>{if(!Q.localizationLoaded||!Q.selectedCountryCode)return void(Date.now()-e>15e3&&(clearInterval(t),ko("BigCommerce international checkout resume flag: localization did not initialize within 15s","info")));const o=document.querySelector(`#${xo}`);if(o)return clearInterval(t),void o.dispatchEvent(Ao("click"));Date.now()-e>15e3&&(clearInterval(t),ko("BigCommerce international checkout resume flag: trigger button did not mount within 15s","info"))}),200)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){x(o)}async triggerCheckoutInternational(){const o=document.querySelector(`#${xo}`);o&&o.dispatchEvent(Ao("click"))}async handleCustomerInfoContinue(){var o,e,t,s;M({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:X.checkoutSessionId}}),y({checkoutSessionId:X.checkoutSessionId,eventName:"checkout_customerInfoCompleted"}),this.submitLoading=!0;const{isRequestNotReady:n}=await I();n&&"stripe"===l.addressFormRenderType&&go({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:null===(e=null===(o=c.stripeAddressEventData)||void 0===o?void 0:o.value)||void 0===e?void 0:e.address,billingAddress:null===(s=null===(t=c.stripeBillingAddressEventData)||void 0===t?void 0:t.value)||void 0===s?void 0:s.address,cartId:window.Zonos.cartId}});const i=o=>{"customer-info"===l.step?c.isFetchingLandedCost||(l.landedCostData&&(K({currency:l.currency}),T()),this.submitLoading=!1,o&&clearInterval(o)):clearInterval(o)};i();const r=setInterval((()=>{i(r)}),20);setTimeout((()=>{clearInterval(r)}),1e4)}async handleShippingContinue(){T()}handleInventoryCheckDialogConfirm(){l.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){if("USD"===c.checkoutSettlementCurrency&&c.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen)return void(this.payInUsdConfirmDialogOpen=!0);this.payInUsdConfirmDialogOpen=!1;const o=A();try{if(H.paypalErrorMessage=null,c.hasPaymentError=!1,this.submitLoading=!0,l.inventoryCheckErrorMessage=null,!await O())return c.hasPaymentError=!0,c.customErrorMessage=to("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}),void(this.submitLoading=!1);try{l.inventoryCheckErrorMessage=await k()}catch(o){l.inventoryCheckErrorMessage=to("Unable to check inventory. Please try again.")}if(l.inventoryCheckErrorMessage)return void(this.submitLoading=!1);if($()>0){const o=await _();if(!o.success)return c.hasPaymentError=!0,c.customErrorMessage=o.error||to("Unable to apply store credit. Please try again."),void(this.submitLoading=!1)}if(B()){try{const o=await E();if(!o.valid)return c.hasPaymentError=!0,c.customErrorMessage=o.errorMessage,void(this.submitLoading=!1);const e=await L();if(!e.success)return c.hasPaymentError=!0,c.customErrorMessage=e.error||to("Unable to place order with store credit. Please try again."),void(this.submitLoading=!1);T(),g()}catch(o){mo(o),M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:X.checkoutSessionId}}),c.hasPaymentError=!0}return void(this.submitLoading=!1)}try{await D({noLandedCostCheck:z()}),T(),g()}catch(o){mo(o),M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:X.checkoutSessionId}}),c.hasPaymentError=!0,c.shouldInventoryRefund&&(P(),c.shouldInventoryRefund=!1)}this.submitLoading=!1}finally{o&&(U.locked=!1)}}async handleFinishClick(){if(j(),this.preview)return l.step="customer-info",void await this.init();if(h(),m(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl||io.onlineStoreSettings.url;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=wo(this.mobile),this.applyStripeTheme(),ko(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=wo(this.mobile),this.applyStripeTheme(),ko(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=co(this.appearanceSettingsOverride.theme))}handleAddressChange(){j()}handleCustomerProfileChange(){var o,e;if(!this.customerProfile)return ko("No customer profile","info"),void(this.defaultCustomerProfileAddress=[]);ko("Customer profile found","info",{customerProfile:this.customerProfile}),this.defaultCustomerProfileAddress=(null===(e=null===(o=c.customerProfile)||void 0===o?void 0:o.locations)||void 0===e?void 0:e.map((o=>{var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||(null===(e=c.customerProfile)||void 0===e?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]}handleClientSecretChange(){ko("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret}),this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,t=document.documentElement;if(this.open)window.Zonos.openHelloDialog(!1),e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",t.style.overflow&&t.setAttribute(o,t.style.overflow),t.style.overflow="hidden";else{this.stripeCustomerSessionClientSecret=null;const s=e.getAttribute(o),n=t.getAttribute(o);s?(e.removeAttribute(o),e.style.overflow=s):e.style.removeProperty("overflow"),n?(t.removeAttribute(o),t.style.overflow=n):t.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=wo(this.mobile),this.isIframed=window.self!==window.top,ko(`iframed: ${this.isIframed}`),window.Zonos.isLegacyCheckout&&this.captureParamsRedirectedForVariantTest(),this.handleAppearanceSettingsOverrideChange(),this.storeUnsubscribeList=[so("selectedLocale",(()=>{this.applyStripeTheme()})),N("selectedShippingOption",(()=>{var o,e,t,s;const n=l.selectedShippingOption;(null===(o=io.genericSettings)||void 0===o?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&(null===(t=null===(e=null==n?void 0:n.shippingProfile)||void 0===e?void 0:e.serviceLevel.code)||void 0===t?void 0:t.toLowerCase().startsWith("fedex."))&&"CA"===(null===(s=c.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)&&(this.shouldShowFedexShippingConsentDialog=!0)})),R("stripeAddressEventData",(o=>{var e;if(!window.Zonos.isBigCommerce||!o||this.redirectToDomesticCheckoutDialogOpen||!(null===(e=io.genericSettings)||void 0===e?void 0:e.isBigcommerceDomesticCheckoutRedirectEnabled)||"USD"!==io.sourceCurrency)return;if(!this.open)return;if(window.location.pathname.includes("/checkout"))return;const t=o.value.address.country;t&&io.disabledCountries.includes(t)&&(this.redirectToDomesticCheckoutDialogOpen=!0,ko(`Domestic country ${t} selected in international checkout, redirecting to BigCommerce domestic checkout`,"info"),setTimeout((()=>{window.location.href=Po("/checkout")}),2e3))}))],this.initializeTestKeys(),window.addEventListener("message",this.handleHostedOpenWindowCallback),ko(`mobile: ${this.isMobile}`)}disconnectedCallback(){j(),h(),m(),this.storeUnsubscribeList.forEach((o=>o())),window.removeEventListener("message",this.handleHostedOpenWindowCallback)}render(){var o,n,i,r;this.customerProfile=c.customerProfile,this.clientSecret=c.clientSecret,c.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret);const a="finish"!==l.step&&"error"!==l.step&&!c.stripeElements||c.isFetchingSession,d=z(),{colorPrimary:u,colorSecondary:h,logoUrl:m,style:p}=ro(io.appearance,this.appearanceSettingsOverride||null),g="ENABLED"===io.appearance.zonosAttribution,f=io.appearance.theme,w=u&&_o(u)?"DARK":"LIGHT",k=this.isMobile?f:w,v=this.isMobile?void 0:h,{customMessages:y}=Q,C=null===(o=y.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,b=this.getCurrentLocalePageEnum(),S=y.filter((o=>o.pageName===b)),x=this.getBaseCurrencySettlementInfo(),I=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${io.organizationName} logo`,src:o}))},T=uo(),A=()=>{const o=new URLSearchParams(window.location.search),t=o.get("zonosQaUrl"),s=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||fo();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},I(),T&&e("zonos-badge",{badgeColor:"orange",size:"small"},to("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},to("Staging mode")),"1"===s&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),!d&&e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),S.map((o=>e("zonos-custom-message",{icon:se,message:o.message}))))},O=()=>l.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:to("Your checkout session has expired. Please reload the page to continue."),restStateTitle:to("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},to("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":Oo({overrideBorderStyle:p})}},"finish"!==l.step&&"error"!==l.step&&e(t,null,e("div",{class:"zonos--left","data-theme":k,style:Bo({"--zonos--primary-color":this.isMobile?void 0:u})},!this.isMobile&&A(),"customer-info"===l.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.getDefaultAddress(),isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:v}),"shipping"===l.step&&e("zonos-shipping",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:v}),"payment"===l.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:v})),e("div",{class:"zonos--right","data-theme":f},this.isMobile&&A(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Eo}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:v}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:se,message:C})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:se,message:C}))))),("finish"===l.step||"error"===l.step)&&e("div",{class:"zonos--done","data-theme":f},e("div",{class:"zonos--header"},I(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Eo}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:f})),e("zonos-checkout-finish",{borderRadius:p,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":f,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:To(["zonos--checkout zonos--elements","payment"===l.step&&"zonos--processing-payment",g&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?O():e("zonos-dialog",{borderStyle:p,class:"zonos--checkout-dialog","data-theme":f,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},O()),e("zonos-dialog",{isLoading:!0,loadingText:to("You will be redirected to international checkout shortly."),loadingTitle:to("We detected that you are shipping to an international address."),noClickOutside:!0,noCloseButton:!0,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-dialog",{isLoading:!0,loadingText:to("You will be redirected to domestic checkout shortly."),loadingTitle:to("We detected that you are shipping to a domestic address."),noClickOutside:!0,noCloseButton:!0,open:this.redirectToDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-confirm-dialog",{class:"zonos--logged-in-intl-address-dialog",dialogCancelBtnText:to("Stay on this page"),dialogConfirmBtnText:to("Continue to international checkout"),dialogIntent:"info",dialogOpen:this.loggedInIntlAddressConfirmDialogOpen,dialogSubtitle:to("Your selected address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?"),dialogTitle:to("International shipping address detected"),dialogWidth:480,onCancelClicked:()=>{var o;this.loggedInIntlAddressConfirmDialogOpen=!1,null===(o=this.loggedInIntlAddressResolver)||void 0===o||o.call(this,"stay"),this.loggedInIntlAddressResolver=null},onConfirmClicked:()=>{var o;this.loggedInIntlAddressConfirmDialogOpen=!1,null===(o=this.loggedInIntlAddressResolver)||void 0===o||o.call(this,"redirect"),this.loggedInIntlAddressResolver=null}}),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:to("Don't close"),dialogConfirmBtnText:to("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:to("Would you like to close checkout and return to the site?"),dialogTitle:to("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:to("Return to merchant site"),dialogConfirmBtnText:to("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(n=this.placedOrderInfo)||void 0===n?void 0:n.zonosOrderNumber)?to("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)}):to("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((null===(i=this.placedOrderInfo)||void 0===i?void 0:i.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:to("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:to("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:e(t,null,to("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."),e("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},to("View GAA Form."))),dialogTitle:to("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:()=>this.shouldShowFedexShippingConsentDialog=!1}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:to("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:to("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),x&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:to("Cancel"),dialogConfirmBtnText:to("Pay [orderTotal]",{orderTotal:no({amount:x.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:to("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:to("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:to("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:to("You are being sent back to the shop to re-add items to your cart."),dialogTitle:to("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}),e("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:[{appearanceSettingsOverrideChanged:0},{handleAppearanceSettingsOverrideChange:0}],overrideStagingMode:[{overrideStagingModeChanged:0}],mobile:[{handleMobileChange:0}],defaultAddress:[{handleAddressChange:0}],customerProfile:[{handleCustomerProfileChange:0}],clientSecret:[{handleClientSecretChange:0}],stripeCustomerSessionClientSecret:[{handleClientSecretChange:0}],open:[{handleOpenChange:0}]}}};ne.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{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}";export{ne as zonos_checkout}
@@ -1 +0,0 @@
1
- import{r as o,h as t,e as s,a as e}from"./p-_lt63o7c.js";import{a as r}from"./p-CtEsvWI6.js";import{c as a}from"./p-BJHSB96f.js";import"./p-BJmZPrZl.js";const i=class{constructor(t){o(this,t),this.theme="LIGHT",this.width="auto"}render(){const o="DARK"===this.theme?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return t(e,{key:"89d856c28d227afbe76656ce217544faad91715e",class:a(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":r(),"--zonos--width":this.width}},t("img",{key:"025c97e65f2666028391f6ca2d548bf905528133",alt:"Zonos Logo",src:s("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};i.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";export{i as zonos_logo}
@@ -1,121 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{a(n.next(e))}catch(e){s(e)}}function l(e){try{a(n["throw"](e))}catch(e){s(e)}}function a(e){e.done?t(e.value):i(e.value).then(r,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=l(0),r["throw"]=l(1),r["return"]=l(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,l[0]&&(t=0)),t)try{if(n=1,i&&(s=l[0]&2?i["return"]:l[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1];s=l;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(l);break}if(s[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-BANhKkF2.system.js","./p-Cd9xIgx7.system.js","./p-CPnR_T0a.system.js","./p-C2j7R11h.system.js","./p-zVLAvre1.system.js","./p-Z99tSPFR.system.js","./p-BbgqQIHv.system.js","./p-CaUXHglQ.system.js"],(function(e){"use strict";var o,t,n,i,s,r,l,a,h,d,u,c,f,w,m,v,g,z,p,b,x,y,k;return{setters:[function(e){o=e.r;t=e.h;n=e.a;i=e.g},function(e){s=e.d},function(e){r=e.l;l=e.n;a=e.t;h=e.g;d=e.p;u=e.q;c=e.r;f=e.u;w=e.j;m=e.v},function(e){v=e.z;g=e.g;z=e.m},function(e){p=e.c},function(e){b=e.h;x=e.l},function(e){y=e.g},function(e){k=e.l},null],execute:function(){var _=this;var O=function(e){return __awaiter(_,[e],void 0,(function(e){var o,t,n,i,s;var r=e.items,l=e.shipFrom,a=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t={items:r,shipFrom:l,shipTo:a};return[4/*yield*/,b("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=e.sent(),i=n.errors,s=n.json;if(i.length||!s){x("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2/*return*/,[]]}return[2/*return*/,s.filter(Boolean)]}}))}))};var L=function(e){return __awaiter(_,void 0,void 0,(function(){var o,t,n,i;return __generator(this,(function(s){switch(s.label){case 0:if(!e.length){return[2/*return*/,[]]}o=r.selectedCountryCode;if(!o){x("Hello could not check item restrictions - No country code selected");return[2/*return*/,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4/*yield*/,O({items:t,shipFrom:"AD",shipTo:o})];case 1:n=s.sent();i=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2/*return*/,i]}}))}))};var j=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var I=function(){var e=v.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,i=e.productListUrlPattern;
2
- // The 'if' statements are sorted by most specific to least specific to help with regex matching
3
- if(j(o)){return"cart"}if(j(n)){return"productDetail"}if(j(i)){return"productList"}if(j(t)){return"home"}return""};
4
- /**
5
- * Default Hello widget diameter in pixels. Matches the legacy size that
6
- * shipped before `widgetSize` became configurable, so existing merchants
7
- * continue to render unchanged when they have not set a value.
8
- */var T=18;var C=18;var D=64;
9
- /**
10
- * Resolve the configured Hello widget size to a safe pixel value. Falls back
11
- * to the default when the merchant has not configured a size, and clamps
12
- * out-of-range values so the widget always renders within the supported
13
- * design bounds.
14
- */var E=function(e){if(e==null||!Number.isFinite(e)||e<=0){return T}return Math.min(D,Math.max(C,e))};var S=function(){var e,o;var t=v.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,s=t.productTitleElementSelector,r=t.restrictionBehavior;if(!s||!i){k("Hello could not check item restrictions - must provide title and description selectors.")}var a=s&&l(s)&&document.querySelectorAll(s)||[];var h=i&&l(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){
15
- // If the title and description selectors don't match, kill item restrictions altogether
16
- k("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=r==="RESTRICT_AND_BLOCK";var u=d&&n&&l(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){
17
- // If the "add to cart" selectors don't match, log the error and continue
18
- k('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var f=0;f<a.length;f++){var w=a[f];var m=h[f];var g=u[f];if(w&&m){var z={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=w.textContent)===null||o===void 0?void 0:o.trim())||""};c.push(z)}}return c};var X=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max( 6px, calc(var(--zonos-elements-hello-widget-size) * 0.22) );--zonos-elements-hello-bubble-size:calc( var(--zonos-elements-hello-widget-size) + var(--zonos-elements-hello-bubble-padding) * 2 + 2px )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}"};var R=3e3;var B=e("zonos_hello",/** @class */function(){function e(e){var t=this;o(this,e);this.showPeekMessage=false;this.zonosStoreHelloSettings=v.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";
19
- /**
20
- * This array will hold all restricted items handled by Hello thus far
21
- */this.allRestrictedItems=[];
22
- /**
23
- * This array will hold all products handled by Hello thus far
24
- */this.allFoundProducts=[];
25
- /**
26
- * This array will hold all products currently on the page
27
- */this.productsOnPage=[];
28
- /**
29
- * Hello widget is rendered on the screen, this should only triggered once
30
- */this.isHelloWidgetRendered=false;
31
- /**
32
- * Determine if the window is mobile
33
- */this.isMobile=false;this.getHelloPeekMessage=function(e){var o=v.currentHelloPage==="productDetail"||v.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=a("click to learn more");var i=v.currentHelloPage==="productDetail"?a("Restricted item"):a("Restricted items found");return"".concat(i," - ").concat(n)}switch(v.currentHelloPage){case"cart":return a("Prepay duties and taxes at checkout");case"productList":case"productDetail":return a("See duty and tax thresholds");default:return a("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=v.currentHelloPage==="productDetail"||v.currentHelloPage==="productList";
34
- // Only run detectItemRestrictions on product pages if the restrictionBehavior is not DISABLED
35
- if(!o||v.helloSettings.restrictionBehavior==="DISABLED"){return[2/*return*/,[]]}return[4/*yield*/,L(e)];case 1:t=n.sent();return[2/*return*/,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(v.organizationName);var e=v.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;
36
- // peek message delay is passed in seconds, but setTimeout expects milliseconds
37
- var i=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){
38
- // If restrictions, persist the message until they hover over the hello widget
39
- setTimeout((function(){t.showPeekMessage=false}),R)}}),i)}};this.disableAddToCartButtons=function(){
40
- // Remove disabled attribute from all "add to cart" buttons
41
- if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var i=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));
42
- // if a product description matches a restrictedItems itemDescription, then disable the add to cart button. Otherwise, enable it.
43
- if(i){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var i=this;return __generator(this,(function(s){switch(s.label){case 0:this.productsOnPage=S();e=this.productsOnPage.filter((function(e){return!i.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4/*yield*/,this.getNewItemRestrictions(e)];case 1:o=s.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2/*return*/]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2/*return*/]}}))}))};this.handleProductCountChange=s((function(){var e=v.helloSettings.productTitleElementSelector;if(e){var o=S();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){
44
- // if allFoundProducts length is 0 (first render or no products), kill item restriction process as initial restrictions are handled in updateHelloOnPageChange
45
- if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e;var o=new MutationObserver(t.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true});(e=t.observerWatcher)===null||e===void 0?void 0:e.push(o)};this.watchPriceChange=function(){var e;var o=new MutationObserver((function(){return void t.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true});(e=t.observerWatcher)===null||e===void 0?void 0:e.push(o)};this.updateHelloOnPageChange=function(){
46
- // If the product count changes on the same url (loading more products), update the peek message and item restrictions
47
- t.watchProductCountChange();
48
- // Check url change on interval. If changed, update the peek message and item restrictions
49
- setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&h(e.searchParams);
50
- // If the zCountry url param changes, reset current item restriction tracking
51
- if(o!==r.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;v.currentHelloPage=I();var n=new URL(window.location.href);var i=h(n.searchParams);if(!i){d(r.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};
52
- /**
53
- * Determine if the peek message should animate from left or not
54
- */this.shouldAnimateLeftDesktop=function(){
55
- // Get Hello position (relative = desktop, fixed = mobile)
56
- var e=t.helloRef&&getComputedStyle(t.helloRef).position;
57
- // If relative position, determine if peek message should animate left or right. Mobile is pre-determined.
58
- if(t.helloRef&&e==="relative"){var o=y(t.helloRef);return o}}}e.prototype.showDialogHandler=function(e){var o;
59
- // Attempt to relocate zonos-hello node html to bottom of <body> so that we won't be underneath Google Review. Couldn't increase the z-index because it's already at the max.
60
- if(e){var t=(o=this.helloElement)===null||o===void 0?void 0:o.parentElement;
61
- // Only relocate if hello parent node is nested right underneath the <body>, so if user attach hello to the element fixed on top header, we don't relocate it.
62
- if(t&&t.parentElement===document.body){t.style.zIndex="2147483647";document.body.appendChild(t)}}};
63
- /**
64
- * Get the country list the hello widget's country select is using
65
- */e.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2/*return*/,r.helloCountryList]}))}))};e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2/*return*/]}if(v.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();
66
- // update theme to browser preference theme if appearance theme is system
67
- this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2/*return*/]}))}))}),100)};e.prototype.disconnectedCallback=function(){var e;
68
- // disconnect all observers
69
- (e=this.observerWatcher)===null||e===void 0?void 0:e.forEach((function(e){return e.disconnect()}))};
70
- /**
71
- * This method will trigger the currency conversion and display the converted value
72
- * @returns void
73
- */e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(v.helloSettings.currencyBehavior==="DISABLED"){
74
- // do nothing if currency behavior is disabled
75
- return[2/*return*/]}if(!r.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2/*return*/]}u();return[2/*return*/]}))}))};
76
- /**
77
- * This method will call convert and format, and return the converted and formatted string
78
- * @returns string
79
- */e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2/*return*/,c(e)]}))}))};
80
- /**
81
- * This method will convert the currency and return the converted value
82
- * @returns number
83
- */e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2/*return*/,f(e)]}))}))};
84
- /**
85
- * This method will format the currency and return the formatted string
86
- * @returns number
87
- */e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2/*return*/,w({amount:e})]}))}))};
88
- /**
89
- * This method show the hello dialog
90
- * @returns void
91
- */e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2/*return*/]}))}))};e.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};
92
- /**
93
- * This method will handle the Hello widget initialized state, should only trigger once
94
- */e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,i;
95
- // If the toggle is already set to true, do nothing
96
- if(this.isHelloWidgetRendered){return}
97
- // Should only trigger once when hello is showing up on the page
98
- if(r.selectedCountryCode&&typeof v.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=v.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.getHelloLocation=function(){var e=this.mobileLocationOverride||v.helloSettings.mobileLocation;var o=this.desktopLocationOverride||v.helloSettings.desktopLocation;var t=this.isMobile;switch(true){
99
- // Mobile
100
- case t:{var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"));var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!e}}
101
- // Desktop
102
- default:case!t:{
103
- /**
104
- * Float on desktop when `desktopLocationOverride` is set (explicit
105
- * consumer request) OR when no anchor is specified and a
106
- * `desktopLocation` is configured in the store. With an anchor and no
107
- * override, the widget renders inline at the anchor.
108
- */
109
- var s=!!this.desktopLocationOverride||!v.helloSettings.anchorElementSelector&&!!o;
110
- // When a desktopLocation is set, derive the side deterministically
111
- // from it so RIGHT positions resolve to `false` (not `undefined`).
112
- // Spatial detection only runs as a fallback when no location is set
113
- // (e.g. inline / anchored placement).
114
- var n=this.animateFromLeftOverride||(s&&o?o.includes("LEFT"):this.shouldAnimateLeftDesktop());var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:s}}}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){
115
- // update theme to browser preference theme if appearance theme is system
116
- this.appearanceSettingsOverride.theme=g(this.appearanceSettingsOverride.theme)}};e.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};e.prototype.render=function(){var e=this;var o,i;var s=(o=v.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return e&&new RegExp(e).test(window.location.href)}));if(s){k("Hello is excluded on this url","warn");return null}var l=r.selectedCountryCode,a=r.targetCurrency;var h=this.getHelloLocation(),d=h.isOnLeft,u=h.isOnTop,c=h.shouldFloat;var f=z(v.appearance,this.appearanceSettingsOverride||null);var w=f.theme;var g=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));
117
- // The organization name can be changed after init with the updateOrganizationName method.
118
- // This will cause the element to rerender with the new org name when it changes. (used for preview on dashboard)
119
- this.peekMessage=this.getHelloPeekMessage(v.organizationName);var b=m()&&!!l;
120
- // If the condition for rendering Hello is met, set the toggle to true to trigger callback, should only trigger once
121
- if(b&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:a})}var x=E(v.helloSettings.widgetSize);return t(n,{class:"zonos--hello zonos--elements","data-theme":w,style:{"--zonos-elements-hello-widget-size":"".concat(x,"px")}},b&&t("div",{class:p(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},t("button",{class:p(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",u&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)},type:"button"},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),t("div",{class:p(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",u&&"zonos--hello-widget-top",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:d,appearanceSettings:f,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e.prototype,"helloElement",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{showDialog:[{showDialogHandler:0}],appearanceSettingsOverride:[{handleAppearanceSettingsOverrideChange:0}]}},enumerable:false,configurable:true});return e}());B.style=X()}}}));
@@ -1 +0,0 @@
1
- import{z as o}from"./p-CtEsvWI6.js";const p=p=>{const s=(null==p?void 0:p.customRoundRadius)||"10px",t=null==p?void 0:p.overrideBorderStyle;return t?"SHARP"===t?"0px":s:"SHARP"===o.appearance.style?"0px":s};export{p as g}
@@ -1 +0,0 @@
1
- import{r as o,h as e,a as t,g as s}from"./p-_lt63o7c.js";import{d as l}from"./p-t_ClFAJR.js";import{l as i,n,t as r,g as h,p as a,q as d,r as c,u as m,j as z,v as g}from"./p-CGkdA4pY.js";import{z as p,g as w,m as f}from"./p-CtEsvWI6.js";import{c as u}from"./p-BJHSB96f.js";import{h as b,l as v}from"./p-DE4a-QD5.js";import{g as x}from"./p-DAscqB23.js";import{l as y}from"./p-BJmZPrZl.js";import"./p-D0erXw7p.js";const k=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},C=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:l,restrictionBehavior:i}=p.helloSettings;l&&s||y("Hello could not check item restrictions - must provide title and description selectors.");const r=l&&n(l)&&document.querySelectorAll(l)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return y("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===i,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],l=h[t];if(s&&l){const i={cartButtonNode:d[t]||null,description:(null===(o=l.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(i)}}return c},L=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=p.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===p.currentHelloPage||"productList"===p.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===p.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(p.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==p.currentHelloPage&&"productList"!==p.currentHelloPage||"DISABLED"===p.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=i;if(!e)return v("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const l={items:o,shipFrom:e,shipTo:t},{errors:i,json:n}=await b("/api/zonos-elements/check-item-restrictions",{body:l,method:"POST"});return i.length||!n?(v(`Error fetching item restrictions: ${null===(s=i.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(p.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=p.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=C();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=l((()=>{const{productTitleElementSelector:o}=p.helloSettings;if(o){const o=C();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==i.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,p.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=p.helloSettings;return k(o)?"cart":k(t)?"productDetail":k(s)?"productList":k(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(i.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return x(this.helloRef)}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return i.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&p.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==p.helloSettings.currencyBehavior&&(i.exchangeRate?d():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||i.selectedCountryCode&&"function"==typeof p.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=p.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||p.helloSettings.mobileLocation,e=this.desktopLocationOverride||p.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!!this.desktopLocationOverride||!p.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(o&&e?e.includes("LEFT"):this.shouldAnimateLeftDesktop()),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=p.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:l,targetCurrency:n}=i,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(p.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(p.organizationName);const z=g()&&!!l;z&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:n});const w=null==(b=p.helloSettings.widgetSize)||!Number.isFinite(b)||b<=0?18:Math.min(64,Math.max(18,b));var b;return e(t,{class:"zonos--hello zonos--elements","data-theme":c,style:{"--zonos-elements-hello-widget-size":`${w}px`}},z&&e("div",{class:u(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:u(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),e("div",{class:u(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:r,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:[{showDialogHandler:0}],appearanceSettingsOverride:[{handleAppearanceSettingsOverrideChange:0}]}}};L.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max( 6px, calc(var(--zonos-elements-hello-widget-size) * 0.22) );--zonos-elements-hello-bubble-size:calc( var(--zonos-elements-hello-widget-size) + var(--zonos-elements-hello-bubble-padding) * 2 + 2px )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{L as zonos_hello}
@@ -1 +0,0 @@
1
- import{A as s}from"./p-CGkdA4pY.js";const o=()=>s().length>1;export{o as s}
@@ -1 +0,0 @@
1
- System.register(["./p-CPnR_T0a.system.js","./p-CaUXHglQ.system.js"],(function(t){"use strict";var s,e;return{setters:[function(t){s=t.e},function(t){e=t.r}],execute:function(){var n=e();var r=t("d",s(n))}}}));
@@ -1 +0,0 @@
1
- import{r,e as n}from"./p-CtEsvWI6.js";import{r as t}from"./p-D0erXw7p.js";var i,a,e=n(function(){if(a)return i;a=1;var n=t(),e=r();return i=function(r,t,i){var a=!0,o=!0;if("function"!=typeof r)throw new TypeError("Expected a function");return e(i)&&(a="leading"in i?!!i.leading:a,o="trailing"in i?!!i.trailing:o),n(r,t,{leading:a,maxWait:t,trailing:o})}}());export{e as t}
@@ -1,9 +0,0 @@
1
- System.register(["./p-CPnR_T0a.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.z}],execute:function(){
2
- /**
3
- * Get the border radius for the elements based on the style
4
- * @param overrideBorderStyle
5
- * @returns
6
- */
7
- var r=n("g",(function(n){var r=(n===null||n===void 0?void 0:n.customRoundRadius)||"10px";var e=n===null||n===void 0?void 0:n.overrideBorderStyle;if(e){
8
- // If the override is set, use that, otherwise use the default radius style
9
- return e==="SHARP"?"0px":r}return t.appearance.style==="SHARP"?"0px":r}))}}}));
@@ -1 +0,0 @@
1
- import{d as r}from"./p-DqEtY53c.js";import{s as o}from"./p-CGkdA4pY.js";import{l as s,h as e}from"./p-DE4a-QD5.js";const t=async()=>{var t,i;const n=null===(t=r.partiesData.find((r=>"DESTINATION"===r.type)))||void 0===t?void 0:t.id,a=null===(i=r.partiesData.find((r=>"PAYOR"===r.type)))||void 0===i?void 0:i.id,d=o.checkoutSessionId;if(!d||!a||!n)return s("Missing required data",{billToPartyId:a,checkoutSessionId:d,shipToPartyId:n}),{errors:["Missing required data"],json:null};const l={billToPartyId:a,checkoutSessionId:d,shipToPartyId:n},{errors:p,json:c}=await e("/api/zonos-elements/place-test-order",{body:l,method:"POST"});return p.length||!c?(s("Error occurs when placing test order",p),{errors:p.map((r=>r.message)),json:null}):{errors:[],json:c}};export{t as p}
@@ -1 +0,0 @@
1
- import{d as o}from"./p-DqEtY53c.js";import{B as r,j as n}from"./p-CGkdA4pY.js";const t=({amount:t,isForeign:u})=>{var i,a;const c=(null===(i=o.exchangeRate)||void 0===i?void 0:i.rate)||1,d=u?t:r(t),s=o.currency;if((null===(a=o.items[0])||void 0===a?void 0:a.currencyCode)===s)return n({amount:d,currency:s});const v=o.displayBaseCurrency,e=(()=>{var r,n;return o.displayBaseCurrency&&(null===(r=o.exchangeRate)||void 0===r?void 0:r.sourceCurrencyCode)?null===(n=o.exchangeRate)||void 0===n?void 0:n.sourceCurrencyCode:o.currency})();return n(u?{amount:v?d/c:d,currency:e}:{amount:v?d:d*c,currency:e})};export{t as r}