",onStatusChange:function(e,t){const o=this.hasConsented(),i=new TecartCookieBanner(this.cookieBannerData,this.cookieBannerScripts,this.cookieBannerCategories);o?i.allowAllCookies():!1===o?i.denyAllCookies():i.allowSettingsCookies()},onRevokeChoice:function(e){}};window.cookieconsent.initialise(o),"dismiss"===this.cookieConsent?this.createScriptCode(this.cookieConsentScripts):(this.setCookieConsentCategoriesArray(),this.setCookieConsentScriptsArray()),this.removeSettingsModal(),this.createSettingsModal(this.cookieConsent)}allowAllCookies(){const e=this.cookieExpireDate();document.cookie="cookieconsent_status=allow;"+e+";path=/",console.log("All scripts for this website have been activated in this browser."),window.location.reload()}denyAllCookies(){this.deleteAllCookies(),this.removeCodeTags();const e=this.cookieExpireDate();document.cookie="cookieconsent_status=deny;"+e+";path=/",console.log("All scripts for this website have been deactivated in this browser."),window.location.reload()}allowSettingsCookies(){const e=this.cookieExpireDate();document.cookie="cookieconsent_status=dismiss;"+e+";path=/",console.log("All scripts for this website have set like in settings in this browser.")}setScrolledCookie(){const e=this.cookieExpireDate();document.cookie="cookieconsent_scrolled=scrolled;"+e+";path=/",console.log("Page was scrolled.")}setConsentCategoriesToCookie(e){e instanceof Map&&(e=Array.from(e));const t=this.cookieExpireDate(),o=JSON.stringify(e);document.cookie="cookieconsent_categories="+o+";"+t+";path=/"}setConsentScriptsToCookie(e){e instanceof Map&&(e=Array.from(e));const t=this.cookieExpireDate(),o=JSON.stringify(e);document.cookie="cookieconsent_scripts="+o+";"+t+";path=/"}setConsentOnScrollScriptsToCookie(e){e instanceof Map&&(e=Array.from(e));const t=this.cookieExpireDate(),o=JSON.stringify(e);document.cookie="cookieconsent_onscroll_scripts="+o+";"+t+";path=/"}cookieExpireDate(){const e=new Date;e.setTime(e.getTime()+31536e6);return"expires="+e.toUTCString()}deleteAllCookies(){const e=document.cookie.split("; ");for(let t=0;t0;){const i=encodeURIComponent(e[t].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+o.join(".")+" ;path=",n=location.pathname.split("/");for(document.cookie=i+"/";n.length>0;)document.cookie=i+n.join("/"),n.pop();o.shift()}}window.localStorage.clear(),console.log("all cookies cleared")}getCookieByName(e){const t=document.cookie.match("(^|[^;]+)\\s*"+e+"\\s*=\\s*([^;]+)");return t?t.pop():""}deleteCookieByName(e){document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",console.log(e+" cookie deletetd")}setCookieConsentCategoriesArray(){let e;const t=this.cookieBannerCategories;if(t.length>0)for(let o=0;o0)for(let o=0;o0&&o.length>0)for(let e=0;e0&&""!==n)for(let e=0;e0){const i=e.code_title,n=e.code_position,s=e.code_tag,c=e.code_load_with_timeout,a=e.code_load_with_timeout_time,r=e.code_load_on_scroll,l=(e.code_load_on_scroll_percent,"code_load_on_pages"in e?e.code_load_on_pages:[]),d=window.location.pathname;let k=!0;l.length>0&&-1===l.indexOf(d)&&(k=!1);let h="";if("noscript"===s?h=document.createElement("noscript"):(h=document.createElement("script"),h.setAttribute("type","text/javascript")),h.setAttribute("data-title",o.trim()),h.setAttribute("data-tcb",t),h.setAttribute("data-position",n),h.innerHTML=i.trim(),k)if("scrolled"===this.cookieConsentScrolled){const e=this;"1"===c?setTimeout((function(){e.addScriptTagToDOM(n,h)}),a):e.addScriptTagToDOM(n,h)}else if("1"===r)this.cookieConsentOnScrollScriptsArray.set(t,{allowed:!0});else if("1"===c&&"0"===r){const e=this;setTimeout((function(){e.addScriptTagToDOM(n,h)}),a)}else this.addScriptTagToDOM(n,h)}}addScriptTagToDOM(e,t){"head"===e?document.head.append(t):"body-top"===e?document.body.prepend(t):document.body.appendChild(t)}removeCodeTagByTitle(e){if(""!==e){const t=document.querySelectorAll("[data-tcb]");for(const o in t)t.hasOwnProperty(o)&&t[o].getAttribute("data-tcb")===e&&t[o].remove()}}removeCodeTags(){const e=document.querySelectorAll("[data-tcb]");for(const t in e)e.hasOwnProperty(t)&&e[t].remove()}createSettingsModal(e=""){const t='
",onStatusChange:function(status,chosenBefore){const didConsent=this.hasConsented();const tcb=new TecartCookieBanner(this.cookieBannerData,this.cookieBannerScripts,this.cookieBannerCategories);if(didConsent){tcb.allowAllCookies()}else if(didConsent===false){tcb.denyAllCookies()}else{tcb.allowSettingsCookies()}},onRevokeChoice:function(status){}};window.cookieconsent.initialise(cookieconsentInitialse);if(this.cookieConsent==="dismiss"){this.createScriptCode(this.cookieConsentScripts)}else{this.setCookieConsentCategoriesArray();this.setCookieConsentScriptsArray()}this.removeSettingsModal();this.createSettingsModal(this.cookieConsent)}allowAllCookies(){const expires=this.cookieExpireDate();document.cookie="cookieconsent_status=allow;"+expires+";path=/";console.log("All scripts for this website have been activated in this browser.");window.location.reload()}denyAllCookies(){this.deleteAllCookies();this.removeCodeTags();const expires=this.cookieExpireDate();document.cookie="cookieconsent_status=deny;"+expires+";path=/";console.log("All scripts for this website have been deactivated in this browser.");window.location.reload()}allowSettingsCookies(){const expires=this.cookieExpireDate();document.cookie="cookieconsent_status=dismiss;"+expires+";path=/";console.log("All scripts for this website have set like in settings in this browser.")}setScrolledCookie(){const expires=this.cookieExpireDate();document.cookie="cookieconsent_scrolled=scrolled;"+expires+";path=/";console.log("Page was scrolled.")}setConsentCategoriesToCookie(cookieConsentCategoriesArray){if(cookieConsentCategoriesArray instanceof Map){cookieConsentCategoriesArray=Array.from(cookieConsentCategoriesArray)}const expires=this.cookieExpireDate();const json_string=JSON.stringify(cookieConsentCategoriesArray);document.cookie="cookieconsent_categories="+json_string+";"+expires+";path=/; SameSite=Lax;"}setConsentScriptsToCookie(cookieConsentScriptsArray){if(cookieConsentScriptsArray instanceof Map){cookieConsentScriptsArray=Array.from(cookieConsentScriptsArray)}const expires=this.cookieExpireDate();const json_string=JSON.stringify(cookieConsentScriptsArray);document.cookie="cookieconsent_scripts="+json_string+";"+expires+";path=/; SameSite=Lax;"}setConsentOnScrollScriptsToCookie(cookieConsentOnScrollScriptsArray){if(cookieConsentOnScrollScriptsArray instanceof Map){cookieConsentOnScrollScriptsArray=Array.from(cookieConsentOnScrollScriptsArray)}const expires=this.cookieExpireDate();const json_string=JSON.stringify(cookieConsentOnScrollScriptsArray);document.cookie="cookieconsent_onscroll_scripts="+json_string+";"+expires+";path=/; SameSite=Lax;"}cookieExpireDate(){const d=new Date;d.setTime(d.getTime()+365*24*60*60*1e3);const expires="expires="+d.toUTCString();return expires}deleteAllCookies(){const cookies=document.cookie.split("; ");for(let c=0;c0){const cookieBase=encodeURIComponent(cookies[c].split(";")[0].split("=")[0])+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain="+d.join(".")+" ;path=";const p=location.pathname.split("/");document.cookie=cookieBase+"/";while(p.length>0){document.cookie=cookieBase+p.join("/");p.pop()}d.shift()}}window.localStorage.clear();console.log("all cookies cleared")}getCookieByName(name){const b=document.cookie.match("(^|[^;]+)\\s*"+name+"\\s*=\\s*([^;]+)");return b?b.pop():""}deleteCookieByName(name){document.cookie=name+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";console.log(name+" cookie deletetd")}setCookieConsentCategoriesArray(){let title;const json_data=this.cookieBannerCategories;if(json_data.length>0){for(let i=0;i0){for(let i=0;i0&&scriptArray.length>0){for(let i=0;i0&&cookieScriptTitle!==""){for(let x=0;x0){const codeContent=data.code_title;const codePos=data.code_position;const codeTag=data.code_tag;const codeLoadTimeout=data.code_load_with_timeout;const codeLoadTimeoutTime=data.code_load_with_timeout_time;const codeLoadOnScroll=data.code_load_on_scroll;const codeLoadOnScrollPercent=data.code_load_on_scroll_percent;const codeLoadOnPages="code_load_on_pages"in data?data.code_load_on_pages:[];const currPagePath=window.location.pathname;let pageAllowed=true;if(codeLoadOnPages.length>0&&codeLoadOnPages.indexOf(currPagePath)===-1){pageAllowed=false}let codeItem="";if(codeTag==="noscript"){codeItem=document.createElement("noscript")}else{codeItem=document.createElement("script");codeItem.setAttribute("type","text/javascript")}codeItem.setAttribute("data-title",scriptTitle.trim());codeItem.setAttribute("data-tcb",scriptTitleEncoded);codeItem.setAttribute("data-position",codePos);codeItem.innerHTML=codeContent.trim();if(pageAllowed){if(this.cookieConsentScrolled==="scrolled"){const self=this;if(codeLoadTimeout==="1"){setTimeout(function(){self.addScriptTagToDOM(codePos,codeItem)},codeLoadTimeoutTime)}else{self.addScriptTagToDOM(codePos,codeItem)}}else{if(codeLoadOnScroll==="1"){this.cookieConsentOnScrollScriptsArray.set(scriptTitleEncoded,{allowed:true})}else if(codeLoadTimeout==="1"&&codeLoadOnScroll==="0"){const self=this;setTimeout(function(){self.addScriptTagToDOM(codePos,codeItem)},codeLoadTimeoutTime)}else{this.addScriptTagToDOM(codePos,codeItem)}}}}}addScriptTagToDOM(codePos,codeItem){if(codePos==="head"){document.head.append(codeItem)}else if(codePos==="body-top"){document.body.prepend(codeItem)}else{document.body.appendChild(codeItem)}}removeCodeTagByTitle(dataTitle){if(dataTitle!==""){const tags=document.querySelectorAll("[data-tcb]");for(const i in tags){if(tags.hasOwnProperty(i)){if(tags[i].getAttribute("data-tcb")===dataTitle){tags[i].remove()}}}}}removeCodeTags(){const tags=document.querySelectorAll("[data-tcb]");for(const i in tags){if(tags.hasOwnProperty(i)){tags[i].remove()}}}createSettingsModal(status=""){const settingsModal='