1document.addEventListener("DOMContentLoaded",function(){if(window.location.href.indexOf("add_product=true")>=0){let ProductForm=document.querySelector(".ProductForm");if(ProductForm){let atc=ProductForm.querySelector('[data-action="add-to-cart"]');if(atc){atc.dispatchEvent(new Event("click",{bubbles:!0}));let new_urlStr=window.location.href.split("?add_product=true")[0];window.history.pushState({},document.title,new_urlStr)}}}initMultiAddressShipping()});function initMultiAddressShipping(){const multiAddressCheckbox=document.getElementById("multi-address-checkbox");multiAddressCheckbox&&multiAddressCheckbox.addEventListener("change",function(){updateCartAttribute("multi_address_shipping",this.checked?"yes":"no")})}function updateCartAttribute(key,value){const data={attributes:{}};data.attributes[key]=value,fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(data)}).then(response=>response.json()).then(cart=>{console.log("Cart attribute updated:",key,"=",value),showAttributeUpdateMessage(value==="yes"?"Multi-address shipping enabled":"Multi-address shipping disabled")}).catch(error=>{console.error("Error updating cart attribute:",error);const checkbox=document.getElementById("multi-address-checkbox");checkbox&&(checkbox.checked=!checkbox.checked)})}function showAttributeUpdateMessage(message){let messageEl=document.getElementById("cart-attribute-message");messageEl||(messageEl=document.createElement("div"),messageEl.id="cart-attribute-message",messageEl.style.cssText=` 2 position: fixed; 3 top: 20px; 4 right: 20px; 5 background-color: #4CAF50; 6 color: white; 7 padding: 12px 16px; 8 border-radius: 4px; 9 font-size: 14px; 10 z-index: 10000; 11 transition: opacity 0.3s ease; 12 `,document.body.appendChild(messageEl)),messageEl.textContent=message,messageEl.style.opacity="1",setTimeout(()=>{messageEl.style.opacity="0",setTimeout(()=>{messageEl.parentNode&&messageEl.parentNode.removeChild(messageEl)},300)},3e3)} 13//# sourceMappingURL=/cdn/shop/t/21/assets/custom.js.map?v=18770410821575404521756540970
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.