1/* 2Generated time: November 20, 2025 14:11 3This file was created by the app developer. Feel free to contact the original developer with any questions. It was minified (compressed) by AVADA. AVADA do NOT own this script. 4*/ 5if(!customElements.get("product-form")){class a extends HTMLElement{constructor(){super(),this.hasChildNodes()&&this.init()}init(){this.form=this.querySelector(".js-product-form"),this.form&&(this.form.querySelector('[name="id"]').disabled=!1,this.cartDrawer=document.querySelector("cart-drawer"),this.submitBtn=this.querySelector('[name="add"]'),"no-js"!==theme.settings.afterAtc)&&this.addEventListener("submit",this.handleSubmit.bind(this))}async handleSubmit(e){if("product-signup_form"!==e.target.id&&(e.preventDefault(),"true"!==this.submitBtn.getAttribute("aria-disabled"))){theme.settings.vibrateOnATC&&window.navigator.vibrate&&window.navigator.vibrate(100),this.errorMsg=null,this.setErrorMsgState(),this.submitBtn.setAttribute("aria-disabled","true"),this.submitBtn.classList.add("is-loading");e=new FormData(this.form);let t="cart-icon-bubble";this.cartDrawer&&(t+=","+this.cartDrawer.closest(".shopify-section").id.replace("shopify-section-","")),e.append("sections_url",window.location.pathname),e.append("sections",t);e={method:"POST",headers:{Accept:"application/javascript","X-Requested-With":"XMLHttpRequest"},body:e};try{var s=await fetch(theme.routes.cart+".js");if(!s.ok)throw new Error(s.status);var i=await s.json(),o=await fetch(theme.routes.cartAdd,e);let r=await o.json(),t="string"==typeof r.description?r.description:r.message;if(r.errors&&"object"==typeof r.errors&&(t=Object.entries(r.errors).map(t=>t[1].join(", "))),r.status&&this.setErrorMsgState(t),!o.ok)throw new Error(o.status);if("page"===theme.settings.afterAtc)setTimeout(()=>{window.location.href=theme.routes.cart},300);else{a.updateCartIcon(r);let e=this.closest("quick-add-drawer");e&&e.addedToCart(),setTimeout(()=>{var t;this.cartDrawer?this.cartDrawer.renderContents(r,!e&&"drawer"===theme.settings.afterAtc):window.location.pathname===theme.routes.cart&&(t=document.querySelector("cart-items"))&&("true"===t.dataset.empty?window.location.reload():t.refresh()),handleFloCartBtn()},700)}var n=await fetch(theme.routes.cart+".js");if(!n.ok)throw new Error(n.status);var c=await n.json(),d=i.items.filter(t=>t.variant_id===r.variant_id)[0];d?this.dispatchEvent(new CustomEvent("on:line-item:change",{bubbles:!0,detail:{cart:c,variantId:r.variant_id,oldQuantity:d.quantity,newQuantity:(d.quantity===r.quantity?d:r).quantity}})):this.dispatchEvent(new CustomEvent("on:cart:add",{bubbles:!0,detail:{cart:c,variantId:r.variant_id}}))}catch(t){console.log(t),this.dispatchEvent(new CustomEvent("on:cart:error",{bubbles:!0,detail:{error:this.errorMsg.textContent}}))}finally{this.submitBtn.classList.add("is-success"),this.submitBtn.removeAttribute("aria-disabled"),setTimeout(()=>{this.submitBtn.classList.remove("is-loading"),this.submitBtn.classList.remove("is-success")},1400)}}}static updateCartIcon(t){var e=document.getElementById("cart-icon-bubble");e&&(e.innerHTML=t.sections["cart-icon-bubble"])}setErrorMsgState(t=!1){this.errorMsg=this.errorMsg||this.querySelector(".js-form-error"),this.errorMsg&&(this.errorMsg.hidden=!t,t)&&(this.errorMsg.innerHTML="",(Array.isArray(t)?t:[t]).forEach((t,e)=>{0<e&&this.errorMsg.insertAdjacentHTML("beforeend","<br>"),this.errorMsg.insertAdjacentText("beforeend",t)}))}}customElements.define("product-form",a)}
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.