1import{EVENTS}from"util.events";class GridViewButtons extends HTMLElement{connectedCallback(){this.abortController=new AbortController,this.viewBtns=this.querySelectorAll(".grid-view-btn"),this.viewBtns.forEach(btn=>{btn.addEventListener("click",this.handleClick.bind(this),{signal:this.abortController.signal})})}disconnectedCallback(){this.abortController.abort()}handleClick(event){const btn=event.currentTarget;this.viewBtns.forEach(el=>{el.classList.remove("is-active")}),btn.classList.add("is-active");const newView=btn.dataset.view;this.dispatchEvent(new CustomEvent(EVENTS.viewChange,{detail:{newView},bubbles:!0})),this.updateAttribute("product_view",newView)}updateAttribute(key,value){return fetch(window.Shopify.routes.root+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:{[key]:value}})}).then(response=>{if(!response.ok)throw response;return response.json()})}}customElements.define("grid-view-buttons",GridViewButtons); 2//# sourceMappingURL=/cdn/shop/t/6/assets/list.filter-grid.view-buttons.js.map?v=31923186262704385171777324148
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.