(function(){var preferencesBtnId='consent-banner-prefs-button';var consentState=window.Termly.getConsentState()||{};document.addEventListener('DOMContentLoaded',function(){var button=document.getElementById(preferencesBtnId);button.addEventListener('click',function(){window.displayPreferenceModal()})});function enablePreferencesButton(){var button=document.getElementById(preferencesBtnId);button.style.display='block'}function handleReloadOnConsentChange(){if(!window.TERMLY_AUTOBLOCK_ENABLED){var cookiesDeclined=Object.entries(window.Termly.getConsentState()||{}).some(function(entry){var category=entry[0],value=entry[1];return!value&&consentState[category]});if(cookiesDeclined){window.location.reload()}}}window.getUpdatedCookieWhitelistByTermly=function(data){if(data.uuid){enablePreferencesButton();handleReloadOnConsentChange()}consentState=window.Termly.getConsentState();window.dispatchEvent(new CustomEvent('TermlyConsentUpdated',{detail:data}))};window.getTermlyConsentForCategory=function(category){var state=window.Termly.getConsentState()||{};return state[category.toLowerCase()]||false}}());