var mailchimp,mailchimp_cart,mailchimp_billing_email,mailchimp_username_email,mailchimp_registration_email,mailchimp_submitted_email=!1,mailchimpReady=function(e){/in/.test(document.readyState)?setTimeout("mailchimpReady("+e+")",9):e()};function mailchimpGetCurrentUserByHash(e){try{if(!mailchimp_public_data.allowed_to_set_cookies)return;var i=mailchimp_public_data.ajax_url+"?action=mailchimp_get_user_by_hash&hash="+e,a=new XMLHttpRequest;a.open("POST",i,!0),a.onload=function(){if(a.status>=200&&a.status<400){var e=JSON.parse(a.responseText);e&&mailchimp_cart.valueEmail(e.email)&&mailchimp_cart.setEmail(e.email)}},a.onerror=function(){console.log("mailchimp.get_email_by_hash.request.error",a.responseText)},a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Accept","application/json"),a.send()}catch(t){console.log("mailchimp.get_email_by_hash.error",t)}}function mailchimpHandleBillingEmail(e){try{if(!mailchimp_public_data.allowed_to_set_cookies||mailchimp_public_data.disable_carts)return;var i=document.querySelector("#mailchimp_woocommerce_newsletter");i||(i=document.querySelector("#subscribe-to-newsletter")),e||(e="#billing_email");var a=document.querySelector(e),t=void 0!==a?a.value:"";if(!mailchimp_cart.valueEmail(t)||mailchimp_submitted_email===t)return!1;mailchimp_cart.setEmail(t),console.log(t),console.log(mailchimp_cart);var l=mailchimp_public_data.ajax_url+"?action=mailchimp_set_user_by_email",r=new XMLHttpRequest;return r.open("POST",l,!0),r.onload=function(){console.log(r);var e=r.status>=200&&r.status<400;e&&(mailchimp_submitted_email=t),console.log(e?"mailchimp.handle_billing_email.request.success":"mailchimp.handle_billing_email.request.error",r.responseText)},r.onerror=function(){console.log("mailchimp.handle_billing_email.request.error",r.responseText)},r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.setRequestHeader("Accept","application/json"),r.send("email="+t+"&mc_language="+mailchimp_public_data.language+"&subscribed="+(i&&i.checked?"1":"0")),!0}catch(n){console.log("mailchimp.handle_billing_email.error",n),mailchimp_submitted_email=!1}}!function(){"use strict";var e,i,a,t;mailchimp={storage:(e=document,(a=function(e,i,t){return 1===arguments.length?a.get(e):a.set(e,i,t)}).get=function(i,t){return e.cookie!==a._cacheString&&a._populateCache(),void 0==a._cache[i]?t:a._cache[i]},a.defaults={path:"/",secure:!0,samesite:"strict"},a.set=function(t,l,r){switch(r={path:r&&r.path||a.defaults.path,domain:r&&r.domain||a.defaults.domain,expires:r&&r.expires||a.defaults.expires,secure:r&&r.secure!==i?r.secure:a.defaults.secure,samesite:r&&r.samesite||a.defaults.samesite},l===i&&(r.expires=-1),typeof r.expires){case"number":r.expires=new Date((new Date).getTime()+1e3*r.expires);break;case"string":r.expires=new Date(r.expires)}return t=encodeURIComponent(t)+"="+(l+"").replace(/[^!#-+\--:<-\[\]-~]/g,encodeURIComponent),t+=r.path?";path="+r.path:"",t+=r.domain?";domain="+r.domain:"",t+=r.expires?";expires="+r.expires.toGMTString():"",t+=r.secure?";secure":"",t+=r.samesite?";samesite="+r.samesite:"",e.cookie=t,a},a.expire=function(e,t){return a.set(e,i,t)},a._populateCache=function(){a._cache={};try{a._cacheString=e.cookie;for(var t=a._cacheString.split("; "),l=0;l