@zonos/elements 1.3.154 → 1.3.156

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 (154) hide show
  1. package/dist/cjs/{cart-0ce9e90b.js → cart-79deb872.js} +3 -3
  2. package/dist/cjs/{getBorderRadius-7d0772bf.js → getBorderRadius-d3032bda.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{isDarkColor-2acf30d1.js → isDarkColor-9f6c3601.js} +1 -1
  5. package/dist/cjs/{paypal-d4d0bb3c.js → paypal-e79ca280.js} +3 -3
  6. package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
  7. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  8. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  10. package/dist/cjs/zonos-card.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +14 -8
  12. package/dist/cjs/zonos-checkout.cjs.entry.js +10 -10
  13. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
  15. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  16. package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
  17. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +5 -5
  18. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
  19. package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
  20. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  21. package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
  22. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  24. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-toggle.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  27. package/dist/cjs/{zonosStore-46809186.js → zonosStore-0b1d27df.js} +1 -1
  28. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +5 -5
  29. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +9 -3
  30. package/dist/collection/components/store/zonosStore.js +1 -1
  31. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  32. package/dist/collection/types/generated/graphql.internal.types.js +85 -5
  33. package/dist/esm/{cart-eadc7067.js → cart-aee97bf4.js} +3 -3
  34. package/dist/esm/{getBorderRadius-b32d4218.js → getBorderRadius-9e3ea1de.js} +1 -1
  35. package/dist/esm/index.js +7 -7
  36. package/dist/esm/{isDarkColor-10f38df6.js → isDarkColor-95f3ef90.js} +1 -1
  37. package/dist/esm/{paypal-897e2b5c.js → paypal-4ed46f2f.js} +3 -3
  38. package/dist/esm/zonos-address_8.entry.js +4 -4
  39. package/dist/esm/zonos-badge.entry.js +1 -1
  40. package/dist/esm/zonos-banner.entry.js +1 -1
  41. package/dist/esm/zonos-button_3.entry.js +3 -3
  42. package/dist/esm/zonos-card.entry.js +2 -2
  43. package/dist/esm/zonos-cart-items_13.entry.js +14 -8
  44. package/dist/esm/zonos-checkout.entry.js +10 -10
  45. package/dist/esm/zonos-collapse.entry.js +1 -1
  46. package/dist/esm/zonos-controller.entry.js +4 -4
  47. package/dist/esm/zonos-country-flag.entry.js +4 -4
  48. package/dist/esm/zonos-country-select_4.entry.js +4 -4
  49. package/dist/esm/zonos-empty-state-payment_4.entry.js +5 -5
  50. package/dist/esm/zonos-hello-dialog.entry.js +4 -4
  51. package/dist/esm/zonos-hello.entry.js +4 -4
  52. package/dist/esm/zonos-input.entry.js +2 -2
  53. package/dist/esm/zonos-language-select_2.entry.js +4 -4
  54. package/dist/esm/zonos-logo.entry.js +1 -1
  55. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  56. package/dist/esm/zonos-text.entry.js +1 -1
  57. package/dist/esm/zonos-toggle.entry.js +1 -1
  58. package/dist/esm/zonos-v-stack.entry.js +1 -1
  59. package/dist/esm/{zonosStore-44efd080.js → zonosStore-82bb17e6.js} +1 -1
  60. package/dist/esm-es5/{cart-eadc7067.js → cart-aee97bf4.js} +1 -1
  61. package/dist/esm-es5/{getBorderRadius-b32d4218.js → getBorderRadius-9e3ea1de.js} +1 -1
  62. package/dist/esm-es5/index.js +1 -1
  63. package/dist/esm-es5/{isDarkColor-10f38df6.js → isDarkColor-95f3ef90.js} +1 -1
  64. package/dist/esm-es5/{paypal-897e2b5c.js → paypal-4ed46f2f.js} +1 -1
  65. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  66. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  67. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  68. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  69. package/dist/esm-es5/zonos-card.entry.js +1 -1
  70. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  71. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  72. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  73. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  74. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  75. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  76. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  77. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  78. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  79. package/dist/esm-es5/zonos-input.entry.js +1 -1
  80. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  81. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  82. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  83. package/dist/esm-es5/zonos-text.entry.js +1 -1
  84. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  85. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  86. package/dist/esm-es5/{zonosStore-44efd080.js → zonosStore-82bb17e6.js} +1 -1
  87. package/dist/scripts/index.d.ts +5 -3
  88. package/dist/scripts/index.js +1 -1
  89. package/dist/scripts/loadZonos.js +1 -1
  90. package/dist/scripts/zonos.js +1 -1
  91. package/dist/types/types/checkout/CheckoutConfig.d.ts +3 -3
  92. package/dist/types/types/generated/graphql.frontend.types.d.ts +2 -0
  93. package/dist/types/types/generated/graphql.frontend.types.ts +2 -0
  94. package/dist/types/types/generated/graphql.internal.types.d.ts +123 -14
  95. package/dist/types/types/generated/graphql.internal.types.ts +150 -18
  96. package/dist/zonos-elements/index.esm.js +1 -1
  97. package/dist/zonos-elements/{p-b5c360af.entry.js → p-0160281f.entry.js} +1 -1
  98. package/dist/zonos-elements/{p-709c7e9e.entry.js → p-1262ad56.entry.js} +1 -1
  99. package/dist/zonos-elements/p-130a047c.entry.js +1 -0
  100. package/dist/zonos-elements/{p-b12fbc07.entry.js → p-13579dba.entry.js} +1 -1
  101. package/dist/zonos-elements/{p-5784a0fc.system.entry.js → p-194bb37a.system.entry.js} +1 -1
  102. package/dist/zonos-elements/{p-28a516f8.system.js → p-2297c165.system.js} +1 -1
  103. package/dist/zonos-elements/{p-65dda2b5.system.entry.js → p-28c3f736.system.entry.js} +1 -1
  104. package/dist/zonos-elements/{p-3a213429.system.entry.js → p-2c45f733.system.entry.js} +1 -1
  105. package/dist/zonos-elements/{p-fc4ebe6b.system.entry.js → p-30852c16.system.entry.js} +1 -1
  106. package/dist/zonos-elements/{p-3aa4841a.system.entry.js → p-38967d3a.system.entry.js} +1 -1
  107. package/dist/zonos-elements/{p-11063d30.system.entry.js → p-3a3a2f51.system.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-aaecde60.system.entry.js → p-3cbac6c3.system.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-1c2669bb.system.js → p-3fba0e48.system.js} +1 -1
  110. package/dist/zonos-elements/{p-8a4c6a42.js → p-43b922bf.js} +1 -1
  111. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
  112. package/dist/zonos-elements/{p-0d767751.entry.js → p-4bbf8931.entry.js} +1 -1
  113. package/dist/zonos-elements/{p-c015be06.system.js → p-532afee0.system.js} +1 -1
  114. package/dist/zonos-elements/{p-c36f823b.js → p-5b6c5d04.js} +2 -2
  115. package/dist/zonos-elements/{p-b6bbdb59.system.entry.js → p-5e867a64.system.entry.js} +1 -1
  116. package/dist/zonos-elements/{p-41e26cc4.system.entry.js → p-5f761f09.system.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-d642f149.system.entry.js → p-673d24f9.system.entry.js} +1 -1
  118. package/dist/zonos-elements/{p-cdfca133.entry.js → p-683d1598.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-86e825f0.system.entry.js → p-6d7dc2a2.system.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-9cf018c8.system.entry.js → p-7448f4a6.system.entry.js} +1 -1
  121. package/dist/zonos-elements/{p-619c07c6.system.entry.js → p-75311708.system.entry.js} +1 -1
  122. package/dist/zonos-elements/{p-8cb90d9e.entry.js → p-75b44616.entry.js} +1 -1
  123. package/dist/zonos-elements/{p-7c7f0c32.entry.js → p-77026d4a.entry.js} +1 -1
  124. package/dist/zonos-elements/{p-b2292b70.system.entry.js → p-78ea3d1e.system.entry.js} +1 -1
  125. package/dist/zonos-elements/{p-c94d82fb.entry.js → p-7fe8c97d.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-d2f2c685.entry.js → p-822600bd.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-dec30fa4.entry.js → p-84b2efef.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-731187da.system.entry.js → p-84f71520.system.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-e02fd9ae.js → p-86da894d.js} +1 -1
  130. package/dist/zonos-elements/{p-0028d158.entry.js → p-88fc9989.entry.js} +1 -1
  131. package/dist/zonos-elements/{p-12546668.system.js → p-972261dc.system.js} +1 -1
  132. package/dist/zonos-elements/{p-ee871492.system.entry.js → p-9c845327.system.entry.js} +1 -1
  133. package/dist/zonos-elements/{p-6c578d26.js → p-9fcf4d8c.js} +1 -1
  134. package/dist/zonos-elements/{p-7140439f.system.entry.js → p-b4d04d26.system.entry.js} +1 -1
  135. package/dist/zonos-elements/{p-3e20fb8f.entry.js → p-baa22bb3.entry.js} +1 -1
  136. package/dist/zonos-elements/{p-eb192fa3.system.js → p-bba01622.system.js} +1 -1
  137. package/dist/zonos-elements/{p-7f288336.entry.js → p-bd1a2003.entry.js} +1 -1
  138. package/dist/zonos-elements/{p-3ea350e8.entry.js → p-c071a4ca.entry.js} +1 -1
  139. package/dist/zonos-elements/{p-b0616716.js → p-c285d20c.js} +1 -1
  140. package/dist/zonos-elements/{p-05013308.entry.js → p-c8fa08b8.entry.js} +1 -1
  141. package/dist/zonos-elements/{p-91fc6c24.system.entry.js → p-c901ef48.system.entry.js} +1 -1
  142. package/dist/zonos-elements/p-d1a57d82.system.entry.js +1 -0
  143. package/dist/zonos-elements/{p-57d31762.system.entry.js → p-d3a452d4.system.entry.js} +1 -1
  144. package/dist/zonos-elements/{p-cbd5d932.entry.js → p-d3be144d.entry.js} +1 -1
  145. package/dist/zonos-elements/{p-b288c2ed.entry.js → p-da404f8f.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-36f97fd9.entry.js → p-e1e17979.entry.js} +1 -1
  147. package/dist/zonos-elements/{p-3e3e7800.entry.js → p-e477f1b1.entry.js} +1 -1
  148. package/dist/zonos-elements/{p-5d9c5413.entry.js → p-e47ed595.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-8fe71612.system.entry.js → p-eefadc0d.system.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-32912caf.system.js → p-fb2a884f.system.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-764e5c78.entry.js +0 -1
  154. package/dist/zonos-elements/p-b1d2f586.system.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,d as i}from"./p-ab68ad11.js";import{d as e}from"./p-b0616716.js";const h=class{constructor(s){t(this,s),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight,this.iframe=null}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var t,s,o;this.iframe=(null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector("iframe"))||null,null===(o=null===(s=this.iframe)||void 0===s?void 0:s.contentWindow)||void 0===o||o.addEventListener("resize",(()=>{this.iframe&&(this.height=parseFloat(getComputedStyle(this.iframe).height))}))}render(){return this.collapsed?this.el.style.overflow="hidden":setTimeout((()=>{this.collapsed||(this.el.style.overflow="visible")}),300),s(o,{key:"f27608bd02d0800dda8273909aa3041311dda3eb",class:"zonos--elements zonos--collapse",style:{"--zonos--font-family":e(),height:this.getElementHeight()}},s("div",{key:"7901ab34757169767c99b46523e8cc353874a606"},s("iframe",{key:"1d1e735c535df07e209878f6d66089ab30b943a3",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),s("slot",{key:"213bb5f472be8dfcd026207d706f8a0a3227f5cb"})))}get el(){return i(this)}};h.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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";export{h as zonos_collapse}
1
+ import{r as t,h as s,H as o,d as i}from"./p-ab68ad11.js";import{d as e}from"./p-c285d20c.js";const h=class{constructor(s){t(this,s),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight,this.iframe=null}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var t,s,o;this.iframe=(null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector("iframe"))||null,null===(o=null===(s=this.iframe)||void 0===s?void 0:s.contentWindow)||void 0===o||o.addEventListener("resize",(()=>{this.iframe&&(this.height=parseFloat(getComputedStyle(this.iframe).height))}))}render(){return this.collapsed?this.el.style.overflow="hidden":setTimeout((()=>{this.collapsed||(this.el.style.overflow="visible")}),300),s(o,{key:"f27608bd02d0800dda8273909aa3041311dda3eb",class:"zonos--elements zonos--collapse",style:{"--zonos--font-family":e(),height:this.getElementHeight()}},s("div",{key:"7901ab34757169767c99b46523e8cc353874a606"},s("iframe",{key:"1d1e735c535df07e209878f6d66089ab30b943a3",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),s("slot",{key:"213bb5f472be8dfcd026207d706f8a0a3227f5cb"})))}get el(){return i(this)}};h.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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";export{h as zonos_collapse}
@@ -1 +1 @@
1
- import{r as o,h as e,H as t}from"./p-ab68ad11.js";import{_ as s,e as i,i as n,f as l,z as r,g as a,m as h}from"./p-b0616716.js";import{l as d,E as c,r as m,u as f,G as p,H as g,I as u,J as w,K as z}from"./p-8a4c6a42.js";import{c as b}from"./p-b4b7f705.js";import{h as v,b as x,l as y}from"./p-f0c8150e.js";import{g as k}from"./p-5883217a.js";import"./p-6c578d26.js";import"./p-e02fd9ae.js";var L=s,T=/\s/,C=/^\s+/,O=i,E=n,S=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(C,""):o},D=l,I=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,A=/^0o[0-7]+$/i,H=parseInt,X=l,B=function(){return L.Date.now()},F=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||E(o)&&"[object Symbol]"==O(o)}(o))return NaN;if(D(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=D(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=S(o);var t=j.test(o);return t||A.test(o)?H(o.slice(2),t?2:8):I.test(o)?NaN:+o},N=Math.max,M=Math.min;const P=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},R=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=r.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const l=i&&c(i)&&document.querySelectorAll(i)||[],a=s&&c(s)&&document.querySelectorAll(s)||[];if(l.length!==a.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&c(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const m=[];for(let t=0;t<l.length;t++){const s=l[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};m.push(n)}}return m},$=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===r.currentHelloPage||"productList"===r.currentHelloPage)&&this.allRestrictedItems.length){const o=m("click to learn more");return`${m("productDetail"===r.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(r.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==r.currentHelloPage&&"productList"!==r.currentHelloPage||"DISABLED"===r.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=d;if(!e)return x("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 i={items:o,shipFrom:e,shipTo:t},{errors:n,json:l}=await v("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!l?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):l.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(r.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=r.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=R();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=function(o,e,t){var s,i,n,l,r,a,h=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function f(e){var t=s,n=i;return s=i=void 0,h=e,l=o.apply(n,t)}function p(o){var t=o-a;return void 0===a||t>=e||t<0||c&&o-h>=n}function g(){var o=B();if(p(o))return u(o);r=setTimeout(g,function(o){var t=e-(o-a);return c?M(t,n-(o-h)):t}(o))}function u(o){return r=void 0,m&&s?f(o):(s=i=void 0,l)}function w(){var o=B(),t=p(o);if(s=arguments,i=this,a=o,t){if(void 0===r)return function(o){return h=o,r=setTimeout(g,e),d?f(o):l}(a);if(c)return clearTimeout(r),r=setTimeout(g,e),f(a)}return void 0===r&&(r=setTimeout(g,e)),l}return e=F(e)||0,X(t)&&(d=!!t.leading,n=(c="maxWait"in t)?N(F(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),w.cancel=function(){void 0!==r&&clearTimeout(r),h=0,s=a=i=r=void 0},w.flush=function(){return void 0===r?l:u(B())},w}((()=>{const{productTitleElementSelector:o}=r.helloSettings;if(o){const o=R();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==d.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,r.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=r.helloSettings;return P(o)?"cart":P(t)?"productDetail":P(s)?"productList":P(e)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void p(d.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 k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!d.localizationLoaded)return!1;const{showForCountries:e}=r.helloSettings;return o&&(d.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?d.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(d.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=r.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1}async getCountryList(){return d.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&r.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==r.helloSettings.currencyBehavior&&(d.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return u(o)}async convert(o){return w(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||d.selectedCountryCode&&"function"==typeof r.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=r.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||r.helloSettings.mobileLocation,e=r.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=!r.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0: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=a(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=r.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:i,targetCurrency:n}=d,{isOnLeft:l,isOnTop:a,shouldFloat:c}=this.getHelloLocation(),m=h(r.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,p=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(r.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":f},g&&e("div",{class:b(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:p,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};$.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}: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}}: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(--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;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;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:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));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 6px;padding-right:16px;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{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;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% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}: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{$ as zonos_hello}
1
+ import{r as o,h as e,H as t}from"./p-ab68ad11.js";import{_ as s,e as i,i as n,f as l,z as r,g as h,m as a}from"./p-c285d20c.js";import{l as d,E as c,r as m,u as f,G as p,H as g,I as u,J as w,K as z}from"./p-43b922bf.js";import{c as b}from"./p-b4b7f705.js";import{h as v,b as x,l as y}from"./p-f0c8150e.js";import{g as k}from"./p-5883217a.js";import"./p-9fcf4d8c.js";import"./p-86da894d.js";var L=s,T=/\s/,C=/^\s+/,O=i,E=n,S=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(C,""):o},D=l,I=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,A=/^0o[0-7]+$/i,H=parseInt,X=l,B=function(){return L.Date.now()},F=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||E(o)&&"[object Symbol]"==O(o)}(o))return NaN;if(D(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=D(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=S(o);var t=j.test(o);return t||A.test(o)?H(o.slice(2),t?2:8):I.test(o)?NaN:+o},N=Math.max,M=Math.min;const P=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},R=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=r.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const l=i&&c(i)&&document.querySelectorAll(i)||[],h=s&&c(s)&&document.querySelectorAll(s)||[];if(l.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===n,d=a&&t&&c(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const m=[];for(let t=0;t<l.length;t++){const s=l[t],i=h[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};m.push(n)}}return m},$=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===r.currentHelloPage||"productList"===r.currentHelloPage)&&this.allRestrictedItems.length){const o=m("click to learn more");return`${m("productDetail"===r.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(r.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==r.currentHelloPage&&"productList"!==r.currentHelloPage||"DISABLED"===r.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=d;if(!e)return x("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 i={items:o,shipFrom:e,shipTo:t},{errors:n,json:l}=await v("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!l?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):l.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(r.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=r.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=R();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=function(o,e,t){var s,i,n,l,r,h,a=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function f(e){var t=s,n=i;return s=i=void 0,a=e,l=o.apply(n,t)}function p(o){var t=o-h;return void 0===h||t>=e||t<0||c&&o-a>=n}function g(){var o=B();if(p(o))return u(o);r=setTimeout(g,function(o){var t=e-(o-h);return c?M(t,n-(o-a)):t}(o))}function u(o){return r=void 0,m&&s?f(o):(s=i=void 0,l)}function w(){var o=B(),t=p(o);if(s=arguments,i=this,h=o,t){if(void 0===r)return function(o){return a=o,r=setTimeout(g,e),d?f(o):l}(h);if(c)return clearTimeout(r),r=setTimeout(g,e),f(h)}return void 0===r&&(r=setTimeout(g,e)),l}return e=F(e)||0,X(t)&&(d=!!t.leading,n=(c="maxWait"in t)?N(F(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),w.cancel=function(){void 0!==r&&clearTimeout(r),a=0,s=h=i=r=void 0},w.flush=function(){return void 0===r?l:u(B())},w}((()=>{const{productTitleElementSelector:o}=r.helloSettings;if(o){const o=R();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==d.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,r.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=r.helloSettings;return P(o)?"cart":P(t)?"productDetail":P(s)?"productList":P(e)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void p(d.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 k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!d.localizationLoaded)return!1;const{showForCountries:e}=r.helloSettings;return o&&(d.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?d.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(d.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=r.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1}async getCountryList(){return d.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&r.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==r.helloSettings.currencyBehavior&&(d.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return u(o)}async convert(o){return w(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||d.selectedCountryCode&&"function"==typeof r.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=r.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||r.helloSettings.mobileLocation,e=r.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=!r.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0: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=h(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=r.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:i,targetCurrency:n}=d,{isOnLeft:l,isOnTop:h,shouldFloat:c}=this.getHelloLocation(),m=a(r.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,p=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(r.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":f},g&&e("div",{class:b(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:p,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};$.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}: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}}: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(--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;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;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:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));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 6px;padding-right:16px;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{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;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% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}: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{$ as zonos_hello}
@@ -1 +1 @@
1
- import{g as n,f as t}from"./p-ab68ad11.js";const r=n=>!("isConnected"in n)||n.isConnected,e=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys())n.set(t,n.get(t).filter(r))})(...t)}),2e3)}})(),o=n=>"function"==typeof n?n():n,i=(r,i)=>{const u=((n,t=((n,t)=>n!==t))=>{const r=o(n);let e=new Map(Object.entries(null!=r?r:{}));const i={dispose:[],get:[],set:[],reset:[]},u=()=>{var t;e=new Map(Object.entries(null!==(t=o(n))&&void 0!==t?t:{})),i.reset.forEach((n=>n()))},c=n=>(i.get.forEach((t=>t(n))),e.get(n)),a=(n,r)=>{const o=e.get(n);t(r,o,n)&&(e.set(n,r),i.set.forEach((t=>t(n,r,o))))},s="undefined"==typeof Proxy?{}:new Proxy(r,{get:(n,t)=>c(t),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>e.has(t),set:(n,t,r)=>(a(t,r),!0)}),l=(n,t)=>(i[n].push(t),()=>{((n,t)=>{const r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)})(i[n],t)});return{state:s,get:c,set:a,on:l,onChange:(t,r)=>{const e=l("set",((n,e)=>{n===t&&r(e)})),i=l("reset",(()=>r(o(n)[t])));return()=>{e(),i()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(l("set",t.set)),t.get&&n.push(l("get",t.get)),t.reset&&n.push(l("reset",t.reset)),t.dispose&&n.push(l("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{i.dispose.forEach((n=>n())),u()},reset:u,forceUpdate:n=>{const t=e.get(n);i.set.forEach((r=>r(n,t,t)))}}})(r,i);return u.use((()=>{if("function"!=typeof n)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const e=n();e&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(r,t,e)},set:n=>{const o=r.get(n);o&&r.set(n,o.filter(t)),e(r)},reset:()=>{r.forEach((n=>n.forEach(t))),e(r)}}})()),u};var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},c=function(n,t){return n===t||n!=n&&t!=t},a=c,s=function(n,t){for(var r=n.length;r--;)if(a(n[r][0],t))return r;return-1},l=s,f=Array.prototype.splice,v=s,d=s,h=s;function b(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}b.prototype.clear=function(){this.__data__=[],this.size=0},b.prototype.delete=function(n){var t=this.__data__,r=l(t,n);return!(r<0||(r==t.length-1?t.pop():f.call(t,r,1),--this.size,0))},b.prototype.get=function(n){var t=this.__data__,r=v(t,n);return r<0?void 0:t[r][1]},b.prototype.has=function(n){return d(this.__data__,n)>-1},b.prototype.set=function(n,t){var r=this.__data__,e=h(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this};var p,y=b,g=y,j="object"==typeof u&&u&&u.Object===Object&&u,O="object"==typeof self&&self&&self.Object===Object&&self,S=j||O||Function("return this")(),m=S.Symbol,w=Object.prototype,E=w.hasOwnProperty,_=w.toString,A=m?m.toStringTag:void 0,D=Object.prototype.toString,T=m?m.toStringTag:void 0,L=function(n){return null==n?void 0===n?"[object Undefined]":"[object Null]":T&&T in Object(n)?function(n){var t=E.call(n,A),r=n[A];try{n[A]=void 0;var e=!0}catch(n){}var o=_.call(n);return e&&(t?n[A]=r:delete n[A]),o}(n):function(n){return D.call(n)}(n)},B=function(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)},C=L,P=B,I=function(n){if(!P(n))return!1;var t=C(n);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},M=S["__core-js_shared__"],U=(p=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",x=Function.prototype.toString,F=I,N=B,R=/^\[object .+?Constructor\]$/,z=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=function(n){return!(!N(n)||(t=n,U&&U in t))&&(F(n)?z:R).test(function(n){if(null!=n){try{return x.call(n)}catch(n){}try{return n+""}catch(n){}}return""}(n));var t},$=function(n,t){var r=function(n,t){return null==n?void 0:n[t]}(n,t);return k(r)?r:void 0},G=$(S,"Map"),H=$(Object,"create"),K=H,Y=H,V=Object.prototype.hasOwnProperty,q=H,J=Object.prototype.hasOwnProperty,Q=H;function W(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}W.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},W.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},W.prototype.get=function(n){var t=this.__data__;if(Y){var r=t[n];return"__lodash_hash_undefined__"===r?void 0:r}return V.call(t,n)?t[n]:void 0},W.prototype.has=function(n){var t=this.__data__;return q?void 0!==t[n]:J.call(t,n)},W.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Q&&void 0===t?"__lodash_hash_undefined__":t,this};var X=W,Z=y,nn=G,tn=function(n,t){var r,e,o=n.__data__;return("string"==(e=typeof(r=t))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map},rn=tn,en=tn,on=tn,un=tn;function cn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}cn.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new(nn||Z),string:new X}},cn.prototype.delete=function(n){var t=rn(this,n).delete(n);return this.size-=t?1:0,t},cn.prototype.get=function(n){return en(this,n).get(n)},cn.prototype.has=function(n){return on(this,n).has(n)},cn.prototype.set=function(n,t){var r=un(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this};var an=y,sn=G,ln=cn,fn=y,vn=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},dn=function(n){return this.__data__.get(n)},hn=function(n){return this.__data__.has(n)};function bn(n){var t=this.__data__=new fn(n);this.size=t.size}bn.prototype.clear=function(){this.__data__=new g,this.size=0},bn.prototype.delete=vn,bn.prototype.get=dn,bn.prototype.has=hn,bn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof an){var e=r.__data__;if(!sn||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new ln(e)}return r.set(n,t),this.size=r.size,this};var pn,yn,gn,jn,On,Sn=bn,mn=$,wn=function(){try{var n=mn(Object,"defineProperty");return n({},"",{}),n}catch(n){}}(),En=wn,_n=function(n,t,r){"__proto__"==t&&En?En(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r},An=_n,Dn=c,Tn=function(n,t,r){(void 0!==r&&!Dn(n[t],r)||void 0===r&&!(t in n))&&An(n,t,r)},Ln=function(n,t,r){for(var e=-1,o=Object(n),i=r(n),u=i.length;u--;){var c=i[++e];if(!1===t(o[c],c,o))break}return n},Bn={exports:{}};On=(jn=(gn=(yn=(pn=Bn.exports)&&!pn.nodeType&&pn)&&Bn&&!Bn.nodeType&&Bn)&&gn.exports===yn?S.Buffer:void 0)?jn.allocUnsafe:void 0,Bn.exports=function(n,t){if(t)return n.slice();var r=n.length,e=On?On(r):new n.constructor(r);return n.copy(e),e};var Cn,Pn,In=S.Uint8Array,Mn=B,Un=Object.create,xn=function(){function n(){}return function(t){if(!Mn(t))return{};if(Un)return Un(t);n.prototype=t;var r=new n;return n.prototype=void 0,r}}(),Fn=(Cn=Object.getPrototypeOf,Pn=Object,function(n){return Cn(Pn(n))}),Nn=Object.prototype,Rn=function(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||Nn)},zn=xn,kn=Fn,$n=Rn,Gn=function(n){return null!=n&&"object"==typeof n},Hn=L,Kn=Gn,Yn=function(n){return Kn(n)&&"[object Arguments]"==Hn(n)},Vn=Gn,qn=Object.prototype,Jn=qn.hasOwnProperty,Qn=qn.propertyIsEnumerable,Wn=Yn(function(){return arguments}())?Yn:function(n){return Vn(n)&&Jn.call(n,"callee")&&!Qn.call(n,"callee")},Xn=Array.isArray,Zn=function(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=9007199254740991},nt=I,tt=Zn,rt=function(n){return null!=n&&tt(n.length)&&!nt(n)},et=rt,ot=Gn,it={exports:{}},ut=function(){return!1};!function(n,t){var r=t&&!t.nodeType&&t,e=r&&it&&!it.nodeType&&it,o=e&&e.exports===r?S.Buffer:void 0;it.exports=(o?o.isBuffer:void 0)||ut}(0,it.exports);var ct=L,at=Fn,st=Gn,lt=Function.prototype.toString,ft=Object.prototype.hasOwnProperty,vt=lt.call(Object),dt=L,ht=Zn,bt=Gn,pt={};pt["[object Float32Array]"]=pt["[object Float64Array]"]=pt["[object Int8Array]"]=pt["[object Int16Array]"]=pt["[object Int32Array]"]=pt["[object Uint8Array]"]=pt["[object Uint8ClampedArray]"]=pt["[object Uint16Array]"]=pt["[object Uint32Array]"]=!0,pt["[object Arguments]"]=pt["[object Array]"]=pt["[object ArrayBuffer]"]=pt["[object Boolean]"]=pt["[object DataView]"]=pt["[object Date]"]=pt["[object Error]"]=pt["[object Function]"]=pt["[object Map]"]=pt["[object Number]"]=pt["[object Object]"]=pt["[object RegExp]"]=pt["[object Set]"]=pt["[object String]"]=pt["[object WeakMap]"]=!1;var yt={exports:{}};!function(n,t){var r=t&&!t.nodeType&&t,e=r&&n&&!n.nodeType&&n,o=e&&e.exports===r&&j.process,i=function(){try{return e&&e.require&&e.require("util").types||o&&o.binding&&o.binding("util")}catch(n){}}();n.exports=i}(yt,yt.exports);var gt,jt=function(n){return bt(n)&&ht(n.length)&&!!pt[dt(n)]},Ot=yt.exports,St=Ot&&Ot.isTypedArray,mt=St?function(n){return function(t){return n(t)}}(St):jt,wt=function(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]},Et=_n,_t=c,At=Object.prototype.hasOwnProperty,Dt=function(n,t,r){var e=n[t];At.call(n,t)&&_t(e,r)&&(void 0!==r||t in n)||Et(n,t,r)},Tt=_n,Lt=/^(?:0|[1-9]\d*)$/,Bt=function(n,t){var r=typeof n;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Lt.test(n))&&n>-1&&n%1==0&&n<t},Ct=Wn,Pt=Xn,It=it.exports,Mt=Bt,Ut=mt,xt=Object.prototype.hasOwnProperty,Ft=B,Nt=Rn,Rt=Object.prototype.hasOwnProperty,zt=function(n,t){var r=Pt(n),e=!r&&Ct(n),o=!r&&!e&&It(n),i=!r&&!e&&!o&&Ut(n),u=r||e||o||i,c=u?function(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}(n.length,String):[],a=c.length;for(var s in n)!t&&!xt.call(n,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Mt(s,a))||c.push(s);return c},kt=function(n){if(!Ft(n))return function(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}(n);var t=Nt(n),r=[];for(var e in n)("constructor"!=e||!t&&Rt.call(n,e))&&r.push(e);return r},$t=rt,Gt=function(n){return $t(n)?zt(n,!0):kt(n)},Ht=Gt,Kt=Tn,Yt=Bn.exports,Vt=function(n,t){var r,e,o=t?(e=new(r=n.buffer).constructor(r.byteLength),new In(e).set(new In(r)),e):n.buffer;return new n.constructor(o,n.byteOffset,n.length)},qt=function(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t},Jt=function(n){return"function"!=typeof n.constructor||$n(n)?{}:zn(kn(n))},Qt=Wn,Wt=Xn,Xt=function(n){return ot(n)&&et(n)},Zt=it.exports,nr=I,tr=B,rr=function(n){if(!st(n)||"[object Object]"!=ct(n))return!1;var t=at(n);if(null===t)return!0;var r=ft.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&lt.call(r)==vt},er=mt,or=wt,ir=function(n){return function(n,t,r,e){var o=!r;r||(r={});for(var i=-1,u=t.length;++i<u;){var c=t[i],a=e?e(r[c],n[c],c,r,n):void 0;void 0===a&&(a=n[c]),o?Tt(r,c,a):Dt(r,c,a)}return r}(n,Ht(n))},ur=Sn,cr=Tn,ar=Ln,sr=B,lr=Gt,fr=wt,vr=function(n){return n},dr=Math.max,hr=wn,br=Date.now,pr=function(n){var t=0,r=0;return function(){var e=br(),o=16-(e-r);if(r=e,o>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}(hr?function(n,t){return hr(n,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:vr),yr=vr,gr=function(n,t,r){return t=dr(void 0===t?n.length-1:t,0),function(){for(var e=arguments,o=-1,i=dr(e.length-t,0),u=Array(i);++o<i;)u[o]=e[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=e[o];return c[t]=r(u),function(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}(n,this,c)}},jr=pr,Or=c,Sr=rt,mr=Bt,wr=B,Er=function n(t,r,e,o,i){t!==r&&ar(r,(function(u,c){if(i||(i=new ur),sr(u))!function(n,t,r,e,o,i,u){var c=or(n,r),a=or(t,r),s=u.get(a);if(s)Kt(n,r,s);else{var l=i?i(c,a,r+"",n,t,u):void 0,f=void 0===l;if(f){var v=Wt(a),d=!v&&Zt(a),h=!v&&!d&&er(a);l=a,v||d||h?Wt(c)?l=c:Xt(c)?l=qt(c):d?(f=!1,l=Yt(a,!0)):h?(f=!1,l=Vt(a,!0)):l=[]:rr(a)||Qt(a)?(l=c,Qt(c)?l=ir(c):tr(c)&&!nr(c)||(l=Jt(a))):f=!1}f&&(u.set(a,l),o(l,a,e,i,u),u.delete(a)),Kt(n,r,l)}}(t,r,c,e,n,o,i);else{var a=o?o(fr(t,c),u,c+"",t,r,i):void 0;void 0===a&&(a=u),cr(t,c,a)}}),lr)},_r=(gt=function(n,t,r){Er(n,t,r)},function(n,t){return jr(gr(n,t,yr),n+"")}((function(n,t){var r=-1,e=t.length,o=e>1?t[e-1]:void 0,i=e>2?t[2]:void 0;for(o=gt.length>3&&"function"==typeof o?(e--,o):void 0,i&&function(n,t,r){if(!wr(r))return!1;var e=typeof t;return!!("number"==e?Sr(r)&&mr(t,r.length):"string"==e&&t in r)&&Or(r[t],n)}(t[0],t[1],i)&&(o=e<3?void 0:o,e=1),n=Object(n);++r<e;){var u=t[r];u&&gt(n,u,r)}return n})));const Ar=(n,t,...r)=>{const e=[n,t,...r].filter(Boolean);return _r.apply(null,e)},{reset:Dr,state:Tr}=i((()=>({appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{allowedCharacterSets:"ALL",analyticsProviders:[],cartExpiration:60,externalPaymentMethods:[],externalServiceTokens:[],mode:"TEST",orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",disabledCountries:[],helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",desktopLocation:"BOTTOM_RIGHT",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",notFoundElementFallback:null,organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",showForCountries:"ONLY_SHIPPABLE",visibilityStatus:"ENABLED"},loadedConfig:!1,onlineStoreSettings:{allowedDomains:[],url:""},organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:"",zonosMode:null})));let Lr=null;const Br=n=>"SYSTEM"===n?window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT":n,Cr=({overrideSettings:n,zonosSettings:t})=>{var r,e,o,i,u;Dr(),t&&(Lr=t);const c=Ar(Tr.appearance,(null==Lr?void 0:Lr.appearanceSettings)||(null==t?void 0:t.appearanceSettings)||null,null==n?void 0:n.appearance);"SYSTEM"===c.theme&&(c.theme=Br(c.theme)),Tr.onlineStoreSettings=Ar(Tr.onlineStoreSettings,(null==t?void 0:t.onlineStoreSettings)||null),Tr.disabledCountries=(null===(r=null==t?void 0:t.checkoutSettings)||void 0===r?void 0:r.disabledCountries)||[],Tr.appearance=c,Tr.checkoutSettings=Ar(Tr.checkoutSettings,(null==Lr?void 0:Lr.checkoutSettings)||(null==t?void 0:t.checkoutSettings)||null,null==n?void 0:n.checkoutSettings),Tr.helloSettings=Ar(Tr.helloSettings,(null==Lr?void 0:Lr.helloSettings)||(null==t?void 0:t.helloSettings)||null,null==n?void 0:n.helloSettings),Tr.loadedConfig=!0,Tr.organizationId=(null===(e=null==t?void 0:t.organization)||void 0===e?void 0:e.id)||"",Tr.organizationName=(null===(o=null==t?void 0:t.organization)||void 0===o?void 0:o.name)||"",Tr.storeId=(null===(u=null===(i=null==t?void 0:t.organization)||void 0===i?void 0:i.references)||void 0===u?void 0:u.storeId)||null,Tr.currencyConverter=null==n?void 0:n.currencyConverter,Tr.onCountryChange=null==n?void 0:n.onCountryChange,Tr.overrideCurrencyFormat=null==n?void 0:n.overrideCurrencyFormat},Pr=()=>Tr.appearance.fontFamily||"Inter";export{S as _,u as a,Cr as b,i as c,Pr as d,L as e,B as f,Br as g,Gn as i,Ar as m,Tr as z}
1
+ import{g as n,f as t}from"./p-ab68ad11.js";const r=n=>!("isConnected"in n)||n.isConnected,e=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys())n.set(t,n.get(t).filter(r))})(...t)}),2e3)}})(),o=n=>"function"==typeof n?n():n,i=(r,i)=>{const u=((n,t=((n,t)=>n!==t))=>{const r=o(n);let e=new Map(Object.entries(null!=r?r:{}));const i={dispose:[],get:[],set:[],reset:[]},u=()=>{var t;e=new Map(Object.entries(null!==(t=o(n))&&void 0!==t?t:{})),i.reset.forEach((n=>n()))},c=n=>(i.get.forEach((t=>t(n))),e.get(n)),a=(n,r)=>{const o=e.get(n);t(r,o,n)&&(e.set(n,r),i.set.forEach((t=>t(n,r,o))))},s="undefined"==typeof Proxy?{}:new Proxy(r,{get:(n,t)=>c(t),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>e.has(t),set:(n,t,r)=>(a(t,r),!0)}),l=(n,t)=>(i[n].push(t),()=>{((n,t)=>{const r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)})(i[n],t)});return{state:s,get:c,set:a,on:l,onChange:(t,r)=>{const e=l("set",((n,e)=>{n===t&&r(e)})),i=l("reset",(()=>r(o(n)[t])));return()=>{e(),i()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(l("set",t.set)),t.get&&n.push(l("get",t.get)),t.reset&&n.push(l("reset",t.reset)),t.dispose&&n.push(l("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{i.dispose.forEach((n=>n())),u()},reset:u,forceUpdate:n=>{const t=e.get(n);i.set.forEach((r=>r(n,t,t)))}}})(r,i);return u.use((()=>{if("function"!=typeof n)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const e=n();e&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(r,t,e)},set:n=>{const o=r.get(n);o&&r.set(n,o.filter(t)),e(r)},reset:()=>{r.forEach((n=>n.forEach(t))),e(r)}}})()),u};var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},c=function(n,t){return n===t||n!=n&&t!=t},a=c,s=function(n,t){for(var r=n.length;r--;)if(a(n[r][0],t))return r;return-1},l=s,f=Array.prototype.splice,v=s,d=s,h=s;function b(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}b.prototype.clear=function(){this.__data__=[],this.size=0},b.prototype.delete=function(n){var t=this.__data__,r=l(t,n);return!(r<0||(r==t.length-1?t.pop():f.call(t,r,1),--this.size,0))},b.prototype.get=function(n){var t=this.__data__,r=v(t,n);return r<0?void 0:t[r][1]},b.prototype.has=function(n){return d(this.__data__,n)>-1},b.prototype.set=function(n,t){var r=this.__data__,e=h(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this};var p,y=b,g=y,j="object"==typeof u&&u&&u.Object===Object&&u,O="object"==typeof self&&self&&self.Object===Object&&self,S=j||O||Function("return this")(),m=S.Symbol,w=Object.prototype,E=w.hasOwnProperty,_=w.toString,A=m?m.toStringTag:void 0,D=Object.prototype.toString,T=m?m.toStringTag:void 0,L=function(n){return null==n?void 0===n?"[object Undefined]":"[object Null]":T&&T in Object(n)?function(n){var t=E.call(n,A),r=n[A];try{n[A]=void 0;var e=!0}catch(n){}var o=_.call(n);return e&&(t?n[A]=r:delete n[A]),o}(n):function(n){return D.call(n)}(n)},C=function(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)},B=L,P=C,I=function(n){if(!P(n))return!1;var t=B(n);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},M=S["__core-js_shared__"],U=(p=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",x=Function.prototype.toString,F=I,N=C,R=/^\[object .+?Constructor\]$/,z=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=function(n){return!(!N(n)||(t=n,U&&U in t))&&(F(n)?z:R).test(function(n){if(null!=n){try{return x.call(n)}catch(n){}try{return n+""}catch(n){}}return""}(n));var t},$=function(n,t){var r=function(n,t){return null==n?void 0:n[t]}(n,t);return k(r)?r:void 0},G=$(S,"Map"),H=$(Object,"create"),K=H,Y=H,V=Object.prototype.hasOwnProperty,q=H,J=Object.prototype.hasOwnProperty,Q=H;function W(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}W.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},W.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},W.prototype.get=function(n){var t=this.__data__;if(Y){var r=t[n];return"__lodash_hash_undefined__"===r?void 0:r}return V.call(t,n)?t[n]:void 0},W.prototype.has=function(n){var t=this.__data__;return q?void 0!==t[n]:J.call(t,n)},W.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Q&&void 0===t?"__lodash_hash_undefined__":t,this};var X=W,Z=y,nn=G,tn=function(n,t){var r,e,o=n.__data__;return("string"==(e=typeof(r=t))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map},rn=tn,en=tn,on=tn,un=tn;function cn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}cn.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new(nn||Z),string:new X}},cn.prototype.delete=function(n){var t=rn(this,n).delete(n);return this.size-=t?1:0,t},cn.prototype.get=function(n){return en(this,n).get(n)},cn.prototype.has=function(n){return on(this,n).has(n)},cn.prototype.set=function(n,t){var r=un(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this};var an=y,sn=G,ln=cn,fn=y,vn=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},dn=function(n){return this.__data__.get(n)},hn=function(n){return this.__data__.has(n)};function bn(n){var t=this.__data__=new fn(n);this.size=t.size}bn.prototype.clear=function(){this.__data__=new g,this.size=0},bn.prototype.delete=vn,bn.prototype.get=dn,bn.prototype.has=hn,bn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof an){var e=r.__data__;if(!sn||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new ln(e)}return r.set(n,t),this.size=r.size,this};var pn,yn,gn,jn,On,Sn=bn,mn=$,wn=function(){try{var n=mn(Object,"defineProperty");return n({},"",{}),n}catch(n){}}(),En=wn,_n=function(n,t,r){"__proto__"==t&&En?En(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r},An=_n,Dn=c,Tn=function(n,t,r){(void 0!==r&&!Dn(n[t],r)||void 0===r&&!(t in n))&&An(n,t,r)},Ln=function(n,t,r){for(var e=-1,o=Object(n),i=r(n),u=i.length;u--;){var c=i[++e];if(!1===t(o[c],c,o))break}return n},Cn={exports:{}};On=(jn=(gn=(yn=(pn=Cn.exports)&&!pn.nodeType&&pn)&&Cn&&!Cn.nodeType&&Cn)&&gn.exports===yn?S.Buffer:void 0)?jn.allocUnsafe:void 0,Cn.exports=function(n,t){if(t)return n.slice();var r=n.length,e=On?On(r):new n.constructor(r);return n.copy(e),e};var Bn,Pn,In=S.Uint8Array,Mn=C,Un=Object.create,xn=function(){function n(){}return function(t){if(!Mn(t))return{};if(Un)return Un(t);n.prototype=t;var r=new n;return n.prototype=void 0,r}}(),Fn=(Bn=Object.getPrototypeOf,Pn=Object,function(n){return Bn(Pn(n))}),Nn=Object.prototype,Rn=function(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||Nn)},zn=xn,kn=Fn,$n=Rn,Gn=function(n){return null!=n&&"object"==typeof n},Hn=L,Kn=Gn,Yn=function(n){return Kn(n)&&"[object Arguments]"==Hn(n)},Vn=Gn,qn=Object.prototype,Jn=qn.hasOwnProperty,Qn=qn.propertyIsEnumerable,Wn=Yn(function(){return arguments}())?Yn:function(n){return Vn(n)&&Jn.call(n,"callee")&&!Qn.call(n,"callee")},Xn=Array.isArray,Zn=function(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=9007199254740991},nt=I,tt=Zn,rt=function(n){return null!=n&&tt(n.length)&&!nt(n)},et=rt,ot=Gn,it={exports:{}},ut=function(){return!1};!function(n,t){var r=t&&!t.nodeType&&t,e=r&&it&&!it.nodeType&&it,o=e&&e.exports===r?S.Buffer:void 0;it.exports=(o?o.isBuffer:void 0)||ut}(0,it.exports);var ct=L,at=Fn,st=Gn,lt=Function.prototype.toString,ft=Object.prototype.hasOwnProperty,vt=lt.call(Object),dt=L,ht=Zn,bt=Gn,pt={};pt["[object Float32Array]"]=pt["[object Float64Array]"]=pt["[object Int8Array]"]=pt["[object Int16Array]"]=pt["[object Int32Array]"]=pt["[object Uint8Array]"]=pt["[object Uint8ClampedArray]"]=pt["[object Uint16Array]"]=pt["[object Uint32Array]"]=!0,pt["[object Arguments]"]=pt["[object Array]"]=pt["[object ArrayBuffer]"]=pt["[object Boolean]"]=pt["[object DataView]"]=pt["[object Date]"]=pt["[object Error]"]=pt["[object Function]"]=pt["[object Map]"]=pt["[object Number]"]=pt["[object Object]"]=pt["[object RegExp]"]=pt["[object Set]"]=pt["[object String]"]=pt["[object WeakMap]"]=!1;var yt={exports:{}};!function(n,t){var r=t&&!t.nodeType&&t,e=r&&n&&!n.nodeType&&n,o=e&&e.exports===r&&j.process,i=function(){try{return e&&e.require&&e.require("util").types||o&&o.binding&&o.binding("util")}catch(n){}}();n.exports=i}(yt,yt.exports);var gt,jt=function(n){return bt(n)&&ht(n.length)&&!!pt[dt(n)]},Ot=yt.exports,St=Ot&&Ot.isTypedArray,mt=St?function(n){return function(t){return n(t)}}(St):jt,wt=function(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]},Et=_n,_t=c,At=Object.prototype.hasOwnProperty,Dt=function(n,t,r){var e=n[t];At.call(n,t)&&_t(e,r)&&(void 0!==r||t in n)||Et(n,t,r)},Tt=_n,Lt=/^(?:0|[1-9]\d*)$/,Ct=function(n,t){var r=typeof n;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Lt.test(n))&&n>-1&&n%1==0&&n<t},Bt=Wn,Pt=Xn,It=it.exports,Mt=Ct,Ut=mt,xt=Object.prototype.hasOwnProperty,Ft=C,Nt=Rn,Rt=Object.prototype.hasOwnProperty,zt=function(n,t){var r=Pt(n),e=!r&&Bt(n),o=!r&&!e&&It(n),i=!r&&!e&&!o&&Ut(n),u=r||e||o||i,c=u?function(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}(n.length,String):[],a=c.length;for(var s in n)!t&&!xt.call(n,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Mt(s,a))||c.push(s);return c},kt=function(n){if(!Ft(n))return function(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}(n);var t=Nt(n),r=[];for(var e in n)("constructor"!=e||!t&&Rt.call(n,e))&&r.push(e);return r},$t=rt,Gt=function(n){return $t(n)?zt(n,!0):kt(n)},Ht=Gt,Kt=Tn,Yt=Cn.exports,Vt=function(n,t){var r,e,o=t?(e=new(r=n.buffer).constructor(r.byteLength),new In(e).set(new In(r)),e):n.buffer;return new n.constructor(o,n.byteOffset,n.length)},qt=function(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t},Jt=function(n){return"function"!=typeof n.constructor||$n(n)?{}:zn(kn(n))},Qt=Wn,Wt=Xn,Xt=function(n){return ot(n)&&et(n)},Zt=it.exports,nr=I,tr=C,rr=function(n){if(!st(n)||"[object Object]"!=ct(n))return!1;var t=at(n);if(null===t)return!0;var r=ft.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&lt.call(r)==vt},er=mt,or=wt,ir=function(n){return function(n,t,r,e){var o=!r;r||(r={});for(var i=-1,u=t.length;++i<u;){var c=t[i],a=e?e(r[c],n[c],c,r,n):void 0;void 0===a&&(a=n[c]),o?Tt(r,c,a):Dt(r,c,a)}return r}(n,Ht(n))},ur=Sn,cr=Tn,ar=Ln,sr=C,lr=Gt,fr=wt,vr=function(n){return n},dr=Math.max,hr=wn,br=Date.now,pr=function(n){var t=0,r=0;return function(){var e=br(),o=16-(e-r);if(r=e,o>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}(hr?function(n,t){return hr(n,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:vr),yr=vr,gr=function(n,t,r){return t=dr(void 0===t?n.length-1:t,0),function(){for(var e=arguments,o=-1,i=dr(e.length-t,0),u=Array(i);++o<i;)u[o]=e[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=e[o];return c[t]=r(u),function(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}(n,this,c)}},jr=pr,Or=c,Sr=rt,mr=Ct,wr=C,Er=function n(t,r,e,o,i){t!==r&&ar(r,(function(u,c){if(i||(i=new ur),sr(u))!function(n,t,r,e,o,i,u){var c=or(n,r),a=or(t,r),s=u.get(a);if(s)Kt(n,r,s);else{var l=i?i(c,a,r+"",n,t,u):void 0,f=void 0===l;if(f){var v=Wt(a),d=!v&&Zt(a),h=!v&&!d&&er(a);l=a,v||d||h?Wt(c)?l=c:Xt(c)?l=qt(c):d?(f=!1,l=Yt(a,!0)):h?(f=!1,l=Vt(a,!0)):l=[]:rr(a)||Qt(a)?(l=c,Qt(c)?l=ir(c):tr(c)&&!nr(c)||(l=Jt(a))):f=!1}f&&(u.set(a,l),o(l,a,e,i,u),u.delete(a)),Kt(n,r,l)}}(t,r,c,e,n,o,i);else{var a=o?o(fr(t,c),u,c+"",t,r,i):void 0;void 0===a&&(a=u),cr(t,c,a)}}),lr)},_r=(gt=function(n,t,r){Er(n,t,r)},function(n,t){return jr(gr(n,t,yr),n+"")}((function(n,t){var r=-1,e=t.length,o=e>1?t[e-1]:void 0,i=e>2?t[2]:void 0;for(o=gt.length>3&&"function"==typeof o?(e--,o):void 0,i&&function(n,t,r){if(!wr(r))return!1;var e=typeof t;return!!("number"==e?Sr(r)&&mr(t,r.length):"string"==e&&t in r)&&Or(r[t],n)}(t[0],t[1],i)&&(o=e<3?void 0:o,e=1),n=Object(n);++r<e;){var u=t[r];u&&gt(n,u,r)}return n})));const Ar=(n,t,...r)=>{const e=[n,t,...r].filter(Boolean);return _r.apply(null,e)},{reset:Dr,state:Tr}=i((()=>({appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{allowedCharacterSets:"ALL",analyticsProviders:[],defaultCartExpiration:3600,externalPaymentMethods:[],externalServiceTokens:[],mode:"TEST",orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",disabledCountries:[],helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",desktopLocation:"BOTTOM_RIGHT",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",notFoundElementFallback:null,organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",showForCountries:"ONLY_SHIPPABLE",visibilityStatus:"ENABLED"},loadedConfig:!1,onlineStoreSettings:{allowedDomains:[],url:""},organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:"",zonosMode:null})));let Lr=null;const Cr=n=>"SYSTEM"===n?window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT":n,Br=({overrideSettings:n,zonosSettings:t})=>{var r,e,o,i,u;Dr(),t&&(Lr=t);const c=Ar(Tr.appearance,(null==Lr?void 0:Lr.appearanceSettings)||(null==t?void 0:t.appearanceSettings)||null,null==n?void 0:n.appearance);"SYSTEM"===c.theme&&(c.theme=Cr(c.theme)),Tr.onlineStoreSettings=Ar(Tr.onlineStoreSettings,(null==t?void 0:t.onlineStoreSettings)||null),Tr.disabledCountries=(null===(r=null==t?void 0:t.checkoutSettings)||void 0===r?void 0:r.disabledCountries)||[],Tr.appearance=c,Tr.checkoutSettings=Ar(Tr.checkoutSettings,(null==Lr?void 0:Lr.checkoutSettings)||(null==t?void 0:t.checkoutSettings)||null,null==n?void 0:n.checkoutSettings),Tr.helloSettings=Ar(Tr.helloSettings,(null==Lr?void 0:Lr.helloSettings)||(null==t?void 0:t.helloSettings)||null,null==n?void 0:n.helloSettings),Tr.loadedConfig=!0,Tr.organizationId=(null===(e=null==t?void 0:t.organization)||void 0===e?void 0:e.id)||"",Tr.organizationName=(null===(o=null==t?void 0:t.organization)||void 0===o?void 0:o.name)||"",Tr.storeId=(null===(u=null===(i=null==t?void 0:t.organization)||void 0===i?void 0:i.references)||void 0===u?void 0:u.storeId)||null,Tr.currencyConverter=null==n?void 0:n.currencyConverter,Tr.onCountryChange=null==n?void 0:n.onCountryChange,Tr.overrideCurrencyFormat=null==n?void 0:n.overrideCurrencyFormat},Pr=()=>Tr.appearance.fontFamily||"Inter";export{S as _,u as a,Br as b,i as c,Pr as d,L as e,C as f,Cr as g,Gn as i,Ar as m,Tr as z}
@@ -1 +1 @@
1
- import{r as o,h as s,H as t}from"./p-ab68ad11.js";import{d as a}from"./p-b0616716.js";import{c as r}from"./p-b4b7f705.js";const h=class{constructor(s){o(this,s),this.spacing=24}render(){return s(t,{key:"32154740511a038c4ca04ad55bc7d77d96496654",style:{"--zonos--font-family":a()}},s("div",{key:"f80f8b0e51554a3db9efa960706ac9bb450155cb",class:r(["vstack"]),style:{"grid-row-gap":`${this.spacing}px`}},s("slot",{key:"711a207eb1b4c59672be4df8b19a3c7200d44f29"})))}};h.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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";export{h as zonos_v_stack}
1
+ import{r as o,h as s,H as t}from"./p-ab68ad11.js";import{d as a}from"./p-c285d20c.js";import{c as r}from"./p-b4b7f705.js";const h=class{constructor(s){o(this,s),this.spacing=24}render(){return s(t,{key:"32154740511a038c4ca04ad55bc7d77d96496654",style:{"--zonos--font-family":a()}},s("div",{key:"f80f8b0e51554a3db9efa960706ac9bb450155cb",class:r(["vstack"]),style:{"grid-row-gap":`${this.spacing}px`}},s("slot",{key:"711a207eb1b4c59672be4df8b19a3c7200d44f29"})))}};h.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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";export{h as zonos_v_stack}
@@ -1 +1 @@
1
- System.register(["./p-4caffd96.system.js","./p-32912caf.system.js","./p-23e7c655.system.js","./p-c015be06.system.js"],(function(e){"use strict";var s,t,a,o,r,n;return{setters:[function(e){s=e.r;t=e.h;a=e.H},function(e){o=e.d},function(e){r=e.c},function(e){n=e.g}],execute:function(){var i=":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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var d=i;var c=e("zonos_card",function(){function e(e){s(this,e);this.actions=undefined;this.backgroundColor=undefined;this.borderRadius=6;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}e.prototype.render=function(){var e=this.backgroundColor?"var(--zonos-elements-".concat(this.backgroundColor,")"):"transparent";var s=n({customRoundRadius:"".concat(this.borderRadius,"px"),overrideBorderStyle:"ROUNDED"});return t(a,{key:"d1a2b02f3d33492fc76bd88cf92e68bf1603cbd0",style:{"--zonos--font-family":o()}},t("div",{key:"0c9acee7938dc95d1f6267dff6fa399bd8a65b95",class:r(["styled-card"]),style:{"--zonos--background-color":e,"--zonos--border-radius":s,padding:this.spacing}},this.label&&t("header",{key:"2559a7fd78c4c4a97ce466e0eefbc4db8409c97f",class:"card-header",style:{padding:this.spacing}},t("zonos-text",{key:"287e0e64461cb5206a653711346fd8eb62524a00",type:"subheader"},this.label),t("h-stack",{key:"9ac80b9c555a93232bbcdd0e1769a4b78ded2fa8",spacing:8},this.actions)),t("slot",{key:"3342bd7f5d2af58740c49d353f311ce1c4101f13"}),(this.footerActions||this.footerContent)&&t("footer",{key:"dee65ea527dfac5821ece452426e2d33f127e356",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},t("div",{key:"13a23726ada09eb39783ea261b760cbe83587f5b"},this.footerContent),t("h-stack",{key:"1389bcbce376431f3008669e9f55a69b0a177d85",spacing:8},this.footerActions))))};return e}());c.style=d}}}));
1
+ System.register(["./p-4caffd96.system.js","./p-fb2a884f.system.js","./p-23e7c655.system.js","./p-532afee0.system.js"],(function(e){"use strict";var s,t,a,o,r,n;return{setters:[function(e){s=e.r;t=e.h;a=e.H},function(e){o=e.d},function(e){r=e.c},function(e){n=e.g}],execute:function(){var i=":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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var d=i;var c=e("zonos_card",function(){function e(e){s(this,e);this.actions=undefined;this.backgroundColor=undefined;this.borderRadius=6;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}e.prototype.render=function(){var e=this.backgroundColor?"var(--zonos-elements-".concat(this.backgroundColor,")"):"transparent";var s=n({customRoundRadius:"".concat(this.borderRadius,"px"),overrideBorderStyle:"ROUNDED"});return t(a,{key:"d1a2b02f3d33492fc76bd88cf92e68bf1603cbd0",style:{"--zonos--font-family":o()}},t("div",{key:"0c9acee7938dc95d1f6267dff6fa399bd8a65b95",class:r(["styled-card"]),style:{"--zonos--background-color":e,"--zonos--border-radius":s,padding:this.spacing}},this.label&&t("header",{key:"2559a7fd78c4c4a97ce466e0eefbc4db8409c97f",class:"card-header",style:{padding:this.spacing}},t("zonos-text",{key:"287e0e64461cb5206a653711346fd8eb62524a00",type:"subheader"},this.label),t("h-stack",{key:"9ac80b9c555a93232bbcdd0e1769a4b78ded2fa8",spacing:8},this.actions)),t("slot",{key:"3342bd7f5d2af58740c49d353f311ce1c4101f13"}),(this.footerActions||this.footerContent)&&t("footer",{key:"dee65ea527dfac5821ece452426e2d33f127e356",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},t("div",{key:"13a23726ada09eb39783ea261b760cbe83587f5b"},this.footerContent),t("h-stack",{key:"1389bcbce376431f3008669e9f55a69b0a177d85",spacing:8},this.footerActions))))};return e}());c.style=d}}}));
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function s(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function r(o){try{a(n.next(o))}catch(o){i(o)}}function c(o){try{a(n["throw"](o))}catch(o){i(o)}}function a(o){o.done?t(o.value):s(o.value).then(r,c)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(o){return function(e){return a([o,e])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,c[0]&&(t=0)),t)try{if(n=1,s&&(i=c[0]&2?s["return"]:c[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,c[1])).done)return i;if(s=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;s=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=e.call(o,t)}catch(o){c=[6,o];s=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-bba01622.system.js","./p-2297c165.system.js","./p-fb2a884f.system.js","./p-18e5b741.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-532afee0.system.js","./p-972261dc.system.js","./p-1aa93d1e.system.js","./p-73a3e5bb.system.js","./p-2770ba48.system.js"],(function(o){"use strict";var e,t,n,s,i,r,c,a,u,d,l,h,f,m,v,z,p,g,k,w,b,y,C,x,_,S,A,O,I,T,j,P,E,B,L,D,N,R,U,M,H,F,Z,G,V,q,K,W,Y,J,Q,X,$,oo,eo,to,no,so,io;return{setters:[function(o){e=o.r;t=o.h;n=o.H;s=o.F},function(o){i=o.l;r=o.s;c=o.a;a=o.b;u=o.c;d=o.i;l=o.d;h=o.e;f=o.f;m=o.g;v=o.h;z=o.j;p=o.k;g=o.m;k=o.n;w=o.o;b=o.t;y=o.p;C=o.q;x=o.r;_=o.u;S=o.v;A=o.w;O=o.x;I=o.y;T=o.z;j=o.A;P=o.B;E=o.C},function(o){B=o.p;L=o.s;D=o.a;N=o.b},function(o){R=o.z;U=o.g;M=o.m},function(o){H=o.h;F=o.l;Z=o.b;G=o.s;V=o.c;q=o.d;K=o.g;W=o.j;Y=o.a},function(o){J=o.i},function(o){Q=o.c},function(o){X=o.c},function(o){$=o.g},function(o){oo=o.i},function(o){eo=o.s},function(o){to=o.c;no=o.s;so=o.d},function(o){io=o.R}],execute:function(){var ro=this;var co=function(o){var e=o.items.map((function(o){return{amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||undefined,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""}}))||[];return{adjustments:o.adjustments,cartItems:e}};var ao=function(){return __awaiter(ro,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,H("/api/zonos-elements/get-store-discount-enabled-status")];case 1:o=n.sent(),e=o.errors,t=o.json;if(e.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var uo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return true}if(i.isDisabledCountry){if(o){F("Checkout: disabled country")}return true}return false};var lo=function(o){if(o===void 0){o=true}if(!i.localizationLoaded){return false}if(!i.isShippableCountry){if(o){F("Checkout: not shippable country")}return false}return true};var ho=function(o){var e=o.domesticRedirectedBtnSelector,t=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var n=new MutationObserver((function(){return __awaiter(ro,void 0,void 0,(function(){var o,s,i,d,l;var h=this;return __generator(this,(function(f){o=document.querySelector(e);s=r();if(!o&&s){i=document.createElement("button");i.style.display="none";i.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(i);t===null||t===void 0?void 0:t(s);n.disconnect();return[2]}d=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!d||!l){return[2]}n.disconnect();l.addEventListener("click",(function(o){return __awaiter(h,void 0,void 0,(function(){var e,t,n,s,i,r,l;return __generator(this,(function(h){n=d.value;if(!n){return[2]}c(n);if(!lo(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}i=new FormData(s);r=document.querySelector("input#addressLine1Input");l={address1:(e=i.get("shippingAddress.address1"))!==null&&e!==void 0?e:r&&r.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:(t=i.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){Z("One or more shipping address field is missing",Object.entries(l));void G({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:R.storeId}});return[2]}u({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));n.observe(document.body,{childList:true,subtree:true})};var fo=function(){var o="connection"in window.navigator?window.navigator.connection:null;var e="mozConnection"in window.navigator?window.navigator.mozConnection:null;var t="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;var n=o||e||t;return n};var mo=function(){var o="userAgentData"in window.navigator?window.navigator.userAgentData:null;var e=fo();return{connectionDownlink:e===null||e===void 0?void 0:e.downlink,connectionEffectiveType:e===null||e===void 0?void 0:e.effectiveType,connectionRtt:e===null||e===void 0?void 0:e.rtt,connectionSaveData:e===null||e===void 0?void 0:e.saveData,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}};var vo=function(){return __awaiter(ro,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){o=V().elapsedTime;e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:q},mo()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};void H("/api/zonos-elements/log-script-load",{body:e,method:"POST"});return[2]}))}))};var zo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var po=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var go=po;var ko=90*60*1e3;var wo=6*60*60*1e3;var bo=o("zonos_checkout",function(){function o(o){var t=this;e(this,o);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,t,n,s;return __generator(this,(function(i){switch(i.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||R.appearance.theme;return[4,d({overrideBorderRadius:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?s:undefined,paypalEnabled:B()})];case 1:i.sent();return[2]}}))}))};this.handleCartExpiredCheck=function(){var o;if(K()){F("Not checking for cart expiration in test mode");return false}if(!R.checkoutSettings.defaultCartExpiration||!((o=window.Zonos.cartData)===null||o===void 0?void 0:o.createdAt)){return false}var e=new Date(window.Zonos.cartData.createdAt).getTime();var n=(new Date).getTime();var s=n-e;var i=Math.floor(s/1e3);F("Cart has been created for ".concat(i/60," minutes"));if(R.checkoutSettings.defaultCartExpiration){if(i>R.checkoutSettings.defaultCartExpiration){t.isCartExpired=true;return true}}return false};this.checkStripePaymentIntentStatus=function(o){return __awaiter(t,[o],void 0,(function(o){var e,t,n,s,i,r,c,a,u;var d=o.triggeredButton;return __generator(this,(function(o){switch(o.label){case 0:e=d===null||d===void 0?void 0:d.matches("#".concat(to));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;s=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!e){F("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}F("Payment intent exist, checking stripe payment intent status");if(!s){F("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,l({clientSecret:s})];case 1:r=o.sent(),c=r.error,a=r.status;u=new URLSearchParams(window.location.search).get("redirect_status");if(u){if(!c){F("Payment intent is succeeded or in a good state to move forward, show success screen")}else{F("Payment intent failed, show status from error")}this.open=true;h.checkoutSessionId=i;f.clientSecret=s;void this.setToFinishStep(a);return[2,{shouldAllowOrder:false}]}if(!t){F("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}F("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.formatDate=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleDateString()};this.formatTime=function(o){if(!o){return""}var e=new Date(o);return e.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(h.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.overrideStagingMode=undefined;this.defaultAddress=null;this.forceDialogOpen=false;this.defaultAddressParams=null;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=f.clientSecret}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=o.detail;void m({adjustments:h.adjustments,cartItems:e});return[2]}))}))};o.prototype.handleKeyPress=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(o.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};o.prototype.closeDialogHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(o===null||o===void 0?void 0:o.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;L("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&h.step==="finish"){v()}h.step="customer-info";z();p();(t=(e=R.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(e);return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n,s,r,c,a,s,u,c,a,a,d,l,c,f;return __generator(this,(function(v){switch(v.label){case 0:if(!(typeof R.checkoutSettings.createCartId==="function"))return[3,4];F('"createCartId" is provided, start building cart');return[4,R.checkoutSettings.createCartId()];case 1:o=v.sent();e=void 0;if(typeof o==="object"){F("object detected, use cartId and prefill address from createCartId");e=o.cartId;this.useShippingDataFromCreateCartId(o.shippingData)}else{e=o}window.Zonos.cartId=e;return[4,no(e)];case 2:t=v.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){Z("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;s=this.handleCartExpiredCheck();if(s){return[2,false]}r=co(n),c=r.adjustments,a=r.cartItems;return[4,m({adjustments:c,cartItems:a})];case 3:v.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];F("tempCartUUID is provided, start building cart");s=this.handleCartExpiredCheck();if(s){return[2,false]}u=co(window.Zonos.cartData),c=u.adjustments,a=u.cartItems;return[4,m({adjustments:c,cartItems:a})];case 5:v.sent();return[3,9];case 6:if(!(R.checkoutSettings.buildCartDetail&&i.selectedCountryCode))return[3,9];F("build cart detail");return[4,R.checkoutSettings.buildCartDetail({countryCode:i.selectedCountryCode,currencyCode:i.targetCurrency})];case 7:a=v.sent();d=a.filter((function(o){return o.amount>=0}));l=a.filter((function(o){return o.amount<0}));c=l.map((function(o){return{amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"}}));return[4,m({adjustments:c,cartItems:d})];case 8:v.sent();v.label=9;case 9:if(!!h.checkoutSessionId)return[3,11];return[4,g()];case 10:f=v.sent();F("stripeStoreInitCheckoutSession: ".concat(f));if(!f){return[2,false]}v.label=11;case 11:if(!h.isStagingMode){void k()}return[4,this.applyStripeTheme()];case 12:v.sent();this.isRedirectAfterOrder=R.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!h.externalConfirmationPageURL;return[2,true]}}))}))};o.prototype.reloadCheckoutSession=function(){window.location.reload()};o.prototype.handleOrderDuplication=function(){var o=W(localStorage.getItem("zonos--placed-order-info"));if(!o){localStorage.removeItem("zonos--placed-order-info");return}var e=Date.now()-o.time;F("=== Existing placed order info: ".concat(o.orderId," - ").concat(this.formatDate(o.time)," - elapsed in hh:ss format: ").concat(new Date(e).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||wo;if(e>t){F("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=o;F("=== Showing order duplication confirmation","warn")};o.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!h.checkoutSessionId){return}void H("/api/zonos-elements/update-checkout-session-metadata",{body:{id:h.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})};o.prototype.handleCancelOrderDuplication=function(){var o;this.placedOrderInfo=null;if(this.isLegacyCheckout){var e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}void this.closeDialogHandler({confirmed:true})};o.prototype.attachCheckout=function(){var o=this;var e=R.checkoutSettings.placeOrderButtonSelector;F("attach checkout ".concat(e));if(!e&&!window.Zonos.cartData){return}var t=[e,"#".concat(so),"#".concat(to)].filter(Boolean);var n=document.querySelectorAll(t.join(","));n.forEach((function(t){var n=t.getAttribute("data-zonos-checkout-attached");if(n){return}F("attached event to button ".concat(e),"info",{button:t});t.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,t,n,s,i;return __generator(this,(function(r){switch(r.label){case 0:if(!window.Zonos.isLegacyCheckout&&(!lo()||uo())){return[2]}e.preventDefault();e.stopPropagation();F("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:e.target})];case 1:t=r.sent().shouldAllowOrder;if(!t){return[2]}f.isFetchingSession=true;this.open=true;r.label=2;case 2:r.trys.push([2,5,,6]);return[4,this.buildCartAndInit()];case 3:n=r.sent();if(this.isCartExpired){throw new Error("This shopping cart is expired")}if(!n){throw new Error("Error building cart")}w({isPreview:this.preview,sessionTimeout:ko});return[4,ao()];case 4:s=r.sent().enabled;h.shouldHideDiscountInput=!s;L("zonos-checkout-start");void b("checkout_open");this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void vo()}return[3,6];case 5:i=r.sent();f.isFetchingSession=false;Z(i);if(this.isCartExpired){return[2]}void G({endpoint:"Error creating Checkout",errors:[i instanceof Error?i.toString():"Unknown error"],metadata:{allLogs:q,cartId:window.Zonos.cartId,checkoutSessionBody:y(),href:window.location.href,storeBaseUrl:(o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl}});C({messages:[x("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:x("Error creating Checkout")});return[3,6];case 6:return[2]}}))}))}),{capture:true,passive:false});if(!R.checkoutSettings.disablePlaceOrderButtonActivation){t.removeAttribute("disabled")}t.setAttribute("data-zonos-checkout-attached","true");if(t.matches(so)){t.dispatchEvent(X("click"));a();t.remove()}if(t.matches("#".concat(to))){t.dispatchEvent(X("click"));t.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.useShippingDataFromCreateCartId=function(o){if(!o){return}F("shipping data from createCartId result","info",Object.entries(o));var e=o.customerAddress1,t=o.customerAddress2,n=o.customerCity,s=o.customerCountry,r=o.customerEmail,c=o.customerName,a=o.customerPhone,u=o.customerState,d=o.customerZip;var l=new URLSearchParams(window.location.search);var h=s||_(l)||i.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:n,customerCountry:h,customerEmail:r,customerName:c,customerPhone:a,customerState:u,customerZip:d})};o.prototype.useLegacyQueryParams=function(){var o=new URLSearchParams(window.location.search);F("legacy urlParams","info",Object.fromEntries(o.entries()));var e=function(e){var t=o.get(e);if(!t||t==="undefined"){return null}return t};var t=_(o)||i.selectedCountryCode;var n=e("customerCity");var s=e("customerEmail");var r=e("customerAddress1");var c=e("customerAddress2");var a=e("customerName");var u=e("customerPhone");var d=e("customerZip");var l=e("customerState");this.applyPrefillAddress({customerAddress1:r,customerAddress2:c,customerCity:n,customerCountry:t,customerEmail:s,customerName:a,customerPhone:u,customerState:l,customerZip:d})};o.prototype.applyPrefillAddress=function(o){var e=o.customerAddress1||"";var t=o.customerCountry||"";var n=o.customerAddress2||"";var s=o.customerCity||"";var i=o.customerEmail||"";var r=o.customerName||"";var c=o.customerPhone||"";var a=o.customerZip||"";var u=o.customerState||"";if(!e||!r||!c||!t){F("Missing required query params so it can not be prefilled","info",[!e&&"line1",!r&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}this.defaultAddressParams={address:{city:s||"",country:t,line1:e,line2:n,postal_code:a,state:u},email:i,name:r,phone:c};F("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})};o.prototype.overrideStagingModeChanged=function(){h.isStagingMode=!!this.overrideStagingMode};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){f.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;h.isStagingMode=Y();if(typeof this.overrideStagingMode!=="undefined"){h.isStagingMode=this.overrideStagingMode}ho({domesticRedirectedBtnSelector:so,onShippingAddressSessionFound:function(o){e.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});if(window.Zonos){this.useLegacyQueryParams()}o=setInterval((function(){f.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){F("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(o);return}F("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){e.attachCheckout()}else if(window){e.attachCheckout();var t=new MutationObserver((function(){e.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(o)}),50);setTimeout((function(){clearInterval(o)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){h.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.mockCheckoutSession=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){S(o);return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.submitLoading=true;return[4,A()];case 1:t.sent();o=setInterval((function(){if(h.landedCostData||!f.isFetchingLandedCost){if(h.landedCostData){void D({currency:h.currency});O()}e.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){O();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleInventoryCheckDialogConfirm=function(){h.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};o.prototype.handleCartExpiredDialogConfirm=function(){var o;this.isCartExpired=false;if(this.isLegacyCheckout){var e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.storeBaseUrl;if(!e){return}if(window.parent){window.parent.location.href=e}window.location.href=e;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(n){switch(n.label){case 0:N.paypalErrorMessage=null;f.hasPaymentError=false;this.submitLoading=true;h.inventoryCheckErrorMessage=null;n.label=1;case 1:n.trys.push([1,3,,4]);o=h;return[4,I()];case 2:o.inventoryCheckErrorMessage=n.sent();return[3,4];case 3:e=n.sent();h.inventoryCheckErrorMessage=x("Unable to check inventory. Please try again.");return[3,4];case 4:if(h.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}n.label=5;case 5:n.trys.push([5,7,,8]);return[4,T()];case 6:n.sent();O();p();return[3,8];case 7:t=n.sent();Z(t);L("zonos-checkout-payment-fail");f.hasPaymentError=true;if(f.shouldInventoryRefund){void j();f.shouldInventoryRefund=false}return[3,8];case 8:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t,n;return __generator(this,(function(s){switch(s.label){case 0:P();if(!this.preview)return[3,2];h.step="customer-info";return[4,this.init()];case 1:s.sent();return[2];case 2:v();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){o=window.Zonos.cartData.storeBaseUrl;if(window.parent){window.parent.location.href=o}window.location.href=o;return[2]}e=window.location.href;t=e.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=J(this.mobile);void this.applyStripeTheme();F("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=J(this.mobile);void this.applyStripeTheme();F("mobile: ".concat(this.isMobile))};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=U(this.appearanceSettingsOverride.theme)}};o.prototype.handleAddressChange=function(){P()};o.prototype.handleClientSecretChange=function(){void this.applyStripeTheme()};o.prototype.handleOpenChange=function(){var o="data-zonos-overflow-origin";var e=document.body;var t=document.documentElement;if(this.open){if(e.style.overflow){e.setAttribute(o,e.style.overflow)}e.style.overflow="hidden";if(t.style.overflow){t.setAttribute(o,t.style.overflow)}t.style.overflow="hidden"}else{var n=e.getAttribute(o);var s=t.getAttribute(o);if(n){e.removeAttribute(o);e.style.overflow=n}else{e.style.removeProperty("overflow")}if(s){t.removeAttribute(o);t.style.overflow=s}else{t.style.removeProperty("overflow")}}};o.prototype.componentWillLoad=function(){var o=this;void this.init();this.isMobile=J(this.mobile);this.isIframed=window.self!==window.top;F("iframed: ".concat(this.isIframed));this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=E("selectedLocale",(function(){void o.applyStripeTheme()}));F("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){P();v();this.onChangeLocaleListener()};o.prototype.render=function(){var o=this;var e,r,c,a;this.clientSecret=f.clientSecret;var u=h.step!=="finish"&&h.step!=="error"&&!f.stripeElements||f.isFetchingSession;var d=M(R.appearance,this.appearanceSettingsOverride||null),l=d.colorPrimary,m=d.colorSecondary,v=d.logoUrl,z=d.style;var p=R.appearance.zonosAttribution==="ENABLED";var g=R.appearance.theme;var k=l&&oo(l)?"DARK":"LIGHT";var w=this.isMobile?g:k;var b=!this.isMobile?m:undefined;var y=i.customMessages;var C=(e=y.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var _=this.getCurrentLocalePageEnum();var S=y.filter((function(o){return o.pageName===_}));var A=function(){var e=o.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},e&&t("img",{alt:"".concat(R.organizationName," logo"),src:e}))};var O=K();var I=function(){var e=new URLSearchParams(window.location.search);var n=e.get("zonosQaUrl");var s=e.get("zonosDebug");var i=e.get("zonosE2ETest");var r=o.overrideStagingMode||Y();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},A(),O&&t("zonos-badge",{badgeColor:"orange",size:"small"},x("Test mode")),r&&t("zonos-badge",{badgeColor:"red",size:"small"},x("Staging mode")),s==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:o.isMobile?"--zonos-elements-gray-0":null}),S.map((function(o){return t("zonos-custom-message",{icon:zo,message:o.message})})))};var T=function(){if(h.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:x("Your checkout session has expired. Please reload the page to continue."),restStateTitle:x("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return o.reloadCheckoutSession()},variant:"primary"},x("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":$({overrideBorderStyle:z})}},h.step!=="finish"&&h.step!=="error"&&t(s,null,t("div",{class:"zonos--left","data-theme":w,style:eo({"--zonos--primary-color":!o.isMobile?l:undefined})},!o.isMobile&&I(),h.step==="customer-info"&&t("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress||o.defaultAddressParams,isMobile:o.isMobile,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:b}),h.step==="shipping"&&t("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:b}),h.step==="payment"&&t("zonos-checkout-payment",{continueLoading:o.submitLoading,isMobile:o.isMobile,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))},submitBtnColor:b})),t("div",{class:"zonos--right","data-theme":g},o.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!o.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:io}),noBackground:true,onClick:function(){return o.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),t("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},t("zonos-cart-items",null),o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:b}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:zo,message:C})))),t("zonos-cart-restricted-items",null),!o.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:zo,message:C}))))),(h.step==="finish"||h.step==="error")&&t("div",{class:"zonos--done","data-theme":g},t("div",{class:"zonos--header"},A(),!o.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:io}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:g})),t("zonos-checkout-finish",{borderRadius:z,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:h.step==="error"&&!!h.error?Object.assign(Object.assign({},h.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":g,mobile:o.isMobile,slot:!o.isMobile?"dialog-footer":undefined}))};return t(n,{class:Q(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?T():t("zonos-dialog",{borderStyle:z,"data-theme":g,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},T()),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:x("Don't close"),dialogConfirmBtnText:x("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:x("Would you like to close checkout and return to the site?"),dialogTitle:x("Are you sure?"),onCancelClicked:function(){o.confirmDialogOpen=false},onConfirmClicked:function(){return o.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:x("Return to merchant site"),dialogConfirmBtnText:x("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((r=this.placedOrderInfo)===null||r===void 0?void 0:r.zonosOrderNumber)?x("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):x("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((c=this.placedOrderInfo)===null||c===void 0?void 0:c.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:x("Are you sure?"),dialogWidth:530,onCancelClicked:function(){o.handleCancelOrderDuplication()},onConfirmClicked:function(){o.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:x("Return to cart"),dialogIntent:"danger",dialogOpen:!!h.inventoryCheckErrorMessage,dialogSubtitle:h.inventoryCheckErrorMessage,dialogTitle:x("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return o.handleInventoryCheckDialogConfirm()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:x("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:x("You are being sent back to the shop to re-add items to your cart."),dialogTitle:x("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return o.handleCartExpiredDialogConfirm()}}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],clientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return o}());bo.style=go}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-32912caf.system.js","./p-eb192fa3.system.js","./p-23e7c655.system.js","./p-18e5b741.system.js","./p-bc7bf53e.system.js","./p-12546668.system.js","./p-c015be06.system.js"],(function(e){"use strict";var o,t,n,i,r,s,l,a,h,d,u,f,c,v,w,m,g,p,z,b,x,y,k,_;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){i=e._;r=e.e;s=e.i;l=e.f;a=e.z;h=e.g;d=e.m},function(e){u=e.l;f=e.E;c=e.r;v=e.u;w=e.G;m=e.H;g=e.I;p=e.J;z=e.K},function(e){b=e.c},function(e){x=e.h;y=e.b;k=e.l},function(e){_=e.g},function(){},function(){}],execute:function(){var L=this;var T=i;var O=function(){return T.Date.now()};var E=O;var S=/\s/;function j(e){var o=e.length;while(o--&&S.test(e.charAt(o))){}return o}var I=j;var D=I;var X=/^\s+/;function C(e){return e?e.slice(0,D(e)+1).replace(X,""):e}var A=C;var B=r,M=s;var R="[object Symbol]";function F(e){return typeof e=="symbol"||M(e)&&B(e)==R}var H=F;var N=A,P=l,W=H;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var G=/^0b[01]+$/i;var K=/^0o[0-7]+$/i;var Y=parseInt;function q(e){if(typeof e=="number"){return e}if(W(e)){return $}if(P(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=P(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=N(e);var t=G.test(e);return t||K.test(e)?Y(e.slice(2),t?2:8):U.test(e)?$:+e}var J=q;var Q=l,V=E,Z=J;var ee="Expected a function";var oe=Math.max,te=Math.min;function ne(e,o,t){var n,i,r,s,l,a,h=0,d=false,u=false,f=true;if(typeof e!="function"){throw new TypeError(ee)}o=Z(o)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oe(Z(t.maxWait)||0,o):r;f="trailing"in t?!!t.trailing:f}function c(o){var t=n,r=i;n=i=undefined;h=o;s=e.apply(r,t);return s}function v(e){h=e;l=setTimeout(g,o);return d?c(e):s}function w(e){var t=e-a,n=e-h,i=o-t;return u?te(i,r-n):i}function m(e){var t=e-a,n=e-h;return a===undefined||t>=o||t<0||u&&n>=r}function g(){var e=V();if(m(e)){return p(e)}l=setTimeout(g,w(e))}function p(e){l=undefined;if(f&&n){return c(e)}n=i=undefined;return s}function z(){if(l!==undefined){clearTimeout(l)}h=0;n=a=i=l=undefined}function b(){return l===undefined?s:p(V())}function x(){var e=V(),t=m(e);n=arguments;i=this;a=e;if(t){if(l===undefined){return v(a)}if(u){clearTimeout(l);l=setTimeout(g,o);return c(a)}}if(l===undefined){l=setTimeout(g,o)}return s}x.cancel=z;x.flush=b;return x}var ie=ne;var re=function(e){return __awaiter(L,[e],void 0,(function(e){var o,t,n,i,r;var s=e.items,l=e.shipFrom,a=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,x("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=e.sent(),i=n.errors,r=n.json;if(i.length||!r){y("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var se=function(e){return __awaiter(L,void 0,void 0,(function(){var o,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!e.length){return[2,[]]}o=u.selectedCountryCode;if(!o){y("Hello could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,re({items:t,shipFrom:"AD",shipTo:o})];case 1:n=r.sent();i=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2,i]}}))}))};var le=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var ae=function(){var e=a.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,i=e.productListUrlPattern;if(le(o)){return"cart"}if(le(n)){return"productDetail"}if(le(i)){return"productList"}if(le(t)){return"home"}return""};var he=function(){var e,o;var t=a.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){y("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&f(r)&&document.querySelectorAll(r)||[];var h=i&&f(i)&&document.querySelectorAll(i)||[];if(l.length!==h.length){y("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&f(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var v=0;v<l.length;v++){var w=l[v];var m=h[v];var g=u[v];if(w&&m){var p={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=w.textContent)===null||o===void 0?void 0:o.trim())||""};c.push(p)}}return c};var de=":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}: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}}: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(--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;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;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:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));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 6px;padding-right:16px;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{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;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% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ue=de;var fe=3e3;var ce=e("zonos_hello",function(){function e(e){var t=this;o(this,e);this.getHelloPeekMessage=function(e){var o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=c("click to learn more");var i=a.currentHelloPage==="productDetail"?c("Restricted item"):c("Restricted items found");return"".concat(i," - ").concat(n)}switch(a.currentHelloPage){case"cart":return c("Prepay duties and taxes at checkout");case"productList":case"productDetail":return c("See duty and tax thresholds");default:return c("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(!o||a.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,se(e)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(a.organizationName);var e=a.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;var i=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){t.showPeekMessage=false}),fe)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var i=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(i){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=he();e=this.productsOnPage.filter((function(e){return!i.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=r.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=ie((function(){var e=a.helloSettings.productTitleElementSelector;if(e){var o=he();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&v(e.searchParams);if(o!==u.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;a.currentHelloPage=ae();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){w(u.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&e==="relative"){var o=_(t.helloRef);return o}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!u.localizationLoaded){return false}var o=a.helloSettings.showForCountries;if(e){if(!u.isShippableCountry){k("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return u.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.includes(u.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=a.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false}e.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,u.helloCountryList]}))}))};e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(a.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(a.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!u.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}m();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,g(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,p(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,z({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(u.selectedCountryCode&&typeof a.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=a.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.getHelloLocation=function(){var e=this.mobileLocationOverride||a.helloSettings.mobileLocation;var o=a.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"));var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!e}}default:case!t:{var r=!a.helloSettings.anchorElementSelector&&!!o;var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"))||this.shouldAnimateLeftDesktop();var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme)}};e.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};e.prototype.render=function(){var e=this;var o,i;var r=(o=a.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return e&&new RegExp(e).test(window.location.href)}));if(r){k("Hello is excluded on this url","warn");return null}var s=u.selectedCountryCode,l=u.targetCurrency;var h=this.getHelloLocation(),f=h.isOnLeft,c=h.isOnTop,v=h.shouldFloat;var w=d(a.appearance,this.appearanceSettingsOverride||null);var m=w.theme;var g=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(a.organizationName);var p=this.shouldRenderHello()&&!!s;if(p&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:s,currencyCode:l})}return t(n,{class:"zonos--hello zonos--elements","data-theme":m},p&&t("div",{class:b(["zonos--hello-wrapper",v&&"zonos--hello-widget-float"])},t("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",f&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",v&&"zonos--hello-widget-float"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",v&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:w,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}());ce.style=ue}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(o){return a([e,o])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=o.call(e,t)}catch(e){l=[6,e];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-fb2a884f.system.js","./p-bba01622.system.js","./p-23e7c655.system.js","./p-18e5b741.system.js","./p-bc7bf53e.system.js","./p-972261dc.system.js","./p-532afee0.system.js"],(function(e){"use strict";var o,t,n,i,r,s,l,a,h,d,u,f,c,v,w,m,g,p,z,b,x,y,k,_;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){i=e._;r=e.e;s=e.i;l=e.f;a=e.z;h=e.g;d=e.m},function(e){u=e.l;f=e.E;c=e.r;v=e.u;w=e.G;m=e.H;g=e.I;p=e.J;z=e.K},function(e){b=e.c},function(e){x=e.h;y=e.b;k=e.l},function(e){_=e.g},function(){},function(){}],execute:function(){var L=this;var T=i;var O=function(){return T.Date.now()};var E=O;var S=/\s/;function j(e){var o=e.length;while(o--&&S.test(e.charAt(o))){}return o}var I=j;var D=I;var X=/^\s+/;function C(e){return e?e.slice(0,D(e)+1).replace(X,""):e}var A=C;var B=r,M=s;var R="[object Symbol]";function F(e){return typeof e=="symbol"||M(e)&&B(e)==R}var H=F;var N=A,P=l,W=H;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var G=/^0b[01]+$/i;var K=/^0o[0-7]+$/i;var Y=parseInt;function q(e){if(typeof e=="number"){return e}if(W(e)){return $}if(P(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=P(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=N(e);var t=G.test(e);return t||K.test(e)?Y(e.slice(2),t?2:8):U.test(e)?$:+e}var J=q;var Q=l,V=E,Z=J;var ee="Expected a function";var oe=Math.max,te=Math.min;function ne(e,o,t){var n,i,r,s,l,a,h=0,d=false,u=false,f=true;if(typeof e!="function"){throw new TypeError(ee)}o=Z(o)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oe(Z(t.maxWait)||0,o):r;f="trailing"in t?!!t.trailing:f}function c(o){var t=n,r=i;n=i=undefined;h=o;s=e.apply(r,t);return s}function v(e){h=e;l=setTimeout(g,o);return d?c(e):s}function w(e){var t=e-a,n=e-h,i=o-t;return u?te(i,r-n):i}function m(e){var t=e-a,n=e-h;return a===undefined||t>=o||t<0||u&&n>=r}function g(){var e=V();if(m(e)){return p(e)}l=setTimeout(g,w(e))}function p(e){l=undefined;if(f&&n){return c(e)}n=i=undefined;return s}function z(){if(l!==undefined){clearTimeout(l)}h=0;n=a=i=l=undefined}function b(){return l===undefined?s:p(V())}function x(){var e=V(),t=m(e);n=arguments;i=this;a=e;if(t){if(l===undefined){return v(a)}if(u){clearTimeout(l);l=setTimeout(g,o);return c(a)}}if(l===undefined){l=setTimeout(g,o)}return s}x.cancel=z;x.flush=b;return x}var ie=ne;var re=function(e){return __awaiter(L,[e],void 0,(function(e){var o,t,n,i,r;var s=e.items,l=e.shipFrom,a=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,x("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=e.sent(),i=n.errors,r=n.json;if(i.length||!r){y("Error fetching item restrictions: ".concat((o=i.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var se=function(e){return __awaiter(L,void 0,void 0,(function(){var o,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!e.length){return[2,[]]}o=u.selectedCountryCode;if(!o){y("Hello could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,re({items:t,shipFrom:"AD",shipTo:o})];case 1:n=r.sent();i=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2,i]}}))}))};var le=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var ae=function(){var e=a.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,i=e.productListUrlPattern;if(le(o)){return"cart"}if(le(n)){return"productDetail"}if(le(i)){return"productList"}if(le(t)){return"home"}return""};var he=function(){var e,o;var t=a.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){y("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&f(r)&&document.querySelectorAll(r)||[];var h=i&&f(i)&&document.querySelectorAll(i)||[];if(l.length!==h.length){y("Hello could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&f(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var v=0;v<l.length;v++){var w=l[v];var m=h[v];var g=u[v];if(w&&m){var p={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=w.textContent)===null||o===void 0?void 0:o.trim())||""};c.push(p)}}return c};var de=":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}: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}}: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(--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;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;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:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));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 6px;padding-right:16px;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{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;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% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ue=de;var fe=3e3;var ce=e("zonos_hello",function(){function e(e){var t=this;o(this,e);this.getHelloPeekMessage=function(e){var o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=c("click to learn more");var i=a.currentHelloPage==="productDetail"?c("Restricted item"):c("Restricted items found");return"".concat(i," - ").concat(n)}switch(a.currentHelloPage){case"cart":return c("Prepay duties and taxes at checkout");case"productList":case"productDetail":return c("See duty and tax thresholds");default:return c("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=a.currentHelloPage==="productDetail"||a.currentHelloPage==="productList";if(!o||a.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,se(e)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(a.organizationName);var e=a.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;var i=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){t.showPeekMessage=false}),fe)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var i=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(i){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=he();e=this.productsOnPage.filter((function(e){return!i.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=r.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=ie((function(){var e=a.helloSettings.productTitleElementSelector;if(e){var o=he();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&v(e.searchParams);if(o!==u.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;a.currentHelloPage=ae();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){w(u.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&e==="relative"){var o=_(t.helloRef);return o}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!u.localizationLoaded){return false}var o=a.helloSettings.showForCountries;if(e){if(!u.isShippableCountry){k("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return u.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.includes(u.selectedCountryCode||"")};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=a.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false}e.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,u.helloCountryList]}))}))};e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(a.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(a.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!u.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}m();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,g(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,p(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,z({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(u.selectedCountryCode&&typeof a.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=a.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.getHelloLocation=function(){var e=this.mobileLocationOverride||a.helloSettings.mobileLocation;var o=a.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"));var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!e}}default:case!t:{var r=!a.helloSettings.anchorElementSelector&&!!o;var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"))||this.shouldAnimateLeftDesktop();var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme)}};e.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};e.prototype.render=function(){var e=this;var o,i;var r=(o=a.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return e&&new RegExp(e).test(window.location.href)}));if(r){k("Hello is excluded on this url","warn");return null}var s=u.selectedCountryCode,l=u.targetCurrency;var h=this.getHelloLocation(),f=h.isOnLeft,c=h.isOnTop,v=h.shouldFloat;var w=d(a.appearance,this.appearanceSettingsOverride||null);var m=w.theme;var g=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(a.organizationName);var p=this.shouldRenderHello()&&!!s;if(p&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:s,currencyCode:l})}return t(n,{class:"zonos--hello zonos--elements","data-theme":m},p&&t("div",{class:b(["zonos--hello-wrapper",v&&"zonos--hello-widget-float"])},t("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",f&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",v&&"zonos--hello-widget-float"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",v&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:w,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}());ce.style=ue}}}));
@@ -1 +1 @@
1
- import{r as o,h as s,a as t,H as e}from"./p-ab68ad11.js";import{d as a}from"./p-b0616716.js";import{c as r}from"./p-b4b7f705.js";const i=class{constructor(s){o(this,s),this.theme="LIGHT",this.width="auto"}render(){const o="DARK"===this.theme?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return s(e,{key:"00a2d8c27b70f329813b6a3c1547c82b2e7cf725",class:r(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":a(),"--zonos--width":this.width}},s("img",{key:"e994199d3178a1198a1f0a1b132fae75bef47ce7",alt:"Zonos Logo",src:t("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};i.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";export{i as zonos_logo}
1
+ import{r as o,h as s,a as t,H as e}from"./p-ab68ad11.js";import{d as a}from"./p-c285d20c.js";import{c as r}from"./p-b4b7f705.js";const i=class{constructor(s){o(this,s),this.theme="LIGHT",this.width="auto"}render(){const o="DARK"===this.theme?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return s(e,{key:"00a2d8c27b70f329813b6a3c1547c82b2e7cf725",class:r(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":a(),"--zonos--width":this.width}},s("img",{key:"e994199d3178a1198a1f0a1b132fae75bef47ce7",alt:"Zonos Logo",src:t("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};i.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";export{i as zonos_logo}
@@ -1 +1 @@
1
- import{r as o,h as e,H as s}from"./p-ab68ad11.js";import{d as n}from"./p-b0616716.js";import{c as r}from"./p-b4b7f705.js";const t=class{constructor(e){o(this,e),this.bold=!1,this.badgeColor="gray",this.icon=void 0,this.iconRight=!1,this.size="default",this.rounded=!1,this.loading=!1,this.dismissHandler=void 0}render(){return e(s,{key:"d8a6a11f10c36a272ecdb52c54919f9ad45e1a9a",class:r(["zonos--elements zonos--badge"]),style:{"--zonos--font-family":n()}},e("div",{key:"c7573446a478f9b9e45a4787593ba9ecaf595fdc",class:r(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,e("zonos-text",{key:"578f7cf2f27be3306fc7c776dc82a7a324a8b3ca",textColor:`${this.badgeColor}-800`},e("slot",{key:"0b59f674e40454dcf07bea704f38c9df7d68cb43"})),this.dismissHandler&&e("zonos-icon",{key:"ff4e2ee7511940df9ec27830e406502d7acf5209","aria-label":"Remove action",class:"zonos--badge-dismiss",content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>\n</svg>\n',onClick:()=>{var o;return null===(o=this.dismissHandler)||void 0===o?void 0:o.call(this)}})))}};t.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}:host .zonos--badge-dismiss{cursor:pointer}";export{t as zonos_badge}
1
+ import{r as o,h as e,H as s}from"./p-ab68ad11.js";import{d as n}from"./p-c285d20c.js";import{c as r}from"./p-b4b7f705.js";const t=class{constructor(e){o(this,e),this.bold=!1,this.badgeColor="gray",this.icon=void 0,this.iconRight=!1,this.size="default",this.rounded=!1,this.loading=!1,this.dismissHandler=void 0}render(){return e(s,{key:"d8a6a11f10c36a272ecdb52c54919f9ad45e1a9a",class:r(["zonos--elements zonos--badge"]),style:{"--zonos--font-family":n()}},e("div",{key:"c7573446a478f9b9e45a4787593ba9ecaf595fdc",class:r(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,e("zonos-text",{key:"578f7cf2f27be3306fc7c776dc82a7a324a8b3ca",textColor:`${this.badgeColor}-800`},e("slot",{key:"0b59f674e40454dcf07bea704f38c9df7d68cb43"})),this.dismissHandler&&e("zonos-icon",{key:"ff4e2ee7511940df9ec27830e406502d7acf5209","aria-label":"Remove action",class:"zonos--badge-dismiss",content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>\n</svg>\n',onClick:()=>{var o;return null===(o=this.dismissHandler)||void 0===o?void 0:o.call(this)}})))}};t.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}:host .zonos--badge-dismiss{cursor:pointer}";export{t as zonos_badge}
@@ -1 +1 @@
1
- import{r as e,h as s,H as o}from"./p-ab68ad11.js";import{d as a}from"./p-b0616716.js";import{c as t}from"./p-b4b7f705.js";import{g as r}from"./p-e02fd9ae.js";const d=class{constructor(s){e(this,s),this.actions=void 0,this.backgroundColor=void 0,this.borderRadius=6,this.footerActions=void 0,this.footerContent=void 0,this.footerHeight=void 0,this.label=void 0,this.spacing="24px"}render(){const e=this.backgroundColor?`var(--zonos-elements-${this.backgroundColor})`:"transparent",d=r({customRoundRadius:`${this.borderRadius}px`,overrideBorderStyle:"ROUNDED"});return s(o,{key:"d1a2b02f3d33492fc76bd88cf92e68bf1603cbd0",style:{"--zonos--font-family":a()}},s("div",{key:"0c9acee7938dc95d1f6267dff6fa399bd8a65b95",class:t(["styled-card"]),style:{"--zonos--background-color":e,"--zonos--border-radius":d,padding:this.spacing}},this.label&&s("header",{key:"2559a7fd78c4c4a97ce466e0eefbc4db8409c97f",class:"card-header",style:{padding:this.spacing}},s("zonos-text",{key:"287e0e64461cb5206a653711346fd8eb62524a00",type:"subheader"},this.label),s("h-stack",{key:"9ac80b9c555a93232bbcdd0e1769a4b78ded2fa8",spacing:8},this.actions)),s("slot",{key:"3342bd7f5d2af58740c49d353f311ce1c4101f13"}),(this.footerActions||this.footerContent)&&s("footer",{key:"dee65ea527dfac5821ece452426e2d33f127e356",class:"card-footer",style:{height:this.footerHeight?`${this.footerHeight}px`:"auto",padding:this.spacing}},s("div",{key:"13a23726ada09eb39783ea261b760cbe83587f5b"},this.footerContent),s("h-stack",{key:"1389bcbce376431f3008669e9f55a69b0a177d85",spacing:8},this.footerActions))))}};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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";export{d as zonos_card}
1
+ import{r as e,h as s,H as o}from"./p-ab68ad11.js";import{d as a}from"./p-c285d20c.js";import{c as t}from"./p-b4b7f705.js";import{g as r}from"./p-86da894d.js";const d=class{constructor(s){e(this,s),this.actions=void 0,this.backgroundColor=void 0,this.borderRadius=6,this.footerActions=void 0,this.footerContent=void 0,this.footerHeight=void 0,this.label=void 0,this.spacing="24px"}render(){const e=this.backgroundColor?`var(--zonos-elements-${this.backgroundColor})`:"transparent",d=r({customRoundRadius:`${this.borderRadius}px`,overrideBorderStyle:"ROUNDED"});return s(o,{key:"d1a2b02f3d33492fc76bd88cf92e68bf1603cbd0",style:{"--zonos--font-family":a()}},s("div",{key:"0c9acee7938dc95d1f6267dff6fa399bd8a65b95",class:t(["styled-card"]),style:{"--zonos--background-color":e,"--zonos--border-radius":d,padding:this.spacing}},this.label&&s("header",{key:"2559a7fd78c4c4a97ce466e0eefbc4db8409c97f",class:"card-header",style:{padding:this.spacing}},s("zonos-text",{key:"287e0e64461cb5206a653711346fd8eb62524a00",type:"subheader"},this.label),s("h-stack",{key:"9ac80b9c555a93232bbcdd0e1769a4b78ded2fa8",spacing:8},this.actions)),s("slot",{key:"3342bd7f5d2af58740c49d353f311ce1c4101f13"}),(this.footerActions||this.footerContent)&&s("footer",{key:"dee65ea527dfac5821ece452426e2d33f127e356",class:"card-footer",style:{height:this.footerHeight?`${this.footerHeight}px`:"auto",padding:this.spacing}},s("div",{key:"13a23726ada09eb39783ea261b760cbe83587f5b"},this.footerContent),s("h-stack",{key:"1389bcbce376431f3008669e9f55a69b0a177d85",spacing:8},this.footerActions))))}};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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";export{d as zonos_card}