@zonos/elements 1.3.288 → 1.3.290

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 (321) hide show
  1. package/dist/cjs/{cart-CV4buPlT.js → cart-7DceSLKl.js} +3 -3
  2. package/dist/cjs/{collect-jzWKzrV7.js → collect-C08DUE1L.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-r5vYIqoX.js → getMissingRequiredShippingFields-Duz8xpmf.js} +1 -1
  7. package/dist/cjs/{hasInclusivePrice-BZMQohG9.js → hasInclusivePrice-C-iyXqJ0.js} +1 -1
  8. package/dist/cjs/index.cjs.js +8 -9
  9. package/dist/cjs/{invoice-CHw-mJdS.js → invoice-DSuHUQpi.js} +3 -3
  10. package/dist/cjs/{localization-CxXsmxs5.js → localization-BJqYz_PB.js} +192 -69
  11. package/dist/cjs/{paypal-BLuHeOJH.js → paypal-CZoctP9S.js} +4 -4
  12. package/dist/cjs/{placeTestOrder-VK_CMeq0.js → placeTestOrder-D7baFuaV.js} +2 -2
  13. package/dist/cjs/{renderCheckoutCurrency-CC4CAy-a.js → renderCheckoutCurrency-Ca2HH1Gc.js} +2 -2
  14. package/dist/cjs/{shouldShowLanguageSelect-Bj_jKWPK.js → shouldShowLanguageSelect-FyTdz7U_.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 +11 -11
  19. package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
  20. package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
  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 +7 -7
  26. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +15 -15
  27. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
  28. package/dist/cjs/zonos-checkout.cjs.entry.js +12 -12
  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 +11 -11
  32. package/dist/cjs/zonos-collect.cjs.entry.js +7 -7
  33. package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
  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 +11 -11
  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 +3 -3
  47. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  48. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  49. package/dist/cjs/{zonosStore-BCNYr6Tk.js → zonosStore-Bx9jK82G.js} +2 -0
  50. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +1 -1
  51. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
  53. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +1 -1
  54. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +17 -15
  55. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +29 -52
  56. package/dist/collection/components/main/zonos-controller.js +2 -2
  57. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -2
  58. package/dist/collection/components/store/hello/localization.js +69 -34
  59. package/dist/collection/components/store/zonosStore.js +2 -0
  60. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
  61. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -3
  62. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  63. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +0 -1
  64. package/dist/collection/components/utils/api/getLocalization.js +2 -2
  65. package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -4
  66. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +1 -0
  67. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +2 -0
  68. package/dist/collection/components/utils/formatDate.js +1 -3
  69. package/dist/collection/components/utils/getOverridenZCountry.js +3 -5
  70. package/dist/collection/components/utils/hello/countryOverrideStorage.js +49 -0
  71. package/dist/collection/components/utils/hello/getZCountryUrlParam.js +5 -9
  72. package/dist/collection/components/utils/hello/isCountryCode.js +1 -0
  73. package/dist/collection/components/utils/hello/isCountryInShippingZone.js +8 -0
  74. package/dist/collection/components/utils/hello/reconcileRememberedCountryOverride.js +37 -0
  75. package/dist/collection/components/utils/hello/resolveHelloFloatPlacement.js +98 -0
  76. package/dist/collection/components/utils/hello/shouldShowHelloWidget.js +27 -20
  77. package/dist/collection/environment.js +0 -1
  78. package/dist/collection/scripts/_stripe.js +0 -2
  79. package/dist/collection/scripts/_zonosBase.js +1 -1
  80. package/dist/collection/types/generated/graphql.frontend.types.js +218 -63
  81. package/dist/collection/types/generated/graphql.internal.types.js +815 -152
  82. package/dist/collection/utils/formattedCloudflareApiUrl.js +1 -0
  83. package/dist/collection/utils/generateCloudflareDeployUrl.js +5 -2
  84. package/dist/esm/{cart-ekBk_gxV.js → cart-Cleo1j5P.js} +3 -3
  85. package/dist/esm/{collect-33rMINDo.js → collect-CspdWIRo.js} +3 -3
  86. package/dist/esm/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +1 -1
  87. package/dist/esm/{debounce-DWPsxJsW.js → debounce-CrmpwbEE.js} +2 -2
  88. package/dist/esm/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
  89. package/dist/esm/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-B1IL1-gn.js} +1 -1
  90. package/dist/esm/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-DKRplpLX.js} +1 -1
  91. package/dist/esm/index.js +8 -9
  92. package/dist/esm/{invoice-BNDWuVsD.js → invoice-D49igPQ9.js} +3 -3
  93. package/dist/esm/{localization-AOqYXGdP.js → localization-BiL8bPsY.js} +192 -70
  94. package/dist/esm/{paypal-CW1D2XqZ.js → paypal-D4vWRxHJ.js} +4 -4
  95. package/dist/esm/{placeTestOrder-nhmsLLOA.js → placeTestOrder-BNmc5RCo.js} +2 -2
  96. package/dist/esm/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-BNbwijGo.js} +2 -2
  97. package/dist/esm/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-B82gTfHz.js} +1 -1
  98. package/dist/esm/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
  99. package/dist/esm/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
  100. package/dist/esm/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
  101. package/dist/esm/zonos-address-completion-dialog_7.entry.js +11 -11
  102. package/dist/esm/zonos-address-display_2.entry.js +3 -3
  103. package/dist/esm/zonos-address_4.entry.js +8 -8
  104. package/dist/esm/zonos-airwallex-payment.entry.js +5 -5
  105. package/dist/esm/zonos-badge.entry.js +1 -1
  106. package/dist/esm/zonos-banner.entry.js +1 -1
  107. package/dist/esm/zonos-button_3.entry.js +2 -2
  108. package/dist/esm/zonos-card_5.entry.js +7 -7
  109. package/dist/esm/zonos-cart-items_12.entry.js +15 -15
  110. package/dist/esm/zonos-checkbox_2.entry.js +2 -2
  111. package/dist/esm/zonos-checkout.entry.js +12 -12
  112. package/dist/esm/zonos-collapse.entry.js +1 -1
  113. package/dist/esm/zonos-collect-cart-items_3.entry.js +4 -4
  114. package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
  115. package/dist/esm/zonos-collect.entry.js +7 -7
  116. package/dist/esm/zonos-controller.entry.js +7 -7
  117. package/dist/esm/zonos-country-flag.entry.js +2 -2
  118. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  119. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  120. package/dist/esm/zonos-hello.entry.js +129 -51
  121. package/dist/esm/zonos-input.entry.js +2 -2
  122. package/dist/esm/zonos-invoice-cart-items_2.entry.js +6 -6
  123. package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
  124. package/dist/esm/zonos-invoice.entry.js +7 -7
  125. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  126. package/dist/esm/zonos-logo.entry.js +1 -1
  127. package/dist/esm/zonos-policy-consent_2.entry.js +5 -5
  128. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  129. package/dist/esm/zonos-stripe-input.entry.js +3 -3
  130. package/dist/esm/zonos-text.entry.js +1 -1
  131. package/dist/esm/zonos-v-stack.entry.js +1 -1
  132. package/dist/esm/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +2 -0
  133. package/dist/esm-es5/{cart-ekBk_gxV.js → cart-Cleo1j5P.js} +8 -8
  134. package/dist/esm-es5/{collect-33rMINDo.js → collect-CspdWIRo.js} +1 -1
  135. package/dist/esm-es5/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +7 -7
  136. package/dist/esm-es5/debounce-CrmpwbEE.js +1 -0
  137. package/dist/esm-es5/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
  138. package/dist/esm-es5/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-B1IL1-gn.js} +3 -3
  139. package/dist/esm-es5/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-DKRplpLX.js} +1 -1
  140. package/dist/esm-es5/index.js +6 -8
  141. package/dist/esm-es5/{invoice-BNDWuVsD.js → invoice-D49igPQ9.js} +1 -1
  142. package/dist/esm-es5/{localization-AOqYXGdP.js → localization-BiL8bPsY.js} +74 -68
  143. package/dist/esm-es5/{paypal-CW1D2XqZ.js → paypal-D4vWRxHJ.js} +1 -1
  144. package/dist/esm-es5/{placeTestOrder-nhmsLLOA.js → placeTestOrder-BNmc5RCo.js} +1 -1
  145. package/dist/esm-es5/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-BNbwijGo.js} +1 -1
  146. package/dist/esm-es5/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-B82gTfHz.js} +1 -1
  147. package/dist/esm-es5/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
  148. package/dist/esm-es5/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
  149. package/dist/esm-es5/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
  150. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +3 -3
  151. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  152. package/dist/esm-es5/zonos-address_4.entry.js +2 -2
  153. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  154. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  155. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  156. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  157. package/dist/esm-es5/zonos-card_5.entry.js +2 -2
  158. package/dist/esm-es5/zonos-cart-items_12.entry.js +2 -2
  159. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  160. package/dist/esm-es5/zonos-checkout.entry.js +6 -6
  161. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  162. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  163. package/dist/esm-es5/zonos-collect-finish_6.entry.js +2 -2
  164. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  165. package/dist/esm-es5/zonos-controller.entry.js +3 -3
  166. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  167. package/dist/esm-es5/zonos-country-select_4.entry.js +2 -2
  168. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  169. package/dist/esm-es5/zonos-hello.entry.js +21 -24
  170. package/dist/esm-es5/zonos-input.entry.js +1 -1
  171. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
  172. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +2 -2
  173. package/dist/esm-es5/zonos-invoice.entry.js +3 -3
  174. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  175. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  176. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  177. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  178. package/dist/esm-es5/zonos-stripe-input.entry.js +2 -2
  179. package/dist/esm-es5/zonos-text.entry.js +1 -1
  180. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  181. package/dist/esm-es5/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +1 -1
  182. package/dist/scripts/index.d.ts +36 -6
  183. package/dist/scripts/index.js +1 -1
  184. package/dist/scripts/loadZonos.js +1 -1
  185. package/dist/scripts/zonos.js +1 -1
  186. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +5 -3
  187. package/dist/types/components/store/hello/localization.d.ts +2 -1
  188. package/dist/types/components/utils/api/getLocalization.d.ts +3 -1
  189. package/dist/types/components/utils/getOverridenZCountry.d.ts +2 -3
  190. package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +5 -0
  191. package/dist/types/components/utils/hello/isCountryCode.d.ts +2 -0
  192. package/dist/types/components/utils/hello/isCountryInShippingZone.d.ts +2 -0
  193. package/dist/types/components/utils/hello/reconcileRememberedCountryOverride.d.ts +18 -0
  194. package/dist/types/components/utils/hello/resolveHelloFloatPlacement.d.ts +39 -0
  195. package/dist/types/components/utils/hello/shouldShowHelloWidget.d.ts +8 -4
  196. package/dist/types/components.d.ts +4 -6
  197. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +10 -0
  198. package/dist/types/types/generated/graphql.frontend.types.d.ts +41 -52
  199. package/dist/types/types/generated/graphql.frontend.types.ts +226 -114
  200. package/dist/types/types/generated/graphql.internal.types.d.ts +465 -100
  201. package/dist/types/types/generated/graphql.internal.types.ts +1007 -253
  202. package/dist/types/types/hello/HelloConfig.d.ts +12 -0
  203. package/dist/types/utils/formattedCloudflareApiUrl.d.ts +1 -0
  204. package/dist/types/utils/generateCloudflareDeployUrl.d.ts +5 -2
  205. package/dist/zonos-elements/index.esm.js +1 -1
  206. package/dist/zonos-elements/{p-39c8a898.entry.js → p-028e0500.entry.js} +1 -1
  207. package/dist/zonos-elements/p-079af8c0.system.entry.js +118 -0
  208. package/dist/zonos-elements/{p-058f07aa.system.entry.js → p-0a4a7742.system.entry.js} +1 -1
  209. package/dist/zonos-elements/{p-04cc0dac.system.entry.js → p-0dca8a26.system.entry.js} +47 -47
  210. package/dist/zonos-elements/{p-d33dfc78.system.entry.js → p-0ee74bf3.system.entry.js} +30 -30
  211. package/dist/zonos-elements/{p-e284d329.entry.js → p-11bab88b.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-7a5d2211.system.entry.js → p-13d3a372.system.entry.js} +18 -18
  213. package/dist/zonos-elements/{p-1568ab06.system.entry.js → p-1409de3b.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-8328f44d.entry.js → p-193d9722.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-dcdbc610.system.entry.js → p-195f6e38.system.entry.js} +2 -2
  216. package/dist/zonos-elements/{p-daf9fa07.system.entry.js → p-1b77464d.system.entry.js} +16 -16
  217. package/dist/zonos-elements/{p-cc5306fe.system.entry.js → p-1bac5ac1.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-128485dc.entry.js → p-1c150f26.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-cf5688f7.entry.js → p-234c202c.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-5a631080.system.entry.js → p-23f6346b.system.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-cc949df1.system.entry.js → p-244e0302.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-7681798d.entry.js → p-24f3c547.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-5c08d36b.entry.js → p-2603dce0.entry.js} +1 -1
  224. package/dist/zonos-elements/{p-6b0afaa7.entry.js → p-26295311.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-d4c4a00e.entry.js → p-34c5e145.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-f6e0aeba.system.entry.js → p-35509b10.system.entry.js} +185 -185
  227. package/dist/zonos-elements/{p-4a54f664.entry.js → p-35539d3d.entry.js} +1 -1
  228. package/dist/zonos-elements/{p-5024df2d.system.entry.js → p-3c800376.system.entry.js} +61 -61
  229. package/dist/zonos-elements/{p-f8fd756a.system.entry.js → p-474e8a92.system.entry.js} +1 -1
  230. package/dist/zonos-elements/{p-d55b9664.system.entry.js → p-481ecc23.system.entry.js} +20 -20
  231. package/dist/zonos-elements/{p-4973f8d8.system.entry.js → p-4fd78ecf.system.entry.js} +14 -14
  232. package/dist/zonos-elements/{p-8cd3f1e2.entry.js → p-52d9fd3a.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-a6faab6a.entry.js → p-55916c90.entry.js} +1 -1
  234. package/dist/zonos-elements/p-5b06f069.entry.js +1 -0
  235. package/dist/zonos-elements/{p-5d3079e8.entry.js → p-5df25a1a.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-450ed170.system.entry.js → p-5f347f91.system.entry.js} +3 -3
  237. package/dist/zonos-elements/{p-beeb9d36.system.entry.js → p-756d303f.system.entry.js} +1 -1
  238. package/dist/zonos-elements/{p-5836d426.system.entry.js → p-79ddb12a.system.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-f27317d3.system.entry.js → p-7d284341.system.entry.js} +4 -4
  240. package/dist/zonos-elements/{p-f6ba59f6.system.entry.js → p-7e1050dd.system.entry.js} +10 -10
  241. package/dist/zonos-elements/{p-02ef0f99.system.entry.js → p-7ee2af6e.system.entry.js} +1 -1
  242. package/dist/zonos-elements/{p-34d1545a.entry.js → p-83aa1c8c.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-9818f823.entry.js → p-84c9ce16.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-CaUXHglQ.system.js → p-8PPEbm_0.system.js} +9 -9
  245. package/dist/zonos-elements/{p-b6deae2b.system.entry.js → p-92fe9a1f.system.entry.js} +2 -2
  246. package/dist/zonos-elements/{p-f57495dc.entry.js → p-990b49f2.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-cadf6b63.system.entry.js → p-9ef0f69e.system.entry.js} +10 -10
  248. package/dist/zonos-elements/{p-CZl1nwqv.system.js → p-B4Ufchqh.system.js} +3 -3
  249. package/dist/zonos-elements/{p-BtMauqj_.system.js → p-B5NDhB1w.system.js} +6 -8
  250. package/dist/zonos-elements/{p-CJCoACvU.js → p-BDrM4x5N.js} +2 -2
  251. package/dist/zonos-elements/p-BGktDPwA.system.js +1 -0
  252. package/dist/zonos-elements/{p-C19J2XSh.js → p-BJzAgoqz.js} +1 -1
  253. package/dist/zonos-elements/p-BKoLoalh.js +1 -0
  254. package/dist/zonos-elements/{p-Dj-O6VfM.system.js → p-BT9_ehlh.system.js} +2 -2
  255. package/dist/zonos-elements/{p-B2EZRfoq.system.js → p-B_5RofQ9.system.js} +15 -15
  256. package/dist/zonos-elements/p-BaF00SfB.js +1 -0
  257. package/dist/zonos-elements/{p-D0erXw7p.js → p-BpDCLBwW.js} +1 -1
  258. package/dist/zonos-elements/{p-DkpYo2Fs.js → p-BtWDzGMx.js} +1 -1
  259. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  260. package/dist/zonos-elements/{p-CPnR_T0a.system.js → p-BuU_p5DP.system.js} +58 -58
  261. package/dist/zonos-elements/{p-D5AtAlJx.system.js → p-CASTsiDR.system.js} +3 -3
  262. package/dist/zonos-elements/{p-CaAod213.system.js → p-CBx5nYet.system.js} +1 -1
  263. package/dist/zonos-elements/{p-DIJaXkiE.system.js → p-CEmXVahp.system.js} +111 -105
  264. package/dist/zonos-elements/{p-nU86HJ5w.js → p-CUaf1cEg.js} +1 -1
  265. package/dist/zonos-elements/p-CX_vfdWt.js +1 -0
  266. package/dist/zonos-elements/p-C_z9WL8a.js +1 -0
  267. package/dist/zonos-elements/p-CcJF6xhQ.js +1 -0
  268. package/dist/zonos-elements/{p-DjuFsKLG.js → p-CewmhMGk.js} +1 -1
  269. package/dist/zonos-elements/{p-CYdt69j5.system.js → p-Cpe_ISNt.system.js} +18 -18
  270. package/dist/zonos-elements/{p-DTgv0QpG.js → p-Cuk0LLGQ.js} +1 -1
  271. package/dist/zonos-elements/p-Cxuiqv1I.js +1 -0
  272. package/dist/zonos-elements/p-DQZncB2d.system.js +9 -0
  273. package/dist/zonos-elements/{p-D-DawUYF.system.js → p-DVITR-Eu.system.js} +1 -1
  274. package/dist/zonos-elements/{p-DGsEWFDU.system.js → p-DYIisqF7.system.js} +1 -1
  275. package/dist/zonos-elements/{p-uV7m6KrY.system.js → p-DoEHepOc.system.js} +1 -1
  276. package/dist/zonos-elements/{p-DHwpNxG9.js → p-DwkyNtpD.js} +1 -1
  277. package/dist/zonos-elements/{p-CKTIJ2Gr.js → p-NJVOYjda.js} +1 -1
  278. package/dist/zonos-elements/{p-CtEsvWI6.js → p-W82paT5F.js} +1 -1
  279. package/dist/zonos-elements/{p-04bfcd72.system.entry.js → p-a571beaa.system.entry.js} +13 -13
  280. package/dist/zonos-elements/{p-5562a955.system.entry.js → p-a5c25829.system.entry.js} +3 -3
  281. package/dist/zonos-elements/{p-b68ca96f.entry.js → p-a938c174.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-844a743a.entry.js → p-ab54d0a1.entry.js} +1 -1
  283. package/dist/zonos-elements/{p-9ebe9a36.entry.js → p-acd50b0b.entry.js} +1 -1
  284. package/dist/zonos-elements/{p-0f603278.system.entry.js → p-b5882fbb.system.entry.js} +2 -2
  285. package/dist/zonos-elements/{p-891b47d7.entry.js → p-ba510730.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-e9320825.entry.js → p-c3b02dbf.entry.js} +1 -1
  287. package/dist/zonos-elements/{p-be64d823.system.entry.js → p-c403f004.system.entry.js} +1 -1
  288. package/dist/zonos-elements/{p-64e7bc5b.entry.js → p-c4ad6d4b.entry.js} +1 -1
  289. package/dist/zonos-elements/p-ca3175d9.entry.js +1 -0
  290. package/dist/zonos-elements/{p-a38e62cc.entry.js → p-d3d0656a.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-9b6482ef.entry.js → p-d4d2b39e.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-ea8790aa.entry.js → p-d6b72f6d.entry.js} +1 -1
  293. package/dist/zonos-elements/p-d74bc3e8.entry.js +1 -0
  294. package/dist/zonos-elements/p-db75322d.entry.js +1 -0
  295. package/dist/zonos-elements/p-dd8ca91e.entry.js +1 -0
  296. package/dist/zonos-elements/{p-7ae48e31.entry.js → p-ddca5ee1.entry.js} +1 -1
  297. package/dist/zonos-elements/{p-bdba7d9e.system.entry.js → p-dfc87b10.system.entry.js} +1 -1
  298. package/dist/zonos-elements/{p-e101d722.system.entry.js → p-f37b8aaf.system.entry.js} +2 -2
  299. package/dist/zonos-elements/{p-b14819ab.system.entry.js → p-fb869759.system.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-i1iCWKdv.js → p-sz4L-ZnB.js} +1 -1
  301. package/dist/zonos-elements/{p-D31lQiWo.system.js → p-tGJYTlGL.system.js} +4 -4
  302. package/dist/zonos-elements/p-tkSf-lrO.system.js +13 -0
  303. package/dist/zonos-elements/{p-DPW1yXt9.system.js → p-uuZUZPIm.system.js} +61 -61
  304. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  305. package/package.json +12 -11
  306. package/dist/esm-es5/debounce-DWPsxJsW.js +0 -1
  307. package/dist/zonos-elements/p-0466650f.entry.js +0 -1
  308. package/dist/zonos-elements/p-2ba738ec.entry.js +0 -1
  309. package/dist/zonos-elements/p-3ERbuo5a.js +0 -1
  310. package/dist/zonos-elements/p-6f742021.entry.js +0 -1
  311. package/dist/zonos-elements/p-89ddab88.entry.js +0 -1
  312. package/dist/zonos-elements/p-BANhKkF2.system.js +0 -1
  313. package/dist/zonos-elements/p-BJufDgh3.js +0 -1
  314. package/dist/zonos-elements/p-BSgVcCxT.system.js +0 -9
  315. package/dist/zonos-elements/p-CQqNJo0D.system.js +0 -13
  316. package/dist/zonos-elements/p-LypTHRUC.js +0 -1
  317. package/dist/zonos-elements/p-adfee3a3.entry.js +0 -1
  318. package/dist/zonos-elements/p-f2cedbcd.system.entry.js +0 -121
  319. package/dist/zonos-elements/p-lGLcGvEA.js +0 -1
  320. package/dist/zonos-elements/p-pfIceXbY.js +0 -1
  321. package/dist/zonos-elements/p-t_ClFAJR.js +0 -1
