1const i=()=>({step:1,formValid:!0,submitting:!1,init(){const t=this.$root.querySelector("form");if(t){const o=()=>{t.addEventListener("submit",e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.submitForm()})};window.Shopify&&window.Shopify.captcha&&typeof window.Shopify.captcha.protect=="function"?window.Shopify.captcha.protect(t,()=>{o()}):o()}if(new URLSearchParams(window.location.search).get("contact_posted")==="true"&&location.hash==="#euw-form"){this.openModal();const o=this.$root.querySelectorAll("[data-step]");o.length>0&&(this.step=parseInt(o[o.length-1].getAttribute("data-step")))}},openModal(){const t=this.$root.querySelector("dialog");if(!t){console.error("No modal found");return}this.step=1,t.removeAttribute("hidden"),t.showModal()},closeModal(){const t=this.$root.querySelector("dialog");if(!t){console.error("No modal found");return}t.close(),t.setAttribute("hidden",""),history.pushState({},document.title,window.location.pathname)},validateForm(){this.formValid=!0;const t=this.$root.querySelector("form");return this.formValid=t?.checkValidity()??!1,this.formValid},async submitForm(){if(this.submitting||!this.validateForm())return;this.submitting=!0;const t=this.$root.querySelector("form");if(!t){console.error("No form found");return}t.submit()}});export{i as default};
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.