1/* 2Generated time: June 22, 2024 11:15 3This file was created by the app developer. Feel free to contact the original developer with any questions. It was minified (compressed) by AVADA. AVADA do NOT own this script. 4*/ 5class CartDrawer extends HTMLElement{constructor(){super(),this.addEventListener("keyup",e=>"Escape"===e.code&&this.close()),this.querySelector("#CartDrawer-Overlay").addEventListener("click",this.handleDrawerClose.bind(this)),this.setHeaderCartIconAccessibility()}handleDrawerClose(){(this.classList.contains("is-empty")||window.confirm("Are you sure, you want to leave"))&&this.close()}setHeaderCartIconAccessibility(){let t=document.querySelector("#cart-icon-bubble");t.setAttribute("role","button"),t.setAttribute("aria-haspopup","dialog"),t.classList.contains("on-cart-page")||(t.addEventListener("click",e=>{e.preventDefault(),this.open(t)}),t.addEventListener("keydown",e=>{"SPACE"===e.code.toUpperCase()&&(e.preventDefault(),this.open(t))}))}open(e){e&&this.setActiveElement(e);e=this.querySelector('[id^="Details-"] summary');e&&!e.hasAttribute("role")&&this.setSummaryAccessibility(e),setTimeout(()=>{this.classList.add("animate","active")}),this.addEventListener("transitionend",()=>{var e=this.classList.contains("is-empty")?this.querySelector(".drawer__inner-empty"):document.getElementById("CartDrawer"),t=this.querySelector(".drawer__inner")||this.querySelector(".drawer__close");trapFocus(e,t)},{once:!0}),document.body.classList.add("overflow-hidden")}close(){this.classList.remove("active"),removeTrapFocus(this.activeElement),document.body.classList.remove("overflow-hidden")}setSummaryAccessibility(e){e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),e.nextElementSibling.getAttribute("id")&&e.setAttribute("aria-controls",e.nextElementSibling.id),e.addEventListener("click",e=>{e.currentTarget.setAttribute("aria-expanded",!e.currentTarget.closest("details").hasAttribute("open"))}),e.parentElement.addEventListener("keyup",onKeyUpEscape)}renderContents(t){this.querySelector(".drawer__inner").classList.contains("is-empty")&&this.querySelector(".drawer__inner").classList.remove("is-empty"),this.productId=t.id,this.getSectionsToRender().forEach(e=>{(e.selector?document.querySelector(e.selector):document.getElementById(e.id)).innerHTML=this.getSectionInnerHTML(t.sections[e.id],e.selector)}),setTimeout(()=>{this.querySelector("#CartDrawer-Overlay").addEventListener("click",this.handleDrawerClose.bind(this)),"cart"!=window.template.location&&this.open()})}getSectionInnerHTML(e,t=".shopify-section"){return(new DOMParser).parseFromString(e,"text/html").querySelector(t).innerHTML}getSectionsToRender(){return[{id:"cart-drawer",selector:"#CartDrawer"},{id:"cart-icon-bubble"}]}getSectionDOM(e,t=".shopify-section"){return(new DOMParser).parseFromString(e,"text/html").querySelector(t)}setActiveElement(e){this.activeElement=e}}customElements.define("cart-drawer",CartDrawer);class CartDrawerItems extends CartItems{getSectionsToRender(){return[{id:"CartDrawer",section:"cart-drawer",selector:".drawer-with-recommendations"},{id:"cart-icon-bubble",section:"cart-icon-bubble",selector:".shopify-section"}]}}customElements.define("cart-drawer-items",CartDrawerItems);class cartReservation extends HTMLElement{constructor(){super(),this.initcartReservation()}initcartReservation(){this.countdownMinutes=this.dataset.countdownTime,this.countdownExpiredText=this.dataset.noReservationText,this.timeEl=this.querySelector(".reserved_time"),this.intervalId=null,this.countdownMinutes&&this.countdownExpiredText&&this.timeEl&&(this.countDownMillSecond=6e4*this.countdownMinutes,sessionStorage.getItem("time")&&(this.countDownMillSecond=Number(sessionStorage.getItem("time"))),this.countDownMilSec=(new Date).getTime()+this.countDownMillSecond,this.initiateCountdownInterval(),this.intervalId=window.setInterval(()=>{this.initiateCountdownInterval()},1e3))}initiateCountdownInterval(){var e=(new Date).getTime(),e=this.countDownMilSec-e,t=Math.floor(e%36e5/6e4),i=Math.floor(e%6e4/1e3);this.timeEl&&(this.timeEl.textContent=t+":"+i),e<0&&(window.clearInterval(this.intervalId),this.innerHTML=`<p class="cart-reserved-notification">${this.countdownExpiredText}</p>`),this.updateSessionStorage(e)}updateSessionStorage(e){sessionStorage.setItem("time",e)}}customElements.define("cart-reservation",cartReservation);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.