1document.addEventListener("alpine:init",()=>{const{apiUrl,apiKey,xAppid,acceptedLanguage}=theme.emailSubscription;Alpine.data("cartDpuxEmailSubscribe",()=>({email:"",errMsg:"",loading:!1,isSuccess:!1,contactListId:"",init(){this.contactListId=this.$el.dataset.contactListId},async submitEmailForm(){const contactListId=this.contactListId;if(this.errMsg="",this.email===""){this.errMsg="Please enter your email address.";return}if(!validateEmail(this.email)){this.errMsg="Please enter a valid email address (Example: [email protected])";return}const subscribeInfoCookie=window.getCookieForEmarsys?window.getCookieForEmarsys("subscribe_info"):null;let eventTracking=null;if(subscribeInfoCookie)try{const decodedCookie=decodeURIComponent(subscribeInfoCookie);eventTracking=JSON.parse(decodedCookie),delete eventTracking.ts}catch(error){console.warn("Failed to parse subscribe_info cookie:",error)}const fieldsArray=createFieldsArray(dpuxCartEmailSettingJsons),apiBody={email:this.email,contactListId,fields:fieldsArray,...eventTracking&&{eventTracking}};try{this.loading=!0,(await(await fetch(apiUrl,{method:"POST",headers:{"Content-Type":"application/json",apiKey,traceId,"X-appid":xAppid,"Accepted-Language":acceptedLanguage},body:JSON.stringify(apiBody)})).json()).message==="Success"?this.isSuccess=!0:this.errMsg="Oops... Something went wrong, please refresh and try again."}catch(error){this.errMsg="Oops... Something went wrong, please refresh and try again.",console.error("[cart-dpux-email-subscribe]",error)}finally{this.loading=!1}}}))}); 2//# sourceMappingURL=/cdn/shop/t/1497/assets/cart-dpux-email-subscribe.js.map?v=110048795336641984991780544295
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.