/**
 * Biscotti CMP Pre-Boot Blob (Shield + TCF v2.2 stub)
 *
 * AUTO-GENERATED by scripts/sync-client-to-server-public.js — do not edit.
 * Source files: src/client/biscotti-shield.js + src/client/cmp-stub.js
 *
 * Each platform plugin (WordPress, Joomla, Shopify, Magento, …) loads
 * this file SYNCHRONOUSLY in the page <head> BEFORE the main
 * biscotti.min.js. It installs a MutationObserver, patches
 * HTMLScriptElement.src / fetch / XHR / sendBeacon / document.cookie
 * setters to neutralise tracker requests pre-consent, and exposes
 * window.__biscotti_shield._unblockGranted() for the main script to
 * call once consent is granted.
 */
!function(t,e){"use strict";const o=["google-analytics.com","googletagmanager.com","analytics.google.com","googlesitekit-consent-mode","googlesitekit-events-provider","google-site-kit/dist/assets/js","googlesitekit-modules","matomo","piwik","hotjar.com","clarity.ms","mouseflow.com","fullstory.com","mixpanel.com","amplitude.com","segment.com","heap-analytics.com","facebook.net","facebook.com","fbcdn.net","connect.facebook","fbevents.js","doubleclick.net","googlesyndication.com","googleadservices.com","adservice.google","linkedin.com","snap.licdn.com","ads.twitter.com","twitter.com","static.ads-twitter.com","tiktok.com","analytics.tiktok.com","pinterest.com","pinimg.com/ct","criteo.com","outbrain.com","taboola.com","bing.com/bat","bat.bing.com","bat.bing.net","belboon.com","lafamo.com","daisycon.io","ecomparkour.io","youtube.com","youtube-nocookie.com","ytimg.com","vimeo.com","player.vimeo.com","vimeocdn.com","dailymotion.com","twitch.tv","wistia.com","wistia.net","platform.twitter.com","instagram.com","tiktok.com/embed","fonts.googleapis.com","fonts.gstatic.com","use.fontawesome.com","kit.fontawesome.com","use.typekit.net","p.typekit.net","maps.google.com","maps.googleapis.com","tawk.to","crisp.chat","intercom.io","drift.com","zendesk.com","hubspot.com","hs-scripts.com","hscollectedforms","hs-analytics"],i={analytics:["google-analytics.com","googletagmanager.com","analytics.google.com","googlesitekit-consent-mode","googlesitekit-events-provider","google-site-kit/dist/assets/js","googlesitekit-modules","matomo","piwik","hotjar.com","clarity.ms","mouseflow.com","fullstory.com","mixpanel.com","amplitude.com","segment.com","heap-analytics.com"],marketing:["facebook.net","facebook.com","fbcdn.net","connect.facebook","fbevents.js","doubleclick.net","googlesyndication.com","googleadservices.com","adservice.google","linkedin.com","snap.licdn.com","ads.twitter.com","twitter.com","static.ads-twitter.com","tiktok.com","analytics.tiktok.com","pinterest.com","pinimg.com/ct","criteo.com","outbrain.com","taboola.com","bing.com/bat","bat.bing.com","bat.bing.net","belboon.com","lafamo.com","daisycon.io","ecomparkour.io","wistia.com","wistia.net","hubspot.com","hs-scripts.com","hscollectedforms","hs-analytics"],functional:["youtube.com","youtube-nocookie.com","ytimg.com","vimeo.com","player.vimeo.com","vimeocdn.com","dailymotion.com","twitch.tv","platform.twitter.com","instagram.com","tiktok.com/embed","fonts.googleapis.com","fonts.gstatic.com","use.fontawesome.com","kit.fontawesome.com","use.typekit.net","p.typekit.net","maps.google.com","maps.googleapis.com","tawk.to","crisp.chat","intercom.io","drift.com","zendesk.com"]};try{var c=t.__biscottiShieldCustom;if(Array.isArray(c))for(var n=0;n<c.length;n++){var r=c[n];if(r){var a="string"==typeof r?r:r.pattern;if(a&&"string"==typeof a&&(a=a.trim().toLowerCase())){var s="object"==typeof r&&r.category||"marketing";"analytics"!==s&&"functional"!==s&&"marketing"!==s&&(s="marketing"),-1===o.indexOf(a)&&o.push(a),-1===i[s].indexOf(a)&&i[s].push(a)}}}}catch(C){}t.__biscotti_consent=t.__biscotti_consent||{ready:!1,granted:{essential:!0,functional:!1,analytics:!1,marketing:!1}};const l=["biscotti-cmp.com","api.biscotti-cmp.com","api.dev.biscotti-cmp.com","app.biscotti-cmp.com","app.dev.biscotti-cmp.com"];function u(t){var e;for(e=0;e<i.marketing.length;e++)if(-1!==t.indexOf(i.marketing[e]))return"marketing";for(e=0;e<i.analytics.length;e++)if(-1!==t.indexOf(i.analytics[e]))return"analytics";for(e=0;e<i.functional.length;e++)if(-1!==t.indexOf(i.functional[e]))return"functional";return"marketing"}function m(e){if(!e)return!1;var i=e.toLowerCase();if(l.some(t=>i.includes(t)))return!1;var c=t.__biscottiShieldAllow;if(Array.isArray(c)&&c.some(function(t){return t&&-1!==i.indexOf(t)}))return!1;if(!o.some(t=>i.includes(t)))return!1;if(t.__biscotti_unblocking)return!1;var n=u(i),r=t.__biscotti_consent&&t.__biscotti_consent.granted;return!(r&&!0===r[n])}function b(e){var o=t.__biscotti_consent&&t.__biscotti_consent.granted;return!(!o||!0!==o[e])}function d(e,o){if(!e)return;const i=Object.getOwnPropertyDescriptor(e,o);if(!i||!i.set)return;const c=i.set,n=i.get;Object.defineProperty(e,o,{configurable:!0,enumerable:i.enumerable,get(){return n?n.call(this):this.getAttribute(o)},set(e){try{if(!t.__biscotti_unblocking&&m(String(e))){try{this.setAttribute("data-biscotti-blocked-"+o,String(e))}catch(t){}try{this.setAttribute("data-biscotti-blocked","true")}catch(t){}return}}catch(t){}return c.call(this,e)}})}t.__biscotti_unblocking=!1;try{d(HTMLScriptElement.prototype,"src")}catch(I){}try{d(HTMLIFrameElement.prototype,"src")}catch(D){}try{d(HTMLImageElement.prototype,"src")}catch(N){}try{d(HTMLLinkElement.prototype,"href")}catch(H){}const f=Element.prototype.setAttribute;if(Element.prototype.setAttribute=function(e,o){try{if(!t.__biscotti_unblocking&&("src"===e||"href"===e)&&m(String(o)))return f.call(this,"data-biscotti-blocked-"+e,String(o)),void f.call(this,"data-biscotti-blocked","true")}catch(t){}return f.call(this,e,o)},t.fetch){function P(e){if(e&&e.__biscottiWrapped)return e;var o=function(o,i){try{var c="string"==typeof o?o:o&&o.url||"";if(!t.__biscotti_unblocking&&m(c))return Promise.resolve(new Response(null,{status:204,statusText:"Blocked by Biscotti Shield"}))}catch(t){}return e(o,i)};return o.__biscottiWrapped=!0,o}var g=P(t.fetch.bind(t));try{Object.defineProperty(t,"fetch",{configurable:!1,enumerable:!0,get:function(){return g},set:function(t){"function"==typeof t&&(g=P(t))}})}catch(R){t.fetch=g}}if(t.XMLHttpRequest&&t.XMLHttpRequest.prototype){var p=t.XMLHttpRequest.prototype.open,_=function(e){if(e&&e.__biscottiWrapped)return e;var o=function(o,i){try{if(!t.__biscotti_unblocking&&m(String(i)))return this.__biscotti_blocked=!0,e.call(this,o,"data:,",!0)}catch(t){}return e.apply(this,arguments)};return o.__biscottiWrapped=!0,o},y=_(p);try{Object.defineProperty(t.XMLHttpRequest.prototype,"open",{configurable:!0,enumerable:!0,get:function(){return y},set:function(t){"function"==typeof t&&(p=t,y=_(t))}})}catch(T){t.XMLHttpRequest.prototype.open=_(p)}}if(t.navigator&&"function"==typeof t.navigator.sendBeacon){var k=t.navigator.sendBeacon.bind(t.navigator);t.navigator.sendBeacon=function(e,o){try{if(!t.__biscotti_unblocking&&m(String(e)))return!0}catch(t){}return k(e,o)}}const h=["_fbp","_fbc","_ga","_gid","_gat","_gcl_","_uet","_clck","_clsk","CLID","MUID","_hjSession","_hjid","_pin_unauth","_pinterest_","_tt_enable_cookie","_ttp","tsc","lidc","bcookie","bscookie","IDE"],v={marketing:["_fbp","_fbc","_uet","_pin_unauth","_pinterest_","_tt_enable_cookie","_ttp","tsc","lidc","bcookie","bscookie","IDE"],analytics:["_ga","_gid","_gat","_gcl_","_clck","_clsk","CLID","MUID","_hjSession","_hjid"]};try{const B=Object.getOwnPropertyDescriptor(Document.prototype,"cookie")||Object.getOwnPropertyDescriptor(e,"cookie");if(B&&B.set){const G=B.set,W=B.get;Object.defineProperty(e,"cookie",{configurable:!0,get:()=>W?W.call(e):"",set(o){try{if(!t.__biscotti_unblocking&&function(e){if(!function(t){if(!t||"string"!=typeof t)return!1;const e=t.split("=")[0].trim();return!!e&&h.some(t=>e===t||0===e.indexOf(t))}(e))return!1;var o=function(t){var e;for(e=0;e<v.marketing.length;e++)if(t===v.marketing[e]||0===t.indexOf(v.marketing[e]))return"marketing";for(e=0;e<v.analytics.length;e++)if(t===v.analytics[e]||0===t.indexOf(v.analytics[e]))return"analytics";return"marketing"}(e.split("=")[0].trim()),i=t.__biscotti_consent&&t.__biscotti_consent.granted;return!(i&&!0===i[o])}(o))return}catch(t){}return G.call(e,o)}})}}catch(X){}function A(t){return t&&"text/plain"!==t&&"text/biscotti-blocked"!==t?t:"text/javascript"}function w(t){const e=t.getAttribute("src")||"";return!!m(e)&&(t.setAttribute("data-biscotti-blocked-src",e),t.setAttribute("data-biscotti-original-type",A(t.type)),t.removeAttribute("src"),t.type="text/biscotti-blocked",!0)}const E=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){"SCRIPT"===t.nodeName&&w(t),t.querySelectorAll&&t.querySelectorAll("script").forEach(w)})})});function S(t){const e=t.getAttribute("src")||"";return!!m(e)&&(t.setAttribute("data-biscotti-blocked-src",e),t.removeAttribute("src"),t.setAttribute("data-biscotti-blocked","true"),!0)}E.observe(e.documentElement,{childList:!0,subtree:!0});const L=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){"IFRAME"===t.nodeName&&S(t),t.querySelectorAll&&t.querySelectorAll("iframe").forEach(S)})})});function O(t){const e=t.getAttribute("href")||"";return"stylesheet"===t.rel&&m(e)?(t.setAttribute("data-biscotti-blocked-href",e),t.removeAttribute("href"),t.setAttribute("data-biscotti-blocked","true"),!0):!("preconnect"!==t.rel&&"dns-prefetch"!==t.rel||!m(e)||(t.setAttribute("data-biscotti-blocked-href",e),t.removeAttribute("href"),0))}L.observe(e.documentElement,{childList:!0,subtree:!0});const q=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){"LINK"===t.nodeName&&O(t),t.querySelectorAll&&t.querySelectorAll("link").forEach(O)})})});function j(t){const e=t.getAttribute("src")||"";return!!m(e)&&(t.setAttribute("data-biscotti-blocked-src",e),t.removeAttribute("src"),t.setAttribute("data-biscotti-blocked","true"),!0)}q.observe(e.documentElement,{childList:!0,subtree:!0});const M=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){"IMG"===t.nodeName&&j(t),t.querySelectorAll&&t.querySelectorAll("img").forEach(j)})})});function x(){e.querySelectorAll("script[src]").forEach(w),e.querySelectorAll("iframe[src]").forEach(S),e.querySelectorAll("link[href]").forEach(O),e.querySelectorAll("img[src]").forEach(j)}M.observe(e.documentElement,{childList:!0,subtree:!0}),"loading"===e.readyState&&e.addEventListener("DOMContentLoaded",x),x(),t.__biscotti_shield={version:"1.0.0",unblockCategory:function(e){t.__biscotti_consent.granted[e]=!0,this._unblockGranted()},unblockAll:function(){t.__biscotti_consent.granted={essential:!0,functional:!0,analytics:!0,marketing:!0},this._unblockGranted()},_unblockGranted:function(){t.__biscotti_unblocking=!0;try{e.querySelectorAll("script[data-biscotti-blocked-src]").forEach(function(t){const o=t.getAttribute("data-biscotti-blocked-src");if(!b(u(String(o).toLowerCase())))return;const i=A(t.getAttribute("data-biscotti-original-type")),c=e.createElement("script");c.src=o,c.type=i,Array.from(t.attributes).forEach(function(t){t.name.startsWith("data-biscotti")||"src"===t.name||"type"===t.name||c.setAttribute(t.name,t.value)}),t.parentNode.replaceChild(c,t)}),e.querySelectorAll("iframe[data-biscotti-blocked-src]").forEach(function(t){const e=t.getAttribute("data-biscotti-blocked-src");b(u(String(e).toLowerCase()))&&(t.src=e,t.removeAttribute("data-biscotti-blocked"))}),e.querySelectorAll("link[data-biscotti-blocked-href]").forEach(function(t){const e=t.getAttribute("data-biscotti-blocked-href");b(u(String(e).toLowerCase()))&&(t.href=e,t.removeAttribute("data-biscotti-blocked"))}),e.querySelectorAll("img[data-biscotti-blocked-src]").forEach(function(t){const e=t.getAttribute("data-biscotti-blocked-src");b(u(String(e).toLowerCase()))&&(t.src=e,t.removeAttribute("data-biscotti-blocked"))})}finally{t.__biscotti_unblocking=!1}t.dispatchEvent(new Event("biscotti:unblocked"))},destroy:function(){E.disconnect(),L.disconnect(),q.disconnect(),M.disconnect()}},t.__biscotti_consent.shieldReady=!0,t.dispatchEvent(new Event("biscotti:shield-ready")),t.addEventListener("biscotti:consent",function(e){try{var o=e&&e.detail&&e.detail.state;!function(e){if(e){var o=t.__biscotti_consent.granted;o.essential=!0,o.functional=!!e.functional,o.analytics=!!e.analytics,o.marketing=!!e.marketing}}(o&&o.categories),t.__biscotti_shield._unblockGranted()}catch(t){}})}(window,document);!function(){var e=window,a=document;if(!e.__tcfapi){var i=[];if(e.__tcfapiBuffer=i,e.__tcfapi=function(e,a,t,n){"ping"===e?t({gdprApplies:void 0,cmpLoaded:!1,cmpStatus:"stub",displayStatus:"hidden",apiVersion:"2.2",cmpId:void 0,cmpVersion:void 0,gvlVersion:void 0,tcfPolicyVersion:void 0},!0):i.push([e,a,t,n])},e===e.top){var t=a.createElement("iframe");t.style.cssText="display:none",t.name="__tcfapiLocator",a.body?a.body.appendChild(t):a.addEventListener("DOMContentLoaded",function(){a.body.appendChild(t)})}e.addEventListener("message",function(a){var i=a.data;if(i&&"object"==typeof i&&i.__tcfapiCall){var t=i.__tcfapiCall;e.__tcfapi(t.command,t.version,function(e,i){var n=a.source;n&&n.postMessage({__tcfapiReturn:{returnValue:e,success:i,callId:t.callId}},"*")},t.parameter)}},!1)}}();