@@ -1 +0,0 @@
1
- import{r as o,h as n,a as i,F as s}from"./p-_lt63o7c.js";import{b as e,i as t,c,d as a,r,e as l,k as z,l as d,z as v,E as h,J as m,H as p,f as u}from"./p-DHwpNxG9.js";import{i as g,a as b,b as f,c as w}from"./p-CKTIJ2Gr.js";import{p as x,a as y}from"./p-CJCoACvU.js";import{s as k,t as C,e as I,h as j,j as S,l as E}from"./p-DTgv0QpG.js";import{z as O}from"./p-CtEsvWI6.js";import{b as T}from"./p-BycjkdlE.js";import{h as L,s as U,l as D,g as P}from"./p-DE4a-QD5.js";import{i as _,a as A}from"./p-Clej0Ffe.js";import{c as N}from"./p-BJHSB96f.js";import{l as B}from"./p-BJmZPrZl.js";import"./p-YdrG78th.js";import"./p-3ERbuo5a.js";import"./p-Cye-evFK.js";import"./p-CICjAi70.js";import"./p-i1iCWKdv.js";const F=class{constructor(n){o(this,n),this.storeUnsubscribeList=[],this.onChangeLocaleListener=()=>{},this.mobile=!1,this.tablet=!1,this.stripe=window.Zonos.stripe,this.showLanguageDialogMobile=!1,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isMobile=!1,this.isTablet=!1,this.isOverlayLoading=!0,this.isCartCollected=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.confirmationId=null,this.clientSecret=e.clientSecret,this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret,this.getBaseCurrencySettlementInfo=()=>{const o=a.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:n}}=o;return n?{settlementAmount:(n.discounts||0)+n.items+n.landedCostTotal+n.shipping}:null},this.applyStripeTheme=async()=>{const o=O.appearance.theme;await t({overrideTheme:this.isMobile?o:void 0,paypalEnabled:x()})},this.fetchCheckoutSession=async o=>{const{json:n}=await L("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"});return n},this.checkStripePaymentIntentStatus=async()=>{var o;const n=!!window.Zonos.cartData,i=new URL(window.location.href).searchParams,s=i.get("payment_intent_client_secret"),t=i.get("zonosCheckoutSessionId");if(B("Payment intent exist, checking stripe payment intent status"),!s)return B("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:n};const{error:a,status:r}=await c({clientSecret:s});if(new URLSearchParams(window.location.search).get("redirect_status")&&t){B(a?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen");const n=await this.fetchCheckoutSession(t);return this.confirmationId=(null===(o=null==n?void 0:n.checkoutSession.landedCost)||void 0===o?void 0:o.shortId)||null,k.checkoutSessionId=t,e.clientSecret=s,this.setToFinishStep(r),{shouldAllowOrder:!1}}return n?(B("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(B("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})}}resizeListener(){this.isMobile=_(this.mobile),this.isTablet=A(this.tablet)}async setToFinishStep(o){e.stripe=window.Zonos.stripe,a.step="finish",this.storybookPaymentStatusOverride=o,this.isOverlayLoading=!1}async initInvoiceCart(){var o,n,i,s,e,t,v,h,m,p,u;if(!window.Zonos.cartData)return;const f=null===(n=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.items[0])||void 0===n?void 0:n.currencyCode;f&&(a.currency=f);const w=null===(s=null===(i=window.Zonos.cartData)||void 0===i?void 0:i.references)||void 0===s?void 0:s.checkoutSessionId,x=null===(t=null===(e=window.Zonos.cartData)||void 0===e?void 0:e.references)||void 0===t?void 0:t.landedCostId;if(!x)return void r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:O.organizationName})],title:C("Invalid session")});w?(B("Setting checkout session id from cart reference","info",w),k.checkoutSessionId=w):(B("Clear checkout session id from storage so we start from a fresh session for the invoice cart"),k.checkoutSessionId=null);const{shouldAllowOrder:y}=await this.checkStripePaymentIntentStatus();if(y){try{const{adjustments:o,cartItems:n}=T(window.Zonos.cartData);if(await l({adjustments:o,cartItems:n,landedCostId:x,shouldInitSessionOnFailure:!1}),!k.checkoutSessionId&&!w){const o=await z();if(B(`stripeStoreInitCheckoutSession: ${o}`),!o)throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential")}if((!a.checkoutSession||(null===(v=a.checkoutSession)||void 0===v?void 0:v.completedAt))&&w){const o=await this.fetchCheckoutSession(w);if(this.confirmationId=(null===(h=null==o?void 0:o.checkoutSession.landedCost)||void 0===h?void 0:h.shortId)||null,(null==o?void 0:o.checkoutSession.completedAt)&&o.checkoutSession.order)return void this.setToFinishStep("succeeded");if(null==o?void 0:o.checkoutSession.clientSecret){const{status:n}=await c({clientSecret:o.checkoutSession.clientSecret});if("processing"===n||"succeeded"===n)return void this.setToFinishStep(n)}throw U({endpoint:"INVALID_INVOICE_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:w,cartId:null===(m=window.Zonos.cartData)||void 0===m?void 0:m.id,cartLandedCostId:x}}),new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it")}if(!a.checkoutSession)throw U({endpoint:"FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this invoice cart"],metadata:{cartCheckoutSessionId:w||"N/A",cartId:null===(p=window.Zonos.cartData)||void 0===p?void 0:p.id,cartLandedCostId:x||"N/A"}}),new Error("Could not update/create checkout session for this invoice cart");d();const i=null===(u=a.checkoutSession)||void 0===u?void 0:u.landedCost;if(!i)throw new Error("Landed cost could not be found in checkout session after creating/updating them");await g(Object.assign(Object.assign({},a.checkoutSession),{id:k.checkoutSessionId||""})),b({landedCostId:i.id}),this.applyStripeTheme()}catch(o){D(o),r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:O.organizationName})],title:C("Invalid session")})}this.isOverlayLoading=!1}}toggleLanguageDialog(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile}async handleStripePaymentContinue(){var o,n,i,s;if(null===(o=e.stripeBillingAddressElement)||void 0===o||o.getValue(),null===(n=e.stripeLinkEventData)||void 0===n?void 0:n.complete)if(null===(i=e.stripeBillingAddressEventData)||void 0===i?void 0:i.complete)if("USD"!==e.checkoutSettlementCurrency||!e.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,y.paypalErrorMessage=null,e.hasPaymentError=!1,this.submitLoading=!0,a.inventoryCheckErrorMessage=null,!await v())return e.hasPaymentError=!0,e.customErrorMessage=C("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:e.checkoutSettlementCurrency}),void(this.submitLoading=!1);await f();try{return await h({noLandedCostCheck:!0}),a.step="finish",void(this.confirmationId=w.landedCostShortId||(null===(s=a.selectedLandedCost)||void 0===s?void 0:s.landedCostId)||null)}catch(o){D(o),e.hasPaymentError=!0}this.submitLoading=!1}else this.payInUsdConfirmDialogOpen=!0;else{const o=document.querySelector(".zonos--billing-address");null==o||o.scrollIntoView({behavior:"smooth"})}else{const o=document.querySelector("zonos-link-authentication");null==o||o.scrollIntoView({behavior:"smooth"})}}componentWillLoad(){e.stripe=window.Zonos.stripe,a.step="payment",this.initInvoiceCart(),this.resizeListener(),this.storeUnsubscribeList=[m("clientSecret",(()=>{this.applyStripeTheme()})),I("selectedLocale",(()=>{this.applyStripeTheme()}))],B(`mobile: ${this.isMobile}`)}disconnectedCallback(){p(),u(),this.onChangeLocaleListener(),this.storeUnsubscribeList.forEach((o=>o()))}render(){this.clientSecret=e.clientSecret,e.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret);const o=this.getBaseCurrencySettlementInfo(),{logoUrl:t,theme:c}=O.appearance,r=()=>{const o=`${t}?timestamp=${Date.now()}`;return n("div",{class:"zonos--logo"},o&&n("img",{alt:`${O.organizationName} logo`,src:o}))},l=P(),z=()=>{var o;const i=new URLSearchParams(window.location.search),e=i.get("zonosQaUrl"),t=i.get("zonosDebug"),c=null===(o=S.find((o=>o.code===E.selectedLocale)))||void 0===o?void 0:o.label;return n(s,null,n("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},n("div",{class:"zonos--logo-wrapper"},r(),l&&n("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),"1"===t&&n("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),e&&n("zonos-badge",{badgeColor:"purple",size:"small"},e)),n("div",{class:"zonos--header-right"},n("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:()=>this.toggleLanguageDialog(),variant:"outline"},c,n("zonos-icon",{"aria-label":"Language select",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"})),n("div",{class:N(["zonos--invoice-language-dialog",this.showLanguageDialogMobile&&"zonos--invoice-language-dialog-open"])},n("zonos-language-select",{handleOnClose:()=>this.toggleLanguageDialog()})))))};return n(i,{class:N(["zonos--invoice zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":c},(()=>this.isOverlayLoading||e.isFetchingSession?null:n("div",{class:"zonos--content"},"finish"!==a.step&&"error"!==a.step&&n(s,null,(this.isMobile||this.isTablet)&&z(),n("div",{class:"zonos--left","data-theme":c},!this.isMobile&&!this.isTablet&&z(),n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},C("Billing info")),n("zonos-v-stack",{spacing:16},n("zonos-link-authentication",{titleText:""}),n("zonos-address",{titleText:"",type:"billing"})),n("zonos-invoice-payment",{class:N(["zonos--invoice-container"]),continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()}})),n("div",{class:"zonos--right","data-theme":c},!this.isMobile&&n("zonos-invoice-review",{mobile:this.isMobile,tablet:this.isTablet}),n("div",{class:"zonos--order-details-container"},!this.isMobile&&n("zonos-invoice-cart-items",null),this.isMobile&&n("zonos-invoice-order-details",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onCollapseClicked:()=>{this.collapseReviewMobile=!this.collapseReviewMobile}})),n("div",{class:"flex--wrapper"},!this.isMobile&&n("zonos-v-stack",{spacing:16},n("zonos-invoice-subtotal",null)),!this.isMobile&&!this.isTablet&&n("zonos-invoice-footer",{"data-theme":c,mobile:this.isMobile,tablet:this.isTablet})))),("finish"===a.step||"error"===a.step)&&n("div",{class:"zonos--done","data-theme":c},n("div",{class:"zonos--header"},r()),n("zonos-invoice-finish",{confirmationId:this.confirmationId,overrideNotification:"error"===a.step&&a.error?Object.assign(Object.assign({},a.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),(this.isMobile||this.isTablet||"finish"===a.step||"error"===a.step)&&n("zonos-invoice-footer",{"data-theme":c,mobile:this.isMobile,tablet:this.isTablet})))(),o&&n("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:C("Cancel"),dialogConfirmBtnText:C("Pay [orderTotal]",{orderTotal:j({amount:o.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:C("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:C("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),n("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}};F.style=".sc-zonos-invoice-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-h *.sc-zonos-invoice{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-h img.sc-zonos-invoice{max-width:100%}.sc-zonos-invoice-h dl.sc-zonos-invoice,.sc-zonos-invoice-h dd.sc-zonos-invoice,.sc-zonos-invoice-h h1.sc-zonos-invoice,.sc-zonos-invoice-h h2.sc-zonos-invoice,.sc-zonos-invoice-h h3.sc-zonos-invoice,.sc-zonos-invoice-h h4.sc-zonos-invoice,.sc-zonos-invoice-h h5.sc-zonos-invoice,.sc-zonos-invoice-h h6.sc-zonos-invoice,.sc-zonos-invoice-h hr.sc-zonos-invoice,.sc-zonos-invoice-h figure.sc-zonos-invoice,.sc-zonos-invoice-h p.sc-zonos-invoice,.sc-zonos-invoice-h pre.sc-zonos-invoice{margin:0}.sc-zonos-invoice-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h *.sc-zonos-invoice{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar{width:10px}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--header.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--logo.sc-zonos-invoice{margin-bottom:0}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice zonos-checkout-finish.sc-zonos-invoice{-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{padding:0 8px 8px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--payment-error-banner.sc-zonos-invoice{margin-top:24px}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice .zonos--order-details-container.sc-zonos-invoice{overflow:auto}.sc-zonos-invoice-h .zonos--wrapper.sc-zonos-invoice{overflow:auto;max-height:100%;position:relative}.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice>*.sc-zonos-invoice{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-invoice-h .zonos--header-right.sc-zonos-invoice{display:none}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice img.sc-zonos-invoice{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-invoice-h .zonos--invoice-container.sc-zonos-invoice{overflow:visible}.mobile.sc-zonos-invoice-h,.tablet.sc-zonos-invoice-h{min-width:auto}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding-bottom:0}}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice{margin-bottom:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice{margin-top:8px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{max-height:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:auto}.mobile.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice{margin:0}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px;padding:0 16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{overflow:visible;width:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{gap:32px}.mobile.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{margin-top:0}.mobile.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:56px;top:-56px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--header-right.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:28px;top:-28px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar{width:10px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open.sc-zonos-invoice{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{F as zonos_invoice}
@@ -1,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-DIJaXkiE.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,z,g,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.m;a=e.t;h=e.g;d=e.o;u=e.p;c=e.q;f=e.r;w=e.h;m=e.u},function(e){v=e.z;z=e.g;g=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 X=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 z=u[f];if(w&&m){var g={cartButtonNode:z||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(g)}}return c};var S=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=X();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=X();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=z(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=g(v.appearance,this.appearanceSettingsOverride||null);var w=f.theme;var z=(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:z,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=S()}}}));
@@ -1 +0,0 @@
1
- import{z as s}from"./p-DTgv0QpG.js";const o=()=>s().length>1;export{o as s}
@@ -1 +0,0 @@
1
- import{d as o}from"./p-DHwpNxG9.js";import{A as r,h as n}from"./p-DTgv0QpG.js";const u=({amount:u,isForeign:i})=>{var t,v;const a=(null===(t=o.exchangeRate)||void 0===t?void 0:t.rate)||1,s=i?u:r(u),c=o.currency;if((null===(v=o.items[0])||void 0===v?void 0:v.currencyCode)===c)return n({amount:s,currency:c});const d=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(i?{amount:d?s/a:s,currency:e}:{amount:d?s:s*a,currency:e})};export{u as r}
@@ -1 +0,0 @@
1
- import{e as r}from"./p-CtEsvWI6.js";import{r as p}from"./p-D0erXw7p.js";var s=r(p());export{s as d}