@zonos/elements 1.1.1 → 1.1.2

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 (362) hide show
  1. package/dist/cjs/{cart-108bc407.js → cart-a969ee0b.js} +8 -8
  2. package/dist/cjs/{cart-108bc407.js.map → cart-a969ee0b.js.map} +1 -1
  3. package/dist/cjs/{getBorderRadius-2904800c.js → getBorderRadius-ae52cae1.js} +2 -2
  4. package/dist/cjs/{getBorderRadius-2904800c.js.map → getBorderRadius-ae52cae1.js.map} +1 -1
  5. package/dist/cjs/{isDarkColor-a86b8a05.js → isDarkColor-e1a7bf45.js} +2 -2
  6. package/dist/cjs/{isDarkColor-a86b8a05.js.map → isDarkColor-e1a7bf45.js.map} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{localization-f6a1b679.js → localization-d510574c.js} +200 -12
  9. package/dist/cjs/localization-d510574c.js.map +1 -0
  10. package/dist/cjs/{submitGtag-b1b96579.js → submitGtag-4de4430f.js} +3 -3
  11. package/dist/cjs/{submitGtag-b1b96579.js.map → submitGtag-4de4430f.js.map} +1 -1
  12. package/dist/cjs/zonos-address_2.cjs.entry.js +5 -5
  13. package/dist/cjs/zonos-banner.cjs.entry.js +68 -0
  14. package/dist/cjs/zonos-banner.cjs.entry.js.map +1 -0
  15. package/dist/cjs/zonos-button_2.cjs.entry.js +3 -3
  16. package/dist/cjs/zonos-cart-items_10.cjs.entry.js +12 -12
  17. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -9
  18. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  19. package/dist/cjs/zonos-controller.cjs.entry.js.map +1 -1
  20. package/dist/cjs/zonos-country-flag_4.cjs.entry.js +6 -6
  21. package/dist/cjs/zonos-elements.cjs.js +1 -1
  22. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +12 -8
  23. package/dist/cjs/zonos-hello-dialog.cjs.entry.js.map +1 -1
  24. package/dist/cjs/zonos-hello.cjs.entry.js +237 -22
  25. package/dist/cjs/zonos-hello.cjs.entry.js.map +1 -1
  26. package/dist/cjs/zonos-payment.cjs.entry.js +60 -0
  27. package/dist/cjs/zonos-payment.cjs.entry.js.map +1 -0
  28. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  29. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js.map +1 -1
  30. package/dist/cjs/{zonosStore-960e5542.js → zonosStore-d9cdaec6.js} +6 -22
  31. package/dist/cjs/zonosStore-d9cdaec6.js.map +1 -0
  32. package/dist/collection/components/checkout/zonos-checkout/assets/LeftArrow.svg +1 -1
  33. package/dist/collection/components/checkout/zonos-checkout/assets/MessageIcon.svg +1 -1
  34. package/dist/collection/components/checkout/zonos-checkout/assets/RemoveIcon.svg +1 -1
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/assets/InfoIcon.svg +1 -1
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/RemoveIcon.svg +1 -1
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/SuccessIcon.svg +1 -1
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronDownIcon.svg +1 -1
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronUpIcon.svg +1 -1
  40. package/dist/collection/components/common/zonos-banner/zonos-banner.css +6 -1
  41. package/dist/collection/components/common/zonos-banner/zonos-banner.js +1 -1
  42. package/dist/collection/components/common/zonos-banner/zonos-banner.js.map +1 -1
  43. package/dist/collection/components/common/zonos-country-select/assets/arrowLeftBlue.svg +1 -1
  44. package/dist/collection/components/common/zonos-dialog/assets/removeIcon.svg +1 -1
  45. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
  46. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js.map +1 -1
  47. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +20 -2
  48. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +135 -20
  49. package/dist/collection/components/hello/zonos-hello/zonos-hello.js.map +1 -1
  50. package/dist/collection/components/hello/zonos-hello-dialog/assets/bagIcon.svg +1 -1
  51. package/dist/collection/components/hello/zonos-hello-dialog/assets/messageIcon.svg +1 -1
  52. package/dist/collection/components/hello/zonos-hello-dialog/assets/moneyIcon.svg +1 -1
  53. package/dist/collection/components/hello/zonos-hello-dialog/assets/removeIcon.svg +1 -1
  54. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/chevronDownIcon.svg +1 -1
  55. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIcon.svg +1 -1
  56. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +12 -4
  57. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +30 -1
  58. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js.map +1 -1
  59. package/dist/collection/components/store/hello/localization.js +2 -4
  60. package/dist/collection/components/store/hello/localization.js.map +1 -1
  61. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  62. package/dist/collection/components/store/translationStore/strings.arabic.js.map +1 -1
  63. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  64. package/dist/collection/components/store/translationStore/strings.base.js.map +1 -1
  65. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  66. package/dist/collection/components/store/translationStore/strings.chinese.js.map +1 -1
  67. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  68. package/dist/collection/components/store/translationStore/strings.danish.js.map +1 -1
  69. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  70. package/dist/collection/components/store/translationStore/strings.dutch.js.map +1 -1
  71. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  72. package/dist/collection/components/store/translationStore/strings.french.js.map +1 -1
  73. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  74. package/dist/collection/components/store/translationStore/strings.german.js.map +1 -1
  75. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  76. package/dist/collection/components/store/translationStore/strings.hebrew.js.map +1 -1
  77. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  78. package/dist/collection/components/store/translationStore/strings.indonesian.js.map +1 -1
  79. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  80. package/dist/collection/components/store/translationStore/strings.italian.js.map +1 -1
  81. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  82. package/dist/collection/components/store/translationStore/strings.japanese.js.map +1 -1
  83. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  84. package/dist/collection/components/store/translationStore/strings.korean.js.map +1 -1
  85. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  86. package/dist/collection/components/store/translationStore/strings.norwegian.js.map +1 -1
  87. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  88. package/dist/collection/components/store/translationStore/strings.polish.js.map +1 -1
  89. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  90. package/dist/collection/components/store/translationStore/strings.portuguese.js.map +1 -1
  91. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  92. package/dist/collection/components/store/translationStore/strings.russian.js.map +1 -1
  93. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  94. package/dist/collection/components/store/translationStore/strings.spanish.js.map +1 -1
  95. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  96. package/dist/collection/components/store/translationStore/strings.swedish.js.map +1 -1
  97. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  98. package/dist/collection/components/store/translationStore/strings.turkish.js.map +1 -1
  99. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  100. package/dist/collection/components/store/translationStore/strings.vietnamese.js.map +1 -1
  101. package/dist/collection/components/store/zonosStore.js +5 -3
  102. package/dist/collection/components/store/zonosStore.js.map +1 -1
  103. package/dist/collection/components/utils/api/checkItemRestrictions.js +18 -0
  104. package/dist/collection/components/utils/api/checkItemRestrictions.js.map +1 -0
  105. package/dist/collection/components/utils/hello/detectItemRestrictions.js +29 -0
  106. package/dist/collection/components/utils/hello/detectItemRestrictions.js.map +1 -0
  107. package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js +8 -7
  108. package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js.map +1 -1
  109. package/dist/collection/components/utils/hello/getProductsOnPage.js +49 -0
  110. package/dist/collection/components/utils/hello/getProductsOnPage.js.map +1 -0
  111. package/dist/collection/components/utils/hello/setZonosCountryUrlParam.js +10 -0
  112. package/dist/collection/components/utils/hello/setZonosCountryUrlParam.js.map +1 -0
  113. package/dist/collection/environment.js +34 -7
  114. package/dist/collection/environment.js.map +1 -1
  115. package/dist/collection/scripts/loadStripe.js +3 -3
  116. package/dist/collection/scripts/loadStripe.js.map +1 -1
  117. package/dist/collection/scripts/stripe.js +3 -3
  118. package/dist/collection/scripts/stripe.js.map +1 -1
  119. package/dist/collection/scripts/zonos.js +83 -30
  120. package/dist/collection/scripts/zonos.js.map +1 -1
  121. package/dist/collection/types/generated/graphql.customer.types.js +34 -0
  122. package/dist/collection/types/generated/graphql.customer.types.js.map +1 -1
  123. package/dist/collection/types/hello/HelloConfig.js.map +1 -1
  124. package/dist/collection/types/hello/Product.js +2 -0
  125. package/dist/collection/types/hello/Product.js.map +1 -0
  126. package/dist/collection/types/hello/RestrictedItem.js +2 -0
  127. package/dist/collection/types/hello/RestrictedItem.js.map +1 -0
  128. package/dist/components/localization.js +198 -11
  129. package/dist/components/localization.js.map +1 -1
  130. package/dist/components/stripe.js +3 -3
  131. package/dist/components/stripe.js.map +1 -1
  132. package/dist/components/zonos-banner2.js +2 -2
  133. package/dist/components/zonos-banner2.js.map +1 -1
  134. package/dist/components/zonos-cart-subtotal2.js +1 -1
  135. package/dist/components/zonos-checkout-finish2.js +2 -2
  136. package/dist/components/zonos-checkout.js +3 -3
  137. package/dist/components/zonos-controller.js +1 -1
  138. package/dist/components/zonos-controller.js.map +1 -1
  139. package/dist/components/zonos-country-select2.js +1 -1
  140. package/dist/components/zonos-dialog2.js +1 -1
  141. package/dist/components/zonos-hello-dialog-footer2.js +2 -2
  142. package/dist/components/zonos-hello-dialog2.js +18 -7
  143. package/dist/components/zonos-hello-dialog2.js.map +1 -1
  144. package/dist/components/zonos-hello.js +247 -22
  145. package/dist/components/zonos-hello.js.map +1 -1
  146. package/dist/components/zonos-review2.js +2 -2
  147. package/dist/components/zonos-shipping-rich-radio2.js +1 -1
  148. package/dist/components/zonos-shipping-rich-radio2.js.map +1 -1
  149. package/dist/components/zonosStore.js +5 -21
  150. package/dist/components/zonosStore.js.map +1 -1
  151. package/dist/{zonos-elements/cart-2f83e048.js → esm/cart-d00e1acb.js} +8 -8
  152. package/dist/esm/{cart-2f83e048.js.map → cart-d00e1acb.js.map} +1 -1
  153. package/dist/{zonos-elements/getBorderRadius-82fbaf25.js → esm/getBorderRadius-e8ad5967.js} +2 -2
  154. package/dist/esm/{getBorderRadius-82fbaf25.js.map → getBorderRadius-e8ad5967.js.map} +1 -1
  155. package/dist/{zonos-elements/isDarkColor-b21326ae.js → esm/isDarkColor-3bb345f4.js} +2 -2
  156. package/dist/{zonos-elements/isDarkColor-b21326ae.js.map → esm/isDarkColor-3bb345f4.js.map} +1 -1
  157. package/dist/esm/loader.js +1 -1
  158. package/dist/{zonos-elements/localization-4a424f49.js → esm/localization-1d92a557.js} +200 -13
  159. package/dist/esm/localization-1d92a557.js.map +1 -0
  160. package/dist/{zonos-elements/submitGtag-fbdb454b.js → esm/submitGtag-85914088.js} +3 -3
  161. package/dist/esm/{submitGtag-fbdb454b.js.map → submitGtag-85914088.js.map} +1 -1
  162. package/dist/esm/zonos-address_2.entry.js +5 -5
  163. package/dist/esm/zonos-banner.entry.js +64 -0
  164. package/dist/esm/zonos-banner.entry.js.map +1 -0
  165. package/dist/esm/zonos-button_2.entry.js +3 -3
  166. package/dist/esm/zonos-cart-items_10.entry.js +12 -12
  167. package/dist/esm/zonos-checkout.entry.js +9 -9
  168. package/dist/esm/zonos-controller.entry.js +6 -6
  169. package/dist/esm/zonos-controller.entry.js.map +1 -1
  170. package/dist/esm/zonos-country-flag_4.entry.js +6 -6
  171. package/dist/esm/zonos-elements.js +1 -1
  172. package/dist/esm/zonos-hello-dialog.entry.js +12 -8
  173. package/dist/esm/zonos-hello-dialog.entry.js.map +1 -1
  174. package/dist/esm/zonos-hello.entry.js +237 -22
  175. package/dist/esm/zonos-hello.entry.js.map +1 -1
  176. package/dist/esm/zonos-payment.entry.js +56 -0
  177. package/dist/esm/zonos-payment.entry.js.map +1 -0
  178. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  179. package/dist/esm/zonos-shipping-rich-radio.entry.js.map +1 -1
  180. package/dist/{zonos-elements/zonosStore-13a7b534.js → esm/zonosStore-1c9c7d76.js} +6 -22
  181. package/dist/esm/zonosStore-1c9c7d76.js.map +1 -0
  182. package/dist/esm-es5/cart-d00e1acb.js +2 -0
  183. package/dist/esm-es5/{cart-2f83e048.js.map → cart-d00e1acb.js.map} +1 -1
  184. package/dist/esm-es5/{getBorderRadius-82fbaf25.js → getBorderRadius-e8ad5967.js} +2 -2
  185. package/dist/esm-es5/{isDarkColor-b21326ae.js → isDarkColor-3bb345f4.js} +2 -2
  186. package/dist/esm-es5/loader.js +1 -1
  187. package/dist/esm-es5/loader.js.map +1 -1
  188. package/dist/esm-es5/localization-1d92a557.js +2 -0
  189. package/dist/esm-es5/localization-1d92a557.js.map +1 -0
  190. package/dist/esm-es5/{submitGtag-fbdb454b.js → submitGtag-85914088.js} +2 -2
  191. package/dist/esm-es5/zonos-address_2.entry.js +1 -1
  192. package/dist/esm-es5/zonos-banner.entry.js +2 -0
  193. package/dist/esm-es5/zonos-banner.entry.js.map +1 -0
  194. package/dist/esm-es5/zonos-button_2.entry.js +1 -1
  195. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
  196. package/dist/esm-es5/zonos-cart-items_10.entry.js.map +1 -1
  197. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  198. package/dist/esm-es5/zonos-checkout.entry.js.map +1 -1
  199. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  200. package/dist/esm-es5/zonos-controller.entry.js.map +1 -1
  201. package/dist/esm-es5/zonos-country-flag_4.entry.js +1 -1
  202. package/dist/esm-es5/zonos-country-flag_4.entry.js.map +1 -1
  203. package/dist/esm-es5/zonos-elements.js +1 -1
  204. package/dist/esm-es5/zonos-elements.js.map +1 -1
  205. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  206. package/dist/esm-es5/zonos-hello-dialog.entry.js.map +1 -1
  207. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  208. package/dist/esm-es5/zonos-hello.entry.js.map +1 -1
  209. package/dist/esm-es5/zonos-payment.entry.js +2 -0
  210. package/dist/esm-es5/zonos-payment.entry.js.map +1 -0
  211. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  212. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js.map +1 -1
  213. package/dist/esm-es5/zonosStore-1c9c7d76.js +2 -0
  214. package/dist/esm-es5/zonosStore-1c9c7d76.js.map +1 -0
  215. package/dist/scripts/loadStripe.js +6 -6
  216. package/dist/scripts/loadZonos.js +92 -35
  217. package/dist/scripts/stripe.js +5 -5
  218. package/dist/scripts/zonos.js +92 -35
  219. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +24 -1
  220. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +6 -0
  221. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  222. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  223. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  224. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  225. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  226. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  227. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  228. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  229. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  230. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  231. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  232. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  233. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  234. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  235. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  236. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  237. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  238. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  239. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  240. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  241. package/dist/types/components/store/zonosStore.d.ts +1 -1
  242. package/dist/types/components/utils/api/checkItemRestrictions.d.ts +22 -0
  243. package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +14 -0
  244. package/dist/types/components/utils/hello/getCurrentHelloLocalePage.d.ts +2 -1
  245. package/dist/types/components/utils/hello/getProductsOnPage.d.ts +2 -0
  246. package/dist/types/components/utils/hello/setZonosCountryUrlParam.d.ts +2 -0
  247. package/dist/types/components.d.ts +12 -0
  248. package/dist/types/environment.d.ts +9 -0
  249. package/dist/types/scripts/loadStripe.d.ts +1 -1
  250. package/dist/types/scripts/stripe.d.ts +2 -2
  251. package/dist/types/scripts/zonos.d.ts +2 -0
  252. package/dist/types/types/generated/graphql.customer.types.d.ts +75 -1
  253. package/dist/types/types/generated/graphql.customer.types.ts +113 -1
  254. package/dist/types/types/hello/HelloConfig.d.ts +4 -0
  255. package/dist/types/types/hello/Product.d.ts +5 -0
  256. package/dist/types/types/hello/RestrictedItem.d.ts +6 -0
  257. package/dist/zonos-elements/assets/ChevronDownIcon.svg +1 -1
  258. package/dist/zonos-elements/assets/ChevronUpIcon.svg +1 -1
  259. package/dist/zonos-elements/assets/InfoIcon.svg +1 -1
  260. package/dist/zonos-elements/assets/LeftArrow.svg +1 -1
  261. package/dist/zonos-elements/assets/MessageIcon.svg +1 -1
  262. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  263. package/dist/zonos-elements/assets/SuccessIcon.svg +1 -1
  264. package/dist/zonos-elements/assets/bagIcon.svg +1 -1
  265. package/dist/zonos-elements/assets/messageIcon.svg +1 -1
  266. package/dist/zonos-elements/assets/moneyIcon.svg +1 -1
  267. package/dist/zonos-elements/assets/removeIcon.svg +1 -1
  268. package/dist/zonos-elements/cart-c641ddaf.system.js +2 -0
  269. package/dist/zonos-elements/{cart-9780fa28.system.js.map → cart-c641ddaf.system.js.map} +1 -1
  270. package/dist/{esm/cart-2f83e048.js → zonos-elements/cart-d00e1acb.js} +8 -8
  271. package/dist/zonos-elements/{cart-2f83e048.js.map → cart-d00e1acb.js.map} +1 -1
  272. package/dist/zonos-elements/{getBorderRadius-4fbe49de.system.js → getBorderRadius-b59c3ada.system.js} +2 -2
  273. package/dist/{esm/getBorderRadius-82fbaf25.js → zonos-elements/getBorderRadius-e8ad5967.js} +2 -2
  274. package/dist/zonos-elements/{getBorderRadius-82fbaf25.js.map → getBorderRadius-e8ad5967.js.map} +1 -1
  275. package/dist/zonos-elements/{isDarkColor-dc2b7c8f.system.js → isDarkColor-231502d4.system.js} +2 -2
  276. package/dist/{esm/isDarkColor-b21326ae.js → zonos-elements/isDarkColor-3bb345f4.js} +2 -2
  277. package/dist/{esm/isDarkColor-b21326ae.js.map → zonos-elements/isDarkColor-3bb345f4.js.map} +1 -1
  278. package/dist/{esm/localization-4a424f49.js → zonos-elements/localization-1d92a557.js} +200 -13
  279. package/dist/zonos-elements/localization-1d92a557.js.map +1 -0
  280. package/dist/zonos-elements/localization-a6b6a5a5.system.js +2 -0
  281. package/dist/zonos-elements/localization-a6b6a5a5.system.js.map +1 -0
  282. package/dist/zonos-elements/submitGtag-764af8c4.system.js +2 -0
  283. package/dist/{esm/submitGtag-fbdb454b.js → zonos-elements/submitGtag-85914088.js} +3 -3
  284. package/dist/zonos-elements/{submitGtag-fbdb454b.js.map → submitGtag-85914088.js.map} +1 -1
  285. package/dist/zonos-elements/zonos-address_2.entry.js +5 -5
  286. package/dist/zonos-elements/zonos-address_2.system.entry.js +1 -1
  287. package/dist/zonos-elements/zonos-banner.entry.js +64 -0
  288. package/dist/zonos-elements/zonos-banner.entry.js.map +1 -0
  289. package/dist/zonos-elements/zonos-banner.system.entry.js +2 -0
  290. package/dist/zonos-elements/zonos-banner.system.entry.js.map +1 -0
  291. package/dist/zonos-elements/zonos-button_2.entry.js +3 -3
  292. package/dist/zonos-elements/zonos-button_2.system.entry.js +1 -1
  293. package/dist/zonos-elements/zonos-cart-items_10.entry.js +12 -12
  294. package/dist/zonos-elements/zonos-cart-items_10.system.entry.js +1 -1
  295. package/dist/zonos-elements/zonos-cart-items_10.system.entry.js.map +1 -1
  296. package/dist/zonos-elements/zonos-checkout.entry.js +9 -9
  297. package/dist/zonos-elements/zonos-checkout.system.entry.js +1 -1
  298. package/dist/zonos-elements/zonos-checkout.system.entry.js.map +1 -1
  299. package/dist/zonos-elements/zonos-controller.entry.js +6 -6
  300. package/dist/zonos-elements/zonos-controller.entry.js.map +1 -1
  301. package/dist/zonos-elements/zonos-controller.system.entry.js +1 -1
  302. package/dist/zonos-elements/zonos-controller.system.entry.js.map +1 -1
  303. package/dist/zonos-elements/zonos-country-flag_4.entry.js +6 -6
  304. package/dist/zonos-elements/zonos-country-flag_4.system.entry.js +1 -1
  305. package/dist/zonos-elements/zonos-country-flag_4.system.entry.js.map +1 -1
  306. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  307. package/dist/zonos-elements/zonos-elements.system.js +1 -1
  308. package/dist/zonos-elements/zonos-elements.system.js.map +1 -1
  309. package/dist/zonos-elements/zonos-hello-dialog.entry.js +12 -8
  310. package/dist/zonos-elements/zonos-hello-dialog.entry.js.map +1 -1
  311. package/dist/zonos-elements/zonos-hello-dialog.system.entry.js +1 -1
  312. package/dist/zonos-elements/zonos-hello-dialog.system.entry.js.map +1 -1
  313. package/dist/zonos-elements/zonos-hello.entry.js +237 -22
  314. package/dist/zonos-elements/zonos-hello.entry.js.map +1 -1
  315. package/dist/zonos-elements/zonos-hello.system.entry.js +1 -1
  316. package/dist/zonos-elements/zonos-hello.system.entry.js.map +1 -1
  317. package/dist/zonos-elements/zonos-payment.entry.js +56 -0
  318. package/dist/zonos-elements/zonos-payment.entry.js.map +1 -0
  319. package/dist/zonos-elements/zonos-payment.system.entry.js +2 -0
  320. package/dist/zonos-elements/zonos-payment.system.entry.js.map +1 -0
  321. package/dist/zonos-elements/zonos-shipping-rich-radio.entry.js +3 -3
  322. package/dist/zonos-elements/zonos-shipping-rich-radio.entry.js.map +1 -1
  323. package/dist/zonos-elements/zonos-shipping-rich-radio.system.entry.js +1 -1
  324. package/dist/zonos-elements/zonos-shipping-rich-radio.system.entry.js.map +1 -1
  325. package/dist/{esm/zonosStore-13a7b534.js → zonos-elements/zonosStore-1c9c7d76.js} +6 -22
  326. package/dist/zonos-elements/zonosStore-1c9c7d76.js.map +1 -0
  327. package/dist/zonos-elements/zonosStore-e5c545ea.system.js +2 -0
  328. package/dist/zonos-elements/zonosStore-e5c545ea.system.js.map +1 -0
  329. package/package.json +1 -1
  330. package/dist/cjs/localization-f6a1b679.js.map +0 -1
  331. package/dist/cjs/zonos-banner_2.cjs.entry.js +0 -120
  332. package/dist/cjs/zonos-banner_2.cjs.entry.js.map +0 -1
  333. package/dist/cjs/zonosStore-960e5542.js.map +0 -1
  334. package/dist/esm/localization-4a424f49.js.map +0 -1
  335. package/dist/esm/zonos-banner_2.entry.js +0 -115
  336. package/dist/esm/zonos-banner_2.entry.js.map +0 -1
  337. package/dist/esm/zonosStore-13a7b534.js.map +0 -1
  338. package/dist/esm-es5/cart-2f83e048.js +0 -2
  339. package/dist/esm-es5/localization-4a424f49.js +0 -2
  340. package/dist/esm-es5/localization-4a424f49.js.map +0 -1
  341. package/dist/esm-es5/zonos-banner_2.entry.js +0 -2
  342. package/dist/esm-es5/zonos-banner_2.entry.js.map +0 -1
  343. package/dist/esm-es5/zonosStore-13a7b534.js +0 -2
  344. package/dist/esm-es5/zonosStore-13a7b534.js.map +0 -1
  345. package/dist/zonos-elements/cart-9780fa28.system.js +0 -2
  346. package/dist/zonos-elements/localization-3c43290f.system.js +0 -2
  347. package/dist/zonos-elements/localization-3c43290f.system.js.map +0 -1
  348. package/dist/zonos-elements/localization-4a424f49.js.map +0 -1
  349. package/dist/zonos-elements/submitGtag-23ecdc20.system.js +0 -2
  350. package/dist/zonos-elements/zonos-banner_2.entry.js +0 -115
  351. package/dist/zonos-elements/zonos-banner_2.entry.js.map +0 -1
  352. package/dist/zonos-elements/zonos-banner_2.system.entry.js +0 -2
  353. package/dist/zonos-elements/zonos-banner_2.system.entry.js.map +0 -1
  354. package/dist/zonos-elements/zonosStore-13a7b534.js.map +0 -1
  355. package/dist/zonos-elements/zonosStore-77bcd7c0.system.js +0 -2
  356. package/dist/zonos-elements/zonosStore-77bcd7c0.system.js.map +0 -1
  357. /package/dist/esm-es5/{getBorderRadius-82fbaf25.js.map → getBorderRadius-e8ad5967.js.map} +0 -0
  358. /package/dist/esm-es5/{isDarkColor-b21326ae.js.map → isDarkColor-3bb345f4.js.map} +0 -0
  359. /package/dist/esm-es5/{submitGtag-fbdb454b.js.map → submitGtag-85914088.js.map} +0 -0
  360. /package/dist/zonos-elements/{getBorderRadius-4fbe49de.system.js.map → getBorderRadius-b59c3ada.system.js.map} +0 -0
  361. /package/dist/zonos-elements/{isDarkColor-dc2b7c8f.system.js.map → isDarkColor-231502d4.system.js.map} +0 -0
  362. /package/dist/zonos-elements/{submitGtag-23ecdc20.system.js.map → submitGtag-764af8c4.system.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-d1aa9293.js';
2
- import { _ as _root, i as isObjectLike_1, e as _baseGetTag, f as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore-13a7b534.js';
3
- import { t as translate, a as localizationStore, e as currencyDisplay, f as currencyConvertAndFormat, g as currencyConvert, j as currencyFormat, l as log } from './localization-4a424f49.js';
2
+ import { _ as _root, i as isObjectLike_1, e as _baseGetTag, f as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore-1c9c7d76.js';
3
+ import { h as handleFetch, b as logError, a as localizationStore, i as isValidSelector, t as translate, s as setZonosCountryUrlParam, e as currencyDisplay, f as currencyConvertAndFormat, g as currencyConvert, j as currencyFormat, l as log } from './localization-1d92a557.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-feba1ae2.js';
6
6
 
@@ -340,12 +340,131 @@ function debounce(func, wait, options) {
340
340
 
341
341
  var debounce_1 = debounce;
342
342
 
343
- const zonosHelloCss = ":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:0}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:0}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;width:100%;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(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}: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{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;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-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;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-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.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-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";
343
+ const checkItemRestrictions = async ({ items, shipFrom, shipTo, }) => {
344
+ var _a;
345
+ const url = `${"https://v1.route.js.zonos.com"}/api/check-item-restrictions`;
346
+ const body = {
347
+ items,
348
+ shipFrom,
349
+ shipTo,
350
+ };
351
+ const { errors, json } = await handleFetch(url, { body, method: 'POST' });
352
+ if (errors.length || !json) {
353
+ logError(`Error fetching item restrictions: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
354
+ return [];
355
+ }
356
+ return json.filter(Boolean);
357
+ };
358
+
359
+ const detectItemRestrictions = async (newProducts) => {
360
+ if (!newProducts.length) {
361
+ return [];
362
+ }
363
+ const { selectedCountryCode } = localizationStore;
364
+ if (!selectedCountryCode) {
365
+ logError('Hello Could not check item restrictions - No country code selected');
366
+ return [];
367
+ }
368
+ const items = newProducts.map(product => ({
369
+ description: product.description,
370
+ name: product.title,
371
+ }));
372
+ const restrictedItems = await checkItemRestrictions({
373
+ items: items,
374
+ shipFrom: 'AD',
375
+ shipTo: selectedCountryCode,
376
+ });
377
+ const restrictedItemsWithName = restrictedItems.map(item => {
378
+ var _a;
379
+ const name = ((_a = items.filter(x => x.description === item.itemDescription).find(Boolean)) === null || _a === void 0 ? void 0 : _a.name) || '';
380
+ return Object.assign(Object.assign({}, item), { name });
381
+ });
382
+ return restrictedItemsWithName;
383
+ };
384
+
385
+ const getCurrentHelloLocalePage = () => {
386
+ const { href } = window.location;
387
+ const { cartUrlPattern, homepageUrlPattern, productDetailUrlPattern, productListUrlPattern, } = zonosStore.helloSettings;
388
+ // The 'if' statements are sorted by most specific to least specific to help with regex matching
389
+ if (cartUrlPattern && new RegExp(cartUrlPattern).test(href)) {
390
+ return 'cart';
391
+ }
392
+ if (productDetailUrlPattern &&
393
+ new RegExp(productDetailUrlPattern).test(href)) {
394
+ return 'productDetail';
395
+ }
396
+ if (productListUrlPattern && new RegExp(productListUrlPattern).test(href)) {
397
+ return 'productList';
398
+ }
399
+ if (homepageUrlPattern && new RegExp(homepageUrlPattern).test(href)) {
400
+ return 'home';
401
+ }
402
+ return '';
403
+ };
404
+
405
+ const getProductsOnPage = () => {
406
+ var _a, _b;
407
+ const { productAddToCartElementSelector, productDescriptionElementSelector, productTitleElementSelector, restrictionBehavior, } = zonosStore.helloSettings;
408
+ if (!productTitleElementSelector || !productDescriptionElementSelector) {
409
+ logError(`Hello Could not check item restrictions - must provide title and description selectors.`);
410
+ }
411
+ const titleNodes = (productTitleElementSelector &&
412
+ isValidSelector(productTitleElementSelector) &&
413
+ document.querySelectorAll(productTitleElementSelector)) ||
414
+ [];
415
+ const descriptionNodes = (productDescriptionElementSelector &&
416
+ isValidSelector(productDescriptionElementSelector) &&
417
+ document.querySelectorAll(productDescriptionElementSelector)) ||
418
+ [];
419
+ if (titleNodes.length !== descriptionNodes.length) {
420
+ // If the title and description selectors don't match, kill item restrictions altogether
421
+ logError('Hello Could not check item restrictions - Title and description selectors do not match');
422
+ return [];
423
+ }
424
+ const shouldDisableCart = restrictionBehavior === 'RESTRICT_AND_BLOCK';
425
+ const cartButtonNodes = (shouldDisableCart &&
426
+ productAddToCartElementSelector &&
427
+ isValidSelector(productAddToCartElementSelector) &&
428
+ document.querySelectorAll(productAddToCartElementSelector)) ||
429
+ [];
430
+ if (shouldDisableCart && cartButtonNodes.length !== descriptionNodes.length) {
431
+ // If the "add to cart" selectors don't match, log the error and continue
432
+ logError('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');
433
+ }
434
+ const mergedElements = [];
435
+ for (let i = 0; i < titleNodes.length; i++) {
436
+ const titleNode = titleNodes[i];
437
+ const descriptionNode = descriptionNodes[i];
438
+ const cartButtonNode = cartButtonNodes[i];
439
+ if (titleNode && descriptionNode) {
440
+ const element = {
441
+ cartButtonNode: cartButtonNode || null,
442
+ description: ((_a = descriptionNode.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '',
443
+ title: ((_b = titleNode.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || '',
444
+ };
445
+ mergedElements.push(element);
446
+ }
447
+ }
448
+ return mergedElements;
449
+ };
344
450
 
451
+ const zonosHelloCss = ":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;width:100%;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(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-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(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}: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{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;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-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;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-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.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-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";
452
+
453
+ const PEEK_MESSAGE_DELAY_MS = 3000;
454
+ const RESIZE_DEBOUNCE_DELAY_MS = 500;
345
455
  const ZonosHello = class {
346
456
  constructor(hostRef) {
347
457
  registerInstance(this, hostRef);
348
458
  this.getHelloPeekMessage = () => {
459
+ const isRestrictionPage = zonosStore.currentHelloPage === 'productDetail' ||
460
+ zonosStore.currentHelloPage === 'productList';
461
+ if (isRestrictionPage && this.allRestrictedItems.length) {
462
+ const clickMessage = translate('click to learn more');
463
+ const restrictMessage = zonosStore.currentHelloPage === 'productDetail'
464
+ ? translate('Restricted item')
465
+ : translate('Restricted items found');
466
+ return `${restrictMessage} - ${clickMessage}`;
467
+ }
349
468
  switch (zonosStore.currentHelloPage) {
350
469
  case 'cart':
351
470
  return translate(`Prepay duties and taxes at checkout`);
@@ -361,16 +480,116 @@ const ZonosHello = class {
361
480
  this.showPeekMessage = true;
362
481
  }
363
482
  };
483
+ this.getNewItemRestrictions = async (newProducts) => {
484
+ const isRestrictionPage = zonosStore.currentHelloPage === 'productDetail' ||
485
+ zonosStore.currentHelloPage === 'productList';
486
+ // Only run detectItemRestrictions on product pages if the restrictionBehavior is not DISABLED
487
+ if (!isRestrictionPage ||
488
+ zonosStore.helloSettings.restrictionBehavior === 'DISABLED') {
489
+ return [];
490
+ }
491
+ const newRestrictions = await detectItemRestrictions(newProducts);
492
+ return newRestrictions;
493
+ };
494
+ this.triggerShowPeekMessage = () => {
495
+ this.peekMessage = this.getHelloPeekMessage();
496
+ const { peekMessageBehavior, peekMessageDelay } = zonosStore.helloSettings;
497
+ // peek message delay is passed in seconds, but setTimeout expects milliseconds
498
+ const peekMessageDelayToUse = peekMessageDelay * 1000;
499
+ if (peekMessageBehavior === 'ENABLED') {
500
+ setTimeout(() => {
501
+ this.enableShowPeekMessage();
502
+ setTimeout(() => {
503
+ this.showPeekMessage = false;
504
+ }, PEEK_MESSAGE_DELAY_MS);
505
+ }, peekMessageDelayToUse);
506
+ }
507
+ };
508
+ this.disableAddToCartButtons = () => {
509
+ // Remove disabled attribute from all "add to cart" buttons
510
+ if (this.productsOnPage.length) {
511
+ this.productsOnPage.forEach(product => {
512
+ var _a, _b;
513
+ const isRestricted = this.allRestrictedItems.some(item => item.itemDescription === product.description);
514
+ // if a product description matches a restrictedItems itemDescription, then disable the add to cart button. Otherwise, enable it.
515
+ if (isRestricted) {
516
+ (_a = product.cartButtonNode) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled');
517
+ }
518
+ else {
519
+ (_b = product.cartButtonNode) === null || _b === void 0 ? void 0 : _b.removeAttribute('disabled');
520
+ }
521
+ });
522
+ }
523
+ };
524
+ this.handleItemRestrictions = async () => {
525
+ this.productsOnPage = getProductsOnPage();
526
+ const newProducts = this.productsOnPage.filter(product => !this.allFoundProducts.some(foundProduct => foundProduct.title === product.title));
527
+ const newRestrictions = await this.getNewItemRestrictions(newProducts);
528
+ this.allRestrictedItems.push(...newRestrictions);
529
+ this.allFoundProducts.push(...newProducts);
530
+ this.disableAddToCartButtons();
531
+ };
532
+ this.reloadHelloData = async () => {
533
+ await this.handleItemRestrictions();
534
+ this.triggerShowPeekMessage();
535
+ void this.displayCurrency();
536
+ };
537
+ this.handleProductCountChange = debounce_1(() => {
538
+ const { productTitleElementSelector } = zonosStore.helloSettings;
539
+ if (productTitleElementSelector) {
540
+ const allProductsOnPage = getProductsOnPage();
541
+ if (this.allFoundProducts.length !== allProductsOnPage.length &&
542
+ window.location.href === this.initialUrl) {
543
+ // if allFoundProducts length is 0 (first render or no products), kill item restriction process as initial restrictions are handled in updateHelloOnPageChange
544
+ if (!this.allFoundProducts.length) {
545
+ return;
546
+ }
547
+ void this.reloadHelloData();
548
+ }
549
+ }
550
+ }, 1000);
551
+ this.watchProductCountChange = () => {
552
+ const observer = new MutationObserver(this.handleProductCountChange);
553
+ observer.observe(document.body, {
554
+ childList: true,
555
+ subtree: true,
556
+ });
557
+ };
558
+ this.updateHelloOnPageChange = () => {
559
+ // If the product count changes on the same url (loading more products), update the peek message and item restrictions
560
+ this.watchProductCountChange();
561
+ // Check url change on interval. If changed, update the peek message and item restrictions
562
+ setInterval(() => {
563
+ if (window.location.href !== this.initialUrl) {
564
+ const prevUrl = this.initialUrl && new URL(this.initialUrl);
565
+ const initialZonosCountry = prevUrl && prevUrl.searchParams.get('zonosCountry');
566
+ // If the zonosCountry url param changes, reset current item restriction tracking
567
+ if (initialZonosCountry !== localizationStore.selectedCountryCode) {
568
+ this.allFoundProducts = [];
569
+ this.allRestrictedItems = [];
570
+ this.productsOnPage = [];
571
+ }
572
+ this.initialUrl = window.location.href;
573
+ zonosStore.currentHelloPage = getCurrentHelloLocalePage();
574
+ const currentUrl = new URL(window.location.href);
575
+ const zonosCountry = currentUrl.searchParams.get('zonosCountry');
576
+ if (!zonosCountry) {
577
+ setZonosCountryUrlParam(localizationStore.selectedCountryCode);
578
+ return;
579
+ }
580
+ void this.reloadHelloData();
581
+ }
582
+ }, 1000);
583
+ };
364
584
  this.changeShowDialog = (value) => {
365
585
  this.showDialog = value;
366
586
  };
367
587
  this.shouldAnimateLeftDesktop = () => {
368
- // Get element position (relative = desktop, fixed = mobile)
588
+ // Get Hello position (relative = desktop, fixed = mobile)
369
589
  const elPosition = this.helloRef && getComputedStyle(this.helloRef).position;
370
590
  // If relative position, determine if peek message should animate left or right. Mobile is pre-determined.
371
591
  if (this.helloRef && elPosition === 'relative') {
372
592
  const hasMoreSpaceOnRight = getHasMoreSpaceOnRight(this.helloRef);
373
- // Determine peek message direction
374
593
  return hasMoreSpaceOnRight;
375
594
  }
376
595
  };
@@ -381,26 +600,19 @@ const ZonosHello = class {
381
600
  this.zonosStoreHelloSettings = zonosStore.helloSettings;
382
601
  this.showDialog = false;
383
602
  this.peekMessage = '';
603
+ this.initialUrl = '';
604
+ this.allRestrictedItems = [];
605
+ this.allFoundProducts = [];
606
+ this.productsOnPage = [];
384
607
  }
385
- componentDidLoad() {
386
- const initInterval = setInterval(() => {
608
+ componentWillLoad() {
609
+ const initInterval = setInterval(async () => {
387
610
  if (!this.helloRef) {
388
611
  return;
389
612
  }
390
613
  if (zonosStore.loadedConfig) {
391
614
  this.helloRef.setAttribute('data-zonos-hello-loaded', '');
392
- this.peekMessage = this.getHelloPeekMessage();
393
- const { peekMessageBehavior, peekMessageDelay } = zonosStore.helloSettings;
394
- // peek message delay is passed in seconds, but setTimeout expects milliseconds
395
- const peekMessageDelayToUse = peekMessageDelay * 1000;
396
- if (peekMessageBehavior === 'ENABLED') {
397
- setTimeout(() => {
398
- this.enableShowPeekMessage();
399
- setTimeout(() => {
400
- this.showPeekMessage = false;
401
- }, 3000);
402
- }, peekMessageDelayToUse);
403
- }
615
+ this.updateHelloOnPageChange();
404
616
  clearInterval(initInterval);
405
617
  }
406
618
  }, 100);
@@ -439,10 +651,10 @@ const ZonosHello = class {
439
651
  currencyFormat(value);
440
652
  }
441
653
  handleResize() {
442
- debounce_1(this.render.bind(this), 500);
654
+ debounce_1(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
443
655
  }
444
656
  render() {
445
- var _a;
657
+ var _a, _b;
446
658
  const isExcludedUrl = (_a = zonosStore.helloSettings.excludedUrlPatterns) === null || _a === void 0 ? void 0 : _a.some(pattern => new RegExp(pattern).test(window.location.href));
447
659
  if (isExcludedUrl) {
448
660
  log('Hello is excluded on this url', 'warn');
@@ -458,6 +670,7 @@ const ZonosHello = class {
458
670
  const isOnTop = mobileLocation.includes('TOP');
459
671
  const appearanceSettings = mergeConfig(zonosStore.appearance, this.appearanceSettingsOverride);
460
672
  const { theme } = appearanceSettings;
673
+ const restrictedItemsOnPage = (_b = this.allRestrictedItems) === null || _b === void 0 ? void 0 : _b.filter(product => this.productsOnPage.some(restriction => restriction.description === product.itemDescription));
461
674
  return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, selectedCountryCode && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
462
675
  'zonos--hello-widget',
463
676
  this.showPeekMessage && 'zonos--hello-show-peek-message',
@@ -465,13 +678,15 @@ const ZonosHello = class {
465
678
  isOnLeft &&
466
679
  'zonos--hello-widget-left zonos--hello-widget-animate-from-left',
467
680
  isOnTop && 'zonos--hello-widget-top',
681
+ !!this.allRestrictedItems.length &&
682
+ 'zonos--hello-has-restrictions',
468
683
  ]), onClick: () => {
469
684
  this.changeShowDialog(!this.showDialog);
470
685
  }, onMouseEnter: () => this.enableShowPeekMessage(), onMouseLeave: () => (this.showPeekMessage = false), ref: el => el && (this.helloRef = el) }, h("span", { class: "zonos--hello-message" }, this.peekMessage), selectedCountryCode && (h("div", { class: "zonos--hello-country-flag-wrapper" }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode })))), h("div", { class: classes([
471
686
  'zonos--hello-dialog-wrapper',
472
687
  this.mobileLocationOverride &&
473
688
  'zonos--hello-dialog-wrapper-mobile-override',
474
- ]), style: { height: this.showDialog ? 'fit-content' : '0px' } }, h("zonos-hello-dialog", { animateFromLeftOverride: this.animateFromLeftOverride, appearanceSettings: appearanceSettings, isOpen: this.showDialog, mobileLocationOverride: this.mobileLocationOverride, setIsOpen: this.changeShowDialog }))))));
689
+ ]), style: { height: this.showDialog ? 'fit-content' : '0px' } }, h("zonos-hello-dialog", { animateFromLeftOverride: this.animateFromLeftOverride, appearanceSettings: appearanceSettings, isOpen: this.showDialog, mobileLocationOverride: this.mobileLocationOverride, restrictedItems: restrictedItemsOnPage, setIsOpen: this.changeShowDialog }))))));
475
690
  }
476
691
  };
477
692
  ZonosHello.style = zonosHelloCss;
@@ -1 +1 @@
1
- {"file":"zonos-hello.entry.esm.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,GAAG,WAAW;AACrB,EAAE,OAAOA,KAAI,CAAC,IAAI,CAAC,GAA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I,CAAC,uBAAuB,EACrD,kBAAkB,EAAE,kBAAkB,EACtC,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,SAAS,EAAE,IAAI,CAAC,gBAAgB,GACZ,CAClB,CACF,CACP,CACI,EACP;GACH;;;;;;","names":["root","trimmedEndIndex","isObjectLike","baseGetTag","isSymbol","isObject","baseTrim","toNumber","now","debounce"],"sources":["node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","src/components/hello/zonos-hello/zonos-hello.scss?tag=zonos-hello&encapsulation=shadow","src/components/hello/zonos-hello/zonos-hello.tsx"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n",":host {\n display: inline-block;\n\n .zonos--hello-wrapper {\n position: relative;\n\n .zonos--hello-dialog-wrapper-mobile-override {\n @include zonos--hello-dialog-wrapper-mobile;\n }\n @media (max-width: 768px) {\n @include zonos--hello-dialog-wrapper-mobile;\n }\n }\n\n .zonos--hello-widget {\n // Base CSS is catered to the right positioned widget (animating in from the right)\n transition: all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);\n padding: 6px;\n border-radius: 30px;\n background: $amino-page-background;\n font-size: $amino-font-size-s;\n border: $amino-border;\n display: flex;\n align-items: center;\n cursor: pointer;\n height: fit-content;\n width: fit-content;\n position: relative;\n z-index: 1000;\n\n > .zonos--hello-message {\n order: 0; // Position text on the left\n width: 100%;\n max-width: 0;\n height: 100%;\n white-space: nowrap;\n transition: border 0.3s ease-in,\n all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);\n overflow: hidden;\n color: $amino-text-color;\n position: absolute;\n background: $amino-page-background;\n display: flex;\n align-items: center;\n border-top-left-radius: 30px;\n border-bottom-left-radius: 30px;\n left: 0;\n transform: translateX(calc(-100% + $amino-space-16));\n width: fit-content;\n border-top: $amino-border;\n border-bottom: $amino-border;\n }\n\n &.zonos--hello-show-peek-message {\n max-width: 100vw;\n width: 100%;\n\n > .zonos--hello-message {\n max-width: 100vw;\n padding: 0 6px;\n padding-right: $amino-space-16;\n border: $amino-border;\n }\n\n &:not(.zonos--hello-widget-animate-from-left) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n > .zonos--hello-message {\n border-right: none;\n }\n }\n\n &.zonos--hello-widget-animate-from-left {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n > .zonos--hello-message {\n border-left: 0;\n }\n\n > .zonos--hello-message {\n padding-left: $amino-space-16;\n padding-right: 6px;\n border-left: none;\n }\n }\n }\n\n &.zonos--hello-widget-animate-from-left {\n > .zonos--hello-message {\n order: 1; // Position text on the right\n transform: translateX(calc(100% - $amino-space-16));\n right: 0;\n left: auto;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 30px;\n border-bottom-right-radius: 30px;\n }\n }\n\n .zonos--hello-country-flag-wrapper {\n display: flex;\n justify-content: center;\n\n .zonos--hello-country-flag {\n @include zonos--hello-country-flag;\n\n @media (max-width: 768px) {\n @include zonos--hello-country-flag-mobile;\n }\n }\n }\n\n // Mobile styles (fixed position)\n @media (max-width: 768px) {\n @include zonos--hello-widget-mobile;\n }\n }\n\n // Apply mobile styles on mobile override prop\n .zonos--hello-mobile-override {\n &.zonos--hello-widget {\n @include zonos--hello-widget-mobile;\n\n .zonos--hello-country-flag {\n @include zonos--hello-country-flag-mobile;\n }\n }\n }\n}\n","import { Component, h, Host, Listen, Method, Prop, State } from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { localizationStore } from 'src/components/store/hello/localization';\nimport { translate } from 'src/components/store/translationStore';\nimport {\n type AppearanceConfig,\n zonosStore,\n} from 'src/components/store/zonosStore';\nimport { classes } from 'src/components/utils/classes';\nimport { currencyConvert } from 'src/components/utils/hello/currencyConversion/currencyConvert';\nimport { currencyConvertAndFormat } from 'src/components/utils/hello/currencyConversion/currencyConvertAndFormat';\nimport { currencyDisplay } from 'src/components/utils/hello/currencyConversion/currencyDisplay';\nimport { currencyFormat } from 'src/components/utils/hello/currencyConversion/currencyFormat';\nimport { getHasMoreSpaceOnRight } from 'src/components/utils/hello/getHasMoreSpaceOnRight';\nimport { log } from 'src/components/utils/logging/log';\nimport { mergeConfig } from 'src/components/utils/mergeConfig';\nimport type { HelloMobileLocation } from 'src/types/generated/graphql.customer.types';\n\n@Component({\n shadow: true,\n styleUrl: 'zonos-hello.scss',\n tag: 'zonos-hello',\n})\nexport class ZonosHello {\n private helloRef?: HTMLButtonElement;\n\n /**\n * Force mobile styling instead of media query and use the passed location value\n * @default false\n */\n @Prop() mobileLocationOverride?: HelloMobileLocation;\n /**\n * Force left animation instead of detecting which side has more space\n * @default false\n */\n @Prop() animateFromLeftOverride?: boolean;\n /**\n * Override the appearance settings\n */\n @Prop() appearanceSettingsOverride?: Partial<AppearanceConfig>;\n\n @State() showPeekMessage: boolean = false;\n @State() zonosStoreHelloSettings = zonosStore.helloSettings;\n @State() showDialog: boolean = false;\n @State() peekMessage: string | null = '';\n\n private getHelloPeekMessage = () => {\n switch (zonosStore.currentHelloPage) {\n case 'cart':\n return translate(`Prepay duties and taxes at checkout`);\n case 'productList':\n case 'productDetail':\n return translate(`See duty and tax thresholds`);\n\n default:\n return `${translate('Welcome to')} ${zonosStore.organizationName}`;\n }\n };\n\n private enableShowPeekMessage = () => {\n if (this.peekMessage) {\n this.showPeekMessage = true;\n }\n };\n\n componentDidLoad() {\n const initInterval = setInterval(() => {\n if (!this.helloRef) {\n return;\n }\n if (zonosStore.loadedConfig) {\n this.helloRef.setAttribute('data-zonos-hello-loaded', '');\n\n this.peekMessage = this.getHelloPeekMessage();\n const { peekMessageBehavior, peekMessageDelay } =\n zonosStore.helloSettings;\n // peek message delay is passed in seconds, but setTimeout expects milliseconds\n const peekMessageDelayToUse = peekMessageDelay * 1000;\n\n if (peekMessageBehavior === 'ENABLED') {\n setTimeout(() => {\n this.enableShowPeekMessage();\n\n setTimeout(() => {\n this.showPeekMessage = false;\n }, 3000);\n }, peekMessageDelayToUse);\n }\n\n clearInterval(initInterval);\n }\n }, 100);\n }\n\n /**\n * This method will trigger the currency conversion and display the converted value\n * @returns void\n */\n @Method()\n async displayCurrency() {\n if (!localizationStore.exchangeRate) {\n // eslint-disable-next-line no-console\n console.error(\n 'Could not display currency. Exchange rate and format data is not available.',\n );\n return;\n }\n currencyDisplay();\n }\n\n /**\n * This method will call convert and format, and return the converted and formatted string\n * @returns string\n */\n @Method()\n async convertAndFormat(value: number) {\n currencyConvertAndFormat(value);\n }\n\n /**\n * This method will convert the currency and return the converted value\n * @returns number\n */\n @Method()\n async convert(value: number) {\n currencyConvert(value);\n }\n\n /**\n * This method will format the currency and return the formatted string\n * @returns number\n */\n @Method()\n async format(value: number) {\n currencyFormat(value);\n }\n\n private changeShowDialog = (value: boolean) => {\n this.showDialog = value;\n };\n\n private shouldAnimateLeftDesktop = () => {\n // Get element position (relative = desktop, fixed = mobile)\n const elPosition =\n this.helloRef && getComputedStyle(this.helloRef).position;\n\n // If relative position, determine if peek message should animate left or right. Mobile is pre-determined.\n if (this.helloRef && elPosition === 'relative') {\n const hasMoreSpaceOnRight = getHasMoreSpaceOnRight(this.helloRef);\n\n // Determine peek message direction\n return hasMoreSpaceOnRight;\n }\n };\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n debounce(this.render.bind(this), 500);\n }\n\n render() {\n const isExcludedUrl = zonosStore.helloSettings.excludedUrlPatterns?.some(\n pattern => new RegExp(pattern).test(window.location.href),\n );\n if (isExcludedUrl) {\n log('Hello is excluded on this url', 'warn');\n return null;\n }\n\n const { selectedCountryCode } = localizationStore;\n const mobileLocation =\n this.mobileLocationOverride || zonosStore.helloSettings.mobileLocation;\n const isMobileWindow = window.innerWidth < 768;\n\n const isOnLeft =\n this.animateFromLeftOverride ||\n (isMobileWindow && mobileLocation.includes('LEFT')) ||\n this.shouldAnimateLeftDesktop() ||\n false;\n\n const isOnTop = mobileLocation.includes('TOP');\n\n const appearanceSettings = mergeConfig(\n zonosStore.appearance,\n this.appearanceSettingsOverride,\n );\n const { theme } = appearanceSettings;\n\n return (\n <Host class=\"zonos--hello zonos--elements\" data-theme={theme}>\n {selectedCountryCode && (\n <div class=\"zonos--hello-wrapper\">\n <button\n class={classes([\n 'zonos--hello-widget',\n this.showPeekMessage && 'zonos--hello-show-peek-message',\n this.mobileLocationOverride && 'zonos--hello-mobile-override',\n isOnLeft &&\n 'zonos--hello-widget-left zonos--hello-widget-animate-from-left',\n isOnTop && 'zonos--hello-widget-top',\n ])}\n onClick={() => {\n this.changeShowDialog(!this.showDialog);\n }}\n onMouseEnter={() => this.enableShowPeekMessage()}\n onMouseLeave={() => (this.showPeekMessage = false)}\n ref={el => el && (this.helloRef = el)}\n >\n <span class=\"zonos--hello-message\">{this.peekMessage}</span>\n\n {selectedCountryCode && (\n <div class=\"zonos--hello-country-flag-wrapper\">\n <zonos-country-flag\n class=\"zonos--hello-country-flag\"\n countryCode={selectedCountryCode}\n ></zonos-country-flag>\n </div>\n )}\n </button>\n\n <div\n class={classes([\n 'zonos--hello-dialog-wrapper',\n this.mobileLocationOverride &&\n 'zonos--hello-dialog-wrapper-mobile-override',\n ])}\n style={{ height: this.showDialog ? 'fit-content' : '0px' }}\n >\n <zonos-hello-dialog\n animateFromLeftOverride={this.animateFromLeftOverride}\n appearanceSettings={appearanceSettings}\n isOpen={this.showDialog}\n mobileLocationOverride={this.mobileLocationOverride}\n setIsOpen={this.changeShowDialog}\n ></zonos-hello-dialog>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"zonos-hello.entry.esm.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,GAAG,WAAW;AACrB,EAAE,OAAOA,KAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC,CAAC;AACF;AACA,SAAc,GAAG,GAAG;;ACtBpB;AACA,IAAI,YAAY,GAAG,IAAI,CAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,MAAM,EAAE;AACjC,EAAE,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAC5B;AACA,EAAE,OAAO,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE;AAC/D,EAAE,OAAO,KAAK,CAAC;AACf,CAAC;AACD;AACA,oBAAc,GAAG,eAAe;;AChBhC;AACA,IAAI,WAAW,GAAG,MAAM,CAAC;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,MAAM,EAAE;AAC1B,EAAE,OAAO,MAAM;AACf,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,EAAEC,gBAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;AAC3E,MAAM,MAAM,CAAC;AACb,CAAC;AACD;AACA,aAAc,GAAG,QAAQ;;ACfzB;AACA,IAAI,SAAS,GAAG,iBAAiB,CAAC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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O,CAAC;QACb,qBAAqB;QACrB,IAAI,CAAC,eAAe,IAAI,gCAAgC;QACxD,IAAI,CAAC,sBAAsB,IAAI,8BAA8B;QAC7D,QAAQ;UACN,gEAAgE;QAClE,OAAO,IAAI,yBAAyB;QACpC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM;UAC9B,+BAA+B;OAClC,CAAC,EACF,OAAO,EAAE;QACP,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;OACzC,EACD,YAAY,EAAE,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAChD,YAAY,EAAE,OAAO,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,EAClD,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,IAErC,YAAM,KAAK,EAAC,sBAAsB,IAAE,IAAI,CAAC,WAAW,CAAQ,EAE3D,mBAAmB,KAClB,WAAK,KAAK,EAAC,mCAAmC,IAC5C,0BACE,KAAK,EAAC,2BAA2B,EACjC,WAAW,EAAE,mBAAmB,GACZ,CAClB,CACP,CACM,EAET,WACE,KAAK,EAAE,OAAO,CAAC;QACb,6BAA6B;QAC7B,IAAI,CAAC,sBAAsB;UACzB,6CAA6C;OAChD,CAAC,EACF,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,GAAG,aAAa,GAAG,KAAK,EAAE,IAE1D,0BACE,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EACrD,kBAAkB,EAAE,kBAAkB,EACtC,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,eAAe,EAAE,qBAAqB,EACtC,SAAS,EAAE,IAAI,CAAC,gBAAgB,GACZ,CAClB,CACF,CACP,CACI,EACP;GACH;;;;;;","names":["root","trimmedEndIndex","isObjectLike","baseGetTag","isSymbol","isObject","baseTrim","toNumber","now","debounce"],"sources":["node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","src/components/utils/api/checkItemRestrictions.ts","src/components/utils/hello/detectItemRestrictions.ts","src/components/utils/hello/getCurrentHelloLocalePage.ts","src/components/utils/hello/getProductsOnPage.ts","src/components/hello/zonos-hello/zonos-hello.scss?tag=zonos-hello&encapsulation=shadow","src/components/hello/zonos-hello/zonos-hello.tsx"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { handleFetch } from 'src/components/utils/handleFetch';\nimport { logError } from 'src/components/utils/logging/logError';\nimport type {\n CheckItemRestrictionsMutation,\n CountryCode,\n} from 'src/types/generated/graphql.customer.types';\n\ntype Item = {\n description: string;\n name: string;\n};\n\ntype RequestBody = {\n items: Item[];\n shipFrom: CountryCode;\n shipTo: CountryCode;\n};\n\nexport const checkItemRestrictions = async ({\n items,\n shipFrom,\n shipTo,\n}: {\n items: Item[];\n shipFrom: CountryCode;\n shipTo: CountryCode;\n}) => {\n const url = `${process.env.NEXT_PUBLIC_ZONOS_ROUTE_URL}/api/check-item-restrictions`;\n const body: RequestBody = {\n items,\n shipFrom,\n shipTo,\n };\n const { errors, json } = await handleFetch<\n CheckItemRestrictionsMutation['itemRestrictionApply']['items']\n >(url, { body, method: 'POST' });\n\n if (errors.length || !json) {\n logError(\n `Error fetching item restrictions: ${errors.find(Boolean)?.message}`,\n );\n return [];\n }\n\n return json.filter(Boolean);\n};\n","import { localizationStore } from 'src/components/store/hello/localization';\nimport { checkItemRestrictions } from 'src/components/utils/api/checkItemRestrictions';\nimport { logError } from 'src/components/utils/logging/logError';\nimport type { Product } from 'src/types/hello/Product';\n\nexport const detectItemRestrictions = async (newProducts: Product[]) => {\n if (!newProducts.length) {\n return [];\n }\n const { selectedCountryCode } = localizationStore;\n if (!selectedCountryCode) {\n logError(\n 'Hello Could not check item restrictions - No country code selected',\n );\n return [];\n }\n\n const items = newProducts.map(product => ({\n description: product.description,\n name: product.title,\n }));\n\n const restrictedItems = await checkItemRestrictions({\n items: items,\n shipFrom: 'AD',\n shipTo: selectedCountryCode,\n });\n\n const restrictedItemsWithName = restrictedItems.map(item => {\n const name =\n items.filter(x => x.description === item.itemDescription).find(Boolean)\n ?.name || '';\n\n return {\n ...item,\n name,\n };\n });\n\n return restrictedItemsWithName;\n};\n","import { type Page, zonosStore } from 'src/components/store/zonosStore';\n\nexport const getCurrentHelloLocalePage = (): Page | '' => {\n const { href } = window.location;\n const {\n cartUrlPattern,\n homepageUrlPattern,\n productDetailUrlPattern,\n productListUrlPattern,\n } = zonosStore.helloSettings;\n\n // The 'if' statements are sorted by most specific to least specific to help with regex matching\n\n if (cartUrlPattern && new RegExp(cartUrlPattern).test(href)) {\n return 'cart';\n }\n\n if (\n productDetailUrlPattern &&\n new RegExp(productDetailUrlPattern).test(href)\n ) {\n return 'productDetail';\n }\n\n if (productListUrlPattern && new RegExp(productListUrlPattern).test(href)) {\n return 'productList';\n }\n\n if (homepageUrlPattern && new RegExp(homepageUrlPattern).test(href)) {\n return 'home';\n }\n\n return '';\n};\n","import { zonosStore } from 'src/components/store/zonosStore';\nimport { isValidSelector } from 'src/components/utils/isValidSelector';\nimport { logError } from 'src/components/utils/logging/logError';\nimport type { Product } from 'src/types/hello/Product';\n\nexport const getProductsOnPage = (): Product[] => {\n const {\n productAddToCartElementSelector,\n productDescriptionElementSelector,\n productTitleElementSelector,\n restrictionBehavior,\n } = zonosStore.helloSettings;\n\n if (!productTitleElementSelector || !productDescriptionElementSelector) {\n logError(\n `Hello Could not check item restrictions - must provide title and description selectors.`,\n );\n }\n\n const titleNodes =\n (productTitleElementSelector &&\n isValidSelector(productTitleElementSelector) &&\n document.querySelectorAll(productTitleElementSelector)) ||\n [];\n\n const descriptionNodes =\n (productDescriptionElementSelector &&\n isValidSelector(productDescriptionElementSelector) &&\n document.querySelectorAll(productDescriptionElementSelector)) ||\n [];\n\n if (titleNodes.length !== descriptionNodes.length) {\n // If the title and description selectors don't match, kill item restrictions altogether\n logError(\n 'Hello Could not check item restrictions - Title and description selectors do not match',\n );\n return [];\n }\n\n const shouldDisableCart = restrictionBehavior === 'RESTRICT_AND_BLOCK';\n const cartButtonNodes =\n (shouldDisableCart &&\n productAddToCartElementSelector &&\n isValidSelector(productAddToCartElementSelector) &&\n document.querySelectorAll(productAddToCartElementSelector)) ||\n [];\n\n if (shouldDisableCart && cartButtonNodes.length !== descriptionNodes.length) {\n // If the \"add to cart\" selectors don't match, log the error and continue\n logError(\n 'Hello could not disable \"Add to cart\" buttons - Title and add to cart selectors do not match',\n );\n }\n\n const mergedElements = [];\n\n for (let i = 0; i < titleNodes.length; i++) {\n const titleNode = titleNodes[i];\n const descriptionNode = descriptionNodes[i];\n const cartButtonNode = cartButtonNodes[i];\n\n if (titleNode && descriptionNode) {\n const element = {\n cartButtonNode: cartButtonNode || null,\n description: descriptionNode.textContent?.trim() || '',\n title: titleNode.textContent?.trim() || '',\n };\n\n mergedElements.push(element);\n }\n }\n\n return mergedElements;\n};\n",":host {\n display: inline-block;\n\n .zonos--hello-wrapper {\n position: relative;\n\n .zonos--hello-dialog-wrapper-mobile-override {\n @include zonos--hello-dialog-wrapper-mobile;\n }\n @media (max-width: 768px) {\n @include zonos--hello-dialog-wrapper-mobile;\n }\n }\n\n .zonos--hello-widget {\n // Base CSS is catered to the right positioned widget (animating in from the right)\n transition: all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);\n padding: 6px;\n border-radius: 30px;\n background: $amino-page-background;\n font-size: $amino-font-size-s;\n border: $amino-border;\n display: flex;\n align-items: center;\n cursor: pointer;\n height: fit-content;\n width: fit-content;\n position: relative;\n z-index: 1000;\n\n > .zonos--hello-message {\n order: 0; // Position text on the left\n width: 100%;\n max-width: 0;\n height: 100%;\n white-space: nowrap;\n transition: border 0.3s ease-in,\n all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);\n overflow: hidden;\n color: $amino-text-color;\n position: absolute;\n background: $amino-page-background;\n display: flex;\n align-items: center;\n border-top-left-radius: 30px;\n border-bottom-left-radius: 30px;\n left: 0;\n transform: translateX(calc(-100% + $amino-space-16));\n width: fit-content;\n border-top: $amino-border;\n border-bottom: $amino-border;\n }\n\n &.zonos--hello-has-restrictions {\n background: $amino-red-100;\n border: 1px solid $amino-red-200;\n\n > .zonos--hello-message {\n background: $amino-red-100;\n color: $amino-red-800;\n font-weight: 500;\n }\n\n &.zonos--hello-show-peek-message > .zonos--hello-message {\n border: 1px solid $amino-red-200;\n }\n }\n\n &.zonos--hello-show-peek-message {\n max-width: 100vw;\n width: 100%;\n\n > .zonos--hello-message {\n max-width: 100vw;\n padding: 0 6px;\n padding-right: $amino-space-16;\n border: $amino-border;\n }\n\n &:not(.zonos--hello-widget-animate-from-left) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n > .zonos--hello-message {\n border-right: none;\n }\n }\n\n &.zonos--hello-widget-animate-from-left {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n > .zonos--hello-message {\n border-left: 0;\n }\n\n > .zonos--hello-message {\n padding-left: $amino-space-16;\n padding-right: 6px;\n border-left: none;\n }\n }\n }\n\n &.zonos--hello-widget-animate-from-left {\n > .zonos--hello-message {\n order: 1; // Position text on the right\n transform: translateX(calc(100% - $amino-space-16));\n right: 0;\n left: auto;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 30px;\n border-bottom-right-radius: 30px;\n }\n }\n\n .zonos--hello-country-flag-wrapper {\n display: flex;\n justify-content: center;\n\n .zonos--hello-country-flag {\n @include zonos--hello-country-flag;\n\n @media (max-width: 768px) {\n @include zonos--hello-country-flag-mobile;\n }\n }\n }\n\n // Mobile styles (fixed position)\n @media (max-width: 768px) {\n @include zonos--hello-widget-mobile;\n }\n }\n\n // Apply mobile styles on mobile override prop\n .zonos--hello-mobile-override {\n &.zonos--hello-widget {\n @include zonos--hello-widget-mobile;\n\n .zonos--hello-country-flag {\n @include zonos--hello-country-flag-mobile;\n }\n }\n }\n}\n","import { Component, h, Host, Listen, Method, Prop, State } from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { localizationStore } from 'src/components/store/hello/localization';\nimport { translate } from 'src/components/store/translationStore';\nimport {\n type AppearanceConfig,\n zonosStore,\n} from 'src/components/store/zonosStore';\nimport { classes } from 'src/components/utils/classes';\nimport { currencyConvert } from 'src/components/utils/hello/currencyConversion/currencyConvert';\nimport { currencyConvertAndFormat } from 'src/components/utils/hello/currencyConversion/currencyConvertAndFormat';\nimport { currencyDisplay } from 'src/components/utils/hello/currencyConversion/currencyDisplay';\nimport { currencyFormat } from 'src/components/utils/hello/currencyConversion/currencyFormat';\nimport { detectItemRestrictions } from 'src/components/utils/hello/detectItemRestrictions';\nimport { getCurrentHelloLocalePage } from 'src/components/utils/hello/getCurrentHelloLocalePage';\nimport { getHasMoreSpaceOnRight } from 'src/components/utils/hello/getHasMoreSpaceOnRight';\nimport { getProductsOnPage } from 'src/components/utils/hello/getProductsOnPage';\nimport { setZonosCountryUrlParam } from 'src/components/utils/hello/setZonosCountryUrlParam';\nimport { log } from 'src/components/utils/logging/log';\nimport { mergeConfig } from 'src/components/utils/mergeConfig';\nimport type { HelloMobileLocation } from 'src/types/generated/graphql.customer.types';\nimport type { Product } from 'src/types/hello/Product';\nimport type { RestrictedItem } from 'src/types/hello/RestrictedItem';\n\nconst PEEK_MESSAGE_DELAY_MS = 3000;\nconst RESIZE_DEBOUNCE_DELAY_MS = 500;\n\n@Component({\n shadow: true,\n styleUrl: 'zonos-hello.scss',\n tag: 'zonos-hello',\n})\nexport class ZonosHello {\n private helloRef?: HTMLButtonElement;\n\n /**\n * Force mobile styling instead of media query and use the passed location value\n * @default false\n */\n @Prop() mobileLocationOverride?: HelloMobileLocation;\n /**\n * Force left animation instead of detecting which side has more space\n * @default false\n */\n @Prop() animateFromLeftOverride?: boolean;\n /**\n * Override the appearance settings\n */\n @Prop() appearanceSettingsOverride?: Partial<AppearanceConfig>;\n\n @State() showPeekMessage: boolean = false;\n @State() zonosStoreHelloSettings = zonosStore.helloSettings;\n @State() showDialog: boolean = false;\n @State() peekMessage: string | null = '';\n @State() initialUrl: string = '';\n /**\n * This array will hold all restricted items handled by Hello thus far\n */\n @State() allRestrictedItems: RestrictedItem[] = [];\n /**\n * This array will hold all products handled by Hello thus far\n */\n @State() allFoundProducts: Product[] = [];\n /**\n * This array will hold all products currently on the page\n */\n @State() productsOnPage: Product[] = [];\n\n private getHelloPeekMessage = () => {\n const isRestrictionPage =\n zonosStore.currentHelloPage === 'productDetail' ||\n zonosStore.currentHelloPage === 'productList';\n if (isRestrictionPage && this.allRestrictedItems.length) {\n const clickMessage = translate('click to learn more');\n const restrictMessage =\n zonosStore.currentHelloPage === 'productDetail'\n ? translate('Restricted item')\n : translate('Restricted items found');\n\n return `${restrictMessage} - ${clickMessage}`;\n }\n\n switch (zonosStore.currentHelloPage) {\n case 'cart':\n return translate(`Prepay duties and taxes at checkout`);\n case 'productList':\n case 'productDetail':\n return translate(`See duty and tax thresholds`);\n\n default:\n return `${translate('Welcome to')} ${zonosStore.organizationName}`;\n }\n };\n\n private enableShowPeekMessage = () => {\n if (this.peekMessage) {\n this.showPeekMessage = true;\n }\n };\n\n private getNewItemRestrictions = async (newProducts: Product[]) => {\n const isRestrictionPage =\n zonosStore.currentHelloPage === 'productDetail' ||\n zonosStore.currentHelloPage === 'productList';\n\n // Only run detectItemRestrictions on product pages if the restrictionBehavior is not DISABLED\n if (\n !isRestrictionPage ||\n zonosStore.helloSettings.restrictionBehavior === 'DISABLED'\n ) {\n return [];\n }\n\n const newRestrictions = await detectItemRestrictions(newProducts);\n return newRestrictions;\n };\n\n private triggerShowPeekMessage = () => {\n this.peekMessage = this.getHelloPeekMessage();\n const { peekMessageBehavior, peekMessageDelay } = zonosStore.helloSettings;\n // peek message delay is passed in seconds, but setTimeout expects milliseconds\n const peekMessageDelayToUse = peekMessageDelay * 1000;\n\n if (peekMessageBehavior === 'ENABLED') {\n setTimeout(() => {\n this.enableShowPeekMessage();\n\n setTimeout(() => {\n this.showPeekMessage = false;\n }, PEEK_MESSAGE_DELAY_MS);\n }, peekMessageDelayToUse);\n }\n };\n\n private disableAddToCartButtons = () => {\n // Remove disabled attribute from all \"add to cart\" buttons\n if (this.productsOnPage.length) {\n this.productsOnPage.forEach(product => {\n const isRestricted = this.allRestrictedItems.some(\n item => item.itemDescription === product.description,\n );\n\n // if a product description matches a restrictedItems itemDescription, then disable the add to cart button. Otherwise, enable it.\n if (isRestricted) {\n product.cartButtonNode?.setAttribute('disabled', 'disabled');\n } else {\n product.cartButtonNode?.removeAttribute('disabled');\n }\n });\n }\n };\n\n private handleItemRestrictions = async () => {\n this.productsOnPage = getProductsOnPage();\n\n const newProducts = this.productsOnPage.filter(\n product =>\n !this.allFoundProducts.some(\n foundProduct => foundProduct.title === product.title,\n ),\n );\n const newRestrictions = await this.getNewItemRestrictions(newProducts);\n\n this.allRestrictedItems.push(...newRestrictions);\n this.allFoundProducts.push(...newProducts);\n\n this.disableAddToCartButtons();\n };\n\n private reloadHelloData = async () => {\n await this.handleItemRestrictions();\n this.triggerShowPeekMessage();\n void this.displayCurrency();\n };\n\n private handleProductCountChange = debounce(() => {\n const { productTitleElementSelector } = zonosStore.helloSettings;\n\n if (productTitleElementSelector) {\n const allProductsOnPage = getProductsOnPage();\n if (\n this.allFoundProducts.length !== allProductsOnPage.length &&\n window.location.href === this.initialUrl\n ) {\n // if allFoundProducts length is 0 (first render or no products), kill item restriction process as initial restrictions are handled in updateHelloOnPageChange\n if (!this.allFoundProducts.length) {\n return;\n }\n\n void this.reloadHelloData();\n }\n }\n }, 1000);\n\n private watchProductCountChange = () => {\n const observer = new MutationObserver(this.handleProductCountChange);\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n };\n\n private updateHelloOnPageChange = () => {\n // If the product count changes on the same url (loading more products), update the peek message and item restrictions\n this.watchProductCountChange();\n\n // Check url change on interval. If changed, update the peek message and item restrictions\n setInterval(() => {\n if (window.location.href !== this.initialUrl) {\n const prevUrl = this.initialUrl && new URL(this.initialUrl);\n const initialZonosCountry =\n prevUrl && prevUrl.searchParams.get('zonosCountry');\n\n // If the zonosCountry url param changes, reset current item restriction tracking\n if (initialZonosCountry !== localizationStore.selectedCountryCode) {\n this.allFoundProducts = [];\n this.allRestrictedItems = [];\n this.productsOnPage = [];\n }\n\n this.initialUrl = window.location.href;\n zonosStore.currentHelloPage = getCurrentHelloLocalePage();\n\n const currentUrl = new URL(window.location.href);\n const zonosCountry = currentUrl.searchParams.get('zonosCountry');\n if (!zonosCountry) {\n setZonosCountryUrlParam(localizationStore.selectedCountryCode);\n return;\n }\n\n void this.reloadHelloData();\n }\n }, 1000);\n };\n\n componentWillLoad() {\n const initInterval = setInterval(async () => {\n if (!this.helloRef) {\n return;\n }\n if (zonosStore.loadedConfig) {\n this.helloRef.setAttribute('data-zonos-hello-loaded', '');\n\n this.updateHelloOnPageChange();\n\n clearInterval(initInterval);\n }\n }, 100);\n }\n\n /**\n * This method will trigger the currency conversion and display the converted value\n * @returns void\n */\n @Method()\n async displayCurrency() {\n if (!localizationStore.exchangeRate) {\n // eslint-disable-next-line no-console\n console.error(\n 'Could not display currency. Exchange rate and format data is not available.',\n );\n return;\n }\n currencyDisplay();\n }\n\n /**\n * This method will call convert and format, and return the converted and formatted string\n * @returns string\n */\n @Method()\n async convertAndFormat(value: number) {\n currencyConvertAndFormat(value);\n }\n\n /**\n * This method will convert the currency and return the converted value\n * @returns number\n */\n @Method()\n async convert(value: number) {\n currencyConvert(value);\n }\n\n /**\n * This method will format the currency and return the formatted string\n * @returns number\n */\n @Method()\n async format(value: number) {\n currencyFormat(value);\n }\n\n private changeShowDialog = (value: boolean) => {\n this.showDialog = value;\n };\n\n private shouldAnimateLeftDesktop = () => {\n // Get Hello position (relative = desktop, fixed = mobile)\n const elPosition =\n this.helloRef && getComputedStyle(this.helloRef).position;\n\n // If relative position, determine if peek message should animate left or right. Mobile is pre-determined.\n if (this.helloRef && elPosition === 'relative') {\n const hasMoreSpaceOnRight = getHasMoreSpaceOnRight(this.helloRef);\n\n return hasMoreSpaceOnRight;\n }\n };\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n debounce(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);\n }\n\n render() {\n const isExcludedUrl = zonosStore.helloSettings.excludedUrlPatterns?.some(\n pattern => new RegExp(pattern).test(window.location.href),\n );\n if (isExcludedUrl) {\n log('Hello is excluded on this url', 'warn');\n return null;\n }\n\n const { selectedCountryCode } = localizationStore;\n const mobileLocation =\n this.mobileLocationOverride || zonosStore.helloSettings.mobileLocation;\n const isMobileWindow = window.innerWidth < 768;\n\n const isOnLeft =\n this.animateFromLeftOverride ||\n (isMobileWindow && mobileLocation.includes('LEFT')) ||\n this.shouldAnimateLeftDesktop() ||\n false;\n\n const isOnTop = mobileLocation.includes('TOP');\n\n const appearanceSettings = mergeConfig(\n zonosStore.appearance,\n this.appearanceSettingsOverride,\n );\n const { theme } = appearanceSettings;\n\n const restrictedItemsOnPage = this.allRestrictedItems?.filter(product =>\n this.productsOnPage.some(\n restriction => restriction.description === product.itemDescription,\n ),\n );\n\n return (\n <Host class=\"zonos--hello zonos--elements\" data-theme={theme}>\n {selectedCountryCode && (\n <div class=\"zonos--hello-wrapper\">\n <button\n class={classes([\n 'zonos--hello-widget',\n this.showPeekMessage && 'zonos--hello-show-peek-message',\n this.mobileLocationOverride && 'zonos--hello-mobile-override',\n isOnLeft &&\n 'zonos--hello-widget-left zonos--hello-widget-animate-from-left',\n isOnTop && 'zonos--hello-widget-top',\n !!this.allRestrictedItems.length &&\n 'zonos--hello-has-restrictions',\n ])}\n onClick={() => {\n this.changeShowDialog(!this.showDialog);\n }}\n onMouseEnter={() => this.enableShowPeekMessage()}\n onMouseLeave={() => (this.showPeekMessage = false)}\n ref={el => el && (this.helloRef = el)}\n >\n <span class=\"zonos--hello-message\">{this.peekMessage}</span>\n\n {selectedCountryCode && (\n <div class=\"zonos--hello-country-flag-wrapper\">\n <zonos-country-flag\n class=\"zonos--hello-country-flag\"\n countryCode={selectedCountryCode}\n ></zonos-country-flag>\n </div>\n )}\n </button>\n\n <div\n class={classes([\n 'zonos--hello-dialog-wrapper',\n this.mobileLocationOverride &&\n 'zonos--hello-dialog-wrapper-mobile-override',\n ])}\n style={{ height: this.showDialog ? 'fit-content' : '0px' }}\n >\n <zonos-hello-dialog\n animateFromLeftOverride={this.animateFromLeftOverride}\n appearanceSettings={appearanceSettings}\n isOpen={this.showDialog}\n mobileLocationOverride={this.mobileLocationOverride}\n restrictedItems={restrictedItemsOnPage}\n setIsOpen={this.changeShowDialog}\n ></zonos-hello-dialog>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}