https://shapeworld.com/cdn/shop/t/81/assets/cart-notification.min.js?v=13646567967628883621666706281
1class CartNotification extends HTMLElement{constructor(){super();this.notification=document.getElementById("cart-notification");this.header=document.querySelector("sticky-header");this.onBodyClick=this.handleBodyClick.bind(this);this.notification.addEventListener("keyup",a=>"Escape"===a.code&&this.close());this.querySelectorAll('button[type="button"]').forEach(a=>a.addEventListener("click",this.close.bind(this)))}open(){this.notification.classList.add("animate","active");this.notification.addEventListener("transitionend", 2()=>{this.notification.focus();trapFocus(this.notification)},{once:!0});document.body.addEventListener("click",this.onBodyClick)}close(){this.notification.classList.remove("active");document.body.removeEventListener("click",this.onBodyClick);removeTrapFocus(this.activeElement)}renderContents(a){this.productId=a.id;this.getSectionsToRender().forEach(b=>{document.getElementById(b.id).innerHTML=this.getSectionInnerHTML(a.sections[b.id],b.selector)});this.header&&this.header.reveal();this.open()}getSectionsToRender(){return[{id:"cart-notification-product", 3selector:`#cart-notification-product-${this.productId}`},{id:"cart-notification-button"},{id:"cart-icon-bubble"}]}getSectionInnerHTML(a,b=".shopify-section"){return(new DOMParser).parseFromString(a,"text/html").querySelector(b).innerHTML}handleBodyClick(a){a=a.target;a===this.notification||a.closest("cart-notification")||(this.activeElement=(a=a.closest("details-disclosure"))?a.querySelector("summary"):null,this.close())}setActiveElement(a){this.activeElement=a}} 4customElements.define("cart-notification",CartNotification);
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.