window.WpStatisticsUserTracker||(window.WpStatisticsUserTracker={lastUrl:window.location.href,originalPushState:history.pushState,originalReplaceState:history.replaceState,isDndActive:parseInt(navigator.msDoNotTrack||window.doNotTrack||navigator.doNotTrack,10),hasTrackerInitializedOnce:!1,hasUrlChangeTrackerInitialized:!1,hitRequestSuccessful:!0,init:function(){this.hasTrackerInitializedOnce||(this.hasTrackerInitializedOnce=!0,WP_Statistics_Tracker_Object.option.isPreview)||(void 0===WP_Statistics_Tracker_Object?console.error("WP Statistics: Variable WP_Statistics_Tracker_Object not found. Ensure /wp-content/plugins/wp-statistics/assets/js/tracker.js is either excluded from cache settings or not dequeued by any plugin. Clear your cache if necessary."):this.checkHitRequestConditions(),this.trackUrlChange())},base64Encode:function(t){t=(new TextEncoder).encode(t);return btoa(String.fromCharCode.apply(null,t))},getPathAndQueryString:function(){var t=window.location.pathname,e=window.location.search;return this.base64Encode(t+e)},getReferred:function(){return this.base64Encode(document.referrer)},checkHitRequestConditions:function(){!WP_Statistics_Tracker_Object.option.dntEnabled||1!==this.isDndActive?this.sendHitRequest():console.log("WP Statistics: Do Not Track (DNT) is enabled. Hit request not sent.")},sendHitRequest:async function(){try{var t=this.getRequestUrl(),s=new URLSearchParams({...WP_Statistics_Tracker_Object.hitParams,referred:this.getReferred(),page_uri:this.getPathAndQueryString()}).toString();let e=new XMLHttpRequest;e.open("POST",t,!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send(s),e.onreadystatechange=function(){var t;4===e.readyState&&(200===e.status?(t=this.parseHitResponse(e.responseText),this.hitRequestSuccessful=null!==t&&"object"==typeof t&&!Array.isArray(t)&&!0===t.status,this.hitRequestSuccessful||(t=t&&("string"==typeof t.data?t.data:t.message),console.warn("WP Statistics: Hit request failed with status "+e.status+(t?": "+t:"")))):(this.hitRequestSuccessful=!1,t="string"==typeof(t=this.parseHitResponse(e.responseText,!0)||{}).data?t.data:t.message,console.warn("WP Statistics: Hit request failed with status "+e.status+(t?": "+t:""))))}.bind(this)}catch(t){this.hitRequestSuccessful=!1,console.error("WP Statistics: Error sending hit request:",t)}},parseHitResponse:function(e,s){try{return JSON.parse(e)}catch(t){var i=e.indexOf('{"');if(-1<i)try{return JSON.parse(e.slice(i))}catch(t){}return s||console.warn("WP Statistics: The hit response was not valid JSON. Another plugin or the theme may be printing PHP notices."),{status:!1}}},getRequestUrl:function(){let t=WP_Statistics_Tracker_Object.requestUrl+"/";return WP_Statistics_Tracker_Object.option.bypassAdBlockers?t=WP_Statistics_Tracker_Object.ajaxUrl:t+=WP_Statistics_Tracker_Object.hitParams.endpoint,t},updateTrackerObject:function(i){function a(){var t=document.getElementById("wp-statistics-tracker-js-extra");if(t)try{var e,s=t.innerHTML.match(/var\s+WP_Statistics_Tracker_Object\s*=\s*(\{[\s\S]*?\});/);s&&s[1]&&(e=JSON.parse(s[1]),!WP_Statistics_Tracker_Object.hitParams||JSON.stringify(WP_Statistics_Tracker_Object.hitParams)!==JSON.stringify(e.hitParams))?(WP_Statistics_Tracker_Object=e,!r&&i&&(r=!0,i())):++n<20?setTimeout(a,100):!r&&i&&(r=!0,i())}catch(t){console.error("WP Statistics: Error parsing WP_Statistics_Tracker_Object",t),!r&&i&&(r=!0,i())}else++n<20?setTimeout(a,100):!r&&i&&(r=!0,i())}let r=!1,n=0;setTimeout(a,50)},trackUrlChange:function(){if(!this.hasUrlChangeTrackerInitialized){this.hasUrlChangeTrackerInitialized=!0;let t=this;window.removeEventListener("popstate",t.handleUrlChange),history.pushState=function(){t.originalPushState.apply(history,arguments),t.handleUrlChange()},history.replaceState=function(){t.originalReplaceState.apply(history,arguments),t.handleUrlChange()},window.addEventListener("popstate",function(){t.handleUrlChange()})}},handleUrlChange:function(){let t=this;window.location.href!==this.lastUrl&&(this.lastUrl=window.location.href,this.updateTrackerObject(function(){t.checkHitRequestConditions()}))}});
window.WpStatisticsEventTracker||(window.WpStatisticsEventTracker={hasEventsInitializedOnce:!1,downloadTracker:!1,linkTracker:!1,init:async function(){this.hasEventsInitializedOnce||WP_Statistics_Tracker_Object.isLegacyEventLoaded||(this.hasEventsInitializedOnce=!0,"undefined"!=typeof WP_Statistics_DataPlus_Event_Object&&(this.downloadTracker=WP_Statistics_DataPlus_Event_Object.options.downloadTracker,this.linkTracker=WP_Statistics_DataPlus_Event_Object.options.linkTracker,this.downloadTracker||this.linkTracker)&&this.captureEvent(),window.wp_statistics_event=this.handleCustomEvent.bind(this),"undefined"!=typeof WP_Statistics_Marketing_Event_Object&&this.captureCustomClickEvents())},handleCustomEvent:function(t,e={}){var n=WP_Statistics_Tracker_Object.customEventAjaxUrl,t=(e.timestamp=Date.now(),e.resource_id||(e.resource_id=WP_Statistics_Tracker_Object.hitParams.source_id),{event_name:t,event_data:JSON.stringify(e)});this.sendEventData(t,n)},captureCustomClickEvents:function(){WP_Statistics_Marketing_Event_Object.events.clicks.forEach(e=>{!e.selector||null!=e.scope&&e.scope!=WP_Statistics_Tracker_Object.hitParams.source_id||document.querySelectorAll(""+e.selector).forEach(t=>{t.addEventListener("click",t=>{t={text:t.target.textContent,id:t.currentTarget.id,class:t.currentTarget.className,target:t.currentTarget.href};this.handleCustomEvent(e.name,t)})})})},captureEvent:function(){document.querySelectorAll("a").forEach(t=>{t.addEventListener("click",async t=>this.handleEvent(t)),t.addEventListener("mouseup",async t=>this.handleEvent(t))})},handleEvent:async function(t){var e;"mouseup"==t.type&&1!=t.button||(t=this.prepareEventData(t))&&(e=WP_Statistics_DataPlus_Event_Object.eventAjaxUrl,await this.sendEventData(t,e))},prepareEventData:function(t){let e={en:t.type,et:Date.now(),eid:t.currentTarget.id,ec:t.currentTarget.className,ev:"",mb:t.button,fn:"",fx:"",m:"",tu:"",pid:""};return"A"===t.currentTarget.tagName&&(e=this.extractLinkData(t,e)),"undefined"!=typeof WP_Statistics_Tracker_Object&&(e.pid=WP_Statistics_Tracker_Object.hitParams.source_id),e},extractLinkData(t,e){var n=t.target.textContent,a=t.currentTarget.href,i=WP_Statistics_DataPlus_Event_Object.fileExtensions,i=new RegExp("\\.("+i.join("|")+")$","i"),n=(n&&(e.ev=n),a&&(e.tu=a),t.currentTarget.classList.contains("woocommerce-MyAccount-downloads-file")||a.includes("download_file="));if(e.wcdl=n,(i.test(a)||n)&&(t=new URL(a).pathname,e.df=n?a.substring(a.lastIndexOf("download_file=")+14).split("&").shift():"",e.dk=n?a.substring(a.lastIndexOf("key=")+4).split("&").shift():"",e.en="file_download",e.fn=n?e.df:t.substring(t.lastIndexOf("/")+1).split(".").shift(),e.fx=n?e.df:t.split(".").pop()),"click"===e.en){if(!this.linkTracker)return!1;try{if(new URL(a).host===window.location.host)return!1}catch(t){}}return!("file_download"===e.en&&!this.downloadTracker)&&e},sendEventData:async function(t,e){var n,a=new URLSearchParams;for(n in t)a.append(n,t[n]);if(!e)throw new Error("AJAX URL is not defined.");try{(await fetch(e,{method:"POST",keepalive:!0,body:a})).ok}catch(t){console.error("Error:",t)}}});
function handleWpConsentApiIntegration(){(wp_has_consent("statistics")||wp_has_consent("statistics-anonymous"))&&(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),document.addEventListener("wp_listen_for_consent_change",function(t){var e,n=t.detail;for(e in n)!n.hasOwnProperty(e)||"statistics"!==e&&"statistics-anonymous"!==e||"allow"!==n[e]||(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init())})}function handleRealCookieBannerIntegration(){(window.consentApi?.consent("wp-statistics")||Promise.resolve()).then(()=>{WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()}).catch(()=>{var t=window.consentApi?.consentSync("wp-statistics-with-data-processing");null!=t.cookie&&t.cookieOptIn?(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()):console.log("WP Statistics: Real Cookie Banner consent is not given to track visitor information.")})}function handleCookieYesIntegration(){let e=!1,n=()=>{e||(e=!0,WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init())},i=()=>{var t;return"function"==typeof window.getCkyConsent?!(!(t=window.getCkyConsent())||!t.categories||!0!==t.categories.analytics):(t=document.cookie.match(/(?:^|;\s*)cookieyes-consent=([^;]*)/))?-1!==decodeURIComponent(t[1]).split(",").indexOf("analytics:yes"):(()=>{if(!o||s("viewed_cookie_policy")!=="yes")return false;const t=s("cookielawinfo-checkbox-analytics");return t===null||t==="yes"})()};let o=!0===((WP_Statistics_Tracker_Object.option.consentIntegration||{}).status||{}).legacy||void 0!==window.Cli_Data,s=t=>{t=document.cookie.match(new RegExp("(?:^|;\\s*)"+t+"=([^;]*)"));return t?decodeURIComponent(t[1]):null};i()&&n(),document.addEventListener("cookieyes_consent_update",function(t){-1===(t.detail&&t.detail.accepted||[]).indexOf("analytics")&&!i()||n()}),document.addEventListener("click",function(t){e||!o||window.CLI&&window.CLI.settings&&!0===Boolean(window.CLI.settings.accept_close_reload)||!t.target||"function"!=typeof t.target.closest||t.target.closest("#cookie-law-info-bar, #cliSettingsPopup, .cli-modal, .cli-bar-container")&&setTimeout(function(){i()&&n()},300)})}document.addEventListener("DOMContentLoaded",function t(){var e;document.prerendering?document.addEventListener("prerenderingchange",t,{once:!0}):((e=WP_Statistics_Tracker_Object.option.consentIntegration.name)&&"borlabs_cookie"!==e||(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),"wp_consent_api"===e&&handleWpConsentApiIntegration(),"real_cookie_banner"===e&&handleRealCookieBannerIntegration(),"cookieyes"===e&&handleCookieYesIntegration())});
(()=>{"use strict";const e="email",t="phone",n="name",l={[e]:["email","e-mail","mail","email address"],[t]:["phone","tel","mobile","cell","telephone","phone number"],[n]:["name","full-name","full name","full_name","fullname","first-name","first name","first_name","firstname","last-name","last name","last_name","lastname","given-name","given name","given_name","givenname","family-name","family name","family_name","familyname","fname","lname","first","last","your-name","your name"]};function a(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function r(e){const t=a(e),n=t.lastIndexOf("@");if(-1===n)return t;const l=t.slice(n+1);return["gmail.com","googlemail.com"].includes(l)?`${t.slice(0,n).replace(/\./g,"")}@${l}`:t}function i(e){const t=a(e),n=t.replace(/\D/g,"");return t.startsWith("+")?`+${n}`:n}function s(e){const t=e.filter(({type:e})=>e===n).map(({value:e})=>a(e)).filter(Boolean);if(!t.length)return;const[l,...r]=1===t.length?t[0].split(" "):t;return{first_name:l,...r?.length>0?{last_name:r.join(" ")}:{}}}function o(t){return t.find(({type:t})=>t===e)?.value}function u(e){return e.find(({type:e})=>e===t)?.value}globalThis.document.addEventListener("wpcf7mailsent",m=>{const c=m,f=globalThis._googlesitekit?.gtagUserData,g=f?function(m){if(!(m&&m instanceof HTMLFormElement))return;const c=new FormData(m);return function(e){const t=[["address",s(e)],["email",o(e)],["phone_number",u(e)]].filter(([,e])=>e);if(0!==t.length)return Object.fromEntries(t)}(Array.from(c.entries()).map(([s,o])=>{const u=m.querySelector(`[name='${s}']`),c=u?.type;return"hidden"===c||"submit"===c||"string"!=typeof o?null:function(s){let{type:o,name:u,value:m,label:c}=s||{};switch(o=a(o),u=a(u),m=a(m),c=function(e){return e&&"string"==typeof e?e.trim().toLowerCase().replace(/\s*\*+\s*$/,"").replace(/\s*\(required\)\s*$/i,"").replace(/\s*:\s*$/,"").trim():""}(c),o){case"email":return{type:e,value:r(m)};case"tel":return{type:t,value:i(m)}}return function(e){if(!e)return!1;const t=r(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(m)||l[e].includes(u)||l[e].includes(c)?{type:e,value:r(m)}:l[t].includes(u)||l[t].includes(c)?{type:t,value:i(m)}:l[n].includes(u)||l[n].includes(c)?{type:n,value:a(m)}:function(e){if(!e)return!1;if(!function(e){const t=e.replace(/\D/g,"");return!(t.length<7||t.length<e.length/2)&&/^[\s\-()+.\d]*$/.test(e)}(e))return!1;const t=i(e);if(!/^\+?\d{7,}$/.test(t))return!1;const n=/[\s\-()+.]/.test(e),l=e.trim().startsWith("+");return!(!n&&!l)}(m)?{type:t,value:i(m)}:null}({type:c,label:u?.id?m.querySelector(`label[for='${u?.id}']`)?.textContent:void 0,name:s,value:o})}).filter(e=>null!==e))}(m.target):null,{contactFormId:d}=c.detail;globalThis._googlesitekit?.gtagEvent?.("contact",{event_category:d,event_label:c.detail.unitTag,googlesitekit_event_provider:"contact-form-7",googlesitekit_form_id:String(d),...g?{user_data:g}:{}})})})();