PageSourceSearch

https://youpickwemix.com.au/cdn/shop/t/15/assets/cart-drawer.js?v=174769205598737708971779652416

js youpickwemix.com.au collected 2026-10-08 17:36:09 UTC 4,136 bytes, 1 lines download raw bytes

1class CartDrawer extends HTMLElement{constructor(){super(),this.addEventListener("keyup",e=>"Escape"===e.code&&this.close()),this.querySelector("#CartDrawer-Overlay").addEventListener("click",this.close.bind(this)),this.checkoutButton=this.querySelector(".cart__checkout-button"),this.setHeaderCartIconAccessibility(),this.checkoutButton?.addEventListener("click",this.cartFormSubmit.bind(this))}cartFormSubmit(e){e.target.classList.add("loading"),e.target.setAttribute("aria-disabled","true"),e.target.querySelector(".loading__spinner")?.classList.remove("hidden"),setTimeout(()=>{e.target.classList.remove("loading"),e.target.setAttribute("aria-disabled","false"),e.target.querySelector(".loading__spinner")?.classList.add("hidden")},3e3)}setHeaderCartIconAccessibility(){const e=document.querySelector("#cart-icon-bubble");e&&"drawer"==e.dataset.type&&(e.setAttribute("role","button"),e.setAttribute("aria-haspopup","dialog"),e.addEventListener("click",t=>{t.preventDefault(),this.open(e)}),e.addEventListener("keydown",t=>{"SPACE"===t.code.toUpperCase()&&(t.preventDefault(),this.open(e))}))}open(e){if(document.querySelector("cart-order-summary")?.stickyBlock(),"drawer"!=this.dataset.type)return;e&&this.setActiveElement(e);const t=this.querySelector('[id^="Details-"] summary');t&&!t.hasAttribute("role")&&this.setSummaryAccessibility(t),setTimeout(()=>{this.classList.add("animate","active")}),this.addEventListener("transitionend",()=>{const 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(e,t=!0){this.querySelector(".drawer__inner").classList.contains("is-empty")&&this.querySelector(".drawer__inner").classList.remove("is-empty"),this.productId=e.id,this.getSectionsToRender().forEach(t=>{const r=t.selector?document.querySelector(t.selector):document.getElementById(t.id);r&&(r.innerHTML=this.getSectionInnerHTML(e.sections[t.id],t.selector))}),t&&setTimeout(()=>{this.querySelector("#CartDrawer-Overlay").addEventListener("click",this.close.bind(this)),this.data=Debutify.variables.widgets.dbtfy_skip_cart.enabled,0==this.data&&this.open()})}getSectionInnerHTML(e,t=".shopify-section"){return(new DOMParser).parseFromString(e,"text/html").querySelector(t).innerHTML}getSectionsToRender(){return[{id:Debutify.cart_drawer_id,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:Debutify.cart_drawer_id,selector:".drawer__inner"},{id:"cart-icon-bubble",section:"cart-icon-bubble",selector:".shopify-section"}]}}customElements.define("cart-drawer-items",CartDrawerItems);class CartOrderSummary extends HTMLElement{constructor(){super()}connectedCallback(){const e=this;document.addEventListener("DOMContentLoaded",function(){e.stickyBlock()})}stickyBlock(){const e=this;setTimeout(function(){if(Debutify.widgets["cart-order-summary"].sticky_block){const t=e.offsetHeight;e.classList.add("sticky-block"),e.style.setProperty("--sticky-block-height",`${t}px`),document.querySelector(".cart-drawer").style.setProperty("--sticky-block-height",`${t}px`),0!=t||document.body.classList.contains("empty-cart")||e.stickyBlock()}},500)}}customElements.define("cart-order-summary",CartOrderSummary);

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.