let container_height=0;let footer_height=0;class CookieXray{constructor(dialogue,cookies,language,banner,key,exertobanner){this.title=dialogue.title;this.body=dialogue.body;this.dialogue=dialogue;this.position=dialogue.script_position;this.scriptPosition="";this.cookies_body=dialogue.cookies_body;this.preference_title=dialogue.preference_title;this.preference_body=dialogue.preference_body;this.statistics_title=dialogue.statistics_title;this.statistics_body=dialogue.statistics_body;this.marketing_title=dialogue.marketing_title;this.marketing_body=dialogue.marketing_body;this.unclassified_title=dialogue.unclassified_title;this.unclassified_body=dialogue.unclassified_body;this.template_name=dialogue.template_name;this.title_color=dialogue.title_color;this.body_text_color=dialogue.body_text_color;this.agree_btn_color=dialogue.agree_btn_color;this.disagree_btn_color=dialogue.disagree_btn_color;this.preferences_btn_color=dialogue.preferences_btn_color;this.agree_text_color=dialogue.agree_text_color;this.disagree_text_color=dialogue.disagree_text_color;this.preferences_text_color=dialogue.preferences_text_color;this.logo_bg_color=dialogue.logo_bg_color;this.banner_bg_color=dialogue.banner_bg_color;this.cookie_policy_url=dialogue.cookie_policy_url;this.policy_url=dialogue.policy_url;this.cookie_consent=dialogue.cookie_consent;this.is_cookie_banner=dialogue.is_cookie_banner;this.is_cookie_policy=dialogue.is_cookie_policy;this.is_cookie_declaration_table=dialogue.is_cookie_declaration_table;this.btn_disagree_title=dialogue.btn_disagree_title;this.btn_agree_title=dialogue.btn_agree_title;this.btn_read_more_title=dialogue.btn_read_more_title;this.consent_mode=dialogue.consent_mode;this.show_once=dialogue.show_once;this.auto_accept_on_scroll=dialogue.auto_accept_on_scroll;this.consent_type=dialogue.consent_type;this.preferences_checked=dialogue.preferences_checked;this.statistics_checked=dialogue.statistics_checked;this.targeting_checked=dialogue.targeting_checked;this.agreement_expire=dialogue.agreement_expire;this.logo=dialogue.logo_link;this.logo_status=dialogue.logo_status;this.do_prior_consent=dialogue.do_prior_consent;this.save_consent_logs=dialogue.save_consent_logs;this.cookies=cookies;this.language=language;if((dialogue.region_detection==1||dialogue.region_detection==!0)&&exertobanner!=null){this.banner=exertobanner}else{this.banner=banner} this.has_badge=dialogue.has_badge||!1;this.email_section=dialogue.email_section;this.policy_url_section=dialogue.policy_url_section;this.cookies_present={preferences:[],statistics:[],marketing:[],};this.whitelist=[];this.scripts=[];this.scripts_pref=[];this.scripts_stats=[];this.scripts_markt=[];this.scripts_unknown=[];this.key=key;this.consent_done=!1;this.apply_google_consent=dialogue.apply_google_consent;this.lambda_url=lambda_url;this.name='SeersCMPConsent';this.ccpa_email='';this.ccpa_toggle_txt=dialogue.ccpa_toggle_txt} buildHTML(){var self=this;var pref_checked=this.preferences_checked?'checked':'';var stat_checked=this.statistics_checked?'checked':'';var market_checked=this.targeting_checked?'checked':'';var agreeBtnSpecific='';var disAgreeBtnSpecific='';var readMoreBtnSpecific='';var button_type=this.banner.button_type;var logoUrl=cx_host+'/logo/'+this.logo;var html="";html+="
\n"+"
\n"+"
\n"+" \n"+" Close
\n"+" \n"+"
\n";html+="
\n"+"

"+((this.language.cpra_title&&this.language.cpra_title!==null)?this.language.cpra_title:this.language.title)+"

\n"+"
\n"+"
\n"+"
\n"+"
\n"+" \n"+" \n"+"
\n"+" "+this.language.do_not_sell+"\n"+"\n"+"
\n"+"
\n"+" \n"+" \n"+"
\n"+" \n"+"
\n"+"\n"+"\n"+"
\n"+"
\n"+" "+" \n"+" \n"+" \n"+" \n"+" \n"+" \n"+" \n"+"
\n"+"
";html+="
";html+="
";html+="
";html+="

"+((this.language.cpra_title&&this.language.cpra_title!==null)?this.language.cpra_title:this.language.title)+"

"+"\n";if(this.language.title&&!this.dialogue.restrict_main_cpra){html+="
"} if(!this.dialogue.restrict_main_cpra){html+="

"+((this.language.cpra_body&&this.language.cpra_body!==null)?this.language.cpra_body:this.language.body)+"

"} if(this.ccpa_toggle_txt==1&&!this.dialogue.restrict_main_cpra){html+=" Targeting / Advertising"}else{html+=" "} if(!this.dialogue.restrict_main_cpra){html+="
";html+="
";html+="
"} html+="
";if((this.email_section||this.policy_url_section)&&!this.dialogue.restrict_main_cpra){html+="
"}if((this.email_section||this.policy_url_section)&&this.dialogue.restrict_main_cpra){html+="
"} html+="
";if(this.policy_url_section){html+="

"+((this.language.cpra_second_layout_description&&this.language.cpra_second_layout_description!=null)?this.language.cpra_second_layout_description:'')+"

";html+="`} if(this.email_section){html+="

"+((this.language.cpra_email_section_title&&this.language.cpra_email_section_title!=null)?this.language.cpra_email_section_title:this.language.email_section_title)+"

";html+="
";html+="
";html+="
";html+="
"} html+="
";html+="
";if(this.has_badge){} return html} buildCookiesHTML(category){var self=this;var html="";var categories={"necessary":'necessory',"preferences":'preference',"statistics":'statistics',"marketing":'marketing',"non_categorize":'unclassified'};html="\n"+"\n";if(self.cookies){self.cookies[category].forEach(function(cookie,key){var expiry=self.calculateExpiry(cookie.expiry);var purpose="";var secure=cookie.secure==1?'Secure':'Not Secure';if(cookie.purpose_desc){purpose=cookie.purpose_desc} html+="
\n"+"
\n"+"
"+cookie.name+"
\n"+"
\n"+"
\n"+"

"+purpose+"

\n"+"
\n"+"
\n"+" \n"+"
\n"+" \n"+"
\n"})} return html} calculateExpiry(expiry_date){var current_date=new Date();expiry_date=new Date(expiry_date);var diff=(expiry_date.getTime()-current_date.getTime())/1000;diff/=(60*60*24);var result=0;if(diff>=365.25){result=Math.abs(Math.round(diff/365.25))}else{result=Math.abs(Math.round(diff))} return result+' days'} addConsentTypeInCookies(value,days){var expires="";days=365;var name=this.name;if(days||days==0){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()} const item={value:value,expiry:expires} localStorage.setItem(name,JSON.stringify(item))} createCookie(name,value,days){var expires="";days=365;if(days||days==0){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()} document.cookie=name+"="+value+expires+"; path=/"} createLocalStorage(name,value,days){var expires="";days=365;if(days||days==0){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()} const item={value:value,expiry:expires} localStorage.setItem(name,JSON.stringify(item))} readCookie(e){for(var t,o,n="",i=document.cookie,s=i.split(";"),a=0;an.length||"0"==o)&&(n=o)}if(""!=n)return unescape(n) return null} readLocalStorage(storageName){const itemStr=localStorage.getItem(storageName) if(!itemStr){return null} const item=JSON.parse(itemStr);const expiryDate=item.expiry.split("=")[1];const myDate=new Date(expiryDate);const now=new Date() if(now.getTime()>myDate.getTime()){localStorage.removeItem(storageName) return null} return JSON.parse(item.value)} eraseCookie(name){this.createCookie(name,"",-1)} eraseCookieFromAllPaths(name){var pathBits=location.pathname.split('/');var pathCurrent=' path=';document.cookie=name+'=; expires=Thu, 01-Jan-1970 00:00:01 GMT;';for(var i=0;i0){var cookieBase=encodeURIComponent(cookies[c].split(";")[0].split("=")[0])+'=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain='+d.join('.')+' ;path=';var p=location.pathname.split('/');document.cookie=cookieBase+'/';while(p.length>0){document.cookie=cookieBase+p.join('/');p.pop()} d.shift()}}} getRootDomain(e){var t=e;if(0{this.removeCookie(cookie.name)});!stat&&this.cookies.statistics.forEach(cookie=>{this.removeCookie(cookie.name)});!market&&this.cookies.marketing.forEach(cookie=>{this.removeCookie(cookie.name)})}} proceedScripts(pref,stat,market){let domScripts=Array.from(document.getElementsByTagName('script'));domScripts.forEach(script=>{if(pref&&script.dataset.hasOwnProperty('cookieconsent')&&script.dataset.cookieconsent==='preferences'){this.injectScript(script)} if(stat&&script.dataset.hasOwnProperty('cookieconsent')&&script.dataset.cookieconsent==='statistics'){this.injectScript(script)} if(market&&script.dataset.hasOwnProperty('cookieconsent')&&script.dataset.cookieconsent==='marketing'){this.injectScript(script)}})} injectScript(script){let newScript=document.createElement('SCRIPT');if(script.src&&script.src!==''){newScript.src=script.src} newScript.dataset.cookieconsent=script.dataset.cookieconsent;newScript.type=script.dataset.original;if(script.innerHTML!==''){newScript.innerHTML=script.innerHTML} let parent=script.parentNode;let nextSibling=script.nextElementSibling;parent.removeChild(script);parent.insertBefore(newScript,nextSibling||null)} holdCookies(){let self=this;var value='';if(this.cookies){this.cookies.preferences.forEach(function(cookie,key){value=self.readCookie(cookie.name);if(value){self.cookies_present.preferences.push({name:cookie.name,value:value});self.eraseCookie(cookie.name)}});this.cookies.statistics.forEach(function(cookie,key){value=self.readCookie(cookie.name);if(value){self.cookies_present.statistics.push({name:cookie.name,value:value});var expires='; expires=Thu, 01 Jan 1970 00:00:00 GMT';document.cookie=cookie.name+"="+value+expires+"; path=/"}});this.cookies.marketing.forEach(function(cookie,key){value=self.readCookie(cookie.name);if(value){self.cookies_present.marketing.push({name:cookie.name,value:value});self.eraseCookie(cookie.name)}})} this.removeCookiesCB();return} holdScripts(){let self=this;self.scripts=document.getElementsByTagName("script");for(var i=0;i";html+=""+this.policy+"";html+=""} if(this.cookie_consent=='generalised'||this.is_table){if(this.cookies){html+="
";html+="

Cookie Declaration

";if(this.cookies.necessary){html+="

Necessary Cookies:

";html+="";html+="" html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";this.cookies.necessary.forEach(function(cookie,key){var expiry=calculateExpiry(cookie.expiry);var purpose="";if(cookie.purpose_desc){purpose=cookie.purpose_desc} html+="";html+="";html+="";html+="";html+="";html+="";html+=""});html+="";html+="
NameProviderPurposeLife SpanType
";html+="

"+cookie.slug+"

";html+="
";html+="

"+cookie.provider+"

";html+="
";html+="

"+purpose+"

";html+="
";html+="

"+expiry+"

";html+="
";html+="

"+cookie.type+"

";html+="
"} if(this.cookies.preferences){html+="

Preferences Cookies:

";html+="";html+="" html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";this.cookies.preferences.forEach(function(cookie,key){var expiry=calculateExpiry(cookie.expiry);var purpose="";if(cookie.purpose_desc){purpose=cookie.purpose_desc} html+="";html+="";html+="";html+="";html+="";html+="";html+=""});html+="";html+="
NameProviderPurposeLife SpanType
";html+="

"+cookie.slug+"

";html+="
";html+="

"+cookie.provider+"

";html+="
";html+="

"+purpose+"

";html+="
";html+="

"+expiry+"

";html+="
";html+="

"+cookie.type+"

";html+="
"} if(this.cookies.statistics){html+="

Statistics Cookies:

";html+="";html+="" html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";this.cookies.statistics.forEach(function(cookie,key){var expiry=calculateExpiry(cookie.expiry);var purpose="";if(cookie.purpose_desc){purpose=cookie.purpose_desc} html+="";html+="";html+="";html+="";html+="";html+="";html+=""});html+="";html+="
NameProviderPurposeLife SpanType
";html+="

"+cookie.slug+"

";html+="
";html+="

"+cookie.provider+"

";html+="
";html+="

"+purpose+"

";html+="
";html+="

"+expiry+"

";html+="
";html+="

"+cookie.type+"

";html+="
"} if(this.cookies.marketing.length>0){html+="

Marketing/Targeting Cookies:

";html+="";html+="" html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";this.cookies.marketing.forEach(function(cookie,key){var expiry=calculateExpiry(cookie.expiry);var purpose="";if(cookie.purpose_desc){purpose=cookie.purpose_desc} html+="";html+="";html+="";html+="";html+="";html+="";html+=""});html+="";html+="
NameProviderPurposeLife SpanType
";html+="

"+cookie.slug+"

";html+="
";html+="

"+cookie.provider+"

";html+="
";html+="

"+purpose+"

";html+="
";html+="

"+expiry+"

";html+="
";html+="

"+cookie.type+"

";html+="
"} if(this.cookies.non_categorize){html+="

Unclassified Cookies:

";html+="";html+="" html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";html+="";this.cookies.non_categorize.forEach(function(cookie,key){var expiry=calculateExpiry(cookie.expiry);var purpose="";if(cookie.purpose_desc){purpose=cookie.purpose_desc} html+="";html+="";html+="";html+="";html+="";html+="";html+=""});html+="";html+="
NameProviderPurposeLife SpanType
";html+="

"+cookie.slug+"

";html+="
";html+="

"+cookie.provider+"

";html+="
";html+="

"+purpose+"

";html+="
";html+="

"+expiry+"

";html+="
";html+="

"+cookie.type+"

";html+="
"} html+="
"}} return html}} class HttpRequest{createCORSRequest(method,url){var xhr=new XMLHttpRequest();if("withCredentials" in xhr){xhr.open(method,url,!0)}else if(typeof XDomainRequest!="undefined"){xhr=new XDomainRequest();xhr.open(method,url)}else{xhr=null} return xhr} async makeCorsRequest(key){let self=this;var current_url=window.location.href;var json_data=getApiData;if(json_data.hasOwnProperty('reload')&&json_data.reload===!0){window.location.reload();return} if(!json_data.eligible){return} var dialogue=json_data.dialogue;var banner=json_data.banner;var language=banner_lang;if(!language){language=language_obj} if(dialogue.cookie_consent=='generalised'||(dialogue.cookie_consent=='specific'&&(dialogue.is_cookie_banner==!0||dialogue.is_cookie_policy==!0||dialogue.is_cookie_declaration_table==!0))){if(dialogue.cookie_policy_url==current_url&&(dialogue.cookie_consent=='generalised'||(dialogue.cookie_consent=='specific'&&(dialogue.is_cookie_policy==!0||dialogue.is_cookie_declaration_table==!0)))){self.makeCorsRequestForPolicy(key,dialogue.cookie_consent,dialogue.is_cookie_policy,dialogue.is_cookie_declaration_table)}else{if(dialogue.cookie_consent=='generalised'||(dialogue.cookie_consent=='specific'&&dialogue.is_cookie_banner==!0)){var cookies=json_data.cookies;var exertobanner=json_data.exertobanner;let cx=new CookieXray(dialogue,cookies,language,banner,key,exertobanner);window.cx=cx;cx.holdScripts();let cookie_val=cx.readLocalStorage(cx.name);const gpcValue=navigator.globalPrivacyControl;if(gpcValue){if(!cookie_val){let value={pref:!1,stat:!1,market:!1};cx.createLocalStorage(cx.name,JSON.stringify(value),365);consent_value=!0;cookie_val=cx.readLocalStorage(cx.name)}}else{if(!cookie_val){let value={pref:!0,stat:!0,market:!0};cx.createLocalStorage(cx.name,JSON.stringify(value),365);consent_value=!1;cookie_val=cx.readLocalStorage(cx.name)}} if(cookie_val){consent_value=!cookie_val.pref;cx.consent_done=!0;cx.preferenceChecked=cookie_val.pref;cx.statisticsChecked=cookie_val.stat;cx.marketingChecked=cookie_val.market;cx.proceedCookies(cookie_val.pref,cookie_val.stat,cookie_val.market);cx.proceedScripts(cookie_val.pref,cookie_val.stat,cookie_val.market)} if(cx.apply_google_consent){let googleTagManagerScript=Array.from(document.scripts).find(s=>s.hasAttribute('src')&&s.src.includes('googletagmanager.com'));let googleAnalyticsScript=Array.from(document.scripts).find(s=>s.hasAttribute('src')&&s.src.includes('google-analytics.com'));undefined!==googleTagManagerScript&&googleTagManagerScript.setAttribute('type','text/javascript');undefined!==googleAnalyticsScript&&googleAnalyticsScript.setAttribute('type','text/javascript');let googleGtagCodeScript=Array.from(document.scripts).find(s=>s.innerHTML||s.innerText);if(googleGtagCodeScript!==undefined){let string=(googleGtagCodeScript.innerHTML||googleGtagCodeScript.innerText).toString();if(string.includes('window.dataLayer')&&string.includes('gtag')){cx.targeting_checked&>ag('consent','update',{'ad_storage':'granted','wait_for_update':500});cx.statistics_checked&>ag('consent','update',{'analytics_storage':'granted','wait_for_update':500});cx.preferences_checked&>ag('consent','update',{'functionality_storage':'granted','wait_for_update':500});cx.preferences_checked&>ag('consent','update',{'personalization_storage':'granted','wait_for_update':500});gtag('consent','update',{'security_storage':'granted','wait_for_update':500});cx.targeting_checked&>ag('consent','update',{'ad_user_data':'granted','wait_for_update':500});cx.targeting_checked&>ag('consent','update',{'ad_personalization':'granted','wait_for_update':500})}}} var elem=cx.buildHTML();let body=document.getElementsByTagName("body")[0];if(void 0===body){if(consent_value){setTimeout(function(){document.body.insertAdjacentHTML('beforeend',elem);initEvents(cx)},10)}else{setTimeout(function(){document.body.insertAdjacentHTML('beforeend',elem);initEvents(cx)},10)}}else{if(consent_value){document.body.insertAdjacentHTML('beforeend',elem);initEvents(cx)}else{document.body.insertAdjacentHTML('beforeend',elem);initEvents(cx)}} if(!consent_value){} setTimeout(function(){cx.proceedCookies(cookie_val.pref,cookie_val.stat,cookie_val.market)},5000)}}}} makeCorsRequestForPolicy(key,cookie_consent,is_policy,is_table){self=this;var url=cx_host+'/api/getPolicy';var params="key="+key;var xhr=this.createCORSRequest('POST',url);if(!xhr){alert('CORS not supported');return} xhr.onload=function(){var text=xhr.responseText;var json_data=JSON.parse(text);var policy=json_data.policy;var cookies=json_data.cookies;var design=json_data.policy_design;if(policy==null){is_policy=!1} if(design=='default'){var styles='.cx-policy-container,.cx-table-container{width:1024px;\n'+' margin: 0 auto;\n'+' padding:0 15px;\n'+' border: 1px solid #666;\n'+' margin-bottom: 50px;\n'+'}\n'+'.cx-title{\n'+' font-size:26px;\n'+' font-weight: bold;\n'+' color: #fff !important;\n'+' background: #41a2db;\n'+' padding:32px 36px 32px;\n'+' margin:15px 0 30px;\n'+'}\n'+'.cx-policy-container p{\n'+' color: #666;\n'+'}\n'+'\n'+'.cx-policy-container>.cx-headings{\n'+' font-size: 23px;\n'+' font-weight: bold;\n'+' color: #666;\n'+' margin-bottom: 0;\n'+'}\n'+'.cx-table-container>p.cx-declaration-title{\n'+' color: #666;\n'+'}\n'+'\n'+'.cx-policy-container>ul li{\n'+' color: #666 !important;\n'+' margin-bottom: 0;\n'+'}\n'+'.cx-desc{\n'+' text-align: center;\n'+'}\n'+'.cx-desc .cx-domain,.cx-desc .cx-company{\n'+' font-weight: bold;\n'+'}\n'+'.cx-policy-container ul ul li{\n'+' list-style:square;\n'+'}\n'+'.cx-table-table{\n'+' border: 1px solid rgb(211, 211, 211);\n'+'}\n'+'.cx-table-container>table.cx-table-table>thead.cx-table-head {\n'+' background: none !important;\n'+' line-height: 30px;\n'+' color: #000 !important;\n'+'}\n'+'.cx-table-container>table.cx-table-table {\n'+' border-collapse: collapse !important;\n'+'}\n'+'.cx-table-container>table {\n'+' border-collapse: collapse;\n'+'}\n'+'\n'+'.cx-table-container>table,.cx-table-container>table th {\n'+' border: 1px solid rgb(211, 211, 211);\n'+' padding:0px 0px 0px 10px;\n'+'}\n'+'.cx-table-container>table,.cx-table-container>table td {\n'+' border: 1px solid rgb(211, 211, 211);\n'+' border-collapse: collapse;\n'+' padding:0px 0px 0px 10px;\n'+'}\n'+'.cx-table-table>.cx-table-head>.cx-table-heading{\n'+' line-height: 30px;\n'+'}\n'+'.cx-table-table>.cx-table-head>.cx-table-heading{\n'+' line-height: 30px;\n'+'}\n'+'.cx-table-container>h3.cx-category-heading {\n'+' font-size: 1.4em !important;\n'+' text-decoration: none !important;\n'+' color: #666 !important;\n'+'}\n'+'.cx-table-container>table.cx-table-table>tbody.cx-table-body{\n'+' text-align: left !important;\n'+'}\n'+'.cx-policy-container ul li{\n'+' list-style: none;\n'+'}\n'+'.cx-table-heading p{\n'+' margin-bottom: 0;\n'+'}\n'+'.cx-policy-container .cx-desc{\n'+' font-size: 18px;\n'+'}\n'+'@media all and (max-width:600px){\n'+' .cx-table-container>table.cx-table-table{\n'+' width: 100%;\n'+' display:block;\n'+' border: none;\n'+' overflow-x: auto;\n'+' }\n'+'}\n'+'@media all and (max-width:1199px){\n'+' .cx-policy-container, .cx-table-container{\n'+' width: 100%;\n'+' }\n'+'}';loadStyleForDefaultPolicyPageDesign(styles)} let cx=new CookieXrayPolicy(policy,cookies,cookie_consent,is_policy,is_table);var policy_div=document.getElementById('seers-cookie-consent');if(policy_div!==null){var newEl=document.createElement('div');newEl.innerHTML=cx.buildHTML();policy_div.parentNode.replaceChild(newEl,policy_div);return} var footer=document.getElementsByTagName('footer');if(footer[0]){var elem=cx.buildHTML();footer[0].insertAdjacentHTML('beforebegin',elem)}else{document.body.innerHTML+=cx.buildHTML()}};xhr.onerror=function(){alert('Woops, there was an error making the request.')};xhr.onreadystatechange=(e)=>{} xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.send(params)} makeCorsRequestForConsent(key,value,saveConsentLog,lambda_url,ccpa_email,scriptPosition,dialogue_id){var url=lambda_url;var webUrl=window.location.href;var data=JSON.stringify({key:key,permissions:value,saveConsentLogs:saveConsentLog,webUrl:webUrl,userEmail:ccpa_email,scriptPosition:scriptPosition,dialogue_id:dialogue_id});var xhr=this.createCORSRequest('POST',url);if(!xhr){alert('CORS not supported');return} xhr.onload=function(){var text=xhr.responseText;var json_data=JSON.parse(text)};xhr.onerror=function(){alert('Woops, there was an error making the request.')};xhr.onreadystatechange=(e)=>{} xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.send(data)}} function seto(opa){document.getElementsByClassName('cookie_seers_popup')[0].style.opacity=opa;document.getElementsByClassName('cookie_seers_popup')[0].style.display='block';footer_height=document.getElementById('seers_cookie_side_one_footer').offsetHeight;container_height=document.getElementById('cookie_seers_popup_header').offsetHeight;document.getElementById('seers-cx-cookies').style.height="calc(100vh - "+(container_height+footer_height)+"px)";document.getElementById('cookie-management').style.height="calc(100vh - "+(container_height+footer_height)+"px)"} function initEvents(cx){if(cx.consent_done){document.getElementById('seers-cx-banner').classList.replace('seers-cx-show','hide')} var closeButton=document.getElementById('popClose');closeButton.addEventListener("click",function(){document.getElementById('seers-cx-side-bar').classList.replace('seers-cx-show','hide');document.getElementById('seers-cx-banner').classList.replace('seers-cx-show','hide')});if(cx.dialogue.nvda_access){const switchPreferenceInputs=document.querySelectorAll(".seers-preference-input");switchPreferenceInputs.forEach((input)=>{input.addEventListener("change",()=>{input.setAttribute("aria-checked",input.checked)})})} if(cx.email_section){var emailSubmitButton=document.getElementById('email_btn');emailSubmitButton.addEventListener("click",function(){var emailUser=document.getElementById('email_user').value;cx.ccpa_email=emailUser;var toogleActionButton=document.querySelector('.toggle_actions');if(toogleActionButton){var toogleAction=document.querySelector('.toggle_actions').checked} document.getElementById('seers-cx-side-bar').classList.replace('seers-cx-show','hide');document.getElementById('seers-cx-banner').classList.replace('seers-cx-show','hide');if(toogleAction){consent_value=!1;cx.proceedConsent('seers-cx-agree')}else{consent_value=!0;cx.proceedConsent('seers-cx-disagree')} if(consent_value){}})} var confirm_my_choice=document.getElementById('confirm_my_choice');if(confirm_my_choice){confirm_my_choice.addEventListener("click",function(){var toogleAction=document.querySelector('.toggle_actions').checked;let value={};if(toogleAction){consent_value=!1;cx.proceedConsent('seers-cx-agree')}else{consent_value=!0;cx.proceedConsent('seers-cx-disagree')} if(consent_value){} document.getElementById('seers-cx-side-bar').classList.replace('seers-cx-show','hide');document.getElementById('seers-cx-banner').classList.replace('seers-cx-show','hide')})} var popup_close_btn=document.getElementById('popup-close');popup_close_btn.addEventListener("click",function(){document.getElementById('seers-cx-side-bar').classList.replace('seers-cx-show','hide')});var save_my_choices_btn=document.getElementById('save-my-choices');save_my_choices_btn.addEventListener("click",function(){document.getElementById('seers-cx-side-bar').classList.replace('seers-cx-show','hide')});var back_btn=document.getElementById('seers-cx-back-btn');back_btn.addEventListener("click",function(){document.getElementById('seers-cx-header-menu').classList.replace('seers-cx-show','hide');document.getElementById('cookie-management').classList.replace('seers-cx-show','hide');document.getElementById('seers-cx-cookies').classList.replace('hide','seers-cx-show');footer_height=document.getElementById('seers_cookie_side_one_footer').offsetHeight;container_height=document.getElementById('cookie_seers_popup_header').offsetHeight;document.getElementById('seers-cx-cookies').style.height="calc(100vh - "+(container_height+footer_height)+"px)";document.getElementById('cookie-management').style.height="calc(100vh - "+(container_height+footer_height)+"px)"});var seers_cx_do_not_sell=document.getElementById('SeersDoNotSell');seers_cx_do_not_sell&&seers_cx_do_not_sell.addEventListener("click",function(){const modal=document.getElementById('seers-cx-banner');document.getElementById('seers-cx-banner').classList.replace('hide','seers-cx-show');if(cx.dialogue.nvda_access){modal.setAttribute("tabindex","-1");modal.focus()} this.classList.replace('seers-cx-show','hide');document.getElementById('seers-cx-side-bar').classList.replace('seers-cx-show','hide')});var show_cookie_menu=document.getElementsByClassName("show-cookie-menu");var cookie_management=document.getElementById('cookie-management');Array.from(show_cookie_menu).forEach(function(element){element.addEventListener('click',function(){document.getElementById('seers-cx-header-menu').classList.replace('hide','seers-cx-show');cookie_management.innerHTML=cx.buildCookiesHTML(this.dataset.category);document.getElementById('cookie-management').classList.replace('hide','seers-cx-show');document.getElementById('seers-cx-cookies').classList.replace('seers-cx-show','hide')})});const do_not_sell_1=document.querySelector('#do-not-sell-1');const do_not_sell_2=document.querySelector('#do-not-sell-2');const switchesContainer=document.querySelectorAll("#pref #stat #market");var pref=document.getElementById('pref');var stat=document.getElementById('stat');var market=document.getElementById('market');if(do_not_sell_1){do_not_sell_1.addEventListener('change',function(){if(this.checked){if(pref.checked){pref.checked=!pref.checked} if(stat.checked){stat.checked=!stat.checked} if(market.checked){market.checked=!market.checked} if(!do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}else{if(!pref.checked){pref.checked=!pref.checked} if(!stat.checked){stat.checked=!stat.checked} if(!market.checked){market.checked=!market.checked} if(do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}})} if(do_not_sell_2){do_not_sell_2.addEventListener('change',function(){if(this.checked){if(pref.checked){pref.checked=!pref.checked} if(stat.checked){stat.checked=!stat.checked} if(market.checked){market.checked=!market.checked} if(!do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked}}else{if(!pref.checked){pref.checked=!pref.checked} if(!stat.checked){stat.checked=!stat.checked} if(!market.checked){market.checked=!market.checked} if(do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked}}})} pref.addEventListener('change',function(){if(this.checked){if(do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked} if(do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}else{if(!stat.checked&&!market.checked){if(!do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked} if(!do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}}});stat.addEventListener('change',function(){if(this.checked){if(do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked} if(do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}else{if(!pref.checked&&!market.checked){if(!do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked} if(!do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}}});market.addEventListener('change',function(){if(this.checked){if(do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked} if(do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}else{if(!pref.checked&&!stat.checked){if(!do_not_sell_1.checked){do_not_sell_1.checked=!do_not_sell_1.checked} if(!do_not_sell_2.checked){do_not_sell_2.checked=!do_not_sell_2.checked}}}})} var truncate=function(elem,limit,after){if(!elem||!limit)return;var content=elem.textContent||elem.innerText;content=content.trim();if(content.split(' ').length>=limit){content=content.split(' ').slice(0,limit);content=content.join(' ')+(after?after:'');if(elem.textContent){elem.textContent=content}else{elem.innerText=content}}};function addClickListenerToAnchor(target,anchorNode,read_more,read_less){let toggle=!1;anchorNode.addEventListener("click",function(){if(!toggle){makeCompleteStatement(target);anchorNode.textContent=read_less}else{truncate(target,20,null);anchorNode.textContent=read_more} target.appendChild(anchorNode);toggle=!toggle;footer_height=document.getElementById('seers_cookie_side_one_footer').offsetHeight;container_height=document.getElementById('cookie_seers_popup_header').offsetHeight;document.getElementById('seers-cx-cookies').style.height="calc(100vh - "+(container_height+footer_height)+"px)";document.getElementById('cookie-management').style.height="calc(100vh - "+(container_height+footer_height)+"px)"})} function createAnchorNode(value,read_more){let anchor=document.createElement('a');anchor.id=value?'seers_read_more_id_one':'seers_read_more_id_two';anchor.href='javascript:void(0)';anchor.textContent=read_more;anchor.setAttribute("style","font-size: inherit;\n"+" color: #269abc !important;\n"+" font-family: inherit;\n"+" text-decoration: none;\n"+" padding-left: 0px;\n"+" font-weight: inherit;");return anchor} function makeCompleteStatement(node){if(!node)return;if(node.textContent){node.textContent=self.language.body}else{node.innerText=self.language.body}} function openCity(evt,cityName){var i,tabcontent,tablinks;tabcontent=document.getElementsByClassName("seers-cx-tab-content");for(i=0;i=365.25){result=Math.abs(Math.round(diff/365.25))}else{result=Math.abs(Math.round(diff))} if(without_days_string){return result} return result+' days'} function loadStyleSheet(){var link=document.createElement('link');link.rel='stylesheet';link.type='text/css';link.href=cx_host+"/script/styles.min.css";document.getElementsByTagName('HEAD')[0].appendChild(link);return} function loadGPCScript(){var script=document.createElement('script');script.type="text/javascript";script.src=gpcscriptsrc;document.getElementsByTagName('HEAD')[0].appendChild(script);return} function loadIabScript(){var iabScript=document.createElement('script');iabScript.type="text/javascript";iabScript.src='https://seers.mgr.consensu.org/js/iab-sdk.js';iabScript.id='SeersIabBundleScript';document.getElementsByTagName('HEAD')[0].appendChild(iabScript);return} function loadStyleForDefaultPolicyPageDesign(styles){var css=document.createElement('style');css.type='text/css';if(css.styleSheet) css.styleSheet.cssText=styles;else css.appendChild(document.createTextNode(styles));document.getElementsByTagName("head")[0].appendChild(css);return}(function(){let divi_theme_found=document.getElementById('et-bfb-app-frame')||document.getElementById('et-core-frame')||document.getElementById('et-fb-app');let url=window.location.href;if(!divi_theme_found&&!url.includes('wp-admin')){let http_request=new HttpRequest();http_request.makeCorsRequest(key)}})()