@zonos/elements 1.3.268 → 1.3.270

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 (163) hide show
  1. package/dist/cjs/{cart-af7c024e.js → cart-3ff48a0e.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-0fa6e022.js → hasInclusivePrice-aec06153.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-c2e3f232.js → invoice-ff716652.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-6014787b.js → isCollectMobileTablet-3ac53cab.js} +2 -2
  6. package/dist/cjs/{localization-f897bc45.js → localization-5c1c9c6a.js} +245 -4
  7. package/dist/cjs/{paypal-6756a0da.js → paypal-c55b6c45.js} +2 -2
  8. package/dist/cjs/{placeTestOrder-a4874e51.js → placeTestOrder-230f534b.js} +2 -2
  9. package/dist/cjs/{renderCheckoutCurrency-584d50fe.js → renderCheckoutCurrency-e9d8efa8.js} +2 -2
  10. package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +15 -72
  15. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  17. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  20. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-hello.cjs.entry.js +2 -45
  23. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  24. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
  25. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  26. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  27. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
  28. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +2 -44
  29. package/dist/collection/components/store/hello/localization.js +12 -1
  30. package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +28 -0
  31. package/dist/collection/components/utils/checkout/removeBigcommerceCartShipping.js +83 -0
  32. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +6 -2
  33. package/dist/collection/components/utils/hello/shouldShowHelloWidget.js +61 -0
  34. package/dist/collection/utils/toggleBigcommerceNativeCurrencySelector.js +2 -1
  35. package/dist/esm/{cart-68c16805.js → cart-44fa77ef.js} +1 -1
  36. package/dist/esm/{hasInclusivePrice-f1ca1610.js → hasInclusivePrice-f0440925.js} +1 -1
  37. package/dist/esm/index.js +7 -7
  38. package/dist/esm/{invoice-d0eadc6a.js → invoice-89e71796.js} +2 -2
  39. package/dist/esm/{isCollectMobileTablet-11ade63f.js → isCollectMobileTablet-323d2ba1.js} +2 -2
  40. package/dist/esm/{localization-8e81b696.js → localization-066586b6.js} +242 -5
  41. package/dist/esm/{paypal-e32877e9.js → paypal-8725008c.js} +2 -2
  42. package/dist/esm/{placeTestOrder-4cf429d7.js → placeTestOrder-38be871e.js} +2 -2
  43. package/dist/esm/{renderCheckoutCurrency-9459b8a3.js → renderCheckoutCurrency-802f4481.js} +2 -2
  44. package/dist/esm/zonos-address-display_8.entry.js +2 -2
  45. package/dist/esm/zonos-address_4.entry.js +2 -2
  46. package/dist/esm/zonos-card_5.entry.js +3 -3
  47. package/dist/esm/zonos-cart-items_12.entry.js +6 -6
  48. package/dist/esm/zonos-checkout.entry.js +4 -61
  49. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  50. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  51. package/dist/esm/zonos-collect.entry.js +4 -4
  52. package/dist/esm/zonos-controller.entry.js +2 -2
  53. package/dist/esm/zonos-country-flag.entry.js +1 -1
  54. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  55. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  56. package/dist/esm/zonos-hello.entry.js +2 -45
  57. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  58. package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
  59. package/dist/esm/zonos-invoice.entry.js +4 -4
  60. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  61. package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
  62. package/dist/esm-es5/{cart-68c16805.js → cart-44fa77ef.js} +1 -1
  63. package/dist/esm-es5/{hasInclusivePrice-f1ca1610.js → hasInclusivePrice-f0440925.js} +1 -1
  64. package/dist/esm-es5/index.js +1 -1
  65. package/dist/esm-es5/{invoice-d0eadc6a.js → invoice-89e71796.js} +1 -1
  66. package/dist/esm-es5/{isCollectMobileTablet-11ade63f.js → isCollectMobileTablet-323d2ba1.js} +1 -1
  67. package/dist/esm-es5/{localization-8e81b696.js → localization-066586b6.js} +1 -1
  68. package/dist/esm-es5/{paypal-e32877e9.js → paypal-8725008c.js} +1 -1
  69. package/dist/esm-es5/{placeTestOrder-4cf429d7.js → placeTestOrder-38be871e.js} +1 -1
  70. package/dist/esm-es5/{renderCheckoutCurrency-9459b8a3.js → renderCheckoutCurrency-802f4481.js} +1 -1
  71. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  72. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  73. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  74. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  75. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  76. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  77. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  78. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  79. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  80. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  81. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  82. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  83. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  84. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  85. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  86. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  87. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  88. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  89. package/dist/scripts/index.js +1 -1
  90. package/dist/scripts/loadZonos.js +1 -1
  91. package/dist/scripts/zonos.js +1 -1
  92. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +0 -1
  93. package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +9 -0
  94. package/dist/types/components/utils/checkout/removeBigcommerceCartShipping.d.ts +18 -0
  95. package/dist/types/components/utils/hello/shouldShowHelloWidget.d.ts +16 -0
  96. package/dist/zonos-elements/index.esm.js +1 -1
  97. package/dist/zonos-elements/{p-8ddc21f1.system.entry.js → p-08c7dc07.system.entry.js} +1 -1
  98. package/dist/zonos-elements/{p-b93b66c2.entry.js → p-0d251428.entry.js} +1 -1
  99. package/dist/zonos-elements/{p-44b279cc.system.js → p-0d2d7fc4.system.js} +1 -1
  100. package/dist/zonos-elements/{p-7166df08.entry.js → p-0e9c0eff.entry.js} +1 -1
  101. package/dist/zonos-elements/{p-64e8f05d.system.entry.js → p-0fb8b711.system.entry.js} +1 -1
  102. package/dist/zonos-elements/{p-17e3cd62.js → p-208b270a.js} +1 -1
  103. package/dist/zonos-elements/{p-c3459f4a.entry.js → p-225f19b6.entry.js} +1 -1
  104. package/dist/zonos-elements/p-238370ad.system.js +1 -0
  105. package/dist/zonos-elements/{p-01913da8.js → p-260a5b57.js} +1 -1
  106. package/dist/zonos-elements/{p-623fc89a.system.entry.js → p-2651ca93.system.entry.js} +1 -1
  107. package/dist/zonos-elements/{p-5b05b461.system.js → p-27beefda.system.js} +1 -1
  108. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  109. package/dist/zonos-elements/{p-48805ed6.system.entry.js → p-2df84888.system.entry.js} +1 -1
  110. package/dist/zonos-elements/{p-e3d6f9b4.entry.js → p-2f61dc3c.entry.js} +1 -1
  111. package/dist/zonos-elements/{p-50362897.entry.js → p-30e819ed.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-2ccd20c0.system.js → p-31a3b070.system.js} +1 -1
  113. package/dist/zonos-elements/{p-a0ee01dd.system.entry.js → p-553ca694.system.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-af12a1b7.system.entry.js → p-5812b323.system.entry.js} +1 -1
  115. package/dist/zonos-elements/{p-95f3bbad.system.entry.js → p-5ab4bc26.system.entry.js} +1 -1
  116. package/dist/zonos-elements/{p-108b5307.system.entry.js → p-5df77315.system.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-97da66f2.entry.js → p-6704b83e.entry.js} +1 -1
  118. package/dist/zonos-elements/p-69ad7325.entry.js +1 -0
  119. package/dist/zonos-elements/{p-1376e67f.system.entry.js → p-6ac77d9f.system.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-4fe3d5e0.system.js → p-703f2737.system.js} +1 -1
  121. package/dist/zonos-elements/p-72666536.system.entry.js +1 -0
  122. package/dist/zonos-elements/{p-b71ef46e.js → p-7792f4c2.js} +1 -1
  123. package/dist/zonos-elements/{p-95b460e9.system.entry.js → p-7e03bd33.system.entry.js} +1 -1
  124. package/dist/zonos-elements/{p-53a59935.system.js → p-801dd8d8.system.js} +1 -1
  125. package/dist/zonos-elements/{p-673407b8.entry.js → p-91702715.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-6f41c193.entry.js → p-9abfb6b0.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-dcafbd4e.js → p-9e414000.js} +1 -1
  128. package/dist/zonos-elements/{p-bc9a30a1.system.entry.js → p-a2885536.system.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-620a9013.entry.js → p-a977cddd.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-24091606.system.entry.js → p-acd7009a.system.entry.js} +1 -1
  131. package/dist/zonos-elements/{p-69089a6f.system.entry.js → p-ad4c8167.system.entry.js} +1 -1
  132. package/dist/zonos-elements/p-b1125711.system.js +1 -0
  133. package/dist/zonos-elements/p-b15ceaff.entry.js +1 -0
  134. package/dist/zonos-elements/p-b1a4f385.system.entry.js +1 -0
  135. package/dist/zonos-elements/{p-72c3756a.js → p-bea9d128.js} +1 -1
  136. package/dist/zonos-elements/{p-72960738.js → p-bfcc1432.js} +1 -1
  137. package/dist/zonos-elements/p-c049c527.js +1 -0
  138. package/dist/zonos-elements/p-c76ec587.system.js +1 -0
  139. package/dist/zonos-elements/{p-593764cf.system.entry.js → p-ccd0fa8f.system.entry.js} +1 -1
  140. package/dist/zonos-elements/{p-38311c16.entry.js → p-d29dbeb3.entry.js} +1 -1
  141. package/dist/zonos-elements/{p-7628569a.entry.js → p-d4c966cb.entry.js} +1 -1
  142. package/dist/zonos-elements/p-d659153c.entry.js +1 -0
  143. package/dist/zonos-elements/p-debd2e30.js +1 -0
  144. package/dist/zonos-elements/p-e11c3410.entry.js +1 -0
  145. package/dist/zonos-elements/{p-7fef8558.entry.js → p-eb96d62f.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-c91fade3.entry.js → p-ebc966d8.entry.js} +1 -1
  147. package/dist/zonos-elements/{p-774de1ec.system.js → p-f5d4775a.system.js} +1 -1
  148. package/dist/zonos-elements/{p-5e18d92b.system.entry.js → p-fb83134b.system.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-c7ca3e98.system.entry.js → p-fc651784.system.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-fc5007e0.entry.js → p-fcf3ed5c.entry.js} +1 -1
  151. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  152. package/package.json +1 -1
  153. package/dist/zonos-elements/p-000b895a.entry.js +0 -1
  154. package/dist/zonos-elements/p-06e7fe2a.system.entry.js +0 -1
  155. package/dist/zonos-elements/p-0803ad10.js +0 -1
  156. package/dist/zonos-elements/p-11439d12.entry.js +0 -1
  157. package/dist/zonos-elements/p-17be8409.entry.js +0 -1
  158. package/dist/zonos-elements/p-1eef8c23.system.js +0 -1
  159. package/dist/zonos-elements/p-5fa2395d.system.js +0 -1
  160. package/dist/zonos-elements/p-7a220941.system.js +0 -1
  161. package/dist/zonos-elements/p-7cf8e1f0.js +0 -1
  162. package/dist/zonos-elements/p-8116d3ba.entry.js +0 -1
  163. package/dist/zonos-elements/p-b9a615bc.system.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as o,h as e,a as t,g as s}from"./p-ce75b047.js";import{d as l}from"./p-4df08fc4.js";import{l as i,k as n,t as r,g as h,n as a,o as d,p as c,q as m,h as z,r as g}from"./p-260a5b57.js";import{z as p,g as w,m as f}from"./p-701d9a7c.js";import{c as u}from"./p-b4b7f705.js";import{h as b,l as v}from"./p-41dd1cb8.js";import{g as x}from"./p-5883217a.js";import{l as y}from"./p-0a377722.js";const k=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},L=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:l,restrictionBehavior:i}=p.helloSettings;l&&s||y("Hello could not check item restrictions - must provide title and description selectors.");const r=l&&n(l)&&document.querySelectorAll(l)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return y("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===i,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],l=h[t];if(s&&l){const i={cartButtonNode:d[t]||null,description:(null===(o=l.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(i)}}return c},C=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=p.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===p.currentHelloPage||"productList"===p.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===p.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(p.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==p.currentHelloPage&&"productList"!==p.currentHelloPage||"DISABLED"===p.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=i;if(!e)return v("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const l={items:o,shipFrom:e,shipTo:t},{errors:i,json:n}=await b("/api/zonos-elements/check-item-restrictions",{body:l,method:"POST"});return i.length||!n?(v(`Error fetching item restrictions: ${null===(s=i.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(p.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=p.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=L();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=l((()=>{const{productTitleElementSelector:o}=p.helloSettings;if(o){const o=L();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==i.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,p.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=p.helloSettings;return k(o)?"cart":k(t)?"productDetail":k(s)?"productList":k(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(i.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return x(this.helloRef)}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return i.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&p.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==p.helloSettings.currencyBehavior&&(i.exchangeRate?d():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||i.selectedCountryCode&&"function"==typeof p.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=p.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||p.helloSettings.mobileLocation,e=this.desktopLocationOverride||p.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!!this.desktopLocationOverride||!p.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(e?e.includes("LEFT"):this.shouldAnimateLeftDesktop()),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=p.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:l,targetCurrency:n}=i,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(p.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(p.organizationName);const z=g()&&!!l;z&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:l,currencyCode:n});const w=null==(b=p.helloSettings.widgetSize)||!Number.isFinite(b)||b<=0?18:Math.min(64,Math.max(18,b));var b;return e(t,{class:"zonos--hello zonos--elements","data-theme":c,style:{"--zonos-elements-hello-widget-size":`${w}px`}},z&&e("div",{class:u(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:u(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),l&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:l}))),e("div",{class:u(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:r,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};C.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max(\n 6px,\n calc(var(--zonos-elements-hello-widget-size) * 0.22)\n );--zonos-elements-hello-bubble-size:calc(\n var(--zonos-elements-hello-widget-size) +\n var(--zonos-elements-hello-bubble-padding) * 2 + 2px\n )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{C as zonos_hello}
@@ -1 +1 @@
1
- import{r as o,e as t,h as s,a as e}from"./p-ce75b047.js";import{d as a}from"./p-72c3756a.js";import{c as n}from"./p-9581bffb.js";import{f as i}from"./p-701d9a7c.js";import{c as r}from"./p-b4b7f705.js";import{s as h}from"./p-96d77739.js";import"./p-01913da8.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";import"./p-33d4be28.js";import"./p-3dc3596b.js";const l=class{constructor(t){o(this,t),this.errorImages=[]}render(){const o=t("./assets/empty-item.jpeg"),i=a.items.filter((o=>!o.isRestricted));return s(e,{key:"085e4b2fd45b68d916f268719cb52009cc06f8a2",class:"zonos--collect-cart-items zonos--elements"},s("table",{key:"23338d49319259769cd139ff9c329f3a9c6a059a",class:"zonos--cart-table"},s("tbody",{key:"9a8ba11598f20b78a0ea199ccdf7254db461a0ac"},i.map((t=>{const e=t.imageUrl,a=n(t.name);return s("tr",{class:"zonos--collect-cart-item"},s("td",{class:"zonos--column zonos--cart-item-image"},e&&!this.errorImages.includes(e)?s("img",{alt:t.name,onError:()=>{this.errorImages=[...this.errorImages,e]},src:t.imageUrl,style:{"min-width":"40px"},width:40}):s("img",{alt:t.name,src:o,width:40})),s("td",{class:"zonos--column zonos--cart-item-name"},s("div",null,a.map((o=>s("zonos-text",{type:"semiBoldLabel"},o))))))})))))}static get assetsDirs(){return["assets"]}};l.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}";const c=class{constructor(t){o(this,t),this.spacing=24}render(){return s(e,{key:"721c4dd7d467879b21078725e6343b7ee8d76675",style:{"--spacing":`${this.spacing}px`,"--zonos--font-family":i()}},s("slot",{key:"1e4dc26d7e61893d04bc6255abf2834b4545b335"}))}};c.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--spacing, 24px)}";const d=class{constructor(t){o(this,t),this.skeletonWidth="100%",this.skeletonHeight="14px"}render(){return s(e,{key:"22a28005143f47dd80eaec233e7d9937d7e72507",class:r(["zonos--elements zonos--skeleton"]),style:h({"--zonos--skeleton-height":this.skeletonHeight,"--zonos--skeleton-width":this.skeletonWidth})})}};d.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;background:var(--zonos-elements-gray-200);border-radius:var(--zonos-elements-radius-12);width:var(--zonos--skeleton-width);height:var(--zonos--skeleton-height);min-height:var(--zonos--skeleton-height);max-width:100%}";export{l as zonos_collect_cart_items,c as zonos_h_stack,d as zonos_skeleton}
1
+ import{r as o,e as t,h as s,a as e}from"./p-ce75b047.js";import{d as a}from"./p-bea9d128.js";import{c as n}from"./p-9581bffb.js";import{f as i}from"./p-701d9a7c.js";import{c as r}from"./p-b4b7f705.js";import{s as h}from"./p-96d77739.js";import"./p-260a5b57.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";import"./p-33d4be28.js";import"./p-3dc3596b.js";const l=class{constructor(t){o(this,t),this.errorImages=[]}render(){const o=t("./assets/empty-item.jpeg"),i=a.items.filter((o=>!o.isRestricted));return s(e,{key:"085e4b2fd45b68d916f268719cb52009cc06f8a2",class:"zonos--collect-cart-items zonos--elements"},s("table",{key:"23338d49319259769cd139ff9c329f3a9c6a059a",class:"zonos--cart-table"},s("tbody",{key:"9a8ba11598f20b78a0ea199ccdf7254db461a0ac"},i.map((t=>{const e=t.imageUrl,a=n(t.name);return s("tr",{class:"zonos--collect-cart-item"},s("td",{class:"zonos--column zonos--cart-item-image"},e&&!this.errorImages.includes(e)?s("img",{alt:t.name,onError:()=>{this.errorImages=[...this.errorImages,e]},src:t.imageUrl,style:{"min-width":"40px"},width:40}):s("img",{alt:t.name,src:o,width:40})),s("td",{class:"zonos--column zonos--cart-item-name"},s("div",null,a.map((o=>s("zonos-text",{type:"semiBoldLabel"},o))))))})))))}static get assetsDirs(){return["assets"]}};l.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}";const c=class{constructor(t){o(this,t),this.spacing=24}render(){return s(e,{key:"721c4dd7d467879b21078725e6343b7ee8d76675",style:{"--spacing":`${this.spacing}px`,"--zonos--font-family":i()}},s("slot",{key:"1e4dc26d7e61893d04bc6255abf2834b4545b335"}))}};c.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--spacing, 24px)}";const d=class{constructor(t){o(this,t),this.skeletonWidth="100%",this.skeletonHeight="14px"}render(){return s(e,{key:"22a28005143f47dd80eaec233e7d9937d7e72507",class:r(["zonos--elements zonos--skeleton"]),style:h({"--zonos--skeleton-height":this.skeletonHeight,"--zonos--skeleton-width":this.skeletonWidth})})}};d.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;background:var(--zonos-elements-gray-200);border-radius:var(--zonos-elements-radius-12);width:var(--zonos--skeleton-width);height:var(--zonos--skeleton-height);min-height:var(--zonos--skeleton-height);max-width:100%}";export{l as zonos_collect_cart_items,c as zonos_h_stack,d as zonos_skeleton}