PageSourceSearch

https://cdbaby.com/wp-content/plugins/bt-bb-ab/js/bt_conversion-min.js?ver=2.6.11

js cdbaby.com collected 2026-09-24 07:02:41 UTC 117,615 bytes, 1 lines download raw bytes

1function abLog(){if(window.console&&"function"==typeof window.console.log){try{"1"===new URLSearchParams(window.location.search).get("abstdebug")&&window.localStorage&&window.localStorage.setItem("abstdebug","true")}catch(e){}try{if(!window.localStorage||"true"!==window.localStorage.getItem("abstdebug"))return}catch(e){return}window.console.log.apply(window.console,arguments)}}!function(){"use strict";var e={};function t(){document.querySelectorAll('[bt-variation], [data-bt-variation], [class*="ab-var-"]').forEach((function(t){var n=function(e){var t=e.getAttribute("bt-eid")||e.getAttribute("data-bt-eid");if(t)return t;var n="string"==typeof e.className?e.className:"",a=n.match(/(?:^|\s)ab-var-(\d+)-[^\s]+(?:\s|$)/);return a&&a[1]||(a=n.match(/(?:^|\s)ab-(\d+)(?:\s|$)/))&&a[1]?a[1]:""}(t);n&&(e[n]||(t.classList.add("bt-first-variation"),e[n]=!0))}))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}(),function(){var e=0;function t(){return!(!window.ABST_CONFIG||!window.ABST_CONFIG.btab_vars)}if(!t()){abLog("ABST: Config not ready, polling...");var n=setInterval((function(){e+=50,(t()||e>=15e3)&&(clearInterval(n),t()?(abLog("ABST: Config loaded after "+e+"ms, reinitializing..."),window.abstInitConfig(),"function"==typeof abstFullPageEarly&&abstFullPageEarly(),"loading"!==document.readyState&&window.bt_experiments&&Object.keys(window.bt_experiments).length>0&&(abLog("ABST: Running delayed experiment initialization..."),document.body&&document.body.classList.remove("ab-test-setup-complete"),document.dispatchEvent(new Event("abst-config-ready")))):console.warn("ABST: Config not found after 15000ms timeout"))}),50)}}(),window.abstInitConfig=function(){window.ABST_CONFIG=window.ABST_CONFIG||{},window.btab_vars=window.ABST_CONFIG.btab_vars||window.btab_vars||{},window.bt_experiments=window.ABST_CONFIG.bt_experiments||window.bt_experiments||{},window.conversion_details=window.ABST_CONFIG.conversion_details||window.conversion_details||{},window.current_page=window.ABST_CONFIG.current_page||window.current_page||[],window.bt_ajaxurl=window.ABST_CONFIG.ajaxurl||window.bt_ajaxurl||"",window.bt_adminurl=window.ABST_CONFIG.adminurl||window.bt_adminurl||"",window.bt_pluginurl=window.ABST_CONFIG.pluginurl||window.bt_pluginurl||"",window.bt_homeurl=window.ABST_CONFIG.homeurl||window.bt_homeurl||"",ABST_CONFIG=window.ABST_CONFIG,btab_vars=window.btab_vars,bt_experiments=window.bt_experiments,conversion_details=window.conversion_details,current_page=window.current_page,bt_ajaxurl=window.bt_ajaxurl,bt_adminurl=window.bt_adminurl,bt_pluginurl=window.bt_pluginurl,bt_homeurl=window.bt_homeurl},window.ABST_CONFIG=window.ABST_CONFIG||{},window.btab_vars=window.ABST_CONFIG.btab_vars||window.btab_vars||{},window.bt_experiments=window.ABST_CONFIG.bt_experiments||window.bt_experiments||{},window.conversion_details=window.ABST_CONFIG.conversion_details||window.conversion_details||{},window.current_page=window.ABST_CONFIG.current_page||window.current_page||[],window.bt_ajaxurl=window.ABST_CONFIG.ajaxurl||window.bt_ajaxurl||"",window.bt_adminurl=window.ABST_CONFIG.adminurl||window.bt_adminurl||"",window.bt_pluginurl=window.ABST_CONFIG.pluginurl||window.bt_pluginurl||"",window.bt_homeurl=window.ABST_CONFIG.homeurl||window.bt_homeurl||"";var ABST_CONFIG=window.ABST_CONFIG,btab_vars=window.btab_vars,bt_experiments=window.bt_experiments,conversion_details=window.conversion_details,current_page=window.current_page,bt_ajaxurl=window.bt_ajaxurl,bt_adminurl=window.bt_adminurl,bt_pluginurl=window.bt_pluginurl,bt_homeurl=window.bt_homeurl;function abstHasSafeVariationCharacters(e){return"string"==typeof e&&/^[A-Za-z0-9 _-]+$/.test(e)}function abstHasSafeExperimentId(e){return"string"==typeof e&&/^[0-9]+$/.test(e)}function abstWarnOnUnsafeVariationNames(){document.querySelectorAll('[bt-variation]:not([bt-variation=""])').forEach((function(e){var t=e.getAttribute("bt-variation");!t||abstHasSafeVariationCharacters(t)||window.abst.invalidVariationWarnings[t]||(window.abst.invalidVariationWarnings[t]=!0,console.warn('ABST: WARNING: Use of unallowed characters in bt_variation "'+t+'". Use only letters, numbers, space
1s, underscores, and hyphens. Other characters may not match correctly in monitoring or server-side logging.',e))}))}function abstWarnOnUnsafeExperimentIds(){document.querySelectorAll('[bt-eid]:not([bt-eid=""])').forEach((function(e){var t=e.getAttribute("bt-eid");!t||abstHasSafeExperimentId(t)||window.abst.invalidExperimentIdWarnings[t]||(window.abst.invalidExperimentIdWarnings[t]=!0,console.warn('ABST: WARNING: Use of invalid bt_eid "'+t+'". The bt_eid value should be an integer experiment ID. Non-integer values may not match correctly in monitoring or server-side logging.',e))}))}function setAbCrypto(){if(!abstGetAdvancedId()){let e;if(crypto.randomUUID)try{e=crypto.randomUUID()}catch(t){e="10000000-1000-4000-8000-100000000000".replace(/[018]/g,(e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16)))}else e="10000000-1000-4000-8000-100000000000".replace(/[018]/g,(e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16)));window.abst.visitorId=e,window.abst.hasApproval?abstSetCookie("ab-advanced-id",e,365):sessionStorage.setItem("ab-advanced-id",e)}}function setAbstApprovalStatus(e){if(window.abst.hasApproval=e,window.abst.hasApproval){localStorage.setItem("abstApprovalStatus","approved"),abstSetCookie("abst_consent","1",365);var t=sessionStorage.getItem("ab-advanced-id");t&&!abstGetCookie("ab-advanced-id")&&(abstSetCookie("ab-advanced-id",t,365),sessionStorage.removeItem("ab-advanced-id"),abLog("ABST: Migrated UUID from session to cookie after consent")),abst_process_approved_events()}else localStorage.removeItem("abstApprovalStatus"),abstDeleteCookie("abst_consent")}function abstNormalizeOrigin(e){try{return new URL(e,window.location.href).origin.replace(/\/+$/,"").toLowerCase()}catch(e){return""}}function abstGetCrossDomainOrigins(){var e={},t=abstNormalizeOrigin(window.bt_homeurl||window.location.origin);return t&&(e[t]=!0),window.ABST_CONFIG&&Array.isArray(window.ABST_CONFIG.tracking_domains)&&window.ABST_CONFIG.tracking_domains.forEach((function(t){if(t){var n=abstNormalizeOrigin(t.origin||t.url||"");n&&(e[n]=!0)}})),e}function abstAppendUuidToUrl(e,t){try{var n=new URL(e,window.location.href);return n.searchParams.set("abst_uuid",t),n.toString()}catch(t){return e}}function abstShouldDecorateCrossDomainLink(e,t){if(!e||!e.href)return!1;if(e.hasAttribute("download"))return!1;var n=e.getAttribute("href")||"";if(!n||"#"===n.charAt(0))return!1;var a=(e.getAttribute("target")||"").toLowerCase();if(a&&"_self"!==a)return!1;var r=abstNormalizeOrigin(e.href);return!!r&&(r!==abstNormalizeOrigin(window.location.href)&&!!t[r])}function abstSetupCrossDomainLinkDecoration(){if(!window.abst||!window.abst.crossDomainLinkerReady){var e=abstGetCrossDomainOrigins();Object.keys(e).length&&(document.addEventListener("click",(function(t){var n=t.target&&t.target.closest?t.target.closest("a[href]"):null;if(abstShouldDecorateCrossDomainLink(n,e)){var a=abstGetAdvancedId();a||(setAbCrypto(),a=abstGetAdvancedId()),a&&(n.href=abstAppendUuidToUrl(n.href,a))}}),!0),window.abst.crossDomainLinkerReady=!0)}}window.abst=window.abst||{},window.abst.eventQueue=[],window.abst.abconvertpartner={},window.abst.ignoreSelectorPrefixes=["abst-variation","stk-"],window.abst.clickRegister=window.abst.clickRegister||{},window.abst.heatScrollLastSent=window.abst.heatScrollLastSent||0,window.abst.invalidVariationWarnings=window.abst.invalidVariationWarnings||{},window.abst.invalidExperimentIdWarnings=window.abst.invalidExperimentIdWarnings||{},btab_vars&&"1"==btab_vars.wait_for_approval?(window.abst.hasApproval="approved"===localStorage.getItem("abstApprovalStatus"),window.abst.hasApproval&&!abstGetCookie("abst_consent")&&abstSetCookie("abst_consent","1",365)):window.abst.hasApproval=!0;try{window.abst.timer=null===localStorage.getItem("absttimer")?{}:JSON.parse(localStorage.getItem("absttimer")||"{}")}catch(e){window.abst.timer={}}window.abst.currscroll=window.scrollY,window.abst.currentMousePos=-1,window.abst.oldMousePos=-2,window.abst.abactive=!0,window.abst.timeoutTime=3e3,window.abst.intervals={},void 0===window.abst.isTrackingAllowed&&(window.abst.isTrackingAllowed=!0);const services=["abawp","clarity","gai","abmix","abumav","umami","cabin","plausible","fathom","ga4","posthog","meta","matomo"];window.abst.abconvertpartner=Object.fromEntries(services.map((e=>[e,!1])));var abstCookieDomainCache,viewportWidth=window.innerWidth||document.documentElement.clientWidth||0,dpr=window.devicePixelRatio||1,screenWidth=window.screen&&window.screen.width?Math.round(window.screen.width/dpr):0,effectiveWidth=viewportWidth||screenWidth;function abstPersistOriginalTrafficSource(){try{if(!sessionStorage.getItem("abst_original_utm")){var e=new URLSearchParams(window.location.search),t={};["utm_source","utm_medium","utm_campaign","utm_term","utm_content"].forEach((function(n){var a=e.get(n);a&&(t[n]=a)})),sessionStorage.setItem("abst_original_utm",JSON.stringify(t))}if(null===sessionStorage.getItem("abst_original_referrer")){var n=document.referrer||"";if(n)try{new URL(n).hostname!==window.location.hostname&&sessionStorage.setItem("abst_original_referrer",n)}catch(e){sessionStorage.setItem("abst_original_referrer",n)}null===sessionStorage.getItem("abst_original_referrer")&&sessionStorage.setItem("abst_original_referrer","")}}catch(e){}}function abstGetSessionReferrer(){try{var e=sessionStorage.getItem("abst_original_referrer");if(null!==e)return e}catch(e){}return document.referrer||""}function abstGetSessionUtm(e){try{var t=sessionStorage.getItem("abst_original_utm");
1if(t)return JSON.parse(t)[e]}catch(e){}}function abstDetectBrowser(){if(window.abst.browser)return window.abst.browser;var e=navigator.userAgent||"",t="other";return/Edg(e|A|iOS)?\//.test(e)?t="edge":/OPR\/|Opera/.test(e)?t="opera":/Chrome\/|CriOS\//.test(e)?t="chrome":/Firefox\/|FxiOS\//.test(e)?t="firefox":/Safari\//.test(e)&&(t="safari"),window.abst.browser=t,t}function abstDetectOS(){if(window.abst.os)return window.abst.os;var e=navigator.userAgent||"",t="other";return/iPhone|iPad|iPod/.test(e)||/Macintosh/.test(e)&&navigator.maxTouchPoints>1?t="ios":/Android/.test(e)?t="android":/Windows/.test(e)?t="windows":/Macintosh|Mac OS X/.test(e)?t="mac":/Linux/.test(e)&&(t="linux"),window.abst.os=t,t}function abstPassesTargeting(e,t){if(t)try{var n="abst_aud_"+t;if(null===sessionStorage.getItem(n)){var a=abstGetCookie("btab_"+t);if(a){var r=JSON.parse(a);r&&Object.prototype.hasOwnProperty.call(r,"audiences")&&sessionStorage.setItem(n,String(r.audiences||""))}}}catch(e){}function i(e){if(""===e||null==e)return!0;var t=e.split(/[\n\r|,]+/).map((function(e){return e.trim()})).filter(Boolean);return 0===t.length||t.some((function(e){return function(e){var t=(e||"").trim();if(""===t)return!0;var n=!1;t.startsWith("NOT")&&(n=!0,t=t.replace(/^NOT\s*/i,"").trim());var a=!1;if(t.includes("*")){var r=t.replace(/\*/g,"");a=""===r||window.location.href.includes(r)}else{var i=t.split("=");if(1===i.length)a=!!bt_getQueryVariable(i[0])||void 0!==abstGetSessionUtm(i[0]);else if(2===i.length){var o=bt_getQueryVariable(i[0]);!1===o&&(o=abstGetSessionUtm(i[0])),a=i[1]==o}}return n?!a:a}(e)}))}function o(e){if(""===e||null==e)return!0;var t=e.split(/[\n\r|,]+/).map((function(e){return e.trim()})).filter(Boolean);if(0===t.length)return!0;var n=abstGetSessionReferrer().toLowerCase();return t.some((function(e){return function(e,t){var n=(e||"").trim();if(""===n)return!0;var a,r=!1;if(/^NOT\s/i.test(n)&&(r=!0,n=n.replace(/^NOT\s*/i,"").trim()),/^direct$/i.test(n))a=""===t;else{var i=n.replace(/\*/g,"").toLowerCase();a=""===i||-1!==t.indexOf(i)}return r?!a:a}(e,n)}))}function s(e,t){if(""===e||null==e)return!0;var n=String(e).split(/[\n\r|,]+/).map((function(e){return e.trim()})).filter(Boolean);return 0===n.length||n.some((function(e){var n=/^NOT\s/i.test(e),a=t(e.replace(/^NOT\s*/i,"").trim());return n?!a:a}))}function c(e,t){return s(e,(function(e){return e.toLowerCase()===t}))}function d(e){if(""===e||null==e)return!0;var t=String(e).split(/[\n\r]+/).map((function(e){return e.trim()})).filter(Boolean);if(0===t.length)return!0;var n={};(document.cookie||"").split(";").forEach((function(e){var t=e.indexOf("="),a=(-1===t?e:e.slice(0,t)).trim();if(""!==a&&!(a in n)){var r=-1===t?"":e.slice(t+1).trim();try{r=decodeURIComponent(r)}catch(e){}n[a]=r}}));return t.some((function(e){var t=/^NOT\s/i.test(e),a=function(e){var t=e.indexOf("=");if(-1===t)return e in n;var a=e.slice(0,t).trim(),r=e.slice(t+1).trim();if(!(a in n))return!1;if(-1!==r.indexOf("*")){var i=r.replace(/\*/g,"");return""===i||-1!==n[a].indexOf(i)}return n[a]===r}(e.replace(/^NOT\s*/i,"").trim());return t?!a:a}))}function l(e){try{var t=/^([+-])(\d{2}):(\d{2})$/.exec(e||"");if(t){var n=(60*parseInt(t[2],10)+parseInt(t[3],10))*("-"===t[1]?-1:1),a=new Date(Date.now()+6e4*n);return{day:a.getUTCDay(),minutes:60*a.getUTCHours()+a.getUTCMinutes()}}
1var r=new Intl.DateTimeFormat("en-US",{timeZone:e||"UTC",weekday:"short",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(new Date),i={};return r.forEach((function(e){i[e.type]=e.value})),{day:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].indexOf(i.weekday),minutes:60*parseInt(i.hour,10)+parseInt(i.minute,10)}}catch(e){var o=new Date;return{day:o.getUTCDay(),minutes:60*o.getUTCHours()+o.getUTCMinutes()}}}function u(e){return i(e.url_query)&&o(e.referrer_query)&&(a=e.language,r=(navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language||""]).join(",").toLowerCase(),s(a,(function(e){var t=e.replace(/\*/g,"").toLowerCase();return""===t||-1!==r.indexOf(t)})))&&c(e.browser,abstDetectBrowser())&&c(e.os,abstDetectOS())&&function(e){if(!e||!e.length)return!0;var t={mobile:"small",tablet:"medium",desktop:"large"}[window.abst.size]||"large";return-1!==e.indexOf(t)}(e.screen_size)&&(t=e.days,n=e.timezone,!t||!t.length||-1!==t.indexOf(l(n).day))&&function(e,t){if(!e||!e.start||!e.end)return!0;var n=function(e){var t=e.split(":");return 60*parseInt(t[0],10)+parseInt(t[1],10)},a=l(t).minutes,r=n(e.start),i=n(e.end);return r<=i?a>=r&&a<=i:a>=r||a<=i}(e.time,e.timezone)&&d(e.cookie);var t,n,a,r}var b=i(e.url_query)&&o(e.referrer_query),p=e.audiences,w=[];b&&p&&p.length&&p.forEach((function(e){u(e)&&e.id&&w.push(e.id)}));var f=e.target_option_device_size;if(b&&"all"!=f&&(b=f.includes(window.abst.size)),b&&t)try{var g="abst_aud_"+t;null===sessionStorage.getItem(g)&&sessionStorage.setItem(g,w.join(","))}catch(e){window.abstMatchedAudiences=window.abstMatchedAudiences||{},void 0===window.abstMatchedAudiences[t]&&(window.abstMatchedAudiences[t]=w.join(","))}return b}function abstGetMatchedAudienceIds(e){try{var t=sessionStorage.getItem("abst_aud_"+e);if(null!==t)return t}catch(e){}var n=(window.abstMatchedAudiences||{})[e];if(n)return n;var a=abstGetCookie("btab_"+e);if(a)try{var r=JSON.parse(a);if(r&&r.audiences)return r.audiences}catch(e){}return""}function abstShowPageWhenDomReady(){document.body?abstShowPage():window.abstEarlyRevealQueued||(window.abstEarlyRevealQueued=!0,document.addEventListener("DOMContentLoaded",(function(){abstShowPage()})))}function abstFullPageNewVisitor(e){var t=window.bt_experiments&&window.bt_experiments[e];if(t){var n=t.full_page_default_page,a=t.page_variations||{};if(window.abstEarlyProcessed=window.abstEarlyProcessed||{},!abstPassesTargeting(t,e))return showSkippedVisitorDefault(e),abstShowPageWhenDomReady(),void(window.abstEarlyProcessed[e]=!0);var r=t.target_percentage;if(""!==r&&null!=r||(r=100),r<getRandomInt(1,100))return showSkippedVisitorDefault(e,!0),abstShowPageWhenDomReady(),abLog("ABST "+e+" skipped not in percentage target"),void(window.abstEarlyProcessed[e]=!0);var i=[String(n)];Object.keys(a).forEach((function(e){i.push(String(e))}));var o=i[getRandomInt(0,i.length-1)];window.btab_vars&&"1"==window.btab_vars.is_free&&i.length>2&&(o=i[getRandomInt(0,1)]);var s=String(o)!==String(n)?a[o]:"";if(!s&&!document.body)return window.abstEarlyProcessed[e]=!0,document.addEventListener("DOMContentLoaded",(function(){bt_experiment_w(e,o,"visit","")})),void abstShowPageWhenDomReady();bt_experiment_w(e,o,"visit",s),window.abstRedirecting||abstShowPageWhenDomReady(),window.abstEarlyProcessed[e]=!0}}function abstEdgeMap(){if(void 0!==window.__abstEdgeMap)return window.__abstEdgeMap;var e=document.documentElement?document.documentElement.getAttribute("data-abst-edge"):null;try{window.__abstEdgeMap=e?JSON.parse(e):{}}catch(e){window.__abstEdgeMap={}}return window.__abstEdgeMap}function abstSeedEdgeAudiences(){var e=document.documentElement?document.documentElement.getAttribute("data-abst-edge-audiences"):null;if(e)try{var t=JSON.parse(e);Object.keys(t).forEach((function(e){var n="abst_aud_"+e;null===sessionStorage.getItem(n)&&sessionStorage.setItem(n,String(t[e]||""))}))}catch(e){}}function abstStoredVariation(e){var t=abstGetCookie("btab_"+e);if(!t)return null;try{var n=JSON.parse(t);if(n&&n.skipped)return"_bt_skip_";if(n&&void 0!==n.variation&&""!==n.variation)return String(n.variation)}catch(e){}return null}function abstEdgeCorrect(e,t){var n=window.bt_experiments&&window.bt_experiments[e];if(n){var a=n.full_page_default_page,r=n.page_variations||{};if("_bt_skip_"===t||String(t)===String(a)){var i=new URL(window.location.href);i.searchParams.set("abst_pin","control"),abstRedirect(i.toString())}else r[t]?abstRedirect(r[t],e,t):abstShowPage()}}function abstFullPageEarly(){if(!window.abstRedirecting){var e=window.bt_experiments;if(e&&"object"==typeof e&&(!window.btab_vars||!window.btab_vars.is_preview)&&(!window.btab_vars||"1"!=window.btab_vars.wait_for_approval||window.abst&&window.abst.hasApproval)){var t=window.current_page;if(Array.isArray(t))for(var n in window.abstEarlyProcessed=window.abstEarlyProcessed||{},e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=e[n];if(a&&"full_page"===a.test_type){var r=abstEdgeMap();if(Object.prototype.hasOwnProperty.call(r,n)){var i=String(r[n]),o=abstStoredVariation(n);if(null!==o&&o!==i)return void abstEdgeCorrect(n,o)}else{var s=a.full_page_default_page;if(t.some((function(e){return String(e)===String(s)}))){var c=a.page_variations||{};if(a.test_winner&&"1"==a.autocomplete_on){if(String(a.test_winner)!==String(s)&&c[a.test_winner])return void abstRedirect(c[a.test_winner],n,a.test_winner)}else if("publish"===a.test_status&&0!=a.is_current_user_track&&!1!==window.abst.isTrackingAllowed){var d=abstGetCookie("btab_"+n);if(d){var l;try{l=JSON.parse(d)}catch(e){continue}if(l&&l.skipped)continue;var u=l&&l.variation;if(!u)continue;var b=c[u];if(b&&String(u)!==String(s))return void abstRedirect(b,n,u)}else if(abstFullPageNewVisitor(n),window.abstRedirecting)return}}}}}}}}function setupConsentPartners(){if("1"==window.btab_vars.wait_for_approval&&0==window.abst.hasApproval){if(abLog("ABST: Setting up cookie consent partners"),window.Cookiebot&&window.Cookiebot.consent&&window.Cookiebot.consent.statistics&&(abLog("ABST: Cookiebot consent granted for statistics"),setAbstApprovalStatus(!0)),window.addEventListener("CookiebotOnAccept",(function(){window.Cookiebot&&window.Cookiebot.consent&&window.Cookiebot.consent.statistics&&(abLog("ABST: Cookiebot consent granted (after accept)"),setAbstApprovalStatus(!0))})),window.CookieConsent&&window.CookieConsent.acceptedCategory&&window.CookieConsent.acceptedCategory("analytics")&&(abLog("ABST: CookieConsent consent granted for analytics"),setAbstApprovalStatus(!0)),document.addEventListener("cc:onConsent",(function(e){e.detail&&e.detail.cookie&&e.detail.cookie.acceptedCategory&&e.detail.cookie.acceptedCategory("analytics")&&(abLog("ABST: CookieConsent consent granted for analytics (after change)"),setAbstApprovalStatus(!0))})),"undefined"!=typeof wp_has_consent&&wp_has_consent("statistics")&&(abLog("ABST: WP consent api consent granted saving stats"),setAbstApprovalStatus(!0)),document.addEventListener("wp_listen_for_consent_change",(function(e){var t=e.detail;for(var n in t)t.hasOwnProperty(n)&&"statistics"===n&&"allow"===t[n]&&(abLog("ABST: WP consent api consent granted (after change)"),setAbstApprovalStatus(!0))})),window.getCkyCConsent){const e=getCkyCConsent();e&&e.categories&&e.categories.analytics&&(abLog("ABST: CookieYes consent granted for analytics"),setAbstApprovalStatus(!0))}if(document.addEventListener("cookieyes_consent_update",(function(e){if(window.getCkyCConsent){const e=getCkyCConsent();e&&e.categories&&e.categories.analytics&&(abLog("ABST: CookieYes consent granted for analytics (after update)"),setAbstApprovalStatus(!0))}})),"function"==typeof cmplz_has_consent&&cmplz_has_consent("statistics")&&(abLog("ABST: Complianz consent granted for statistics"),setAbstApprovalStatus(!0)),"undefined"!=typeof Cookies){let e=Cookie
1s.get("cookies_and_content_security_policy");if(e||(e=Cookies.get("wpe-us")),e)try{JSON.parse(e).includes("statistics")&&(abLog("ABST: Cookies and Content Security Policy plugin consent granted for statistics"),setAbstApprovalStatus(!0))}catch(e){console.warn("ABST: Error parsing Cookies and Content Security Policy consent cookie:",e)}}abstCheckUsercentricsConsent()}}function abstUsercentricsServiceNameMatches(e){return"string"==typeof e&&/ab ?split ?test|absplittest/i.test(e)}function abstUsercentricsEvaluateDetails(e){if(!e||"object"!=typeof e)return null;var t=e.services||{};for(var n in t){var a=t[n];if(a&&abstUsercentricsServiceNameMatches(a.name))return!(!a.consent||!a.consent.given)}var r=e.categories||{},i=null;for(var o in r){var s=r[o]||{},c=(o+" "+(s.name||"")).toLowerCase();if(-1!==c.indexOf("statistic")||-1!==c.indexOf("analytic"))return"ALL_ACCEPTED"===s.state;null===i&&-1!==c.indexOf("marketing")&&(i="ALL_ACCEPTED"===s.state)}return null!==i?i:e.consent&&e.consent.status?"ALL_ACCEPTED"===e.consent.status:null}function abstUsercentricsEvaluateServices(e){if(!Array.isArray(e)||!e.length)return null;for(var t=null,n=null,a=!0,r=!1,i=0;i<e.length;i++){var o=e[i]||{},s=!(!o.consent||!o.consent.status);if(abstUsercentricsServiceNameMatches(o.name))return s;var c=String(o.categorySlug||"").toLowerCase();"essential"===c||o.isEssential||(r=!0,-1!==c.indexOf("statistic")||-1!==c.indexOf("analytic")?t=(null===t||t)&&s:-1!==c.indexOf("marketing")&&(n=(null===n||n)&&s),s||(a=!1))}return null!==t?t:null!==n?n:r?a:null}function abstApplyUsercentricsDecision(e){!0!==e||window.abst.hasApproval?!1===e&&window.abst.hasApproval&&(abLog("ABST: Usercentrics consent revoked"),setAbstApprovalStatus(!1)):(abLog("ABST: Usercentrics consent granted"),setAbstApprovalStatus(!0))}function abstCheckUsercentricsConsent(){try{if(window.__ucCmp&&"function"==typeof window.__ucCmp.getConsentDetails)return void Promise.resolve(window.__ucCmp.getConsentDetails()).then((function(e){abstApplyUsercentricsDecision(abstUsercentricsEvaluateDetails(e))})).catch((function(){}));window.UC_UI&&"function"==typeof window.UC_UI.getServicesBaseInfo&&Promise.resolve(window.UC_UI.getServicesBaseInfo()).then((function(e){abstApplyUsercentricsDecision(abstUsercentricsEvaluateServices(e))})).catch((function(){}))}catch(e){}}function addServerEvents(e){const t=abstGetCookie("abst_server_events");if(t)try{const n=JSON.parse(decodeURIComponent(t));n.some((t=>t.eid===e.eid&&t.variation===e.variation&&t.type===e.type))||(n.push(e),abstSetCookie("abst_server_events",JSON.stringify(n),2),abLog("ABST: Server event added to existing",e))}catch(t){abstSetCookie("abst_server_events",JSON.stringify([e]),2)}else abstSetCookie("abst_server_events",JSON.stringify([e]),2),abLog("ABST: Server event added none existing creating",e)}function abstParseCurrencyValue(e){if(null==e)return null;let t=String(e).trim();if(!t)return null;t=t.replace(/\u00a0/g," ").replace(/\s+/g," ");let n=!1;if(/^\(.*\)$/.test(t)&&(n=!0,t=t.slice(1,-1)),-1!==t.indexOf("-")&&(n=!0),t=t.replace(/[^0-9,.\-]/g,""),!/[0-9]/.test(t))return null;const a=t.lastIndexOf(","),r=t.lastIndexOf(".");let i=t;if(-1!==a&&-1!==r)i=a>r?i.replace(/\./g,"").replace(",","."):i.replace(/,/g,"");else if(-1!==a){const e=i.length-a-1;i=e>0&&e<=2?i.replace(/\./g,"").replace(",","."):i.replace(/,/g,"")}else if(-1!==r){i.length-r-1>2&&(i=i.replace(/\./g,""))}i=i.replace(/(?!^)-/g,"");let o=parseFloat(i);return!isFinite(o)||o<=0?null:(n&&(o*=-1),!isFinite(o)||o<=0?null:Math.round(100*o)/100)}function abstEscapeRegExp(e){return String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function abstRememberDetectedOrderValue(e,t){const n=abstParseCurrencyValue(e);return null===n?null:(window.abst.abConversionValue=n.toFixed(2),window.abst.abConversionValueSource=t||"detected",abLog("ABST: Detected order value",window.abst.abConversionValue,"from",window.abst.abConversionValueSource),{value:n,formatted:n.toFixed(2),source:window.abst.abConversionValueSource})}function abstSetDetectedOrderValue(e,t){return!!abstRememberDetectedOrderValue(e,t)}function abstNeedsOrderValueDetection(){if(void 0!==conversion_details&&conversion_details)for(const e of Object.values(conversion_details))if(e&&(!0===e.use_order_value||"1"===e.use_order_value))return!0;
1if(void 0!==bt_experiments&&bt_experiments)for(const e of Object.values(bt_experiments))if(e&&(!0===e.use_order_value||"1"===e.use_order_value))return!0;return!1}function abstGetCustomOrderValue(){if(!window.abst)return null;const e=abstParseCurrencyValue(window.abst.abConversionValue);if(null===e||e<=0)return null;const t=window.abst.abConversionValueSource||"preset";return"default"===t&&1===e?null:{value:e,formatted:e.toFixed(2),source:t}}function abstGetOrderValueFromQuery(e){try{const t=new URLSearchParams(window.location.search),n=e?[String(e)]:["total_paid","amount_paid","payment_total","grand_total","order_total","ordertotal","total"];for(const e of n){const n=e.toLowerCase();for(const e of t.entries()){if(String(e[0]||"").toLowerCase()!==n)continue;const t=abstRememberDetectedOrderValue(e[1],"query:"+e[0]);if(t)return t}}}catch(e){console.warn("ABST: Failed to inspect query params for order value",e)}return null}function abstDetectOrderValueFromQuery(){return!!abstGetOrderValueFromQuery()}function abstDetectOrderValueFromDom(){const e=["[data-order-total]",".woocommerce-order-overview__total .amount",".order-total .amount",".order-total .woocommerce-Price-amount",".edd_purchase_total",".edd-order-total",".surecart-order-total",".fluentcart-order-total"];for(const t of e){const e=document.querySelectorAll(t);for(const n of e){const e=(n.getAttribute("data-order-total")||n.getAttribute("data-total")||n.textContent||"").trim();if(e&&abstSetDetectedOrderValue(e,"dom:"+t))return!0}}try{const e=(document.body&&document.body.innerText||"").slice(0,15e4),t=[/order total[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/grand total[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/amount paid[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/total paid[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/payment total[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i];for(const n of t){const t=e.match(n);if(t&&t[1]&&abstSetDetectedOrderValue(t[1],"text"))return!0}}catch(e){console.warn("ABST: Failed to inspect page text for order value",e)}return!1}function abstDetectOrderValue(){if(!window.abst||!abstNeedsOrderValueDetection())return!1;const e=abstParseCurrencyValue(window.abst.abConversionValue);return null!==e&&e>1&&"default"!==window.abst.abConversionValueSource||(!!abstDetectOrderValueFromQuery()||!!abstDetectOrderValueFromDom())}function abstGetOrderValueFromSelector(e){if(!e)return null;try{const t=document.querySelectorAll(e);for(const n of t){const t=(n.getAttribute("data-order-total")||n.getAttribute("data-total")||n.textContent||"").trim();if(!t)continue;const a=abstRememberDetectedOrderValue(t,"dom:"+e);if(a)return a}}catch(t){console.warn("ABST: Failed to inspect selector for order value",e,t)}return null}function abstGetOrderValueFromTextLabel(e){try{const t=(document.body&&document.body.innerText||"").slice(0,15e4),n=e?[new RegExp(abstEscapeRegExp(e)+"[^\\d$€£]{0,30}([$€£]?\\s*[\\d.,]+)","i")]:[/order total[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/grand total[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/amount paid[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/total paid[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i,/payment total[^\d$€£]{0,30}([$€£]?\s*[\d.,]+)/i];for(const a of n){const n=t.match(a);if(!n||!n[1])continue;const r=abstRememberDetectedOrderValue(n[1],e?"text:"+e:"text");if(r)return r}}catch(e){console.warn("ABST: Failed to inspect page text for order value",e)}return null}function abstGetAutoOrderValue(){const e=abstGetOrderValueFromQuery();if(e)return e;const t=["[data-order-total]",".woocommerce-order-overview__total .amount",".order-total .amount",".order-total .woocommerce-Price-amount",".edd_purchase_total",".edd-order-total",".surecart-order-total",".fluentcart-order-total"];for(const e of t){const t=abstGetOrderValueFromSelector(e);if(t)return t}return abstGetOrderValueFromTextLabel("")}function abstResolveOrderValue(e){const t=abstGetCustomOrderValue();if(t)return t;if(!e||!0!==e.use_order_value&&"1"!==e.use_order_value)return null;const n=e.order_value_fallback_method||"auto";return"url_parameter"===n?abstGetOrderValueFromQuery(e.order_value_url_parameter||""):"css_selector"===n?abstGetOrderValueFromSelector(e.order_value_css_selector||""):"page_text_label"===n?abstGetOrderValueFromTextLabel(e.order_value_text_label||""):abstGetAutoOrderValue()}function abstMainInit(){if(document.body&&document.body.classList.contains("ab-test-setup-complete"))return;if(window.abstRedirecting)return;setupConsentPartners();const e=abstGetCookie("abst_server_events");if(e){let u;
1try{u=JSON.parse(decodeURIComponent(e))}catch(b){u=[]}Array.isArray(u)&&u.forEach((e=>{btab_track_event(e)})),abstDeleteCookie("abst_server_events"),abLog("ABST: Server events processed")}window.btab_vars&&!window.btab_vars.is_preview&&document.querySelectorAll(".ab-test-page-redirect").forEach((function(e){e.remove()}));if(document.querySelectorAll('[bt_hidden="true"]').forEach((function(e){e.remove()})),document.addEventListener("mousemove",(function(e){window.abst.currentMousePos=e.pageX})),document.body.addEventListener("mousedown",userActiveNow),document.body.addEventListener("keydown",userActiveNow),document.body.addEventListener("touchstart",userActiveNow),"abConversionValue"in window.abst||(window.abst.abConversionValue=1),!("abConversionValueSource"in window.abst)){const p=abstParseCurrencyValue(window.abst.abConversionValue);window.abst.abConversionValueSource=null!==p&&p>1?"preset":"default"}if(window.abst.timerInterval=setInterval((function(){window.abst.currscroll==window.scrollY&&window.abst.currentMousePos==window.abst.oldMousePos||(window.abst.currscroll=window.scrollY,window.abst.oldMousePos=window.abst.currentMousePos,userActiveNow()),window.abst.abactive&&abstOneSecond()}),1e3),void 0!==conversion_details&&conversion_details){var t=null,n=null,a=window.location.href;Object.entries(conversion_details).forEach((function([e,r]){if(abstUrlPatternMatches(r.conversion_page_url,a))abLog("ABST: "+e+" URL matched, converting: "+r.conversion_page_url+" to "+a),t=e;else if(r.conversion_page_url===a&&void 0!==r.conversion_page_url&&""!=r.conversion_page_url)t=e;else{if(!abstCurrentPageMatches(r.conversion_page_id))return!0;t=e}if(!(n=abstGetCookie("btab_"+t)))return!0;try{n=JSON.parse(n)}catch(e){return!0}if(1==n.conversion)return!0;if(conversionValue=1,!0===r.use_order_value||"1"===r.use_order_value){const e=abstResolveOrderValue(r);e&&e.formatted&&(conversionValue=e.formatted)}bt_experiment_w(t,n.variation,"conversion",!1,conversionValue)}))}if(void 0===bt_experiments)return abstShowPage(),document.body.classList.add("ab-test-setup-complete"),window.dataLayer=window.dataLayer||[],void window.dataLayer.push({event:"ab-test-setup-complete"});{function r(e){return/^ab-\d+$/.test(e)}function i(e,t){var n;for(n=t-1;n>=0;n--)if(r(e[n]))return e[n];for(n=t+1;n<e.length;n++)if(r(e[n]))return e[n];return!1}document.querySelectorAll("[class^='ab-'],[class*=' ab-']").forEach((function(e,t){if(e.className.includes("ab-var-")||e.className.includes("ab-convert")){var n=e.className;n=n.split(" ");var a=!1,r=!1,o=!1,s=!1,c=!1,d=!1;n.forEach((function(e,t){var l,u=!!((l=e.match(/^ab-var-(\d+)-(.+)$/))&&l[1]&&l[2])&&{testId:l[1],variation:l[2]};u?(a=u.variation,o=u.testId):e.startsWith("ab-var-")?(a=e.replace("ab-var-",""),o=i(n,t)):e.startsWith("ab-goal-")?(r=e,s=i(n,t)):e.startsWith("ab-convert-")&&(d=!0,c=function(e,t){var n=e.replace(t,"");return!!/^[0-9]+$/.test(n)&&n}(e,"ab-convert-")),"ab-convert"==e&&(d=!0,c=i(n,t))})),!1!==a&&!1!==o&&(e.setAttribute("bt-eid",o.replace("ab-","")),e.setAttribute("bt-variation",a),n.forEac
1h((function(t){(t.startsWith("ab-var-")||t===o)&&e.classList.remove(t)}))),1==d&&!1!==c&&abstConvert(c.replace("ab-","")),!1!==r&&!1!==s&&abstGoal(s.replace("ab-",""),r.replace("ab-goal-",""))}e.className.includes("ab-click-convert-")&&Array.from(e.classList).forEach((function(e){e.trim().startsWith("ab-click-convert-")&&abClickListener(e.replace("ab-click-convert-",""),"."+e)}))})),document.querySelectorAll("[data-bt-variation]").forEach((function(e){e.setAttribute("bt-variation",e.getAttribute("data-bt-variation")),e.setAttribute("bt-eid",e.getAttribute("data-bt-eid"))})),document.querySelectorAll(".bricks-element [bt-eid]").forEach((e=>{let t=e.closest(".bricks-element");t.setAttribute("bt-eid",e.getAttribute("bt-eid")),t.setAttribute("bt-variation",e.getAttribute("bt-variation")),e.removeAttribute("bt-eid"),e.removeAttribute("bt-variation")})),abstWarnOnUnsafeVariationNames(),abstWarnOnUnsafeExperimentIds();let w=new URLSearchParams(window.location.search);const f=w.get("abtv"),g=w.get("abtid");if(f&&g&&bt_experiments[g])return abLog("AB Split Test: URL variables detected. Skipping user."),showSkippedVisitorDefault(g,!0,f),document.body.classList.add("ab-test-setup-complete"),!0;bt_experiments=Object.entries(bt_experiments).sort(((e,t)=>"full_page"==e[1].test_type?-1:"full_page"==t[1].test_type?1:0)).reduce(((e,t)=>Object.assign(e,{[t[0]]:t[1]})),{}),Object.entries(bt_experiments).forEach((([e,t])=>{try{if(t.test_winner&&"1"==t.autocomplete_on)return"full_page"==t.test_type&&t.full_page_default_page==btab_vars.post_id?t.test_winner!==btab_vars.post_id?(null==t.page_variations[t.test_winner]||abstRedirect(t.page_variations[t.test_winner],e,t.test_winner),!1):(abstShowPage(),!1):("magic"==t.test_type?(abLog("Magic winner is "+t.test_winner+" showing magic test"),showMagicTest(e,t.test_winner)):"css_test"==t.test_type?(abLog("Split Test CSS winner. Showing "+t.test_winner),document.body.classList.add(t.test_winner)):document.querySelectorAll('[bt-eid="'+e+'"][bt-variation="'+t.test_winner+'"]').forEach((function(e){e.classList.add("bt-show-variation")})),!0);if("css_test"==t.test_type)for(var n=0;n<t.css_test_variations;n++){var a=document.createElement("script");a.className="bt-css-scripts",a.setAttribute("bt-variation","test-css-"+e+"-"+(n+1)),a.setAttribute("bt-eid",e),document.body.appendChild(a)}if("full_page"==t.test_type&&void 0!==current_page&&Array.isArray(current_page)&&current_page.some((e=>String(e)===String(t.full_page_default_page)))){var r=document.createElement("div");r.className="bt-redirect-handle",r.style.display="none",r.setAttribute("bt-variation",t.full_page_default_page),r.setAttribute("bt-eid",e),document.body.appendChild(r),Object.entries(t.page_variations).forEach((function([t,n]){var a=document.createElement("div");a.className="bt-redirect-handle",a.style.display="none",a.setAttribute("bt-variation",t),a.setAttribute("bt-eid",e),a.setAttribute("bt-url",n),document.body.appendChild(a)}))}var i=t.conversion_type||t.conversion_page||"",o=t.conversion_page_id;if(null!=o&&""!==o||void 0===t.conversion_page||null===t.conversion_page||""===t.conversion_page||isNaN(t.conversion_page)||(o=parseInt(t.conversion_page,10)),"selector"==i&&""!=t.conversion_selector){var s=t.conversion_selector;abClickListener(e,s,0)}if("link"==i&&""!=t.conversion_link_pattern){var c=t.conversion_link_pattern;abLinkPatternListener(e,c)}"scroll"==i&&void 0!==t.conversion_scroll&&""!==t.conversion_scroll&&shouldSetupScrollListener(e,t)&&abScrollListener(e,t.conversion_scroll),"string"==typeof i&&0===i.indexOf("form-")&&abstInjectFormFields();var d=t.conversion_abhs_form_id||t.conversion_hubspot_form_id;if("form-abhs"!==i&&"form-hubspot"!==i||!d||abstHubspotListener(e,d,0),t.goals)for(var l=Object.keys(t.goals),u=0;u<l.length;u++){n=l[u];if(!t.goals[n])continue;const a=Object.keys(t.goals[n])[0];if("selector"===a&&""!=t.goals[n].selector&&abClickListener(e,t.goals[n].selector,n),"link"===a&&""!=t.goals[n].link&&abLinkPatternListener(e,t.goals[n].link,n),"scroll"===a&&void 0!==t.goals[n].scroll&&""!==t.goals[n].scroll&&shouldSetupScrollListener(e,t)&&abScrollListener(e,t.goals[n].scroll,n),startInverval=!1,"text"===a){if(startInverval=!0,convstatus=abstGetCookie("btab_"+e),startInverval&&convstatus)try{convstatus=JSON.parse(convstatus),convstatus&&convstatus.goals&&1==convstatus.goals[n]&&(startInverval=!1)}catch(e){}""==t.goals[n].text&&(startInverval=!1),startInverval&&startTextWatcher(e,t.goals[n].text,n)}if("page"===a){var b=t.goals[n].page;""===b||null==b||!abstCurrentPageMatches(b)&&b!=btab_vars.post_id||abstGoal(e,n)}else abstIsCurrentPageGoalKey(a)&&abstCurrentPageMatches(a)&&(abLog("ABST: goal page token matched: "+a),abstGoal(e,n));if("url"===a){var p=t.goals[n].url;p&&p.length>1&&abstUrlPatternMatches(p,window.location.href)&&(abLog("ABST: goal URL matched: "+p+" to "+window.location.href),abstGoal(e,n))}var w=t.goals[n][a];"string"==typeof w&&0===w.indexOf("form-")&&abstInjectFormFields(),"form-abhs"!==a&&"form-hubspot"!==a||"string"!=typeof w||""===w||abstHubspotListener(e,w,n),"surecart-order-paid"===a&&window.scData&&function(t){document.addEventListener("scOrderPaid",(function(){abLog("ABST: surecart OrderPaid goal "+t),abstGoal(e,t)}))}(n)}if("text"==i){if(startInverval=!0,bt_experiments[e]||(startInverval=!1),convstatus=abstGetCookie("btab_"+e),startInverval&&convstatus)try{convstatus=JSON.parse(convstatus),1==convstatus.conversion&&(startInverval=!1)}catch(e){}""==t.conversion_text&&(startInverval=!1),startInverval&&startTextWatcher(e,t.conversion_text)}"surecart-order-paid"==i&&window.scData&&document.addEventListener("scOrderPaid",(function(n){abLog("surecart OrderPaid");const a=n.detail;a&&a.amount_due&&(1==t.use_order_value&&(window.abst.abConversionValue=(a.amount_due/100).toFixed(2)),abstConvert(e,window.abst.abConversionValue))})),"fingerprint"!=i||localStorage.getItem("ab-uuid")||(abLog("ab-uuid: set fingerprint"),setAbFingerprint())}catch(t){console.error("ABST: Error processing experiment "+e+":",t)}}));var o=document.querySelectorAll('[bt-eid]:not([bt-eid=""])[bt-variation]:not([bt-variation=""])'),s={},c={};o.forEach((function(e){var t=e.getAttribute("bt-eid"),n=e.getAttribute("bt-variation"),a=e.getAttribute("bt-url");void 0===s[t]&&(s[t]=[],c[t]=[]),s[t].includes(n)||(s[t].push(n),c[t][n]=a)}
1)),Object.keys(bt_experiments).forEach((function(e){if("css_test"==bt_experiments[e].test_type){s[e]=[],c[e]=[];for(var t=1;t<=parseInt(bt_experiments[e].css_test_variations);t++)s[e].push("test-css-"+e+"-"+t),c[e]["test-css-"+e+"-"+t]=""}else if("magic"==bt_experiments[e].test_type&&bt_experiments[e].magic_definition&&bt_experiments[e].magic_definition.length>0){var n=parseMagicTestDefinition(bt_experiments[e].magic_definition);if(!(Array.isArray(n)&&n.length&&n[0]&&Array.isArray(n[0].variations)))return void console.warn("ABST: magic_definition unavailable for experiment "+e+". Skipping magic variation registration.");s[e]=[],c[e]=[];for(t=0;t<n[0].variations.length;t++)s[e].push("magic-"+e+"-"+t),c[e]["magic-"+e+"-"+t]=""}}));var d=abstEdgeMap();window.abstEarlyProcessed=window.abstEarlyProcessed||{},Object.keys(d).forEach((function(e){if(!window.abstRedirecting&&!window.abstEarlyProcessed[e]){var t=bt_experiments[e];if(t&&"full_page"===t.test_type&&(window.abstEarlyProcessed[e]=!0,"publish"===t.test_status))if(0!=t.is_current_user_track&&!1!==window.abst.isTrackingAllowed){var n=String(d[e]),a=abstStoredVariation(e);null===a?(abstPassesTargeting(t,e),"_bt_skip_"===n?showSkippedVisitorDefault(e,!0):(bt_experiment_w(e,n,"visit",""),abstShowPage())):a===n?abstShowPage():abstEdgeCorrect(e,a)}else abstShowPage()}})),Object.keys(s).sort(((e,t)=>{const n=bt_experiments[e],a=bt_experiments[t],r=n?n.test_type:"",i=a?a.test_type:"",o=n?n.test_status:"",s=a?a.test_status:"";return("full_page"===r?"publish"===o?0:"complete"===o?1:2:3)-("full_page"===i?"publish"===s?0:"complete"===s?1:2:3)})).forEach((function(e){if(window.abstRedirecting)return!0;if(window.abstEarlyProcessed&&window.abstEarlyProcessed[e])return!0;if(void 0===bt_experiments[e])return console.info("ABST: Test ID "+e+" does not exist."),showSkippedVisitorDefault(e),!0;if(bt_experiments[e].test_winner&&"1"==bt_experiments[e].autocomplete_on)return!0;if(0==bt_experiments[e].is_current_user_track||!1===window.abst.isTrackingAllowed)return showSkippedVisitorDefault(e),!0;var t=abstGetCookie("btab_"+e);try{t&&JSON.parse(t).skipped&&(abstDeleteCookie("btab_"+e),console.info("ABST: previously skipped experiment will begin "+e))}catch(t){abstDeleteCookie("btab_"+e)}if("publish"!==bt_experiments[e].test_status)return showSkippedVisitorDefault(e),!0;t=abstGetCookie("btab_"+e);var n="";if(t)try{var a=JSON.parse(t);n=a.variation}catch(e){abLog("Error parsing cookie data:",e)}else{if("css_test"==bt_experiments[e].test_type){var r=getRandomInt(1,parseInt(bt_experiments[e].css_test_variations))-1;n=s[e][r]}else if("full_page"==bt_experiments[e].test_type){var i=bt_experiments[e].page_variations||{},o=String(btab_vars.post_id);if(!Object.keys(i).includes(o))return abLog("ABST: Full page test - user on default page, delegating to shared decision"),abstFullPageNewVisitor(e),!0;abLog("ABST: Full page test - user on variation page, assigning to:",n=o)}else{var d=s[e];if("thompson"==bt_experiments[e].conversion_style&&btab_vars.is_agency){abLog("ABST MAB: starting selection for experiment",e);var l=bt_experiments[e].variation_meta||{},u=[];d.forEach((function(e){var t=l[e]&&l[e].weight?parseFloat(l[e].weight):1;u.push({variation:e,weight:t})})),abLog("ABST MAB: raw weights",u);var b=u.reduce((function(e,t){return e+t.weight}),0);u.forEach((function(e){e.weight=e.weight/b})),abLog("ABST MAB: normalized weights",u);var p=2==d.length?.1:.05,w=0;if(u.forEach((function(e){e.weight<p&&(w+=p-e.weight,e.weight=p)})),w>0){var f=u.filter((function(e){return e.weight>p})),g=f.reduce((function(e,t){return e+t.weight}),0);g>0&&f.forEach((function(e){e.weight-=e.weight/g*w}))}abLog("ABST MAB: adjusted weights",u);for(var m=Math.random(),v=0,_=(r=0,0);_<u.length;_++)if(m<=(v+=u[_].weight)){r=_,abLog("ABST MAB: chose variation",n=u[_].variation);break}n||(n=u[u.length-1].variation,r=u.length-1)}else{r=getRandomInt(0,d.length-1);n=d[r]}}if("1"==btab_vars.is_free&&s[e].length>2){r=getRandomInt(0,1);console.info("Free version of AB Split Test is limited to 1 variation. Your others will not be shown. Upgrade: https://absplittest.com/pricing?ref=ug"),n=s[e][r]}}var h=!1;if("css_test"==bt_experiments[e].test_type?document.body.classList.add(n):"magic"==bt_experiments[e].test_type||(h=document.querySelectorAll('[bt-eid="'+e+'"][bt-variation="'+n+'"]')),t){try{t=JSON.parse(t)}catch(t){return console.error("ABST: Error parsing cookie for experiment",e),!0}var y=c[e];if((y=y[n])&&!btab_vars.is_preview)return abstRedirect(y,e,n),!0;if(h&&h.length>0&&h.forEach((function(e){e.classList.add("bt-show-variation")})),"magic"==bt_experiments[e].test_type&&bt_experiments[e].magic_definition&&bt_experiments[e].magic_definition.length>0){var S=0;t.variation&&"string"==typeof t.variation&&(S=parseInt(t.variation.split("-").pop())),showMagicTest(e,S)}return!0}if(!t){var A=bt_experiments[e].target_percentage;if(""!==A&&null!=A||(A=100),!abstPassesTargeting(bt_experiments[e],e))return showSkippedVisitorDefault(e),!0;if(A<getRandomInt(1,100))return showSkippedVisitorDefault(e,!0),abLog("ABST "+e+" skipped not in percentage target"),!0;bt_experiments[e].variations=bt_get_variations(e)}if(h&&!h.length)return showSkippedVisitorDefault(e),abLog("ABST variation doesnt exist, or doesnt match. "),!0;y=Object.keys(c).length>0?(y=c[e])[n]:"","magic"==bt_experiments[e].test_type&&(r=n.split("-").pop(),showMagicTest(e,r)),h&&h.length>0&&h.forEach((function(e){e&&e.classList.add("bt-show-variation")}));var k=!0===bt_experiments[e].log_on_visible;if("ab_test"==bt_experiments[e].test_type)k?watch_for_tag_event(e,void 0,n):bt_experiment_w(e,n,"visit",y);else if("magic"==bt_experiments[e].test_type){if(k)magic_definition.forEach(((t,a)=>{watch_for_tag_event(e,t.selector,n,t.scope||null)}));else Array.isArray(magic_definition)&&magic_definition.some((function(e){if(!e||"string"!=typeof e.selector)return!1;if(!matchesMagicScope(e.scope))return!1;try{return document.querySelectorAll(e.selector).length>0}catch(e){return!1}}
1))&&bt_experiment_w(e,n,"visit",y)}else bt_experiment_w(e,n,"visit",y)})),abstShowPage()}btIsLocalhost()&&console.info("AB Split Test: It looks like you're on a localhost, using local storage instead of cookies. External Conversion Pixels and server side conversions will not work on local web servers."),abst_find_analytics(),window.dispatchEvent(new Event("resize"));var l=new Event("ab-test-setup-complete",{bubbles:!0});document.body.dispatchEvent(l),document.body.classList.add("ab-test-setup-complete"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"ab-test-setup-complete"}),processAbstConvert(),processAbstGoal(),check_heatmap_tracking(),initAbstDynamicElementObserver()}function processAbstConvert(){if(window.abConvert&&window.abConvert.length>0){var e=window.abConvert.slice();window.abConvert.length=0,e.forEach((function(e){abstConvert(e)}))}}function processAbstGoal(){if(window.abGoal&&window.abGoal.length>0){var e=window.abGoal.slice();window.abGoal.length=0,e.forEach((function(e){abLog("processAbstGoal",e),abstGoal(e[0],e[1])}))}}function startTextWatcher(e,t,n=null){if(n||(n=0),bt_experiments[e]&&"draft"!=bt_experiments[e].test_status){void 0===window.abst.intervals[e]&&(window.abst.intervals[e]={}),window.abst.intervals[e]&&window.abst.intervals[e][n]&&clearInterval(window.abst.intervals[e][n]);var a=[];t&&"string"==typeof t&&(a=t.indexOf("|")>=0?t.split("|").map((function(e){return e.trim()})).filter((function(e){return e.length>0})):[t.trim()]),0!==a.length&&(window.abst.intervals[e][n]=setInterval((function(){try{let f=!1;for(var t=0;t<a.length&&!f;t++){var r=a[t];if(r){r.replace(/'/g,"\\'");for(var i=document.body.getElementsByTagName("*"),o=0;o<i.length;o++){var s=i[o];if(s.textContent&&s.textContent.indexOf(r)>=0&&null!==s.offsetParent){f=!0;break}}if(!f)for(var c=document.querySelectorAll("iframe"),d=0;d<c.length;d++)try{var l=c[d],u=l.contentDocument?l.contentDocument.body:null;if(u)if("undefined"!=typeof jQuery&&window.jQuery){if(jQuery(u).find("*").filter((function(){return this.textContent&&this.textContent.indexOf(r)>=0&&null!==this.offsetParent})).length>0){f=!0;break}}else{for(var b=u.getElementsByTagName("*"),p=0;p<b.length;p++){var w=b[p];if(w.textContent&&w.textContent.indexOf(r)>=0&&null!==w.offsetParent){f=!0;break}}if(f)break}}catch(e){continue}}}f&&(0==n?abstConvert(e):abstGoal(e,n),clearInterval(window.abst.intervals[e][n]))}catch(t){console.error("Error in text watcher:",t),clearInterval(window.abst.intervals[e][n])}}),1e3))}}function abstConvert(e="",t=1){if(!window.bt_experiments[e])return!0;if(1==t&&window.bt_experiments[e]&&(!0===window.bt_experiments[e].use_order_value||"1"===window.bt_experiments[e].use_order_value)){const n=abstResolveOrderValue(window.bt_experiments[e]);n&&n.formatted&&(t=n.formatted)}if(abLog("abstConvert",e,t),""!==e){var n=abstGetCookie("btab_"+e);try{n=JSON.parse(n)}catch(e){n=null}if(n)if(0==n.conversion){if(0==bt_experiments[e].is_current_user_track||!1===window.abst.isTrackingAllowed)return!1;bt_experiment_w(e,n.variation,"conversion",!1,t),n.conversion=1;var a=JSON.stringify(n);abstSetCookie("btab_"+e,a,1e3),window.btab_vars&&"1"===window.btab_vars.abst_block_goals_after_conversion&&(window.abst.intervals&&window.abst.intervals[e]&&("number"==typeof window.abst.intervals[e]?clearInterval(window.abst.intervals[e]):"object"==typeof window.abst.intervals[e]&&Object.values(window.abst.intervals[e]).forEach((function(e){e&&clearInterval(e)})),delete window.abst.intervals[e]),window.abst.timer&&Object.keys(window.abst.timer).forEach((function(t){t.startsWith("goal-"+e+"-")&&delete window.abst.timer[t]})))}else abLog("ABST: "+bt_experiments[e].name+": Visitor has already converted");else bt_experiments[e]||abLog("ABST: Test ID not found or test not active")}}function abstGoal(e="",t=""){if(""!==e&&""!==t){var n=abstGetCookie("btab_"+e);if(n){try{n=JSON.parse(n)}catch(e){return!1}if(window.btab_vars&&"1"===window.btab_vars.abst_block_goals_after_conversion&&1===n.conversion)abLog("ABST: Goals are not logged after primary conversion");else{if(!bt_experiments||!bt_experiments[e])return!1;if(0==bt_experiments[e].is_current_user_track||!1===window.abst.isTrackingAllowed)return!1;if(Array.isArray(n.goals)){if(!n.goals[t])if(n.goals[t]=1,bt_experiment_w(e,n.variation,t,!1,1),abstSetCookie("btab_"+e,JSON.stringify(n),1e3),window.abst.intervals&&window.abst.intervals[e]&&"object"==typeof window.abst.intervals[e]&&window.abst.intervals[e][t]&&(clearInterval(window.abst.intervals[e][t]),delete window.abst.intervals[e][t]),window.abst.timer){var a="goal-"+e+"-"+t;void 0!==window.abst.timer[a]&&delete window.abst.timer[a]}}else abLog("ABST: "+(bt_experiments[e]?.name||e)+": Visitor has already goaled")}}else bt_experiments[e]||abLog("ABST: Test ID not found or test not active")}}function showSkippedVisitorDefault(e,t=!1,n=!1,a=!1){if(!window.bt_experiments[e])return btv=(r=document.querySelector('[bt-eid="'+e+'"]'))?r.getAttribute("bt-variation"):null,document.querySelectorAll('[bt-eid="'+e+'"][bt-variation="'+btv+'"]').forEach((function(e){e.classList.add("bt-show-variation")})),!0;var r;if(n&&e){if("css_test"==bt_experiments[e].test_type)document.body.classList.add(n);else{if("full_page"==bt_experiments[e].test_type)return n==btab_vars.post_id||(url=bt_experiments[e].page_variations[n],void 0!==url?(abstRedirect(url),!0):(abstShowPage(),!1));if("magic"==bt_experiments[e].test_type){const t=n.replace("Variation ","").replace("(original)","").replace("(Original)","").replace("magic-","").trim().toLowerCase();let a;
1if(isNaN(t)||isNaN(parseInt(t))){if(1!==t.length||!/[a-z]/.test(t))return console.error("Invalid variation format:",n),!1;a=t.charCodeAt(0)-"a".charCodeAt(0)}else a=parseInt(t);if(a<0||a>25)return console.error("Invalid variation letter:",t),!1;showMagicTest(e,a,!0)}else document.querySelectorAll('[bt-eid="'+e+'"]').forEach((function(e){e.classList.remove("bt-show-variation")})),document.querySelectorAll('[bt-eid="'+e+'"][bt-variation="'+n+'"]').forEach((function(e){e.classList.add("bt-show-variation")})),scrollAndHighlightElement('[bt-eid="'+e+'"][bt-variation="'+n+'"]')}return abstShowPage(),t&&skippedCookie(e,n),!0}if(""!==bt_experiments[e].test_winner&&"1"==bt_experiments[e].autocomplete_on){if("full_page"==bt_experiments[e].test_type){if(url=bt_experiments[e].page_variations[bt_experiments[e].test_winner],void 0!==url)return abstRedirect(url),!0;abLog("ABST: Full page test complete without matching page winner. Showing current page."),abstShowPage()}if("css_test"==bt_experiments[e].test_type)return abLog("ABST: css test winner, showing ver "+bt_experiments[e].test_winner),document.body.classList.add("test-css-"+e+"-"+bt_experiments[e].test_winner),!0;if("magic"==bt_experiments[e].test_type)return abLog("ABST: magic test winner, showing ver "+bt_experiments[e].test_winner),showMagicTest(e,bt_experiments[e].test_winner),!0}if("full_page"==bt_experiments[e].test_type)return abstShowPage(),t&&skippedCookie(e,bt_experiments[e].full_page_default_page),!0;if("css_test"==bt_experiments[e].test_type)return document.body.classList.add("test-css-"+e+"-1"),t&&skippedCookie(e,"test-css-"+e+"-1"),!0;if(e){var i=!1;document.querySelectorAll('[bt-eid="'+e+'"]').forEach((function(e,t){var n=e.getAttribute("bt-variation").toLowerCase();["original","one","1","default","standard","a","control"].includes(n)&&(btv=n,e.classList.add("bt-show-variation"),i=!0)})),i||(btv=function(){var t=document.querySelector('[bt-eid="'+e+'"]');return t?t.getAttribute("bt-variation"):null}(),document.querySelectorAll('[bt-eid="'+e+'"][bt-variation="'+btv+'"]').forEach((function(e){e.classList.add("bt-show-variation")}))),t&&skippedCookie(e,btv)}}function skippedCookie(e,t){var n={eid:e,variation:t,conversion:1,skipped:1};return abstSetCookie("btab_"+e,n=JSON.stringify(n),1e3),!0}function abstMergeRedirectQuery(e,t,n){var a;try{a=new URL(e,window.location.href)}catch(t){return e}var r=new URLSearchParams(t||""),i=!1;return r.forEach((function(e,t){"ssr"!==t&&"abst_pin"!==t&&"abst_uuid"!==t&&"abst_eid"!==t&&"abst_variation"!==t&&(a.searchParams.has(t)||(a.searchParams.append(t,e),i=!0))})),!a.hash&&n&&(a.hash=n),i||n?a.toString():e}function abRedirectUrl(e){return e.startsWith("http")||e.startsWith("/")||(e="/"+e),abstMergeRedirectQuery(e,window.location.search,window.location.hash)}function abstOneSecond(){Object.keys(window.abst.timer).length>0&&(Object.entries(window.abst.timer).forEach((([e,t])=>{if(window.abst.timer[e]>-1&&(window.abst.timer[e]=window.abst.timer[e]-1),0==window.abst.timer[e]){if(e.includes("goal-")){var n=e.split("-");abstGoal(n[1],n[2])}else abstConvert(e);window.abst.timer[e]=-1}})),localStorage.setItem("absttimer",JSON.stringify(window.abst.timer)))}function userActiveNow(){window.abst.currscroll=window.scrollY,window.abst.abactive=!0,clearTimeout(window.abst.timeoutTimer),window.abst.timeoutTimer=setTimeout(abstActiveTimeout,window.abst.timeoutTime)}function abstActiveTimeout(){window.abst.abactive=!1}function getRandomInt(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function normalRandom(){for(var e=0,t=0;0===e;)e=Math.random();for(;0===t;)t=Math.random();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)}function gammaRandom(e){if(e<1){var t=Math.random();return gammaRandom(1+e)*Math.pow(t,1/e)}for(var n=e-1/3,a=1/Math.sqrt(9*n);;){var r=normalRandom(),i=Math.pow(1+a*r,3);if(!(i<=0))if((t=Math.random())<1-.331*Math.pow(r,4)||Math.log(t)<.5*r*r+n*(1-i+Math.log(i)))return n*i}}function betaRandom(e,t){var n=gammaRandom(e);return n/(n+gammaRandom(t))}function abstProbeCookieDomain(){if(void 0!==abstCookieDomainCache)return abstCookieDomainCache;abstCookieDomainCache=null;try{var e=window.location.hostname;if(/^\d+(\.\d+){3}$/.test(e))return abstCookieDomainCache;for(var t="abst_dprobe",n="https:"===window.location.protocol?"; SameSite=None; Secure":"; SameSite=Lax",a=e.replace(/^www\./,"").split("."),r=a.length-2;r>=0;r--){var i="."+a.slice(r).join(".");if(document.cookie=t+"=1; path=/"+n+"; domain="+i,-1!==document.cookie.indexOf(t+"=")){document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; path=/"+n+"; domain="+i,abstCookieDomainCache=i;break}}}catch(e){}return abstCookieDomainCache}function abstSetCookie(e,t,n){if(btIsLocalhost())return btSetLocal(e,t);var a=new Date;a.setDate(a.getDate()+n);var r,i=null==n?"":"; expires="+a.toUTCString(),o="https:"===window.location.protocol?"; SameSite=None; Secure":"; SameSite=Lax",s=escape(t)+"; path=/"+i+o,c=abstProbeCookieDomain();if(c){if(document.cookie=e+"="+s+"; domain="+c,(r=abstGetCookie(e))&&r===t)return!0;abLog("ABST: Main domain failed, trying subdomain fallback")}return document.cookie=e+"="+s,(r=abstGetCookie(e))&&r===t?(abLog("ABST C
1ookie set on subdomain:",window.location.hostname),!0):(abLog("ABST: Subdomain failed, trying minimal cookie"),document.cookie=e+"="+escape(t)+";path=/",(r=abstGetCookie(e))&&r===t?(abLog("ABST Cookie set on minimal cookie"),!0):(abLog("ABST: Cookie set on localStorage backup. ALERT COOKIES ARE BEING BLOCKED."),abLog("ABST: Server side conversions will not work. Client side conversions will work."),btSetLocal(e,t)))}function abstDeleteCookie(e){if(e){var t=e+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; path=/";try{document.cookie=t;for(var n=window.location.hostname.replace(/^www\./,"").split("."),a=0;a<n.length-1;a++)document.cookie=t+"; domain=."+n.slice(a).join(".")}catch(e){}try{localStorage.removeItem(e)}catch(e){}try{sessionStorage.removeItem(e)}catch(e){}}}function abstGetCookie(e){if(!e)return!1;var t,n,a,r=document.cookie.split(";");for(t=0;t<r.length;t++)if(n=r[t].substr(0,r[t].indexOf("=")),a=r[t].substr(r[t].indexOf("=")+1),(n=n.replace(/^\s+|\s+$/g,""))==e)return unescape(a);var i=btGetLocal(e);return i||!1}function abstShowPage(e=!1){if((!window.abstRedirecting||e)&&document.body){document.body.classList.add("abst-show-page"),document.documentElement.style.transition="",document.documentElement.style.opacity="";try{parent.window.document.body.classList.add("abst-show-page")}catch(e){}}}function btSetLocal(e,t){0!=window.abst.hasApproval?localStorage.setItem(e,t):sessionStorage.setItem(e,t)}function btGetLocal(e){return 0==window.abst.hasApproval?sessionStorage.getItem(e):localStorage.getItem(e)}function btDeleteLocal(e){0!=window.abst.hasApproval?localStorage.removeItem(e):sessionStorage.removeItem(e)}function btIsLocalhost(){return"localhost"===location.hostname||"127.0.0.1"===location.hostname||location.hostname.endsWith(".local")||location.hostname.endsWith(".test")}function bt_get_variations(e){let t=[];return document.querySelectorAll('[bt-eid="'+e+'"]').forEach((function(e){var n=e.getAttribute("bt-variation");-1===t.indexOf(n)&&t.push(n)})),"1"==btab_vars.is_free&&(t=t.slice(0,2)),t}function bt_experiment_w(e,t,n,a,r=1){if("_bt_skip_"==t||btab_vars.is_preview||!e||!t)return!0;if(!bt_experiments[e].is_current_user_track||!1===window.abst.isTrackingAllowed)return abLog("ABST: ignoring "+e+" because user is not tracked"),!0;"magic"==bt_experiments[e].test_type&&t.includes("-")&&(t="magic-"+t.split("-").pop());var i=bt_experiments[e].conversion_type||bt_experiments[e].conversion_page||"";if("fingerprint"==i&&!localStorage.getItem("ab-uuid"))return abLog("ABST: bt_exp_w: waiting for fingerprint"),setTimeout(bt_experiment_w,500,e,t,n,a,r),!0;abLog("ABST: bt_experiment_w",e,t,n,a,r),bt_experiments[e]&&"thompson"==bt_experiments[e].conversion_style&&abLog("ABST: MAB: logging",n,"for",t);var o=abstGetMatchedAudienceIds(e),s={action:"bt_experiment_w",eid:e,variation:t,type:n,size:abst.size,location:btab_vars.post_id,orderValue:r,aud:o},c={eid:e,variation:t,conversion:0,goals:[],size:abst.size,location:btab_vars.post_id,audiences:o};"conversion"==n?c.conversion=1:"visit"==n||(c.goals[n]=1),"fingerprint"==i&&(s.uuid=localStorage.getItem("ab-uuid")),"1"==btab_vars.advanced_tracking&&(s.ab_advanced_id=abstGetAdvancedId()),c=JSON.stringify(c),queueEventData(s,a),abstSetCookie("btab_"+e,c,1e3),"time"==i&&(window.abst.timer[e]=bt_experiments[e].conversion_time);var d=bt_experiments[e].goals;if("visit"==n&&d){if("string"==typeof d)try{abLog("ABST: Parsed goals from string:",d=JSON.parse(d))}catch(e){console.error("ABST: Error parsing goals string:",e),d=[]}Object.entries(d).forEach((([t,n])=>{const a=Object.entries(n);"time"===a[0][0]&&(window.abst.timer["goal-"+e+"-"+t]=a[0][1],abLog("ABST: Added timer for goal "+e+"-"+t+" with time: "+a[0][1]))}))}return a&&"ex"!==a?(addServerEvents({eid:e,variation:t,type:"visit"}),abLog("ABST: addServerEvents Redirecting to "+a),abstRedirect(a,e,t)):(btab_track_event(s),abstShowPage()),!0}function queueEventData(e,t){const n={data:e,timestamp:(new Date).getTime(),url:t};let a=[];try{const e=sessionStorage.getItem("abstTestDataQueue");e&&(a=JSON.parse(e))}
1catch(e){console.error("Error parsing abstTestDataQueue",e)}a.length<30?a.push(n):console.warn("abst test data queue full");try{sessionStorage.setItem("abstTestDataQueue",JSON.stringify(a))}catch(e){console.warn("ABST: Unable to persist event queue",e)}}function abst_process_approved_events(){let e=[];try{const t=sessionStorage.getItem("abstTestDataQueue");t&&(e=JSON.parse(t))}catch(e){return console.error("Error parsing abstTestDataQueue",e),!1}if(!e.length)return!0;const t=e.map((e=>e.data)),n=JSON.stringify(t);var a=void 0!==ABST_CONFIG&&ABST_CONFIG&&ABST_CONFIG.collect_url?ABST_CONFIG.collect_url:bt_ajaxurl+"?action=abstdata";try{navigator.sendBeacon(a,n)?sessionStorage.removeItem("abstTestDataQueue"):console.info("ABST: Beacon rejected by browser, will retry")}catch(e){console.warn("ABST: batch beacon failed",e)}return!0}async function btab_track_event(e){if("1"==btab_vars.is_free)return!1;if(check_heatmap_tracking(),"0"==btab_vars.tagging)return!1;if(void 0===bt_experiments||!bt_experiments||!bt_experiments[e.eid])return console.warn("ABST: bt_experiments not defined or experiment not found for eid:",e.eid),!1;const t=bt_experiments[e.eid];if("1"===btab_vars.abst_enable_user_journeys){let t;t="visit"===e.type?"tv-"+e.eid:"conversion"===e.type?"tc-"+e.eid:"tg-"+e.type+"-"+e.eid,abstRecordJourney((new Date).toISOString(),{timestamp:(new Date).toISOString(),type:t,post_id:btab_vars.post_id,uuid:abstGetAdvancedId(),ab_advanced_id:abstGetAdvancedId(),url:abstGetEventUrl(),element_id_or_selector:"0",click_x:0,click_y:0,screen_size:window.abstheatmapScreenSize,meta:e.variation})}if(window.abst.eventQueue.push(e),trackName=t.name||e.eid,gtm_data={event:"ab_split_test",test_name:trackName,test_variation:e.variation,test_event:e.type,test_id:e.eid},"fingerprint"==(t.conversion_type||t.conversion_page||"")?gtm_data.abuuid=localStorage.getItem("ab-uuid"):abstGetAdvancedId()&&(gtm_data.abuuid=abstGetAdvancedId()),window.dataLayer=window.dataLayer||[],window.dataLayer.push(gtm_data),window.abst.abconvertpartner.ga4&&gtag("event","ab_split_test",{test_name:e.eid,test_variation:e.variation,test_event:e.type}),window.abst.abconvertpartner.abawp&&AnalyticsWP.event("Test: "+t.name,{test_id:e.eid,test_name:t.name,test_variation:e.variation,test_visit_type:e.type}),window.abst.abconvertpartner.clarity&&clarity("set",t.name+"-"+e.type,e.variation),window.abst.abconvertpartner.gai&&"function"==typeof ga&&"function"==typeof ga.getAll){var n=ga.getAll(),a=n&&n[0];a&&(a.send("event",t.name,e.type,e.variation,{nonInteraction:!0}),window.abst.abconvertpartner.gai=!0)}if(window.abst.abconvertpartner.abmix&&mixpanel.track(t.name,{type:e.type,variation:e.variation},{send_immediately:!0}),window.abst.abconvertpartner.abumav&&usermaven("track",t.name,{type:e.type,variation:e.variation}),window.abst.abconvertpartner.umami&&umami.track(t.name,{type:e.type,variation:e.variation}),window.abst.abconvertpartner.cabin&&cabin.event(t.name+" | "+e.type+" | "+e.variation),window.abst.abconvertpartner.plausible&&plausible(t.name,{props:{type:e.type,variation:e.variation},callback:{interactive:!1}}),window.abst.abconvertpartner.fathom&&fathom.trackGoal(t.name,{type:e.type,variation:e.variation}),window.abst.abconvertpartner.posthog&&posthog.capture(t.name,{type:e.type,variation:e.variation}),window.abst.abconvertpartner.meta)try{fbq("trackCustom","ABSplitTest",{test_name:trackName,test_variation:e.variation,test_event:e.type})}catch(e){}if(window.abst.abconvertpartner.matomo)try{window._paq.push(["trackEvent","AB Split Test",trackName,e.variation+" | "+e.type])}catch(e){}}function abst_find_analytics(){if("1"==btab_vars.is_free)return!1;if(window.abeventstarted=(new Date).getTime(),window.dataLayer||(window.dataLayer=[]),void 0===bt_experiments||!bt_experiments)return console.warn("ABST: bt_experiments not defined in abst_find_analytics"),!1;const e=[{name:"ga4",check:()=>"function"==typeof gtag,process:()=>{window.abst.eventQueue.forEach((e=>{gtag("event","ab_split_test",{test_name:bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,test_variation:e.variation,test_event:e.type,ab_uuid:e.uuid})}))}},{name:"clarity",check:()=>"function"==typeof clarity,process:()=>{window.abst.eventQueue.forEach((e=>{clarity("set",e.eid+"-"+e.type,e.variation)}))}},{name:"gai",check:()=>
1{if("function"==typeof ga&&"function"==typeof ga.getAll){const e=ga.getAll();return!!(e&&e[0])}return!1},process:()=>{if("function"==typeof ga&&"function"==typeof ga.getAll){const e=ga.getAll(),t=e&&e[0];t&&window.abst.eventQueue.forEach((e=>{t.send("event",e.eid,e.type,e.variation,{nonInteraction:!0})}))}}},{name:"fathom",check:()=>!!window.fathom,process:()=>{window.abst.eventQueue.forEach((e=>{window.fathom.trackEvent(e.eid+", "+e.type+": "+e.variation)}))}},{name:"posthog",check:()=>!!window.posthog,process:()=>{window.abst.eventQueue.forEach((e=>{posthog.capture(bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,{type:e.type,variation:e.variation})}))}},{name:"abmix",check:()=>"object"==typeof mixpanel,process:()=>{window.abst.eventQueue.forEach((e=>{mixpanel.track(bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,{type:e.type,variation:e.variation},{send_immediately:!0})}))}},{name:"abumav",check:()=>"function"==typeof usermaven,process:()=>{window.abst.eventQueue.forEach((e=>{usermaven("track",bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,{type:e.type,variation:e.variation})}))}},{name:"umami",check:()=>!!window.umami,process:()=>{window.abst.eventQueue.forEach((e=>{umami.track(bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,{type:e.type,variation:e.variation})}))}},{name:"cabin",check:()=>!!window.cabin,process:()=>{window.abst.eventQueue.forEach((e=>{cabin.event(bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid+" | "+e.type+" | "+e.variation)}))}},{name:"plausible",check:()=>!!window.plausible,process:()=>{window.abst.eventQueue.forEach((e=>{plausible(bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,{props:{type:e.type,variation:e.variation},callback:{interactive:!1}})}))}},{name:"abawp",check:()=>"object"==typeof AnalyticsWP,process:()=>{window.abst.eventQueue.forEach((e=>{AnalyticsWP.event("Test: "+(bt_experiments[e.eid]&&bt_experiments[e.eid].name)||e.eid,{test_id:e.eid,test_name:bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,test_variation:e.variation,test_visit_type:e.type})}))}},{name:"meta",check:()=>"function"==typeof fbq,process:()=>{window.abst.eventQueue.forEach((e=>{fbq("trackCustom","ABSplitTest",{test_name:bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,test_variation:e.variation,test_event:e.type})}))}},{name:"matomo",check:()=>Array.isArray(window._paq),process:()=>{window.abst.eventQueue.forEach((e=>{window._paq.push(["trackEvent","AB Split Test",bt_experiments[e.eid]&&bt_experiments[e.eid].name||e.eid,e.variation+" | "+e.type])}))}},{name:"dom",check:()=>!0,process:()=>{window.abst.eventQueue.forEach((e=>{try{var t=document.body||document,n=new CustomEvent("abst_event",{detail:e,bubbles:!0});t.dispatchEvent(n)}catch(e){}}))}},{name:"jquery",check:()=>!!window.jQuery,process:()=>{window.abst.eventQueue.forEach((e=>{jQuery("body").trigger("abst_event",[e])}))}}];window.abst.abconvertpartner=window.abst.abconvertpartner||{};const t=()=>e.map((e=>(e=>!!window.abst.abconvertpartner[e.name]||!!e.check()&&(window.abst.abconvertpartner[e.name]=!0,e.process(),!0))(e))),n=(new Date).getTime();return new Promise((e=>{const a=()=>{const r=t().every((e=>!0===e)),i=(new Date).getTime()-n;r||i>1e4?e():setTimeout(a,500)};a()}))}function bt_getQueryVariable(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var a=t[n].split("=");if(a[0]==e)return null==a[1]||a[1]}return!1}function bt_replace_all(e,t,n="body"){!function n(a){if(a.nodeType===Node.TEXT_NODE){let n=a.textContent,r=document.createElement("div");r.innerHTML=n.replace(new RegExp(e,"gi"),t),a.textContent=r.textContent||r.innerText||""}else a.childNodes.forEach(n)}(document.querySelector(n))}function bt_replace_all_html(e,t,n="body"){!function n(a){a.nodeType===Node.ELEMENT_NODE?a.innerHTML=a.innerHTML.split(e).join(t):a.childNodes.forEach(n)}(document.querySelector(n))}function abLinkPatternListener(e,t,n=0){abClickListener(e,"a[href*='"+t+"']",n)}function abstHubspotListener(e,t,n=0){if(t){window.abst=window.abst||{},window.abst._hubspotFormMap=window.abst._hubspotFormMap||{},window.abst._hubspotWildcards=window.abst._hubspotWildcards||[];var a=String(t).split(",").map((function(e){return e.trim().toLowerCase()})).filter((function(e){return""!==e}));
10!==a.length&&(a.forEach((function(t){for(var a="*"===t?window.abst._hubspotWildcards:window.abst._hubspotFormMap[t]=window.abst._hubspotFormMap[t]||[],r=0;r<a.length;r++)if(a[r].experimentId===e&&a[r].goalId===n)return;a.push({experimentId:e,goalId:n})})),abstHubspotInstallDispatchers())}}function abstHubspotDispatch(e){if(e&&(e=String(e).trim().toLowerCase(),window.abst&&window.abst._hubspotFormMap)){var t=(window.abst._hubspotFormMap[e]||[]).concat(window.abst._hubspotWildcards||[]);0!==t.length&&t.forEach((function(e){e.goalId>0?abstGoal(e.experimentId,e.goalId):abstConvert(e.experimentId)}))}}function abstIsHubspotMessageOrigin(e){if(!e||"null"===e)return!1;var t="";try{t=new URL(e).hostname.toLowerCase()}catch(e){return!1}var n=["hubspot.com","hubspotforms.com","hsforms.com","hsforms.net","hubspotusercontent.com","hubspotusercontent-na1.net"];return window.abst&&Array.isArray(window.abst.hubspotMessageDomains)&&(n=n.concat(window.abst.hubspotMessageDomains)),n.some((function(e){return!!(e=String(e||"").toLowerCase().replace(/^\./,""))&&(t===e||t.slice(-(e.length+1))==="."+e)}))}function abstHubspotInstallDispatchers(){window.abst=window.abst||{},window.abst._hubspotMessageInstalled||(window.abst._hubspotMessageInstalled=!0,window.addEventListener("message",(function(e){var t=e&&e.data;t&&"hsFormCallback"===t.type&&("onFormSubmitted"===t.eventName&&abstIsHubspotMessageOrigin(e.origin)&&abstHubspotDispatch(t.id||t.data&&t.data.formGuid||""))}))),window.abst._hubspotV4Installed||(window.abst._hubspotV4Installed=!0,window.addEventListener("hs-form-event:on-submission:success",(function(e){var t=e&&e.detail;t&&abstHubspotDispatch(t.formId||"")})))}function abClickListener(e,t,n=0){var a=abstGetCookie("btab_"+e);if(a){try{a=JSON.parse(a)}catch(e){return}if(0==n){if(1==a.conversion)return}else if(1==a.goals[n])return}var r="click";if(-1!==t.indexOf("|")){var i=t.split("|");i.length>=2&&(t=i[0],r=i[1])}var o="ab-click-convert-"+e;window.abst=window.abst||{},window.abst._abstClickListenerRegistry=window.abst._abstClickListenerRegistry||{};var s=e+"|"+r+"|"+t+"|"+n;if(!window.abst._abstClickListenerRegistry[s]){window.abst._abstClickListenerRegistry[s]=!0;try{document.addEventListener(r,(function(a){for(var i=a.target;i&&i!==document;){if(t&&i instanceof Element&&("string"==typeof t&&""!==t.trim()&&i.matches(t)||("string"==typeof t&&t.trim(),0))){abLog(r+" conversion on "+t+" type "+n),n>0?abstGoal(e,n):abstConvert(e);break}if(o&&"string"==typeof o&&""!==o.trim()&&i instanceof Element&&i.matches(o)){abLog(r+" subselector conversion on "+t+" type "+n),n>0?abstGoal(e,n):abstConvert(e);break}i=i.parentNode}}),!0),document.addEventListener("click",(function(t){for(var a=t.target;a&&a!==document;){if("A"===a.tagName&&a.href)try{var r=new URL(a.href),i=new URLSearchParams(r.
1search);for(const[r,o]of i.entries()){if(r.startsWith("ab-click-convert-"))if(r.replace("ab-click-convert-","")===e){t.preventDefault(),abLog("Query string conversion for experiment ID: "+e),n>0?abstGoal(e,n):abstConvert(e),setTimeout((function(){window.location.href=a.href}),300);break}}}catch(e){}a=a.parentNode}}),!0)}catch(e){console.info("ABST: Invalid conversion selector:"+t+" "+e+" "+n)}document.querySelectorAll("iframe").forEach((function(n){try{n.contentWindow.document.addEventListener(r,(function(n){n.target.matches(t)&&(abLog(r+" IFRAME conversion on "+t),abstConvert(e))}),!0)}catch(e){}}))}}async function setAbFingerprint(){if(localStorage.getItem("ab-uuid"))abLog("ab-uuid: already set: "+localStorage.getItem("ab-uuid"));else try{await import(window.bt_pluginurl+"/js/ab-fingerprint.js");const e=await ThumbmarkJS.getFingerprint();localStorage.setItem("ab-uuid",e),abLog("ABST: set Fingerprint: "+e)}catch(e){console.error("ABST: Error setting fingerprint:",e)}}function abst_revoke_approval(){return setAbstApprovalStatus(!1),abLog("ABST: Approval revoked, events will be queued until approval is given again"),!0}function repairMagicDefinitionJson(e){return"string"!=typeof e?e:e.replace(/(\s[A-Za-z_:][-A-Za-z0-9_:.]*=)"([^"]*)"/g,'$1\\"$2\\"').replace(/(\[[^\]"=]+[*^$|~]?=)"([^"]*)"/g,'$1\\"$2\\"')}function parseMagicTestDefinition(e){try{magic_definition=JSON.parse(e)}catch(t){try{const t=e.replace(/(?<=[a-zA-Z])"(?=[a-zA-Z])/g,'\\"');magic_definition=JSON.parse(t),abLog("ABST: Successfully fixed magic_definition quotes issue. Edit your split test in the WordPress admin to remove this console log.")}catch(t){try{const t=repairMagicDefinitionJson(e);magic_definition=JSON.parse(t),console.warn("ABST: Repaired corrupt magic_definition at runtime. Saved test config was not changed; edit and resave the split test to persist clean JSON."),abLog("ABST: Repaired corrupt magic_definition at runtime. Saved test config was not changed; edit and resave the split test to persist clean JSON.")}catch(e){return console.warn("ABST: Failed to parse magic_definition after runtime repair. Saved test config is corrupt; variation will be skipped.",e),null}}}return magic_definition}function getCurrentPagePath(){return(window.location&&window.location.pathname?window.location.pathname.toLowerCase():"").replace(/^\/+|\/+$/g,"")}function matchesMagicScope(e){if(!e||"object"!=typeof e)return!0;var t=[];Array.isArray(e.page_id)?t=e.page_id.map((function(e){return String(e).trim()})).filter((function(e){return/^[1-9]\d*$/.test(e)})):void 0!==e.page_id&&null!==e.page_id&&""!==e.page_id&&"*"!==e.page_id&&(t=String(e.page_id).split(",").map((function(e){return e.trim()})).filter((function(e){return/^[1-9]\d*$/.test(e)})));var n=t.length>0||"*"===e.page_id,a="string"==typeof e.url&&""!==e.url.trim();return"*"===e.page_id||"*"===e.url||(!n&&!a||(n?!!Array.isArray(window.current_page)&&window.current_page.some((function(e){return-1!==t.indexOf(String(e))})):!a||-1!==getCurrentPagePath().indexOf(String(e.url).toLowerCase().replace(/^\/+|\/+$/g,""))))}function showMagicTest(e,t,n=!1){var a=parseMagicTestDefinition(bt_experiments[e].magic_definition);if(Array.isArray(a)&&a.length){if(a.forEach((function(e,n){if(e&&"string"==typeof e.selector){if(matchesMagicScope(e.scope)){var a=[];try{a=document.querySelectorAll(e.selector)}catch(t){return void console.error("ABST: Malformed selector in showMagicTest:",e.selector,"-",t)}if(a.length&&0!==t){var r;if(Array.isArray(e.variations)){if(null==(r=e.variations[t])||""===r)return}else r=void 0;void 0!==r&&("text"!==e.type&&"html"!==e.type||a.forEach((function(e){try{e.innerHTML=r}catch(t){console.error("ABST: Error setting innerHTML in showMagicTest:",e,"-",t)}})),"image"===e.type&&a.forEach((function(e){try{e.setAttribute("src",r)}catch(t){console.error("ABST: Error setting src in showMagicTest:",e,"-",t)}try{e.setAttribute("srcset",r)}catch(t){console.error("ABST: Error setting srcset in showMagicTest:",e,"-",t)}})),"hide"===e.type&&applyMagicHide(a,r),"move"===e.type&&applyMagicMove(a,r),"create_after"===e.type&&applyMagicCreateAfter(a,r,e.position,abstMagicOpKey(e,n)),"style"===e.type&&e.property&&a.forEach((function(t){try{t.style[e.property]=r}catch(e){console.error("ABST: Error setting style in showMagicTest:",t,"-",e)}})),"attribute"===e.type&&e.property&&a.forEach((function(t){try{t.setAttribute(e.property,r)}catch(e){console.error("ABST: Error setting attribute in showMagicTest:",t,"-",e)}})))}}}else console.error("ABST: Invalid swapElement in showMagicTest:",e)})),n){var r=a.find((function(e){return e&&"string"==typeof e.selector&&matchesMagicScope(e.scope)}));selector=r&&"string"==typeof r.selector?r.selector:null,scrollAndHighlightElement(selector)}}else console.warn("ABST: magic_definition parsing failed for experiment",e,"- Variation will not be displayed. Please recreate this split test.")}function applyMagicHide(e,t){"hide"===t&&e.forEach((function(e){try{e.style.setProperty("display","none","important")}catch(t){console.error("ABST: Error hiding element in applyMagicHide:",e,"-",t)}}))}function applyMagicMove(e,t){var n=null;try{n=JSON.parse(t)}catch(e){return}if(n&&"string"==typeof n.target&&("before"===n.position||"after"===n.position)){var a=null;try{a=document.querySelector(n.target)}catch(e){return void console.error("ABST: Malformed move target selector:",n.target,"-",e)}a&&a.parentNode&&e.forEach((function(e){if(e!==a&&!e.contains(a))try{"before"===n.position?a.parentNode.insertBefore(e,a):a.parentNode.insertBefore(e,a.nextSibling)}catch(t){console.error("ABST: Error moving element in applyMagicMove:",e,"-",t)}}))}}function abstSanitizeCreatedHtml(e){if("string"!=typeof e||!e)return"";var t=document.createElement("template");try{t.innerHTML=e}catch(e){return""}var n=t.content.querySelectorAll("*"),a={script:1,style:1,iframe:1,object:1,embed:1,link:1,meta:1,form:1,base:1};
1return n.forEach((function(e){if(e.parentNode){var t=e.tagName?e.tagName.toLowerCase():"";if(a[t])e.parentNode.removeChild(e);else if(e.attributes)for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n],i=r.name.toLowerCase(),o=(r.value||"").replace(/\s+/g,"").toLowerCase();0!==i.indexOf("on")&&("href"!==i&&"src"!==i&&"xlink:href"!==i||0!==o.indexOf("javascript:"))||e.removeAttribute(r.name)}}})),t.innerHTML}function abstMagicOpKey(e,t){return e&&e.key?String(e.key):(e&&e.selector?e.selector:"")+"|"+(e&&"before"===e.position?"before":"after")+"|"+("number"==typeof t?t:"")}function applyMagicCreateAfter(e,t,n,a){if(t&&"original"!==t){var r=abstSanitizeCreatedHtml(t);if(r){var i="before"===n;a=a?String(a):"",e.forEach((function(e){if(e&&e.parentNode&&!(e.closest?e.closest("[data-abst-created]"):e.getAttribute&&e.getAttribute("data-abst-created")))try{for(var t=i?e.previousSibling:e.nextSibling;t;)if(3!==t.nodeType||/\S/.test(t.nodeValue)){if(1!==t.nodeType||!t.getAttribute||!t.getAttribute("data-abst-created"))break;if((t.getAttribute("data-abst-key")||"")===a)return void(t.innerHTML=r);t=i?t.previousSibling:t.nextSibling}else t=i?t.previousSibling:t.nextSibling;var n=document.createElement("div");n.className="abst-created-block",n.setAttribute("data-abst-created","1"),a&&n.setAttribute("data-abst-key",a),n.innerHTML=r,e.parentNode.insertBefore(n,i?e:e.nextSibling)}catch(t){console.error("ABST: Error inserting element in applyMagicCreateAfter:",e,"-",t)}}))}}}function scrollAndHighlightElement(e){setTimeout((function(){var t=[];if(e)try{t=document.querySelectorAll(e)}catch(n){console.error("ABST: Malformed selector in scrollAndHighlightElement:",e,"-",n),t=[]}if(t.length){try{var n=t[0].getBoundingClientRect(),a=window.pageYOffset+n.top-window.innerHeight/3;window.scrollTo({top:a,behavior:"smooth"})}catch(e){console.error("ABST: Error in scrollTo in scrollAndHighlightElement:",e)}t.forEach((function(e){try{e.classList.add("ab-highlight")}catch(t){console.error("ABST: Error adding ab-highlight class in scrollAndHighlightElement:",e,"-",t)}})),setTimeout((function(){t.forEach((function(e){try{e.classList.remove("ab-highlight")}catch(t){console.error("ABST: Error removing ab-highlight class in scrollAndHighlightElement:",e,"-",t)}}))}),4e3)}}),2e3)}function ensureTrackerInitialized(){return window.btab_vars.tracker||(window.btab_vars.tracker={elements:{},active:!1,interval:null,trackedElements:new Set,addElement:function(e,t,n,a){const r=`${e}_${t}`;this.elements[r]||(this.elements[r]={eid:e,selector:t,variation:n,scope:a})},checkVisibility:function(){for(const e in this.elements){if(!this.elements.hasOwnProperty(e))continue;const{eid:t,selector:n,variation:a,scope:r}=this.elements[e];if(!matchesMagicScope(r))continue;if(this.trackedElements.has(e))continue;let i=[];try{i=document.querySelectorAll(n)}catch(a){console.error("ABST: Invalid selector for experiment",t,":",n,a),this.trackedElements.add(e);continue}if(0===i.length)continue;const o=Array.from(i).some((e=>{if(!e)return!1;const t=window.getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility||0===parseFloat(t.opacity||1))return!1;if("fixed"!==t.position&&"sticky"!==t.position&&null===e.offsetParent)return!1;const n=e.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return n.bottom>0&&n.top<a&&n.right>0&&n.left<r}));if(o){let n=!1;const r=abstGetCookie("btab_"+t);if(r)try{JSON.parse(r),n=!1}catch(e){console.error("Error parsing cookie for "+t,e),n=!0}else{const e=`${t}_${a}`;n=!this.trackedElements.has(e)}if(n)try{bt_experiment_w(t,a,"visit",!1),this.trackedElements.add(e),this.trackedElements.add(`${t}_${a}`)}catch(e){console.error("Error in bt_experiment_w:",e)}}}},start:function(){this.active||(this.interval=setInterval((()=>this.checkVisibility()),500),this.active=!0)},stop:function(){this.active&&this.interval&&(clearInterval(this.interval),this.interval=null,this.active=!1)},reset:function(){this.trackedElements.clear()}}),window.btab_vars.tracker}
1function watch_for_tag_event(e,t='[bt-eid="'+e+'"]',n=null){if(!n)return;const a=ensureTrackerInitialized();var r=arguments.length>3?arguments[3]:null;a.addElement(e,t,n,r),a.active||a.start()}function normalizeUrl(e){let t=e.replace(window.location.origin,"");return"/"==t.charAt(0)&&(t=t.substr(1)),"/"==t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),t}function abstUrlPatternMatches(e,t){if(!e||!t)return!1;for(var n=String(e).toLowerCase().split("*"),a=String(t).toLowerCase(),r=0,i=0;i<n.length;i++)if(""!==n[i]){var o=a.indexOf(n[i],r);if(-1===o)return!1;r=o+n[i].length}return!0}function abstCurrentPageMatches(e){return null!=e&&""!==e&&(!(void 0===current_page||!Array.isArray(current_page))&&(!!current_page.includes(e)||/^[0-9]+$/.test(String(e))&&current_page.includes(parseInt(e,10))))}function abstIsCurrentPageGoalKey(e){return!!e&&(0!==(e=String(e)).indexOf("form-")&&-1===["selector","link","scroll","text","page","url","time","javascript","block","surecart-order-paid","fluentcart-order-paid","edd-purchase"].indexOf(e))}function abstContainsHtml(e){return!(!e||"string"!=typeof e)&&/<[a-z][\s\S]*>/i.test(e)}function shouldSetupScrollListener(e,t){if("full_page"===t.test_type){if(void 0!==current_page&&Array.isArray(current_page)&&current_page.some((e=>String(e)===String(t.full_page_default_page))))return!0;if(t.page_variations&&void 0!==current_page&&Array.isArray(current_page))for(const[e,n]of Object.entries(t.page_variations))if(current_page.some((t=>String(t)===String(e))))return!0;return!1}if("magic"===t.test_type||"ab_test"===t.test_type||"css_test"===t.test_type){if(document.querySelectorAll('[bt-eid="'+e+'"]').length>0)return!0;if("magic"===t.test_type&&t.magic_definition)try{const e=Array.isArray(t.magic_definition)?t.magic_definition:JSON.parse(t.magic_definition);for(const t of e)if(matchesMagicScope(t.scope)&&t.selector&&document.querySelector(t.selector))return!0}catch(t){console.warn("ABST: Error parsing magic definition for experiment",e,t)}return!1}return!0}function abScrollListener(e,t,n=0){if(t=parseInt(t),!isNaN(t)){var a=abstGetCookie("btab_"+e);if(a){try{a=JSON.parse(a)}catch(e){return}if(0==n){if(1==a.conversion)return}else if(a.goals&&1==a.goals[n])return}window.abst=window.abst||{},window.abst._abstScrollListenerRegistry=window.abst._abstScrollListenerRegistry||{};var r=t+"|"+e+"|"+n;window.abst._abstScrollListenerRegistry[r]||(window.abst._abstScrollListenerRegistry[r]=!0,window.addEventListener("scroll",i),i())}function i(){(window.scrollY+window.innerHeight)/Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)*100>=t&&(n>0?abstGoal(e,n):abstConvert(e),window.removeEventListener("scroll",i))}}function abstRedirect(e,t,n){if(abLog("ABST: Redirecting to "+e),window.location.search.indexOf("ssr=1")>-1)return abLog("ABST: Not redirecting - server-side rendering mode active ?ssr=1"),void(window.abstRedirecting=!1);window.abstRedirecting=!0,document.documentElement.style.transition="none";try{var a=abRedirectUrl(e);if(void 0!==t&&void 0!==n&&abstNormalizeOrigin(a)!==abstNormalizeOrigin(window.location.href)){var r=new URL(a,window.location.href),i=abstGetAdvancedId();i&&(r.searchParams.set("abst_uuid",i),r.searchParams.set("abst_eid",String(t)),r.searchParams.set("abst_variation",String(n)),a=r.toString())}window.location.replace(a)}catch(e){console.error("ABST: Redirect failed",e),window.abstRedirecting=!1}}function checkMagicTestSelectors(e){if(window.bt_experiments&&e.querySelectorAll)for(var t in window.bt_experiments){var n=window.bt_experiments[t];if("magic"===n.test_type){var a=abstGetCookie("btab_"+t);if(a)try{var r=JSON.parse(a);if(!r.variation||r.skipped)continue;var i=parseMagicTestDefinition(n.magic_definition);if(!Array.isArray(i))continue;var o=parseInt(r.variation.split("-").pop());i.forEach((function(n,a){if(n&&n.selector&&matchesMagicScope(n.scope))try{var r=function(e){return!!e&&(e.closest?!!e.closest("[data-abst-created]"):!(!e.getAttribute||!e.getAttribute("data-abst-created")))},i=[];if(e.matches&&e.matches(n.selector)&&!r(e)&&i.push(e),e.querySelectorAll(n.selector).forEach((function(e){r(e)||i.push(e)})),0===i.length)return;var s=n.variations?n.variations[o]:void 0;if(null!=s&&""!==s||(s=n.variations?n.variations[0]:void 0),void 0===s)return;
1i.forEach((function(e){var r=t+":"+a,i=e.getAttribute("data-abst-swapped")||"";-1===(" "+i+" ").indexOf(" "+r+" ")&&(e.setAttribute("data-abst-swapped",i?i+" "+r:r),"text"===n.type||"html"===n.type?e.innerHTML=s:"image"===n.type?(e.setAttribute("src",s),e.setAttribute("srcset",s)):"hide"===n.type?applyMagicHide([e],s):"move"===n.type?applyMagicMove([e],s):"create_after"===n.type?applyMagicCreateAfter([e],s,n.position,abstMagicOpKey(n,a)):"style"===n.type?e.style[n.property]=s:"attribute"===n.type&&e.setAttribute(n.property,s))}))}catch(e){}}))}catch(e){}}}}function initAbstDomObserver(){if(!window.MutationObserver)return;if(window.abstDomObserver)return;const e=ensureTrackerInitialized();window.abstDomObserver=new MutationObserver((function(t){let n=!1;t.forEach((function(e){"childList"===e.type&&e.addedNodes.length>0&&e.addedNodes.forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute&&e.hasAttribute("bt-eid")&&(processNewAbTestElement(e),n=!0),e.querySelectorAll){const t=e.querySelectorAll('[bt-eid]:not([bt-eid=""])');t.length>0&&(t.forEach(processNewAbTestElement),n=!0)}checkMagicTestSelectors(e)}}))})),n&&!e.active&&e.start()})),document.body?window.abstDomObserver.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",(function(){document.body&&window.abstDomObserver&&window.abstDomObserver.observe(document.body,{childList:!0,subtree:!0})}))}function processNewAbTestElement(e){const t=e.getAttribute("bt-eid"),n=e.getAttribute("bt-variation");if(!t||!n)return;const a=abstGetCookie("btab_"+t);if(a)try{JSON.parse(a).variation===n&&e.classList.add("bt-show-variation")}catch(e){console.error("ABST: Error parsing cookie for dynamic element:",t,e)}watch_for_tag_event(t,'[bt-eid="'+t+'"][bt-variation="'+n+'"]',n)}function abst_rescan_for_elements(){document.querySelectorAll('[bt-eid]:not([bt-eid=""])').forEach(processNewAbTestElement);const e=ensureTrackerInitialized();e.active||e.start()}function getUniqueSelector(e){if(!(e instanceof Element))return null;const t=e.tagName.toLowerCase();function n(e){const t=e.tagName.toLowerCase();if(e.id&&!isIgnored("id",e.id)){const t="#"+e.id;if(1===document.querySelectorAll(t).length)return t}if(e.classList&&e.classList.length>0){const n=Array.from(e.classList).filter((e=>!isIgnored("class",e))).sort(((e,t)=>document.querySelectorAll("."+e).length-document.querySelectorAll("."+t).length));for(const e of n){const n=t+"."+e;if(1===document.querySelectorAll(n).length)return n}if(n.length>=2)for(let e=0;e<n.length-1;e++)for(let a=e+1;a<n.length;a++){const r=t+"."+n[e]+"."+n[a];if(1===document.querySelectorAll(r).length)return r}}return null}function a(e,t,n){const a=n.tagName.toLowerCase();let r=t+" "+a;if(1===document.querySelectorAll(r).length)return r;if(n.classList&&n.classList.length>0){const e=Array.from(n.classList).filter((e=>!isIgnored("class",e)));for(const n of e)if(r=t+" "+a+"."+n,1===document.querySelectorAll(r).length)return r;if(e.length>=2)for(let n=0;n<e.length-1;n++)for(let i=n+1;i<e.length;i++)if(r=t+" "+a+"."+e[n]+"."+e[i],1===document.querySelectorAll(r).length)return r}const i=["href","alt","title","name","value","type","role"];for(const e of i)if(n.hasAttribute&&n.hasAttribute(e)){const i=n.getAttribute(e);if(i&&i.length<100&&(r=t+" "+a+"["+e+'="'+i.replace(/"/g,'\\"')+'"]',1===document.querySelectorAll(r).length))return r}return null}const r=n(e);if(r)return r;let i=e.parentElement,o=0;for(;i&&i!==document.body&&o<10;){const t=n(i);if(t){const n=a(0,t,e);if(n)return n}i=i.parentElement,o++}const s=["href","alt","title","name","value","type","role"];for(const n of s)if(e.hasAttribute&&e.hasAttribute(n)){const a=e.getAttribute(n);if(a&&a.length<100){const e=t+"["+n+'="'+a.replace(/"/g,'\\"')+'"]';if(1===document.querySelectorAll(e).length)return e}}return generateShortPath(e)}function getPageClass(){var e=document.body;return Array.from(e.classList).find((function(e){return e.startsWith("postid-")||e.startsWith("page-id-")||e.startsWith("post-type-archive-")}))}function scopeSelectorToPage(e){var t=getPageClass();return t?"."+t+" "+e:e}function abstIsEditorArtifactNode(e){if(!e||1!==e.nodeType||!e.getAttribute)return!1;if(e.getAttribute("data-abst-created"))return!0;var t=e.classList;return!(!t||!(t.contains("abst-hidden-placeholder")||t.contains("abst-move-anchor")||t.contains("abst-create-preview")||t.contains("abst-variation-marker")))}function abstRealNthChildIndex(e){for(var t=0,n=e.parentNode?e.parentNode.firstElementChild:null;n;){if(!abstIsEditorArtifactNode(n)&&(t++,n===e))return t;n=n.nextElementSibling}return-1}function generateShortPath(e){let t=[],n=e;for(;n&&n!==document.body;){if(n.id&&!isIgnored("id",n.id)){t.unshift("#"+n.id);break}const e=n.tagName.toLowerCase();let a=e,r=!1;if(n.classList.length>0)for(const t of n.classList){if(isIgnored("class",t))continue;const i=e+"."+t;if(n.parentNode&&1===n.parentNode.querySelectorAll(i).length){a=i,r=!0;break}}if(!r&&n.parentNode){if(Array.from(n.parentNode.querySelectorAll(":scope > "+a)).filter((function(e){return!abstIsEditorArtifactNode(e)})).length>1){const e=abstRealNthChildIndex(n);e>0&&(a+=":nth-child("+e+")")}}t.unshift(a),n=n.parentNode;const i=t.join(" > ");if(1===document.querySelectorAll(i).length)return i}let a=t.join(" > ");if(document.querySelectorAll(a).length>1){const n=document.querySelectorAll(a);for(let a=0;a<n.length;a++)if(n[a]===e){const n=t[t.length-1];if(e.parentNode){const a=abstRealNthChildIndex(e);a>0&&(t[t.length-1]=n.replace(/:nth-child\(\d+\)$/,"")+":nth-child("+a+")")}break}}return t.join(" > ")}function isIgnored(e,t){if(!t)return!1;if("class"===e&&0===t.indexOf("abst-"))return!0;
1if("class"===e&&/[.:\[\]\/]/.test(t))return!0;const n=(window.abst.ignoreSelectorPrefixes||[]).map((e=>(e||"").trim())).filter((t=>"id"===e?t.startsWith("#"):"class"===e&&!t.startsWith("#"))).map((e=>e.startsWith(".")||e.startsWith("#")?e.slice(1):e));for(const e of n)if(t.startsWith(e))return!0;return!1}function abstGetEventUrl(){var e=window.location.search;try{var t=sessionStorage.getItem("abst_original_utm");if(t){var n=JSON.parse(t),a=new URLSearchParams(e),r=!1;for(var i in n)a.has(i)||(a.set(i,n[i]),r=!0);r&&(e="?"+a.toString())}}catch(e){}return e}function enableClickTracking(){if(!window.abstheatmapScreenSize){var e=window.innerWidth||document.documentElement.clientWidth||0,t=window.devicePixelRatio||1,n=window.screen&&window.screen.width?Math.round(window.screen.width/t):0,a=e||n;window.abstheatmapScreenSize=a>1024?"l":a>768?"m":"s",abstResetPageEngagement(),abstPersistOriginalTrafficSource(),abstRecordJourney((new Date).toISOString(),{timestamp:(new Date).toISOString(),type:"pv",post_id:btab_vars.post_id,uuid:abstGetAdvancedId(),ab_advanced_id:abstGetAdvancedId(),url:abstGetEventUrl(),element_id_or_selector:"0",click_x:0,click_y:0,screen_size:window.abstheatmapScreenSize,meta:""});var r={clicks:[],threshold:3,timeWindow:2e3,addClick:function(e,t){var n=t-this.timeWindow;return this.clicks=this.clicks.filter((function(e){return e.timestamp>n})),this.clicks.push({selector:e,timestamp:t}),this.clicks.filter((function(t){return t.selector===e})).length>=this.threshold}};document.addEventListener("click",(function(e){var t=function(e){if(!(e instanceof Element))return e;var t=e.closest('a, button, input, textarea, select, video, audio, summary, [role="button"], [role="link"], [onclick], [contenteditable="true"], [tabindex]:not([tabindex="-1"])');if(t)return t;for(var n=e,a=0;n&&a<4;a++,n=n.parentElement)if("pointer"===window.getComputedStyle(n).cursor)return n;return e}(e.target),n=t.getBoundingClientRect(),a=(e.clientX-n.left)/n.width,i=(e.clientY-n.top)/n.height;a=Math.round(1e3*a)/1e3,i=Math.round(1e3*i)/1e3;var s=getUniqueSelector(t),c=Date.now(),d=r.addClick(s,c),l=!function(e){var t=e.tagName.toLowerCase();if("a"===t||"button"===t||"input"===t||"select"===t||"textarea"===t||"video"===t||"audio"===t||"summary"===t||"label"===t)return!0;if(e.isContentEditable||e.hasAttribute("tabindex")&&parseInt(e.getAttribute("tabindex"),10)>=0)return!0;if(e.onclick||e.hasAttribute("onclick"))return!0;var n=e.getAttribute("role");return"button"===n||"link"===n||"pointer"===window.getComputedStyle(e).cursor||!!e.closest('a, button, [role="button"], [role="link"], [onclick]')||!!e.hasAttribute("href")}(t),u=d?"rage_click":l?"dead_click":"";abstRecordJourney((new Date).toISOString(),{timestamp:(new Date).toISOString(),type:d?"rc":"
1c",post_id:btab_vars.post_id,uuid:abstGetAdvancedId(),ab_advanced_id:abstGetAdvancedId(),url:abstGetEventUrl(),element_id_or_selector:s,click_x:a,click_y:i,screen_size:window.abstheatmapScreenSize,meta:o(t,u)});var b="A"===e.target.tagName||e.target.closest("a"),p="BUTTON"===e.target.tagName&&"submit"===e.target.type||"INPUT"===e.target.tagName&&"submit"===e.target.type||e.target.closest('button[type="submit"], input[type="submit"]');(b||p)&&(flushJourneyData(!1),window.abst.hasApproval&&abst_process_approved_events())})),document.addEventListener("submit",(function(e){flushJourneyData(!1),window.abst.hasApproval&&abst_process_approved_events()})),window.abst.heatScrollMax=0,window.abst.heatViewport=window.innerHeight;var i=!1;document.addEventListener("scroll",(function(){if(!i){i=!0;var e=window.innerHeight,t=document.documentElement.scrollHeight,n=window.pageYOffset||document.documentElement.scrollTop,a=Math.round((n+e)/t*100);a>window.abst.heatScrollMax&&(window.abst.heatScrollMax=a),setTimeout((function(){i=!1}),300)}}),{passive:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(abstPausePageEngagement(),flushJourneyData())})),window.addEventListener("pagehide",(function(){abstPausePageEngagement(),flushJourneyData()})),window.addEventListener("pageshow",(function(e){e.persisted&&(window.abst.heatScrollMax=0,window.abst.heatScrollLastSent=0,abstResetPageEngagement(),abstRecordJourney("pv_"+(new Date).toISOString(),{timestamp:(new Date).toISOString(),type:"pv",post_id:btab_vars.post_id,uuid:abstGetAdvancedId(),ab_advanced_id:abstGetAdvancedId(),url:abstGetEventUrl(),element_id_or_selector:"",click_x:0,click_y:0,screen_size:window.abstheatmapScreenSize,meta:"bfcache_restore"}))}))}function o(e,t){var n=e.getAttribute("aria-label")||e.getAttribute("title")||e.getAttribute("alt")||"";!n&&/^(INPUT|TEXTAREA)$/.test(e.tagName)&&(n=e.getAttribute("placeholder")||""),n||e.isContentEditable||(n=e.innerText||e.textContent||""),n=String(n).replace(/\s+/g," ").trim().slice(0,100);var a=e.matches("a[href]")?e:e.closest("a[href]"),r=a?function(e){var t=String(e||""),n=t.indexOf("#");-1!==n&&(t=t.slice(0,n));var a=t.indexOf("?");if(-1===a)return t.slice(0,300);var r=btab_vars&&Array.isArray(btab_vars.abst_click_url_allowed_query_params)?btab_vars.abst_click_url_allowed_query_params:["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],i=btab_vars&&Array.isArray(btab_vars.abst_click_url_denied_query_params)?btab_vars.abst_click_url_denied_query_params:["access_token","api_key","apikey","auth","authorization","code","email","jwt","key","nonce","pass","password","secret","session","session_id","sig","signature","token"],o={},s={};r.forEach((function(e){o[String(e).toLowerCase()]=!0})),i.forEach((function(e){s[String(e).toLowerCase()]=!0}));var c=new URLSearchParams;new URLSearchParams(t.slice(a+1)).forEach((function(e,t){var n=String(t).toLowerCase();o[n]&&!s[n]&&c.append(t,e)}));var d=c.toString();return(t.slice(0,a)+(d?"?"+d:"")).slice(0,300)}(a.getAttribute("href")):"";return JSON.stringify({interaction:t,label:n,tag:e.tagName.toLowerCase(),href:r})}}function getActiveExperiments(){if(void 0===bt_experiments||!bt_experiments)return"";var e=[];for(var t in bt_experiments){var n=abstGetCookie("btab_"+t);if(n)try{var a=JSON.parse(n);a&&a.variation&&"undefined"!==a.variation&&e.push(t+":"+a.variation)}catch(e){}}return 0===e.length?"":e.join(",")}viewportWidth&&screenWidth&&(effectiveWidth=Math.min(viewportWidth,screenWidth)),window.abst.size=effectiveWidth<768?"mobile":effectiveWidth<1024?"tablet":"desktop",window.btab_vars&&window.btab_vars.advanced_tracking&&"1"==window.btab_vars.advanced_tracking&&setAbCrypto(),abstPersistOriginalTrafficSource(),abstSeedEdgeAudiences(),abstFullPageEarly(),window.btab_vars&&"1"==window.btab_vars.wait_for_approval&&(document.addEventListener("cmplz_enable_category",(function(e){if(!e.detail)return;let t=e.detail.category,n=e.detail.categories;("statistics"===t||Array.isArray(n)&&-1!==n.indexOf("statistics"))&&(abLog("ABST: Complianz consent granted for statistics"),setAbstApprovalStatus(!0))})),document.addEventListener("cmplz_revoke",(function(){abLog("ABST: Complianz consent revoked"),setAbstApprovalStatus(!1)}))),window.btab_vars&&"1"==window.btab_vars.wait_for_approval&&(window.addEventListener("UC_UI_INITIALIZED",abstCheckUsercentricsConsent),window.addEventListener("UC_CONSENT",abstCheckUsercentricsConsent),window.addEventListener("ucEvent",(function(e){e.detail&&"consent_status"==e.detail.event&&abstCheckUsercentricsConsent()}))),document.addEventListener("DOMContentLoaded",abstMainInit),document.addEventListener("abst-config-ready",abstFullPageEarly),document.addEventListener("abst-config-ready",abstMainInit),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),window.btab_vars=window.btab_vars||{},window.btab_vars.setupConversionListeners=function(){if(bt_experiments)for(const e in bt_experiments){if(!bt_experiments.hasOwnProperty(e))continue;const t=bt_experiments[e],n=t.conversion_type||t.conversion_page||"";let a=t.conversion_page_id;switch(null!=a&&""!==a||void 0===t.conversion_page||null===t.conversion_page||""===t.conversion_page||isNaN(t.conversion_page)||(a=parseInt(t.conversion_page,10)),Array.isArray(t.goals)&&t.goals.forEac
1h(((t,n)=>{const[a,r]=Object.entries(t)[0];switch(a){case"selector":abClickListener(e,r,n);break;case"text":startTextWatcher(e,r,n);break;case"url":const t=abstGetCookie("btab_"+e);if(t)try{const a=JSON.parse(t);if(a.goals&&1===a.goals[n]){abLog("Goal already triggered:",e,"Goal #",n);break}}catch(e){}r&&r.length>1&&abstUrlPatternMatches(r,location.href)&&(abLog("URL MATCH! Firing goal for",e,n),abstGoal(e,n));break;case"page":window.btab_vars.post_id==r&&abstGoal(e,n)}})),n){case"selector":abClickListener(e,t.conversion_selector);break;case"text":startTextWatcher(e,t.conversion_text);break;case"surecart-order-paid":document.addEventListener("scOrderPaid",(function(n){const a=n.detail?.amount_due;a&&(t.use_order_value&&(window.abst.abConversionValue=(a/100).toFixed(2)),abstConvert(e,window.abst.abConversionValue))}));break;default:"page"==n&&window.btab_vars.post_id==a&&abstConvert(e)}t.conversion_url&&""!==t.conversion_url&&abstUrlPatternMatches(t.conversion_url,location.href)&&abstConvert(e)}},window.btab_vars.abtracker=function(e,t,n){const a=ensureTrackerInitialized();e&&t&&n&&a.addElement(e,t,n),e||t||n||a.checkVisibility(),a.active||a.start()},document.addEventListener("DOMContentLoaded",(function(){window.btab_vars.setupConversionListeners(),!btab_vars.is_preview&&document.querySelectorAll(".conversion-module").length>0&&document.querySelectorAll(".conversion-module").forEach((function(e){e.remove()})),window.bt_conversion_vars&&Object.entries(bt_conversion_vars).forEach((function([e,t]){if("click"!==t.type){var n=t.eid,a=abstGetCookie("btab_"+n);if(!a)return!0;try{a=JSON.parse(a)}catch(e){return!0}if(void 0===bt_experiments[n])return!1;if(1==a.conversion)return console.info("AB Split test already converted."),!0;var r=bt_experiments[n].conversion_type||bt_experiments[n].conversion_page||"";if(""!=bt_experiments[n].conversion_url||""!=r){if("embed"!=bt_experiments[n].conversion_url)return!0;console.info("AB Split Test conversion defined as external URL, but conversion module used. Please check your configuration settings. This is a soft error and a conversion event has not been blocked.")}variation=a.variation;t.type;var i=t.selector;void 0!==conversion_details&&void 0!==conversion_details[n]&&abLog("Possible duplicate conversion event. Check your set up."),variation&&(bt_experiment_w(n,variation,"conversion",!1),a.conversion=1,abstSetCookie("btab_"+n,a=JSON.stringify(a),1e3))}if("click"==t.type){i=t.selector;document.querySelectorAll(i).length>0||(document.querySelectorAll(i+" a").length>0?i+=" a":document.querySelectorAll(i+" img").length>0&&(i+=" img")),document.querySelectorAll(i).length>0&&document.body.addEventListener("click",(function(e){let n=e.target,a=null;try{a=n.matches(i)?n:n.closest(i)}catch(e){return}if(a){var r=a.getAttribute("href"),o=a.getAttribute("target"),s=t.eid,c=abstGetCookie("btab_"+s);try{c=JSON.parse(c)}catch(e){return}if(void 0===bt_experiments[s])return!1;if(1==c.conversion)return abLog("ab test already converted."),!0;variation=c.variation,r&&"_blank"!==o?(e.preventDefault(),bt_experiment_w(s,variation,"conversion",r)):bt_experiment_w(s,variation,"conversion",!1),c.conversion=1,abstSetCookie("btab_"+s,c=JSON.stringify(c),1e3)}}))}}))})),setTimeout((function(){window.abstRedirecting||document.body.classList.contains("abst-show-page")||abstShowPage()}),2e3),setTimeout((function(){document.body.classList.contains("abst-show-page")||abstShowPage()}),4e3),initAbstDomObserver(),abstPersistOriginalTrafficSource();var enable_click_tracking=!0;function check_heatmap_tracking(){void 0!==btab_vars&&void 0!==btab_vars.abst_enable_user_journeys&&"0"===btab_vars.abst_enable_user_journeys&&(enable_click_tracking=!1);var e=!1;if(enable_click_tracking&&void 0!==btab_vars){var t=btab_vars.heatmap_pages,n=btab_vars.heatmap_all_pages||!1,a=window.current_page,r=!1;if("object"==typeof bt_experiments&&bt_experiments)for(var i in bt_experiments){var o=abstGetCookie("btab_"+i);if(o)try{var s=JSON.parse(o);if(s.variation&&"undefined"!==s.variation&&!s.skipped){r=!0;break}}catch(e){}}if(r)e=!0;else if(btab_vars.is_admin)e=!1;else if(n&&"all"===n)e=!0;else if(void 0!==t&&Array.isArray(t)&&t.length>0){abLog("heatmap_pages",t),abLog("current_post_id",a),e=(Array.isArray(a)?a:[a]).some((function(e){return null!=e&&(t.includes(e)||t.includes(String(e)))}))}}enable_click_tracking&&e&&(abstGetAdvancedId()||setAbCrypto(),enableClickTracking())}function abstRecordJourney(e,t){for(var n=String(e||"event"),a=n,r=1;Object.prototype.hasOwnProperty.call(window.abst.clickRegister,a);)a=n+"-"+r,r++;window.abst.clickRegister[a]=t;try{window.abst.clickRegisterBytes=(window.abst.clickRegisterBytes||0)+JSON.stringify(t).length+a.length+6,window.abst.clickRegisterBytes>=3e4&&window.abst.hasApproval&&flushJourneyData(!1)}catch(e){}}function abstResetPageEngagement(){window.abst.heatPageviewId="pv-"+Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,8),window.abst.heatEngagementMs=0,window.abst.heatEngagementLastSentMs=0,window.abst.heatEngagementStartedAt=abstPageIsForeground()?Date.now():0}function abstPageIsForeground(){return"hidden"!==document.visibilityState&&("function"!=typeof document.hasFocus||document.hasFocus())}function abstPausePageEngagement(){window.abst.heatPageviewId&&window.abst.heatEngagementStartedAt&&(window.abst.heatEngagementMs+=Math.max(0,Date.now()-window.abst.heatEngagementStartedAt),window.abst.heatEngagementStartedAt=0)}function abstResumePageEngagement(){window.abst.heatPageviewId&&!window.abst.heatEngagementStartedAt&&abstPageIsForeground()&&(window.abst.heatEngagementStartedAt=Date.now())}function abstCurrentPageEngagementMs(){if(!window.abst.heatPageviewId)return 0;var e=Number(window.abst.heatEngagementMs)||0;return window.abst.heatEngagementStartedAt&&abstPageIsForeground()&&(e+=Math.max(0,Date.now()-window.abst.heatEngagementStartedAt)),Math.round(e)}function flushJourneyData(){if((void 0===btab_vars||"1"===btab_vars.abst_enable_user_journeys)&&
1!btab_vars.is_admin){var e=Object.keys(window.abst.clickRegister).length>0,t=Number(window.abst.heatScrollMax)||0,n=t>(Number(window.abst.heatScrollLastSent)||0),a=abstCurrentPageEngagementMs(),r=a>(Number(window.abst.heatEngagementLastSentMs)||0);if(e||n||r){abstGetAdvancedId()||setAbCrypto();var i=abstGetAdvancedId();if(i){for(var o in window.abst.clickRegister)window.abst.clickRegister[o].uuid||(window.abst.clickRegister[o].uuid=i);if(window.abst.hasApproval){var s,c={};if(c["meta_"+(new Date).toISOString()]={timestamp:(new Date).toISOString(),type:"meta",post_id:btab_vars.post_id,uuid:abstGetAdvancedId(),ab_advanced_id:abstGetAdvancedId(),url:"",element_id_or_selector:"",click_x:0,click_y:0,screen_size:window.abstheatmapScreenSize,meta:window.abst.heatScrollMax,experiments:getActiveExperiments(),referrer:function(){try{return sessionStorage.getItem("abst_original_referrer")||""}catch(e){return document.referrer||""}}(),viewport_height:window.abst.heatViewport||window.innerHeight},!e&&n)c["scroll_"+(new Date).toISOString()]={timestamp:(new Date).toISOString(),type:"s",post_id:btab_vars.post_id,uuid:i,ab_advanced_id:i,url:abstGetEventUrl(),element_id_or_selector:"",click_x:0,click_y:0,screen_size:window.abstheatmapScreenSize,meta:"scroll_depth"};if(r)c["engagement_"+(new Date).toISOString()]={timestamp:(new Date).toISOString(),type:"e",post_id:btab_vars.post_id,uuid:i,ab_advanced_id:i,url:abstGetEventUrl(),element_id_or_selector:window.abst.heatPageviewId||"",click_x:0,click_y:0,screen_size:window.abstheatmapScreenSize,meta:a};for(var d in window.abst.clickRegister)c[d]=window.abst.clickRegister[d];try{s=new Blob([JSON.stringify(c)],{type:"application/json"})}catch(e){s=JSON.stringify(c)}var l=!1;try{l=navigator.sendBeacon(bt_ajaxurl+"?action=abst_receive_journey_data",s)}catch(e){l=!1}if(!l){var u=0;try{u=JSON.stringify(c).length}catch(e){}"function"==typeof abLog&&abLog("journey beacon rejected, bytes="+u)}window.abst.clickRegister={},window.abst.clickRegisterBytes=0,window.abst.heatScrollLastSent=t,window.abst.heatEngagementLastSentMs=a}}}}}function initAbstDynamicElementObserver(){var e={};if("object"==typeof bt_experiments&&bt_experiments)for(var t in bt_experiments){var n=abstGetCookie("btab_"+t);if(n)try{var a=JSON.parse(n);a.variation&&!a.skipped&&(e[t]=a.variation)}catch(e){}}if(0!==Object.keys(e).length){var r=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){1===t.nodeType&&(processNodeForTests(t,e),t.querySelectorAll&&t.querySelectorAll("[bt-eid][bt-variation]").forEach((function(t){processNodeForTests(t,e)})))}))}))}));document.body&&(r.observe(document.body,{childList:!0,subtree:!0}),window.abstDynamicObserver=r)}}function processNodeForTests(e,t){if(e.getAttribute){var n=e.getAttribute("bt-eid"),a=e.getAttribute("bt-variation");n&&a&&t[n]===a&&(e.classList.contains("bt-show-variation")||(e.classList.add("bt-show-variation"),abLog("ABST: Added bt-show-variation to dynamically created element",{eid:n,variation:a,element:e})))}}function abstGetAdvancedId(){return sessionStorage.getItem("ab-advanced-id")?sessionStorage.getItem("ab-advanced-id"):abstGetCookie("ab-advanced-id")?abstGetCookie("ab-advanced-id"):window.abst&&window.abst.visitorId?window.abst.visitorId:null}function abstSyncWooSession(){if(void 0!==btab_vars&&"1"===btab_vars.wc_session_sync){var e=[];if(document.cookie.split(";").forEach((function(t){var n=t.trim();0!==n.indexOf("btab_")&&0!==n.indexOf("ab-advanced-id=")||e.push(n)})),e.length){e.sort();var t=e.join("|");try{if(sessionStorage.getItem("abstWcSessionSnapshot")===t)return}catch(e){}fetch(bt_ajaxurl+"?action=abst_sync_wc_session",{method:"POST",credentials:"same-origin",keepalive:!0}).then((function(e){return e.ok?e.json():null})).then((function(e){if(e&&e.data&&!0===e.data.persisted)try{sessionStorage.setItem("abstWcSessionSnapshot",t)}catch(e){}}
1)).catch((function(){}))}}}function abstGetFormAttributionData(){var e=document.cookie.split(";"),t={};function n(e,n){if(0===e.indexOf("btab_")&&n){try{var a=JSON.parse(n)}catch(e){try{a=JSON.parse(decodeURIComponent(n))}catch(e){return}}a&&a.variation&&(t[e.replace("btab_","")]=a.variation)}}for(var a=0;a<e.length;a++){var r=e[a].trim();if(0===r.indexOf("btab_")){var i=r.split("=");n(i[0],i.slice(1).join("="))}}return["localStorage","sessionStorage"].forEach((function(e){try{var a=window[e];Object.keys(a).forEach((function(e){Object.prototype.hasOwnProperty.call(t,e.replace("btab_",""))||n(e,a.getItem(e))}))}catch(e){}})),t}function abstApplyFormAttributionData(e,t){if(e&&e.nodeType===Node.ELEMENT_NODE&&"FORM"===e.tagName&&t&&0!==Object.keys(t).length){var n=e.querySelector('input[name="abst_data"]');n||((n=document.createElement("input")).type="hidden",n.name="abst_data",e.appendChild(n)),n.value=JSON.stringify(t)}}function abstSetupFormAttributionSubmitListener(){window.abst=window.abst||{},window.abst.formAttributionSubmitListener||(document.addEventListener("submit",(function(e){abstInjectFormFields(e.target)}),!0),window.jQuery&&window.jQuery.fn&&window.jQuery.fn.on&&window.jQuery(document).on("wpformsBeforeFormSubmit",(function(e,t){abstInjectFormFields(t&&t.jquery?t[0]:t)})),window.abst.formAttributionSubmitListener=!0)}function abstInjectFormFields(e){abstSetupFormAttributionSubmitListener(),window.abst=window.abst||{},window.MutationObserver&&!window.abst.formObserver&&document.body&&(window.abst.formObserver=new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=abstGetFormAttributionData();"FORM"===e.tagName&&abstApplyFormAttributionData(e,t),e.querySelectorAll&&e.querySelectorAll("form").forEach((function(e){abstApplyFormAttributionData(e,t)})),e.closest&&abstApplyFormAttributionData(e.closest("form"),t)}}))}))})),window.abst.formObserver.observe(document.body,{childList:!0,subtree:!0}));var t=abstGetFormAttributionData();0!==Object.keys(t).length&&((e&&e.nodeType===Node.ELEMENT_NODE&&"FORM"===e.tagName?[e]:document.querySelectorAll("form")).forEach((function(e){abstApplyFormAttributionData(e,t)})),window.abst.formFieldsInjected=!0)}function mapTextElementsWithSelectors(){if("1"!==new URLSearchParams(window.location.search).get("abhash"))return;const e=[],t=new Set,n=["script","style","noscript"],a=["wpadminbar"];return document.body?(function r(i){if(i&&!(e=>{if(!e||!e.tagName)return!1;if(n.includes(e.tagName.toLowerCase()))return!0;if(a.some((t=>e.id===t)))return!0;try{return null!==e.closest("#wpadminbar, .wp-admin-bar")}catch(e){return!1}})(i))if(i.nodeType!==Node.TEXT_NODE){if(i.nodeType===Node.ELEMENT_NODE)for(let e of i.childNodes)r(e)}else{if(i.nodeValue.trim().length>=3){const n=i.parentElement;if(n&&!t.has(n)){if(t.add(n),!(e=>{const t=e.getBoundingClientRect(),n=window.getComputedStyle(e);if(t.top>3e3)return!1;if(t.width<50||t.height<20)return!1;if("none"===n.display||"hidden"===n.visibility)return!1;if("0"===n.opacity)return!1;let a=e;for(;a&&a!==document.body;){const e=window.getComputedStyle(a);if("hidden"===e.overflow||"hidden hidden"===e.overflow){const e=a.getBoundingClientRect();if(t.right>e.right||t.bottom>e.bottom||t.left<e.left||t.top<e.top)return!1}a=a.parentElement}return!0})(n))return;const a=getUniqueSelector(n),r=n.textContent.trim(),i=function(e){const t=[];let n=e;for(;n&&n!==document.body;){if(n.tagName){let e=n.tagName.toLowerCase();n.id&&(e+=`#${n.id}`),t.unshift(e)}n=n.parentElement}t.unshift("body");let a=[],r=0;for(let e of t)"div"===e?r++:(r>0&&(a.push(r>1?`div[×${r}]`:"div"),r=0),a.push(e));return r>0&&a.push(r>1?`div[×${r}]`:"div"),a.join(" > ")}(n);e.push({text:r,selector:a,breadcrumb:i})}}}}(document.body),createSelectorTable(e),e):(console.warn("ABST: document.body not available for text selector mapping"),[])}function createSelectorTable(e){if(!document.body)return void console.warn("ABST: document.body not available for selector table creation");const t=document.createElement("div");t.style.cssText="\n    margin: 40px 20px;\n    padding: 20px;\n    background: #f0f0f0;\n    border: 2px solid #333; \n  ";const n=document.createElement("h2");n.textContent=`Text Selector Map (${e.length}
1 elements in top 3000px)`,n.style.cssText="margin-top: 0; font-family: system-ui; font-size: 18px;",t.appendChild(n);const a=document.createElement("table");a.style.cssText="\n    width: 100%;\n    border-collapse: collapse;\n    font-family: monospace;\n    font-size: 12px;\n    background: white;\n    border: 1px solid #ddd;\n  ";const r=document.createElement("thead");r.innerHTML='\n    <tr style="background: #333; color: white;">\n      <th style="padding: 8px; text-align: left; border: 1px solid #ddd; width: 25%;">Text Content</th>\n      <th style="padding: 8px; text-align: left; border: 1px solid #ddd; width: 35%;">Unique Selector</th>\n      <th style="padding: 8px; text-align: left; border: 1px solid #ddd; width: 35%;">Element Hierarchy</th>\n    </tr>\n  ',a.appendChild(r);const i=document.createElement("tbody");e.forEach(((e,t)=>{const n=document.createElement("tr");n.style.cssText=t%2==0?"background: white;":"background: #f9f9f9;";const a=document.createElement("td");a.style.cssText="padding: 8px; border: 1px solid #ddd; max-width: 250px; word-break: break-word; white-space: pre-wrap;",a.textContent=e.text.substring(0,80)+(e.text.length>80?"...":"");const r=document.createElement("td");r.style.cssText='padding: 8px; border: 1px solid #ddd; font-size: 11px; background: #f5f5f5; word-break: break-all; font-family: "Courier New", monospace;',r.textContent=e.selector;const o=document.createElement("td");o.style.cssText='padding: 8px; border: 1px solid #ddd; font-size: 11px; background: #fafafa; word-break: break-all; font-family: "Courier New", monospace; color: #555;',o.textContent=e.breadcrumb;const s=document.createElement("td");s.style.cssText="padding: 8px; border: 1px solid #ddd; text-align: center; font-weight: bold;",s.textContent=e.tagName,n.appendChild(a),n.appendChild(r),n.appendChild(o),n.appendChild(s),i.appendChild(n)})),a.appendChild(i),t.appendChild(a),document.body.appendChild(t),abLog(`ABST: Generated text to selector table with ${e.length} user-facing text elements in top 3000px`)}function abstForgetMe(){if(new URLSearchParams(window.location.search).get("abstforgetme")){abLog("ABST: forgetting you, reloading page");const e=document.cookie.split(";");for(let t=0;t<e.length;t++){const n=e[t].trim().split("=")[0];(n.startsWith("btab_")||"ab-advanced-id"===n||"absttimer"===n)&&abstDeleteCookie(n)}const t=Object.keys(localStorage);for(let e=0;e<t.length;e++)(t[e].startsWith("btab_")||"ab-advanced-id"===t[e]||"absttimer"===t[e])&&localStorage.removeItem(t[e]);const n=Object.keys(sessionStorage);for(let e=0;e<n.length;e++)(n[e].startsWith("btab_")||"ab-advanced-id"===n[e]||"absttimer"===n[e])&&sessionStorage.removeItem(n[e]);const a=new URL(window.location.href);a.searchParams.delete("abstforgetme"),window.location.href=a.toString(),abLog("poof!")}}abstSetupCrossDomainLinkDecoration(),window.addEventListener("pagehide",(function(){abstPausePageEngagement(),window.abst.hasApproval&&abst_process_approved_events()})),window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState?(abstPausePageEngagement(),window.abst.hasApproval&&abst_process_approved_events()):abstResumePageEngagement()})),window.addEventListener("blur",abstPausePageEngagement),window.addEventListener("focus",abstResumePageEngagement),setInterval((function(){window.abst&&window.abst.hasApproval&&abst_process_approved_events()}),1e3),setInterval((function(){window.abst&&window.abst.hasApproval&&"function"==typeof flushJourneyData&&flushJourneyData(!1)}),6e4),setTimeout(abstSyncWooSession,2500),window.addEventListener("pagehide",abstSyncWooSession),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){mapTextElementsWithSelectors()})):mapTextElementsWithSelectors(),abstForgetMe();

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.