File: /home/h340499/public_html/wp-content/plugins/thim-core/assets/js/cookie-consent.min.js
!function(e){"use strict";function t(e,t,o){var i="";if(o){var c=new Date;c.setTime(c.getTime()+24*o*60*60*1e3),i="; expires="+c.toUTCString()}document.cookie=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; path=/","thimcookie-consent"===e&&n()}function o(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));if(t)try{return JSON.parse(decodeURIComponent(t[2]))}catch(e){return null}return null}function n(){const e=o("thimcookie-consent");if(!e)return;const t=window.thimCookieCfg.cookie_list||{};Object.keys(t).forEach(function(o){const n=t[o];"no"===e[o]&&Array.isArray(n)&&n.forEach(function(e){const t=e.src;e.id&&function(e,t="/"){const o=window.location.hostname;document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path="+t+"; domain="+o+";";const n="."+o.replace(/^www\./,"");document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path="+t+"; domain="+n+";"}(e.id),document.querySelectorAll("script").forEach(function(e){const o=e.src||e.getAttribute("src");o&&o.includes(t)&&e.remove()})})}),new MutationObserver(function(o){o.forEach(function(o){o.addedNodes.forEach(function(o){if("script"===o.nodeName.toLowerCase()){const n=o.src||o.getAttribute("src");Object.keys(t).forEach(function(i){const c=t[i];"no"===e[i]&&Array.isArray(c)&&c.forEach(function(e){const t=e.src;n&&n.includes(t)&&o.remove()})})}})})}).observe(document.body,{childList:!0,subtree:!0})}e(document).ready(function(){n();const i=o("thimcookie-consent");i&&document.querySelectorAll('[type="text/plain"][data-thimcookie-category]').forEach(function(e){const t=e.getAttribute("data-thimcookie-category");if("yes"===i[t]){const t=document.createElement("script");e.src?t.src=e.src:t.textContent=e.textContent,document.body.appendChild(t)}});let c=thimCookieCfg.endpoint;document.cookie.includes("thimcookie-consent=")&&(c.includes("?")?c+="&stage=revisit":c+="?stage=revisit"),e.get(c,function(o){o&&(e("body").append(o),window.thimCustomise=function(){var t=e("#thimcookie-customise"),o=e(".md-overlay"),n=e("#thimcookie-banner");t.length&&(t.removeClass("thim-hide"),o.removeClass("thim-hide"),n.length&&!n.hasClass("thim-hide")&&n.addClass("thim-hide"))},window.thimCloseModal=function(){var t=e("#thimcookie-customise"),o=e(".md-overlay"),n=e("#thimcookie-banner");t.length&&(t.addClass("thim-hide"),o.addClass("thim-hide"),n.length&&n.hasClass("thim-hide")&&n.removeClass("thim-hide"))},window.thimCookieAcceptAll=function(){t("thimcookie-consent",{necessary:"yes",analytics:"yes",ads:"yes",functional:"yes"},365),location.reload()},window.thimCookieRejectAll=function(){t("thimcookie-consent",{necessary:"yes",analytics:"no",ads:"no",functional:"no"},365),location.reload()},window.saveThimConsent=function(){var e=document.getElementById("consent-analytics"),o=document.getElementById("consent-ads"),n=document.getElementById("consent-functional");t("thimcookie-consent",{necessary:"yes",analytics:e&&e.checked?"yes":"no",ads:o&&o.checked?"yes":"no",functional:n&&n.checked?"yes":"no"},365),location.reload()},e('#thimcookie-customise .thimcookie-cat input[type="checkbox"]').on("click",function(e){e.stopPropagation()}),e("#thimcookie-customise .thimcookie-cat").on("click",function(){const t=e(this).find(".icon-toggle");e(this).toggleClass("toggled"),e(this).hasClass("toggled")?t.text("-"):t.text("+")}))})})}(jQuery);