// source --> https://lottesgarten.de/wp-content/plugins/cookie-cracker/assets/cc-cookies.min.js?ver=1.0.7 
class CC_Cookies{constructor(){this.cookie=this.setCookieCrackerCookie(),this.cookiePrefs=this.setCookieCrackerPrefsCookie(),this.cookie&&this.cookiePrefs&&(this.scripts=cc_cookie.cc_scripts,this.acceptedScripts=!1,this.blockedContent,this.setAcceptedScripts(),this.initScriptState(),document.addEventListener("DOMContentLoaded",(e=>{this.addScriptsToDOM(),this.setBlockedContent(),this.unblockContent(),jQuery(".cc_iframe_button").on("click",this.unblockIFrame),jQuery(".cc_iframe").each((function(e,t){void 0!==jQuery(this).attr("src")&&(void 0!==jQuery(this).attr("data-origwidth")&&jQuery(this).css("width",jQuery(this).attr("data-origwidth")),void 0!==jQuery(this).attr("data-origheight")&&jQuery(this).css("height",jQuery(this).attr("data-origheight")))}))})))}setScriptState(e,t){e.state=t}setAcceptedScripts(){let e=this.cookiePrefs;e&&(this.acceptedScripts=e.split(","))}setBlockedContent(){this.blockedContent=0!=jQuery(".cc_content_blocker").lenght?jQuery(".cc_content_blocker"):null}getAcceptedScripts(){return this.acceptedScripts}static setCookie=function(e,t,c,o){var i=new Date;i.setTime(i.getTime()+24*c*60*60*1e3);var r="expires="+i.toUTCString();return document.cookie=e+"="+t+";"+r+";SameSite="+o+";path=/",CC_Cookies.getCookie(e)};static getCookie(e){for(var t=e+"=",c=decodeURIComponent(document.cookie).split(";"),o=0;o<c.length;o++){for(var i=c[o];" "==i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return!1}setCookieCrackerCookie(){return CC_Cookies.getCookie(cc_cookie.cookie_name)}setCookieCrackerPrefsCookie(){return CC_Cookies.getCookie(cc_cookie.cookie_name+"_prefs")}getCookieCrackerCookie(){return this.cookieCrackerCookie}getCookieCrackerPrefsCookie(){return this.cookieCrackerPrefsCookie}getBlockedContent(){return this.blockedContent}initScriptState(){Object.values(this.scripts).forEach((e=>{Object.values(e).forEach((e=>{this.checkScriptIsAccepted(e)?this.setScriptState(e,"active"):this.setScriptState(e,"inactive")}))}))}checkScriptIsAccepted(e){return this.acceptedScripts.indexOf(e.id)>=0}addScriptsToDOM(){Object.values(this.scripts).forEach((e=>{Object.values(e).forEach((e=>{"active"==e.state&&e.optin_code&&(this.isScriptInDOM(e.id)||this.addScriptToDOM("#cc-cookie-overlay",e.id,e.optin_code)),"inactive"==e.state&&e.optout_code&&(this.isScriptInDOM(e.id)||this.addScriptToDOM("#cc-cookie-overlay",e.id,e.optout_code))}))}))}isScriptInDOM(e){return jQuery(`[data-cc-id="${e}"]`).length>0}addScriptToDOM(e,t,c){c=c.replaceAll("<script",`<script data-cc-id="${t}"`).replaceAll(/\\/g,""),jQuery(e).after(c)}unblockContent(){Object.values(this.blockedContent).forEach((e=>{Object.values(this.acceptedScripts).forEach((t=>{this.checkIsBlockedContentAccepted(e,t)&&this.unblockIFrame(e)}))}))}checkIsBlockedContentAccepted(e,t){return!(!e.className||!t)&&e.className.split(" ").includes(`cc_content_${t}`)}unblockIFrame(e=""){let t="";t=jQuery(this).hasClass("cc_iframe_button")?jQuery(this).closest(".cc_content_blocker"):jQuery(e);let c=t.find(".cc_iframe"),o=t.find(".cc_accept_box").find(".cc_checkbox"),i=o.attr("data-version"),r=o.attr("data-name"),a=o.attr("data-lifetime"),s=r+"_"+i+"_prefs",n=c.attr("data-name");if(o.is(":checked")&&"default"!==n&&void 0!==n){let e=window.cookieCracker.acceptedScripts;e.push(n),CC_Cookies.setCookie(s,e,a,cc_cookie.same_site),jQuery(".cc_iframe[data-name='"+n+"']").each((function(){var e=jQuery(this),t=jQuery(this).parent();let c=jQuery(e).attr("width",e.attr("data-width")).attr("height",e.attr("data-height")).attr("style","").attr("src",e.attr("data-src")).prop("outerHTML");c=c.replace("div","iframe"),t.html(c),t.find("iframe").unwrap(".cc_content_blocker")}))}else{let e=jQuery(c).attr("width",c.attr("data-width")).attr("height",c.attr("data-height")).attr("style","").attr("src",c.attr("data-src")).prop("outerHTML");e&&(e=e.replace("div","iframe")),c.remove(),t.html(e),t.find("iframe").unwrap(".cc_content_blocker")}}}function ccCookieInit(){var e=function(e){for(var t=e+"=",c=decodeURIComponent(document.cookie).split(";"),o=0;o<c.length;o++){for(var i=c[o];" "==i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return!1};!function(t){let c=[];t(cc_cookie.tracking_codes).each((function(){let e=cc_cookie.other_cookies_info_table;e=e.replace("[name]",this.label),e=e.replace("[data-cookie-link]",this.label),e=e.replace("[data-cookie-table]",this.label),e=e.replace("[provider]",this.provider),e=e.replace("[usage]",this.usage.stripSlashes),e=e.replace("[cookies]",this.cookies),e=e.replace("[lifetime]",this.lifetime),e=e.replace("[dataprivacy]",this.dataprivacy);let t={type:this.label,value:this.cookies,description:this.description,lifetime:e,group:this.group};c.push(t)}));let o={onAccept:function(){window.location.reload()},headline:cc_cookie.headline,descriptionText:cc_cookie.description_text,layout:cc_cookie.layout,privacyPageLink:cc_cookie.privacy_page,privacyPageLabel:cc_cookie.privacy_page_label,imprintPageLink:cc_cookie.imprint_page,imprintPageLabel:cc_cookie.imprint_label,expires:cc_cookie.expiration_time,cookieTypes:c,buttons:{accept:{order:cc_cookie.accept_button_order,text:cc_cookie.accept_button_text},acceptSelection:{order:cc_cookie.accept_selection_order,text:cc_cookie.accept_selection},customize:{order:cc_cookie.customize_button_order,text:cc_cookie.customize_button_text},necessary:{order:cc_cookie.necessary_button_order,type:cc_cookie.necessary_button_type,text:cc_cookie.necessary_button_text}},checkedLabel:cc_cookie.checkedLabel,uncheckedLabel:cc_cookie.uncheckedLabel,cookieTypesTitle:cc_cookie.cookie_type_title,cookieLabelAccept:cc_cookie.cookieLabelAccept,cookieLabelName:cc_cookie.cookieLabelName,cookieLabelProvider:cc_cookie.cookieLabelProvider,cookieLabelUsage:cc_cookie.cookieLabelUsage,cookieLabelPrivacyLink:cc_cookie.cookieLabelPrivacyLink,cookieLabelCookies:cc_cookie.cookieLabelCookies,cookieLabelLifetime:cc_cookie.cookieLabelLifetime,groups:cc_cookie.groups,same_site:cc_cookie.same_site};0!=cc_cookie.cookie_set&&e(cc_cookie.cookie_name)||t("body").ihavecookies(o,"reinit"),t(".cc-edit-cookies").one("click",(function(){t("body").ihavecookies(o,"reinit_button")})),t(document).on("click","#cc-cookie-advanced",(function(){t("#cc-cookie-accept").text(cc_cookie.accept_selection)})),t(document).on("click",".cc-cookie-toggle button",(function(){var e=t(this).attr("data-cookie");e?t(".cc-cookie-details[data-cookie='"+e+"']").slideToggle():t(this).next(".cc-cookie-detailed").slideToggle(),t(this).text(t(this).text()==cc_cookie.more_information?cc_cookie.less_information:cc_cookie.more_information)}))}(jQuery)}window.cookieCracker=new CC_Cookies,String.prototype.stripSlashes=function(){return this.replace(/\\(.?)/g,(function(e,t){switch(t){case"\\":return"\\";case"0":return"\0";case"":return"";default:return t}}))},jQuery(document).ready((function(e){cc_cookie.is_preview||ccCookieInit()}));