setCookie = function (name, value, expirationInDays = 0) { const date = new Date(); date.setDate(date.getDate() + expirationInDays); const expires = date.toUTCString(); document.cookie = `${name}=${value};expires=${expires};path=/`; }; function getParameterValue(parameterKey, isCaseSensitive = true) { let urlParams = location.search.substring(1); urlParams = urlParams.split("&"); const parameterRegexPattern = new RegExp( parameterKey + "=", isCaseSensitive ? "" : "i" ); let parameterValue = urlParams.filter(param => param.match(parameterRegexPattern) ); if (parameterValue.length) { parameterValue = parameterValue[parameterValue.length - 1].replace( parameterRegexPattern, "" ); return parseInt(parameterValue); } return null; } customerSourceCookie = function () { const cValue = getParameterValue("c", false); const storedCValue = sessionStorage.getItem("o_c"); if (cValue && typeof cValue === "number") { const isValidValue = 1 <= cValue && cValue <= 999; if (isValidValue && cValue != storedCValue) { setCookie("o_c", cValue, 360); sessionStorage.setItem("o_c", cValue); return cValue; } return storedCValue; } return storedCValue; }; window.addEventListener("load", customerSourceCookie); window.customerSourceCookie = customerSourceCookie; window.setCookie = setCookie; ; function personalization_marketingcampaigns_paid() { const isMarketingCampaignPaid = sessionStorage.getItem( "_mwb_marketing_campaign_paid" ); const hasOCParam = sessionStorage.getItem("o_c"); if (!isMarketingCampaignPaid && hasOCParam) { sessionStorage.setItem("_mwb_marketing_campaign_paid", true); return true; } return isMarketingCampaignPaid; } ; (()=>{"use strict";document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll(".mb-free-download-btn");e.forEach((e=>{e.setAttribute("href",function(){const e=window.global_variables?.user?.device;return e.isMac?window.global_variables?.site?.downloadLinks?.free.mac:e.isiPad||e.isiPhone?window.global_variables?.site?.downloadLinks?.free.ios:e.isChromeOS||e.isAndroid?window.global_variables?.site?.downloadLinks?.free.android:window.global_variables?.site?.downloadLinks?.free.windows}())})),document.getElementById("redirect-trigger-link")&&e[0]&&e[0]?.click()}))})();; (()=>{"use strict";const e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,{entries:t,setPrototypeOf:n,isFrozen:o,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:l,create:s}=Object,{apply:c,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),l||(l=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const m=v(Array.prototype.forEach),p=v(Array.prototype.lastIndexOf),f=v(Array.prototype.pop),d=v(Array.prototype.push),h=v(Array.prototype.splice),g=v(String.prototype.toLowerCase),y=v(String.prototype.toString),T=v(String.prototype.match),E=v(String.prototype.replace),A=v(String.prototype.indexOf),b=v(String.prototype.trim),_=v(Object.prototype.hasOwnProperty),S=v(RegExp.prototype.test),N=(w=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:g;n&&n(e,null);let i=t.length;for(;i--;){let n=t[i];if("string"==typeof n){const e=r(n);e!==n&&(o(t)||(t[i]=e),n=e)}e[n]=!0}return e}function R(e){for(let t=0;t/gm),Y=l(/\$\{[\w\W]*/gm),j=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),q=l(/^aria-[\-\w]+$/),X=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=l(/^(?:\w+script|data):/i),K=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=l(/^html$/i),Z=l(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:q,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:Z,DATA_ATTR:j,DOCTYPE_NAME:V,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:$,MUSTACHE_EXPR:B,TMPLIT_EXPR:Y});const Q=function(){return"undefined"==typeof window?null:window};var ee=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const o=t=>e(t);if(o.version="3.2.5",o.removed=[],!n||!n.document||9!==n.document.nodeType||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const i=r,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:w,Element:v,NodeFilter:R,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=v.prototype,$=O(q,"cloneNode"),K=O(q,"remove"),Z=O(q,"nextSibling"),ee=O(q,"childNodes"),te=O(q,"parentNode");if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ne,oe="";const{implementation:re,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:le}=r,{importNode:se}=i;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof t&&"function"==typeof te&&re&&void 0!==re.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:ye}=J;let{IS_ALLOWED_URI:Te}=J,Ee=null;const Ae=L({},[...C,...k,...x,...M,...P]);let be=null;const _e=L({},[...U,...F,...H,...W]);let Se=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,we=null,ve=!0,Le=!0,Re=!1,De=!0,Oe=!1,Ce=!0,ke=!1,xe=!1,Ie=!1,Me=!1,ze=!1,Pe=!1,Ue=!0,Fe=!1,He=!0,We=!1,Be={},Ge=null;const Ye=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let je=null;const qe=L({},["audio","video","img","source","image","track"]);let Xe=null;const $e=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Je=Ze,Qe=!1,et=null;const tt=L({},[Ke,Ve,Ze],y);let nt=L({},["mi","mo","mn","ms","mtext"]),ot=L({},["annotation-xml"]);const rt=L({},["title","style","font","a","script"]);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,st=null;const ct=r.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=D(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?y:g,Ee=_(e,"ALLOWED_TAGS")?L({},e.ALLOWED_TAGS,lt):Ae,be=_(e,"ALLOWED_ATTR")?L({},e.ALLOWED_ATTR,lt):_e,et=_(e,"ALLOWED_NAMESPACES")?L({},e.ALLOWED_NAMESPACES,y):tt,Xe=_(e,"ADD_URI_SAFE_ATTR")?L(D($e),e.ADD_URI_SAFE_ATTR,lt):$e,je=_(e,"ADD_DATA_URI_TAGS")?L(D(qe),e.ADD_DATA_URI_TAGS,lt):qe,Ge=_(e,"FORBID_CONTENTS")?L({},e.FORBID_CONTENTS,lt):Ye,Ne=_(e,"FORBID_TAGS")?L({},e.FORBID_TAGS,lt):{},we=_(e,"FORBID_ATTR")?L({},e.FORBID_ATTR,lt):{},Be=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,ve=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,ke=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,ze=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||X,Je=e.NAMESPACE||Ze,nt=e.MATHML_TEXT_INTEGRATION_POINTS||nt,ot=e.HTML_INTEGRATION_POINTS||ot,Se=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(Le=!1),ze&&(Me=!0),Be&&(Ee=L({},P),be=[],!0===Be.html&&(L(Ee,C),L(be,U)),!0===Be.svg&&(L(Ee,k),L(be,F),L(be,W)),!0===Be.svgFilters&&(L(Ee,x),L(be,F),L(be,W)),!0===Be.mathMl&&(L(Ee,M),L(be,H),L(be,W))),e.ADD_TAGS&&(Ee===Ae&&(Ee=D(Ee)),L(Ee,e.ADD_TAGS,lt)),e.ADD_ATTR&&(be===_e&&(be=D(be)),L(be,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&L(Xe,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ge===Ye&&(Ge=D(Ge)),L(Ge,e.FORBID_CONTENTS,lt)),He&&(Ee["#text"]=!0),ke&&L(Ee,["html","head","body"]),Ee.table&&(L(Ee,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,oe=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,l)),null!==ne&&"string"==typeof oe&&(oe=ne.createHTML(""));a&&a(e),st=e}},pt=L({},[...k,...x,...I]),ft=L({},[...M,...z]),dt=function(e){d(o.removed,{element:e});try{te(e).removeChild(e)}catch(t){K(e)}},ht=function(e,t){try{d(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Me||ze)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function(e){let t=null,n=null;if(Ie)e=""+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Je===Ze&&(e=''+e+"");const o=ne?ne.createHTML(e):e;if(Je===Ze)try{t=(new Y).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=re.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?oe:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Je===Ze?le.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},yt=function(e){return ie.call(e.ownerDocument||e,e,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT|R.SHOW_PROCESSING_INSTRUCTION|R.SHOW_CDATA_SECTION,null)},Tt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof B)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Et=function(e){return"function"==typeof w&&e instanceof w};function At(e,t,n){m(e,(e=>{e.call(o,t,n,st)}))}const bt=function(e){let t=null;if(At(ce.beforeSanitizeElements,e,null),Tt(e))return dt(e),!0;const n=lt(e.nodeName);if(At(ce.uponSanitizeElement,e,{tagName:n,allowedTags:Ee}),e.hasChildNodes()&&!Et(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return dt(e),!0;if(7===e.nodeType)return dt(e),!0;if(Ce&&8===e.nodeType&&S(/<[/\w]/g,e.data))return dt(e),!0;if(!Ee[n]||Ne[n]){if(!Ne[n]&&St(n)){if(Se.tagNameCheck instanceof RegExp&&S(Se.tagNameCheck,n))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))return!1}if(He&&!Ge[n]){const t=te(e)||e.parentNode,n=ee(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,Z(e))}}return dt(e),!0}return e instanceof v&&!function(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=g(e.tagName),o=g(t.tagName);return!!et[e.namespaceURI]&&(e.namespaceURI===Ve?t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===o||nt[o]):Boolean(pt[n]):e.namespaceURI===Ke?t.namespaceURI===Ze?"math"===n:t.namespaceURI===Ve?"math"===n&&ot[o]:Boolean(ft[n]):e.namespaceURI===Ze?!(t.namespaceURI===Ve&&!ot[o])&&!(t.namespaceURI===Ke&&!nt[o])&&!ft[n]&&(rt[n]||!pt[n]):!("application/xhtml+xml"!==it||!et[e.namespaceURI]))}(e)?(dt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,m([ue,me,pe],(e=>{t=E(t,e," ")})),e.textContent!==t&&(d(o.removed,{element:e.cloneNode()}),e.textContent=t)),At(ce.afterSanitizeElements,e,null),!1):(dt(e),!0)},_t=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in ct))return!1;if(Le&&!we[t]&&S(fe,t));else if(ve&&S(de,t));else if(!be[t]||we[t]){if(!(St(e)&&(Se.tagNameCheck instanceof RegExp&&S(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&S(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&S(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(Xe[t]);else if(S(Te,E(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==A(n,"data:")||!je[e])if(Re&&!S(he,E(n,ge,"")));else if(n)return!1;return!0},St=function(e){return"annotation-xml"!==e&&T(e,ye)},Nt=function(e){At(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Tt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:s}=i,c=lt(a);let u="value"===a?s:b(s);if(n.attrName=c,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,At(ce.uponSanitizeAttribute,e,n),u=n.attrValue,!Fe||"id"!==c&&"name"!==c||(ht(a,e),u="user-content-"+u),Ce&&S(/((--!?|])>)|<\/(style|title)/i,u)){ht(a,e);continue}if(n.forceKeepAttr)continue;if(ht(a,e),!n.keepAttr)continue;if(!De&&S(/\/>/i,u)){ht(a,e);continue}Oe&&m([ue,me,pe],(e=>{u=E(u,e," ")}));const p=lt(e.nodeName);if(_t(p,c,u)){if(ne&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(p,c)){case"TrustedHTML":u=ne.createHTML(u);break;case"TrustedScriptURL":u=ne.createScriptURL(u)}try{l?e.setAttributeNS(l,a,u):e.setAttribute(a,u),Tt(e)?dt(e):f(o.removed)}catch(e){}}}At(ce.afterSanitizeAttributes,e,null)},wt=function e(t){let n=null;const o=yt(t);for(At(ce.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)At(ce.uponSanitizeShadowNode,n,null),bt(n),Nt(n),n.content instanceof c&&e(n.content);At(ce.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Et(e)){if("function"!=typeof e.toString)throw N("toString is not a function");if("string"!=typeof(e=e.toString()))throw N("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||mt(t),o.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=lt(e.nodeName);if(!Ee[t]||Ne[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=gt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Me&&!Oe&&!ke&&-1===e.indexOf("<"))return ne&&Pe?ne.createHTML(e):e;if(n=gt(e),!n)return Me?null:Pe?oe:""}n&&Ie&&dt(n.firstChild);const s=yt(We?e:n);for(;a=s.nextNode();)bt(a),Nt(a),a.content instanceof c&&wt(a.content);if(We)return e;if(Me){if(ze)for(l=ae.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(be.shadowroot||be.shadowrootmode)&&(l=se.call(i,l,!0)),l}let u=ke?n.outerHTML:n.innerHTML;return ke&&Ee["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(V,n.ownerDocument.doctype.name)&&(u="\n"+u),Oe&&m([ue,me,pe],(e=>{u=E(u,e," ")})),ne&&Pe?ne.createHTML(u):u},o.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},o.clearConfig=function(){st=null,xe=!1},o.isValidAttribute=function(e,t,n){st||mt({});const o=lt(e),r=lt(t);return _t(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&d(ce[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=p(ce[e],t);return-1===n?void 0:h(ce[e],n,1)[0]}return f(ce[e])},o.removeHooks=function(e){ce[e]=[]},o.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();const te=e=>ee.sanitize(e),ne=e=>{for(const t in e)"object"==typeof e[t]&&null!==e[t]?ne(e[t]):e[t]=te(e[t]);return e},oe=(window.global_variables&&ne(window.global_variables),function(e){return new URLSearchParams(te(window.location.search)).get(e)});function re(e,t,n){e.querySelector(`#${t}`).style.display=n?"block":"none"}function ie(e,t){const n=""===t;return re(e,"FirstName-required-error",n),n}function ae(e,t){const n=""===t;return re(e,"LastName-required-error",n),n}function le(t,n){let o=!0;return""===n?(re(t,"EmailAddress-required-error",!0),re(t,"EmailAddress-invalid-email-error",!1)):n.match(e)?(re(t,"EmailAddress-required-error",!1),re(t,"EmailAddress-invalid-email-error",!1),o=!1):(re(t,"EmailAddress-required-error",!1),re(t,"EmailAddress-invalid-email-error",!0)),o}function se(e,t,n){e.querySelector(`input[name='${t}']`).addEventListener("keyup",(function(t){n(e,t.target.value)}))}function ce(e){e.preventDefault();const t=this,n=new FormData(t),o=n.get("EmailAddress"),r=n.get("FirstName"),i=n.get("LastName"),a=oe("campaignName")||"";let l=!1;if(ie(t,r)&&(l=!0),ae(t,i)&&(l=!0),le(t,o)&&(l=!0),l)return;const s={id:"personal-use",event:"consumer_Newsletter_Subscription",ip:global_variables.user.geoData.ip,email:o,firstName:r,lastName:i,campaignName:a,subscription_consumer_newsletter:!0},c=function(e){const t=new FormData;return Object.keys(e).forEach((n=>{t.append(n,e[n])})),t}(s),u=t.querySelector(".personal-submit");u.disabled=!0,u.value="Please Wait",async function(e){try{if(!(await fetch(siteConfig.newsletterAPI,{method:"POST",body:e})).ok)throw window.location=siteConfig.newsletterError,new Error("Network response was not ok");window.location=siteConfig.newsletterSuccess}catch(e){throw window.location=siteConfig.newsletterError,new Error("Newsletter form submission failed")}}(c),function(e){if(!dataLayer||!Array.isArray(dataLayer))throw new Error("dataLayer is not defined or is not an array.");try{const t={event:"personal-use.form.submit","personal-use":{form:e}};dataLayer.push(t)}catch(e){throw new Error("Error updating data layer: "+e?.message)}}(s)}document.addEventListener("DOMContentLoaded",(function(){!function(){const e=oe("source")||"",t="1"===((()=>{const e="adw=",t=document.cookie.split(";");for(let n=0;n