(()=>{var e={799(){window.WPConsent={displayChecks:[],checksPassed:!0,settingsHooks:[],settingsProcessed:!1,listeners:[],lastPreferences:null,cssPromise:null,registerListener:function(e){if(this.listeners.push(e),this.lastPreferences)try{e(this.lastPreferences)}catch(e){console.error("Error in WPConsent listener:",e)}},registerDisplayCheck:function(e){this.displayChecks.push(e),this.checksPassed=!1},registerSettingsHook:function(e){this.settingsHooks.push(e),this.settingsProcessed=!1},runDisplayChecks:function(){return 0===this.displayChecks.length?(this.checksPassed=!0,Promise.resolve()):Promise.all(this.displayChecks.map(e=>e())).then(()=>(this.checksPassed=!0,Promise.resolve())).catch(e=>(console.error("Error in WPConsent display check:",e),this.checksPassed=!0,Promise.resolve()))},runSettingsHooks:function(){return 0===this.settingsHooks.length?(this.settingsProcessed=!0,Promise.resolve()):Promise.all(this.settingsHooks.map(e=>e(window.wpconsent))).then(()=>(this.settingsProcessed=!0,Promise.resolve())).catch(e=>(console.error("Error in WPConsent settings hook:",e),this.settingsProcessed=!0,Promise.resolve()))},hooks:{beforeShowPreferences:[],afterShowPreferences:[],beforeHideBanner:[],afterHideBanner:[],beforeShowBanner:[],afterShowBanner:[],accordionToggled:[]},addHook:function(e,t){this.hooks[e]&&this.hooks[e].push(t)},runHooks:function(e,...t){this.hooks[e]&&this.hooks[e].length>0&&this.hooks[e].forEach(n=>{try{n(...t)}catch(t){console.error(`Error in WPConsent hook ${e}:`,t)}})},showToast:function(e,t=2500){this.ensureCSS().then(()=>{const n=this.shadowRoot.querySelector("#wpconsent-gpc-toast");if(!n)return;const o=n.querySelector(".wpconsent-toast-message");o&&e&&(o.textContent=e),n.style.display="block",setTimeout(()=>{n.classList.add("wpconsent-toast-visible")},10);const s=()=>{n.classList.remove("wpconsent-toast-visible"),setTimeout(()=>{n.style.display="none"},300)},c=setTimeout(s,t),r=n.querySelector(".wpconsent-toast-close");r&&(r.onclick=()=>{clearTimeout(c),s()})})},highlightGPCOverride:function(){const e=this.shadowRoot.querySelector("#wpconsent-gpc-override-toggle-label"),t=this.shadowRoot.querySelector("#wpconsent-gpc-override-checkbox"),n=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");e&&(e.classList.add("wpconsent-gpc-override-error"),e.classList.add("wpconsent-shake"),setTimeout(()=>{e.classList.remove("wpconsent-shake")},300),t&&t.focus(),n&&setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100),t&&t.addEventListener("change",function(){t.checked&&e.classList.remove("wpconsent-gpc-override-error")},{once:!0}))},acceptAll:function(){const e={};Array.isArray(wpconsent.slugs)&&wpconsent.slugs.forEach(t=>{e[t]=!0}),this.savePreferences(e),this.closePreferences()},checkGPC:function(){if(!wpconsent.respect_gpc||!0!==navigator.globalPrivacyControl)return;const e=this.getCookie("wpconsent_preferences");let t={};if(e)try{t=JSON.parse(e)}catch(e){console.error("WPConsent: Error parsing existing preferences:",e)}if(t.hasOwnProperty("respect_gpc"))return;const n={};if(wpconsent.slugs.forEach(e=>{const t=this.shadowRoot?.querySelector(`#wpconsent-preferences-modal input[type="checkbox"][id="cookie-service-${e}"]`);t&&t.disabled?n[e]=!0:n[e]=!1}),n.essential=!0,n.respect_gpc=!0,this.savePreferences(n,!0),!1!==wpconsent.gpc_toast_enabled){const e=wpconsent.gpc_toast_message||"GPC Signal Honored",t=wpconsent.gpc_toast_duration||1e4;this.showToast(e,t)}this.checksPassed=!1},savePreferences:function(e,t=!1){const n=this.getCookie("wpconsent_preferences");let o=!1,s=null;if(n)try{s=JSON.parse(n)}catch(e){console.error("WPConsent: Error parsing existing preferences:",e)}if(wpconsent.respect_gpc&&!t&&s){const t=!0===navigator.globalPrivacyControl,n=!0===s.respect_gpc;if(t&&n){const t=this.shadowRoot.querySelector("#wpconsent-gpc-override-checkbox");if(t&&!t.checked)return void this.highlightGPCOverride();e.respect_gpc=!1}}t||(s&&JSON.stringify(s)!==JSON.stringify(e)||wpconsent.default_allow&&Object.values(e).some(e=>!1===e))&&(this.clearCookies(),o=!0),wpconsent.respect_gpc&&!t&&s&&s.hasOwnProperty("respect_gpc")&&(e.respect_gpc=!1),this.setCookie("wpconsent_preferences",JSON.stringify(e),wpconsent.consent_duration),this.hideBanner(),this.closePreferences(),this.unlockScripts(e),this.unlockIframes(e),this.showFloatingButtonIfEnabled(),this.updateWordPressConsent(e),window.dispatchEvent(new CustomEvent("wpconsent_consent_saved",{detail:e})),n&&window.dispatchEvent(new CustomEvent("wpconsent_consent_updated",{detail:e})),o&&(Object.defineProperty(document,"cookie",{get:function(){return""},set:function(e){}}),window.location.reload())},showPreferences:function(){return this.ensureCSS().then(()=>{const e=this.shadowRoot?.querySelector("#wpconsent-preferences-modal");if(e){e.style.display="flex",this.setupFocusTrap(e),this.runHooks("afterShowPreferences");const t=this.shadowRoot?.querySelector("#wpconsent-preferences-title");t&&setTimeout(()=>{t.focus({preventScroll:!0}),this.lastFocusedElement=t},100);const n=this.getCookie("wpconsent_preferences");if(n)try{const e=JSON.parse(n);this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"]').forEach(t=>{let n=null;n=t.id.startsWith("cookie-category-")?t.id.replace("cookie-category-",""):t.id.startsWith("cookie-service-")?t.id.replace("cookie-service-",""):t.value,n&&n in e&&(t.checked=e[n])});const t=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");if(t){const n=!0===navigator.globalPrivacyControl,o=e&&!0===e.respect_gpc;t.style.display=n&&o?"block":"none"}}catch(e){console.error("Error parsing WPConsent preferences:",e)}}})},closePreferences:function(){const e=this.shadowRoot?.querySelector("#wpconsent-preferences-modal");e&&(e.style.display="none",this.removeFocusTrap(),this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus({preventScroll:!0}),this.previouslyFocusedElement=null))},showBanner:function(){if(!wpconsent.enable_consent_banner)return;const e=this.shadowRoot?.querySelector("#wpconsent-banner-holder");e&&this.ensureCSS().then(()=>{this.runHooks("beforeShowBanner"),e.classList.add("wpconsent-banner-visible"),this.updateButtonVisibility(wpconsent),this.setupFocusTrap(e),this.runHooks("afterShowBanner")})},hideBanner:function(){const e=this.shadowRoot?.querySelector("#wpconsent-banner-holder");e&&(this.runHooks("beforeHideBanner"),e.classList.remove("wpconsent-banner-visible"),this.removeFocusTrap(),this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus({preventScroll:!0}),this.previouslyFocusedElement=null),this.runHooks("afterHideBanner"))},setCookie:function(e,t,n){let o="";if(n>0){const e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),o="expires="+e.toUTCString()+";"}const s=this.getCookieDomain();document.cookie=e+"="+t+";"+o+s+"path=/"},getCookieDomain:function(){return wpconsent.enable_shared_consent&&wpconsent.cookie_domain&&""!==wpconsent.cookie_domain?"domain="+(wpconsent.cookie_domain.startsWith(".")?wpconsent.cookie_domain:"."+wpconsent.cookie_domain)+";":""},getCookie:function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()},hasConsent:function(e){const t=this.getCookie("wpconsent_preferences");if(!t)return!1;try{const n=JSON.parse(t);return"essential"===e||!0===n[e]}catch(e){return console.error("Error parsing WPConsent preferences:",e),!1}},shouldUnlockContent:function(e,t,n){return"essential"===n||(wpconsent.manual_toggle_services?!(!t||void 0===e[t])&&e[t]:!0===e[n])},unlockScripts:function(e){this.lastPreferences=e,this.listeners&&this.listeners.length>0&&this.listeners.forEach(t=>{try{t(e)}catch(e){console.error("Error in WPConsent listener:",e)}}),document.querySelectorAll('script[type="text/plain"]').forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=document.createElement("script");t.getAttributeNames().forEach(n=>{"type"!==n&&e.setAttribute(n,t.getAttribute(n))});const n=t.getAttribute("data-wpconsent-src");n?e.src=n:e.text=t.text,t.parentNode.replaceChild(e,t)}}),document.dispatchEvent(new CustomEvent("wpconsent_consent_processed",{detail:e})),WPConsent.localGtag("set","developer_id.dMmRkYz",!0),WPConsent.localGtag("consent","update",{ad_storage:e.marketing?"granted":"denied",analytics_storage:e.statistics?"granted":"denied",ad_user_data:e.marketing?"granted":"denied",ad_personalization:e.marketing?"granted":"denied",personalization_storage:e.marketing?"granted":"denied"}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"wpconsent_consent_processed",wpconsentPreferences:e})},unlockIframes:function(e){document.querySelectorAll("iframe[data-wpconsent-src]").forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=t.getAttribute("data-wpconsent-src");e&&(t.src=e),t.removeAttribute("data-wpconsent-src"),t.removeAttribute("data-wpconsent-name"),t.removeAttribute("data-wpconsent-category")}}),document.querySelectorAll(".wpconsent-iframe-placeholder").forEach(t=>{const n=t.getAttribute("data-wpconsent-category"),o=t.getAttribute("data-wpconsent-name");if(this.shouldUnlockContent(e,o,n)){const e=t.querySelector(".wpconsent-iframe-thumbnail"),n=t.querySelector(".wpconsent-iframe-overlay-content");e&&e.remove(),n&&n.remove(),t.classList.remove("wpconsent-iframe-placeholder")}})},init:function(){this.runSettingsHooks().then(()=>{this.initWordPress(),this.updateButtonVisibility(wpconsent);const e=document.getElementById("wpconsent-container"),t=document.getElementById("wpconsent-template");if(e&&t)if(this.shadowRoot=e.shadowRoot,this.shadowRoot)this.runDisplayChecks().then(()=>{this.processBannerDisplay()});else{this.shadowRoot=e.attachShadow({mode:"open"});const n=t.content.cloneNode(!0);this.shadowRoot.appendChild(n),t.remove(),this.initializeEventListeners(),this.initializeAccordions(),this.initializeKeyboardHandlers(),this.runDisplayChecks().then(()=>{this.processBannerDisplay()})}})},processBannerDisplay:function(){this.checkGPC();const e=this.getCookie("wpconsent_preferences");if(e){let t={};try{if(t=JSON.parse(e),wpconsent.slugs&&Array.isArray(wpconsent.slugs)&&!wpconsent.slugs.every(e=>t.hasOwnProperty(e)))return this.setCookie("wpconsent_preferences","",-1),void(this.checksPassed&&this.showBanner());this.unlockScripts(t),this.unlockIframes(t)}catch(e){console.error("Error parsing WPConsent preferences:",e)}this.showFloatingButtonIfEnabled()}else if(this.checksPassed&&this.showBanner(),wpconsent.default_allow||!wpconsent.enable_script_blocking){const e={};wpconsent.slugs.forEach(t=>{e[t]=!0}),this.unlockScripts(e),this.unlockIframes(e)}else if(!wpconsent.enable_content_blocking){const e={};wpconsent.slugs.forEach(t=>{e[t]=!0}),this.unlockIframes(e)}document.querySelectorAll(".wpconsent-iframe-overlay-content.wpconsent-content-hidden").forEach(function(e){e.classList.remove("wpconsent-content-hidden")}),window.dispatchEvent(new CustomEvent("wpconsent_banner_initialized"))},ensureCSS:function(){if(this.cssPromise)return this.cssPromise;const e=document.getElementById("wpconsent-container");return this.cssPromise=this.loadExternalCSS(e),this.cssPromise},revealContainer:function(e){e&&(e.style.display="block")},loadExternalCSS:function(e){return new Promise(t=>{if(this.shadowRoot&&this.shadowRoot.querySelector("link[data-wpconsent-css]"))return this.revealContainer(e),void t();if(!this.shadowRoot)return void t();const n=`${wpconsent.css_url}?ver=${wpconsent.css_version}`;let o=!1;const s=()=>{o||(o=!0,t())},c=t=>{let o=null;const r=document.createElement("link");r.rel="stylesheet",r.href=1===t?n:`${n}&wpcretry=${t}`,r.setAttribute("data-wpconsent-css","");const i=()=>{o&&(clearTimeout(o),o=null),r.onload=null,r.onerror=null},a=o=>{i(),r.parentNode&&r.parentNode.removeChild(r),t<2&&!o?c(t+1):(this.applyCSSFallback(e,n),s())};r.onload=()=>{i(),this.revealContainer(e),s()},r.onerror=()=>a(!1),o=setTimeout(()=>a(!0),5e3);try{this.shadowRoot.appendChild(r)}catch(e){console.error("WPConsent: failed to inject stylesheet link:",e),a()}};c(1)})},applyCSSFallback:function(e,t){if(this.shadowRoot&&!this.shadowRoot.querySelector("style[data-wpconsent-css-fallback]")){const e=document.createElement("style");e.setAttribute("data-wpconsent-css-fallback",""),e.textContent="\n#wpconsent-banner-holder {\n\tdisplay: none;\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tz-index: var(--wpconsent-z-index, 900000);\n}\n#wpconsent-banner-holder.wpconsent-banner-visible {\n\tdisplay: block;\n}\n#wpconsent-banner-holder .wpconsent-banner {\n\tbox-sizing: border-box;\n\tmargin: 10px;\n\tpadding: var(--wpconsent-padding, 15px 20px);\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 10px;\n\tbox-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);\n\tfont-size: var(--wpconsent-font-size, 14px);\n\tline-height: 1.4;\n}\n#wpconsent-banner-holder .wpconsent-banner-footer {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tmargin-top: 12px;\n}\n#wpconsent-banner-holder button,\n#wpconsent-preferences-modal button {\n\tcursor: pointer;\n\tpadding: 8px 16px;\n\tborder: 1px solid rgba(0, 0, 0, 0.2);\n\tborder-radius: 4px;\n\tfont-size: inherit;\n}\n#wpconsent-banner-holder .wpconsent-accept-all,\n#wpconsent-preferences-modal .wpconsent-accept-all {\n\tbackground: var(--wpconsent-accept-bg, #2563eb);\n\tcolor: var(--wpconsent-accept-color, #ffffff);\n\tborder-color: transparent;\n}\n#wpconsent-banner-holder .wpconsent-cancel-cookies,\n#wpconsent-preferences-modal .wpconsent-cancel-cookies {\n\tbackground: var(--wpconsent-cancel-bg, #f3f4f6);\n\tcolor: var(--wpconsent-cancel-color, #1a1a1a);\n}\n#wpconsent-preferences-modal {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: rgba(0, 0, 0, 0.5);\n\tz-index: 10202020;\n\talign-items: center;\n\tjustify-content: center;\n}\n#wpconsent-preferences-modal .wpconsent-preferences-content {\n\tbox-sizing: border-box;\n\twidth: 800px;\n\tmax-width: 90%;\n\tmax-height: 90vh;\n\tmargin: auto;\n\tpadding: 20px;\n\toverflow: auto;\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 10px;\n\tbox-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);\n}\n#wpconsent-consent-floating {\n\tdisplay: none;\n\tposition: fixed;\n\tbottom: 20px;\n\tleft: 20px;\n\tz-index: 9999;\n\tcursor: pointer;\n}\n#wpconsent-gpc-toast {\n\tposition: fixed;\n\tbottom: 20px;\n\tright: 20px;\n\tmax-width: 280px;\n\tpadding: 10px 14px;\n\tz-index: calc(var(--wpconsent-z-index, 900000) + 1);\n\tbackground: var(--wpconsent-background, #ffffff);\n\tcolor: var(--wpconsent-text, #1a1a1a);\n\tborder-radius: 8px;\n\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n}\n",this.shadowRoot.appendChild(e)}this.revealContainer(e),console.error(`WPConsent: failed to load styles from ${t}; showing the consent UI with fallback styling.`),window.dispatchEvent(new CustomEvent("wpconsent_css_failed",{detail:{url:t}}))},initializeEventListeners:function(){this.shadowRoot.querySelectorAll(".wpconsent-accept-all").forEach(e=>e.addEventListener("click",()=>this.acceptAll())),this.shadowRoot.querySelectorAll(".wpconsent-cancel-cookies").forEach(e=>e.addEventListener("click",()=>{const e={};wpconsent.slugs.forEach(t=>{const n=this.shadowRoot.querySelector(`#wpconsent-preferences-modal input[type="checkbox"][id="cookie-service-${t}"]`);n&&n.disabled?e[t]=!0:e[t]=!1}),e.essential=!0,this.savePreferences(e)})),this.shadowRoot.querySelector("#wpconsent-banner-close")?.addEventListener("click",()=>this.hideBanner()),this.shadowRoot.querySelector("#wpconsent-preferences-all")?.addEventListener("click",()=>this.showPreferences());const e=this.shadowRoot.querySelector("#wpconsent-consent-floating");e&&e.addEventListener("click",()=>this.showPreferences()),this.initializeCheckboxListeners(),document.addEventListener("click",e=>{const t=e.target.closest(".wpconsent-iframe-accept-button");if(t){const e=t.getAttribute("data-category"),n=t.closest(".wpconsent-iframe-placeholder"),o=n?.getAttribute("data-wpconsent-name");if(e){let t={};try{t=JSON.parse(this.getCookie("wpconsent_preferences")||"{}")}catch(e){console.error("Failed to parse wpconsent_preferences cookie:",e)}const n=!0===navigator.globalPrivacyControl,s=!0===t.respect_gpc;if(wpconsent.respect_gpc&&n&&s)this.showPreferences().then(()=>{const t=this.shadowRoot.querySelector(`#cookie-category-${e}`);if(t&&(t.checked=!0),o){const e=this.shadowRoot.querySelector(`#cookie-service-${o}`);e&&(e.checked=!0)}const n=this.shadowRoot.querySelector("#wpconsent-gpc-override-container");n&&(n.style.display="block"),this.highlightGPCOverride()});else{const n={...t,essential:!0,[e]:!0};o&&(n[o]=!0),this.savePreferences(n)}}}}),document.addEventListener("click",e=>{e.target.closest(".wpconsent-open-preferences")&&(e.preventDefault(),this.showPreferences())}),this.shadowRoot.querySelector(".wpconsent-preferences-header-close")?.addEventListener("click",()=>this.closePreferences()),this.shadowRoot.querySelector(".wpconsent-save-preferences")?.addEventListener("click",()=>{const e=this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"]'),t=Array.from(e).filter(e=>e.checked).map(e=>e.value),n={};wpconsent.slugs.forEach(e=>{n[e]=t.includes(e)}),n.essential=!0,this.savePreferences(n)}),this.shadowRoot.querySelector(".wpconsent-close-preferences")?.addEventListener("click",()=>this.closePreferences()),window.addEventListener("wpconsent_consent_saved",function(e){if("function"!=typeof window.clarity)return;const t=e.detail;window.clarity("consentv2",{ad_Storage:t.marketing?"granted":"denied",analytics_Storage:t.statistics?"granted":"denied"})})},localGtag:function(){window.dataLayer=window.dataLayer||[],function(){dataLayer.push(arguments)}.apply(window,arguments)},initializeCheckboxListeners:function(){this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-category-"]').forEach(e=>{e.addEventListener("change",e=>{this.handleCategoryCheckboxChange(e.target)})}),this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-service-"]').forEach(e=>{e.addEventListener("change",e=>{this.handleServiceCheckboxChange(e.target)})})},handleCategoryCheckboxChange:function(e){const t=e.id.replace("cookie-category-","");this.shadowRoot.querySelectorAll('#wpconsent-preferences-modal input[type="checkbox"][id^="cookie-service-"]').forEach(n=>{n.closest(`.wpconsent-cookie-category-${t}`)&&(n.checked=e.checked)})},handleServiceCheckboxChange:function(e){const t=e.closest(".wpconsent-cookie-category");if(!t)return;const n=t.querySelector('input[type="checkbox"][id^="cookie-category-"]');if(!n)return;const o=t.querySelectorAll('input[type="checkbox"][id^="cookie-service-"]');let s=!1;o.forEach(e=>{e.checked&&(s=!0)}),n.checked=s},initializeAccordions(){this.shadowRoot.querySelectorAll(".wpconsent-preferences-accordion-item").forEach(e=>{const t=e.querySelector(".wpconsent-preferences-accordion-header"),n=e.querySelector(".wpconsent-preferences-accordion-content");t&&n&&t.addEventListener("click",t=>{t.target.closest(".wpconsent-preferences-checkbox-toggle")||this.toggleAccordion(e,n)})})},toggleAccordion(e,t){e.classList.contains("active");const n=e.parentElement,o=e.classList.contains("wpconsent-cookie-service"),s=e.classList.contains("wpconsent-cookie-category");s?n&&n.querySelectorAll(":scope > .wpconsent-preferences-accordion-item.wpconsent-cookie-category").forEach(t=>{if(t!==e){t.classList.remove("active");const e=t.querySelector(".wpconsent-preferences-accordion-toggle");e&&e.setAttribute("aria-expanded","false"),t.querySelectorAll(".wpconsent-cookie-service").forEach(e=>{e.classList.remove("active");const t=e.querySelector(".wpconsent-preferences-accordion-toggle");t&&t.setAttribute("aria-expanded","false"),this.runHooks("accordionToggled",{accordion:e,content:e.querySelector(".wpconsent-preferences-accordion-content"),isActive:!1,isService:!0,isCategory:!1})})}}):o&&n&&n.querySelectorAll(":scope > .wpconsent-preferences-accordion-item.wpconsent-cookie-service").forEach(t=>{if(t!==e){t.classList.remove("active");const e=t.querySelector(".wpconsent-preferences-accordion-toggle");e&&e.setAttribute("aria-expanded","false"),this.runHooks("accordionToggled",{accordion:t,content:t.querySelector(".wpconsent-preferences-accordion-content"),isActive:!1,isService:!0,isCategory:!1})}}),e.classList.toggle("active");const c=e.querySelector(".wpconsent-preferences-accordion-toggle");if(c){const t=e.classList.contains("active");c.setAttribute("aria-expanded",t?"true":"false")}const r=e.classList.contains("active");this.runHooks("accordionToggled",{accordion:e,content:t,isActive:r,isService:o,isCategory:s})},initializeKeyboardHandlers:function(){document.addEventListener("keydown",e=>{"Tab"===e.key?this.handleTabKey(e):"Escape"===e.key&&this.handleEscapeKey(e)})},handleEscapeKey:function(e){const t=this.shadowRoot?.querySelector("#wpconsent-preferences-modal"),n=this.shadowRoot?.querySelector("#wpconsent-banner-holder");t&&"flex"===t.style.display?this.closePreferences():n&&n.classList.contains("wpconsent-banner-visible")&&this.hideBanner()},handleTabKey:function(e){const t=this.shadowRoot?.querySelector("#wpconsent-banner-holder"),n=this.shadowRoot?.querySelector("#wpconsent-preferences-modal"),o=t&&t.classList.contains("wpconsent-banner-visible"),s=n&&"flex"===n.style.display;if(!o&&!s)return;const c=s?n:t,r=this.getFocusableElements(c);if(0===r.length)return;e.preventDefault();const i=r[0],a=r[r.length-1];let l;this.lastFocusedElement&&r.includes(this.lastFocusedElement)?l=this.lastFocusedElement:(l=i,this.lastFocusedElement=l);const d=r.indexOf(l);let p;p=e.shiftKey?d<=0?a:r[d-1]:d>=r.length-1?i:r[d+1],p.focus({preventScroll:!0}),this.lastFocusedElement=p},setupFocusTrap:function(e){this.previouslyFocusedElement=document.activeElement,this.lastFocusedElement=null},removeFocusTrap:function(){this.lastFocusedElement=null},setInitialFocus:function(e){const t=this.getFocusableElements(e);t.length>0&&setTimeout(()=>{t[0].focus({preventScroll:!0}),this.lastFocusedElement=t[0]},100)},getFocusableElements:function(e){return Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(t=>{let n=t;for(;n&&n!==e;){const e=window.getComputedStyle(n);if("none"===e.display||"hidden"===e.visibility||"0"===e.opacity||n.disabled||"true"===n.getAttribute("aria-hidden"))return!1;n=n.parentElement}return!0})},isElementInContainer:function(e,t){return!(!e||!t)&&(t.shadowRoot?t.shadowRoot.contains(e):t.contains(e))},clearCookies:function(){for(var e=document.cookie.split("; "),t=0;t<e.length;t++)for(var n=window.location.hostname.split(".");n.length>0;){var o=encodeURIComponent(e[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+n.join(".")+" ;path=",s=location.pathname.split("/");for(document.cookie=o+"/";s.length>0;)document.cookie=o+s.join("/"),s.pop();n.shift()}},initWordPress:function(){window.wp_consent_type=wpconsent.consent_type;let e=new CustomEvent("wp_consent_type_defined");document.dispatchEvent(e)},showFloatingButtonIfEnabled:function(){wpconsent.enable_consent_floating&&this.ensureCSS().then(()=>{const e=this.shadowRoot?.querySelector("#wpconsent-consent-floating");e&&(e.style.display="block")})},updateButtonVisibility:function(e){this.shadowRoot&&["accept","cancel","preferences"].forEach(t=>{const n=this.shadowRoot.querySelector(`#wpconsent-${t}-all`);n&&(e[`${t}_button_enabled`]?(n.classList.remove("wpconsent-button-disabled"),n.removeAttribute("data-disabled")):(n.classList.add("wpconsent-button-disabled"),n.setAttribute("data-disabled","true")))})},updateWordPressConsent:function(e){"function"==typeof wp_set_consent&&(wp_set_consent("functional","allow"),wp_set_consent("preferences","allow"),wp_set_consent("statistics",e.statistics?"allow":"deny"),wp_set_consent("statistics-anonymous",e.statistics?"allow":"deny"),wp_set_consent("marketing",e.marketing?"allow":"deny"))}},document.addEventListener("DOMContentLoaded",()=>WPConsent.init())}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var c=t[o]={exports:{}};return e[o](c,c.exports,n),c.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(799)})()})();