PageSourceSearch

https://baudoinlange.com/cdn/shop/t/335/assets/cart.js?v=105538842835327870221790615268

js baudoinlange.com collected 2026-10-04 15:14:36 UTC 2,462 bytes, 2 lines download raw bytes

1class CartRemoveButton extends HTMLElement{constructor(){super(),this.addEventListener("click",event=>{event.preventDefault(),(this.closest("cart-drawer-items")||this.closest("cart-items")).updateQuantity(this.dataset.index,0)})}}customElements.define("cart-remove-button",CartRemoveButton);class CartItems extends HTMLElement{constructor(){super(),this.currentItemCount=Array.from(this.querySelectorAll('[name="updates[]"]')).reduce((total,quantityInput)=>total+parseInt(quantityInput.value),0),this.debouncedOnChange=debounce(event=>{this.onChange(event)},300),this.addEventListener("change",this.debouncedOnChange.bind(this))}onChange(event){this.updateQuantity(event.target.dataset.index,event.target.value,document.activeElement.getAttribute("name"))}getSectionsToRender(){return[{id:`#shopify-section-${document.getElementById("main-cart-items").dataset.id}`,section:document.getElementById("main-cart-items").dataset.id,selector:`#shopify-section-${document.getElementById("main-cart-items").dataset.id}`},{id:"#cart-counter",section:"cart-counter",selector:"#shopify-section-cart-counter"}]}updateQuantity(line,quantity,name){const body=JSON.stringify({line,quantity,sections:this.getSectionsToRender().map(section=>section.section),sections_url:window.location.pathname});fetch(`${routes.cart_change_url}`,{...fetchConfig(),body}).then(response=>response.text()).then(state=>{const parsedState=JSON.parse(state);this.getSectionsToRender().forEach(section=>{const elementToReplace=document.querySelector(section.id);elementToReplace&&(elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector))}),this.updateLiveRegions(line,parsedState.item_count);const lineItem=document.getElementById(`CartItem-${line}`);lineItem&&lineItem.querySelector(`[name="${name}"]`)&&lineItem.querySelector(`[name="${name}"]`).focus()})}getSectionInnerHTML(html,selector){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}updateLiveRegions(line,itemCount){this.currentItemCount===itemCount&&document.querySelectorAll(`[data-line-item-error][data-line="${line}"]`).forEach(error=>{error.innerHTML=window.cartStrings.quantityError.replace("[quantity]",document.querySelector(`[id*="ProductQuantity-${line}"]`).value)}),this.currentItemCount=itemCount}}customElements.define("cart-items",CartItems);
2//# sourceMappingURL=/cdn/shop/t/335/assets/cart.js.map?v=105538842835327870221790615268

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.