(()=>{var at=Object.create;var N=Object.defineProperty,lt=Object.defineProperties,ct=Object.getOwnPropertyDescriptor,dt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertyNames,Ae=Object.getOwnPropertySymbols,ut=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var ie=(n,e,t)=>e in n?N(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,I=(n,e)=>{for(var t in e||(e={}))Oe.call(e,t)&&ie(n,t,e[t]);if(Ae)for(var t of Ae(e))pt.call(e,t)&&ie(n,t,e[t]);return n},ae=(n,e)=>lt(n,dt(e)),mt=n=>N(n,"__esModule",{value:!0});var ht=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var yt=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ft(e))!Oe.call(n,o)&&o!=="default"&&N(n,o,{get:()=>e[o],enumerable:!(t=ct(e,o))||t.enumerable});return n},le=n=>yt(mt(N(n!=null?at(ut(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var l=(n,e,t)=>(ie(n,typeof e!="symbol"?e+"":e,t),t);var p=(n,e,t)=>new Promise((o,r)=>{var i=c=>{try{a(t.next(c))}catch(u){r(u)}},s=c=>{try{a(t.throw(c))}catch(u){r(u)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(i,s);a((t=t.apply(n,e)).next())});var Q=ht((Ko,_e)=>{"use strict";var v=new WeakMap,z=new WeakMap,H=new WeakMap,ge=Symbol("anyProducer"),Re=Promise.resolve(),Y=Symbol("listenerAdded"),G=Symbol("listenerRemoved"),Ee=!1;function O(n){if(typeof n!="string"&&typeof n!="symbol")throw new TypeError("eventName must be a string or a symbol")}function J(n){if(typeof n!="function")throw new TypeError("listener must be a function")}function k(n,e){let t=z.get(n);return t.has(e)||t.set(e,new Set),t.get(e)}function R(n,e){let t=typeof e=="string"||typeof e=="symbol"?e:ge,o=H.get(n);return o.has(t)||o.set(t,new Set),o.get(t)}function Et(n,e,t){let o=H.get(n);if(o.has(e))for(let r of o.get(e))r.enqueue(t);if(o.has(ge)){let r=Promise.all([e,t]);for(let i of o.get(ge))i.enqueue(r)}}function Be(n,e){e=Array.isArray(e)?e:[e];let t=!1,o=()=>{},r=[],i={enqueue(s){r.push(s),o()},finish(){t=!0,o()}};for(let s of e)R(n,s).add(i);return{next(){return p(this,null,function*(){return r?r.length===0?t?(r=void 0,this.next()):(yield new Promise(s=>{o=s}),this.next()):{done:!1,value:yield r.shift()}:{done:!0}})},return(a){return p(this,arguments,function*(s){r=void 0;for(let c of e)R(n,c).delete(i);return o(),arguments.length>0?{done:!0,value:yield s}:{done:!0}})},[Symbol.asyncIterator](){return this}}}function Ke(n){if(n===void 0)return Ne;if(!Array.isArray(n))throw new TypeError("`methodNames` must be an array of strings");for(let e of n)if(!Ne.includes(e))throw typeof e!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${e} is not Emittery method`);return n}var we=n=>n===Y||n===G,x=class{static mixin(e,t){return t=Ke(t),o=>{if(typeof o!="function")throw new TypeError("`target` must be function");for(let s of t)if(o.prototype[s]!==void 0)throw new Error(`The property \`${s}\` already exists on \`target\``);function r(){return Object.defineProperty(this,e,{enumerable:!1,value:new x}),this[e]}Object.defineProperty(o.prototype,e,{enumerable:!1,get:r});let i=s=>function(...a){return this[e][s](...a)};for(let s of t)Object.defineProperty(o.prototype,s,{enumerable:!1,value:i(s)});return o}}static get isDebugEnabled(){if(typeof process!="object")return Ee;let{env:e}=process||{env:{}};return e.DEBUG==="emittery"||e.DEBUG==="*"||Ee}static set isDebugEnabled(e){Ee=e}constructor(e={}){v.set(this,new Set),z.set(this,new Map),H.set(this,new Map),this.debug=e.debug||{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(t,o,r,i)=>{try{i=JSON.stringify(i)}catch(c){i=`Object with the following keys failed to stringify: ${Object.keys(i).join(",")}`}typeof r=="symbol"&&(r=r.toString());let s=new Date,a=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}.${s.getMilliseconds()}`;console.log(`[${a}][emittery:${t}][${o}] Event Name: ${r}
data: ${i}`)})}logIfDebugEnabled(e,t,o){(x.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,t,o)}on(e,t){J(t),e=Array.isArray(e)?e:[e];for(let o of e)O(o),k(this,o).add(t),this.logIfDebugEnabled("subscribe",o,void 0),we(o)||this.emit(Y,{eventName:o,listener:t});return this.off.bind(this,e,t)}off(e,t){J(t),e=Array.isArray(e)?e:[e];for(let o of e)O(o),k(this,o).delete(t),this.logIfDebugEnabled("unsubscribe",o,void 0),we(o)||this.emit(G,{eventName:o,listener:t})}once(e){return new Promise(t=>{let o=this.on(e,r=>{o(),t(r)})})}events(e){e=Array.isArray(e)?e:[e];for(let t of e)O(t);return Be(this,e)}emit(e,t){return p(this,null,function*(){O(e),this.logIfDebugEnabled("emit",e,t),Et(this,e,t);let o=k(this,e),r=v.get(this),i=[...o],s=we(e)?[]:[...r];yield Re,yield Promise.all([...i.map(a=>p(this,null,function*(){if(o.has(a))return a(t)})),...s.map(a=>p(this,null,function*(){if(r.has(a))return a(e,t)}))])})}emitSerial(e,t){return p(this,null,function*(){O(e),this.logIfDebugEnabled("emitSerial",e,t);let o=k(this,e),r=v.get(this),i=[...o],s=[...r];yield Re;for(let a of i)o.has(a)&&(yield a(t));for(let a of s)r.has(a)&&(yield a(e,t))})}onAny(e){return J(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),v.get(this).add(e),this.emit(Y,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return Be(this)}offAny(e){J(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(G,{listener:e}),v.get(this).delete(e)}clearListeners(e){e=Array.isArray(e)?e:[e];for(let t of e)if(this.logIfDebugEnabled("clear",t,void 0),typeof t=="string"||typeof t=="symbol"){k(this,t).clear();let o=R(this,t);for(let r of o)r.finish();o.clear()}else{v.get(this).clear();for(let o of z.get(this).values())o.clear();for(let o of H.get(this).values()){for(let r of o)r.finish();o.clear()}}}listenerCount(e){e=Array.isArray(e)?e:[e];let t=0;for(let o of e){if(typeof o=="string"){t+=v.get(this).size+k(this,o).size+R(this,o).size+R(this).size;continue}typeof o!="undefined"&&O(o),t+=v.get(this).size;for(let r of z.get(this).values())t+=r.size;for(let r of H.get(this).values())t+=r.size}return t}bindMethods(e,t){if(typeof e!="object"||e===null)throw new TypeError("`target` must be an object");t=Ke(t);for(let o of t){if(e[o]!==void 0)throw new Error(`The property \`${o}\` already exists on \`target\``);Object.defineProperty(e,o,{enumerable:!1,value:this[o].bind(this)})}}},Ne=Object.getOwnPropertyNames(x.prototype).filter(n=>n!=="constructor");Object.defineProperty(x,"listenerAdded",{value:Y,writable:!1,enumerable:!0,configurable:!1});Object.defineProperty(x,"listenerRemoved",{value:G,writable:!1,enumerable:!0,configurable:!1});_e.exports=x});var bt=["essential"],ce=["personalization","analytics","marketing"],de="uncategorized",_=[...bt,...ce,de],f="fs-cc",kt=f+"-ie",ke=["informational","opt-in","opt-out"],D={allow:"allow",deny:"deny",submit:"submit"},b={banner:`[${f}="banner"]`,preferences:`[${f}="preferences"]`,manager:`[${f}="manager"]`},w={allow:`[${f}="${D.allow}"]`,deny:`[${f}="${D.deny}"]`,submit:`[${f}="${D.submit}"]`,openPreferences:`[${f}="open-preferences"]`,close:`[${f}="close"]`},fe={interactionTrigger:`[${f}="interaction"]`},m={categories:[`${f}-category`,`${f}-categories`],disableScroll:`${f}-scroll`,displayProperty:`${f}-display`,cookieMaxAge:`${f}-expires`,mode:`${f}-mode`,debugMode:`${f}-debug`,endpoint:`${f}-endpoint`,componentsSource:`${f}-source`,src:`${f}-src`,placeholder:`${f}-placeholder`,domain:`${f}-domain`},T={main:f,consentsUpdated:`${f}-updated`};var L={checkbox:n=>`[${f}-checkbox="${n}"]`,gtmEvent:n=>`${n}-activated`};var Me=``;var q=Object.freeze({analytics:!1,essential:!0,marketing:!1,personalization:!1,uncategorized:!1}),$=Object.freeze({analytics:!0,essential:!0,marketing:!0,personalization:!0,uncategorized:!0}),Pe="180";var F=(n,e="flex")=>new Promise(t=>{n.style.opacity="0",n.style.display=e,function o(){let r=parseFloat(n.style.opacity);if(r>=1){t();return}let i=r+.1;n.style.opacity=i.toString(),requestAnimationFrame(o)}()}),j=n=>new Promise(e=>{n.style.opacity="1",function t(){let r=parseFloat(n.style.opacity)-.1;n.style.opacity=r.toString(),r<=0?(n.style.display="none",e()):requestAnimationFrame(t)}()});var C=class{static activateAlerts(){this.alertsActivated=!0}static alert(e,t){if(this.alertsActivated&&window.alert(e),t==="error")throw new Error(e)}};C.alertsActivated=!1;var S=(n,e)=>(Array.isArray(e)||(e=[e]),e.map(o=>n.dispatchEvent(new Event(o,{bubbles:!0}))).every(o=>o));var g=(n,e)=>!!n&&e.includes(n);function ue(n,e,t,o=!0){let r=t?[t]:[];if(!n)return r;let i=n.split(",").reduce((s,a)=>{let c=a.trim();return(!o||c)&&s.push(c),s},[]);if(e){let s=i.filter(a=>g(a,e));return s.length?s:r}return i}var pe=n=>Object.entries(n);var U=n=>Object.keys(n);var V=n=>{let{overflow:e}=getComputedStyle(n);return e==="auto"||e==="scroll"};var Ie=n=>!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length);var y=(n,e,t=document)=>{let o=t.querySelector(n);if(o instanceof e)return o};var me=n=>n.replace(/\/+$/,"");var W=(n,e=!0)=>(e!==n.checked&&(n.checked=e,S(n,["click","input","change"])),n.type==="checkbox"?n.checked:n.value);var De=n=>new Promise(e=>setTimeout(e,n));var he=class{constructor({element:e,duration:t}){this.active=!1;this.running=!1;this.isActive=()=>this.active;this.isRunning=()=>this.running;this.untilFinished=()=>this.runningPromise;var o,r;this.element=typeof e=="string"?y(e,HTMLElement)||C.alert(`No interaction with the ${e} selector was found.`,"error"):e,this.duration={first:typeof t=="number"?t:(o=t==null?void 0:t.first)!=null?o:0,second:typeof t=="number"?t:(r=t==null?void 0:t.second)!=null?r:0}}trigger(e){return p(this,null,function*(){return e==="first"&&this.active||e==="second"&&!this.active?!1:(e||(e=this.active?"second":"first"),S(this.element,"click"),this.running=!0,this.runningPromise=De(this.duration[e]),yield this.runningPromise,this.running=!1,this.active=e==="first",!0)})}};var A=class{constructor({element:e,interaction:t,displayProperty:o,noTransition:r,startsHidden:i}){this.isVisible=()=>this.visible;if(this.element=typeof e=="string"?y(e,HTMLElement)||C.alert(`No element with the ${e} selector was found.`,"error"):e,this.noTransition=r,this.displayProperty=o||"block",i?(this.element.style.display="none",this.visible=!1):this.visible=Ie(this.element),t){let{element:s,duration:a}=t;this.interaction=new he({element:s,duration:a})}}show(){return p(this,null,function*(){this.visible||(this.interaction?yield this.interaction.trigger("first"):this.noTransition?this.element.style.display=this.displayProperty:yield F(this.element,this.displayProperty),this.visible=!0)})}hide(){return p(this,null,function*(){!this.visible||(this.interaction?yield this.interaction.trigger("second"):this.noTransition?this.element.style.display="none":yield j(this.element),this.visible=!1)})}};A.displayProperties=["block","flex","grid","inline-block","inline"];var ye=()=>document.documentElement.getAttribute("data-wf-site");var be=n=>p(void 0,null,function*(){let{Webflow:e}=window;if(!(!e||!("destroy"in e)||!("ready"in e)||!("require"in e))&&!(n&&!n.length)){if(n||(e.destroy(),e.ready()),!n||n.includes("ix2")){let t=e.require("ix2");if(t){let{store:o,actions:r}=t,{eventState:i}=o.getState().ixSession;n||t.destroy(),t.init();for(let s of Object.entries(i))o.dispatch(r.eventStateChanged(...s))}}if(!n||n.includes("commerce")){let t=e.require("commerce"),o=ye();t&&o&&(t.destroy(),t.init({siteId:o,apiUrl:"https://render.webflow.com"}))}if(n==null?void 0:n.includes("lightbox")){let t=e.require("lightbox");t==null||t.ready()}return new Promise(t=>e.push(()=>t(void 0)))}});var gt={info:"green",warning:"yellow",error:"red"},d=class{static activate(){this.init(),this.active=!0}static init(){this.element=document.createElement("div"),Object.assign(this.element.style,{position:"fixed",left:"auto",top:"auto",right:"16px",bottom:"0px","z-index":"999999","max-width":"320px","font-size":"14px","line-height":"1.25"}),document.body.appendChild(this.element)}static alert(e,t){if(!this.active)return;let o=document.createElement("div");Object.assign(o.style,{position:"relative",padding:"16px",opacity:"0","margin-bottom":"16px","border-left":`4px solid ${gt[t]}`,"background-color":"#fff","box-shadow":"1px 1px 3px 0 rgba(0, 0, 0, 0.1)","word-break":"break-all"});let r=document.createElement("div");r.innerText=e,o.appendChild(r),o.insertAdjacentHTML("beforeend",`
\u2716
`),this.handleCard(o)}static handleCard(e){let t=o=>{o.target instanceof Element&&o.target.closest(w.close)&&(e.removeEventListener("click",t),e.remove())};e.addEventListener("click",t),this.element.insertAdjacentElement("afterbegin",e),F(e)}};l(d,"active",!1),l(d,"element");var Le=n=>p(void 0,null,function*(){let{origin:e,pathname:t,href:o}=window.location,{origin:r,pathname:i,href:s}=new URL(document.baseURI);try{if(n.startsWith("/")){let se=s===o?e:r+i;n=me(se)+n}let{origin:a,pathname:c}=new URL(n);if(a+c===e+t)return;let h=yield(yield fetch(n)).text(),it=new DOMParser().parseFromString(h,"text/html");Object.values(b).forEach(se=>{let Te=it.querySelector(se);Te&&document.body.appendChild(Te)}),be()}catch(a){d.alert(`${a}`,"error")}}),$e=n=>{if(V(n))return n;let e=n.querySelectorAll("*");for(let t of e)if(V(t))return t},Fe=({element:n})=>{let e=document.createElement("script");return e.type="text/javascript",e.innerText=n.innerText,e.text=n.text,n.src&&(e.src=n.src),e},je=({element:n,src:e,placeholder:t})=>{let o=document.createElement("iframe");for(let{name:r,value:i}of n.attributes)o.setAttribute(r,i);return o.innerText=n.innerText,o.src=e,t&&o.addEventListener("load",()=>j(t)),o};var Ue=i=>p(void 0,[i],function*({id:n,endpoint:e,consents:t,action:o,bannerText:r}){if(!!e)try{let s=JSON.stringify({id:n,action:o,consents:t,bannerText:r,url:window.location.href,userAgent:navigator.userAgent}),a=yield fetch(e,{body:s,method:"POST"});if(a.ok)d.alert("The new consents were successfully POSTed to the API endpoint.","info");else throw new Error(`The API returned a ${a.status} status.`)}catch(s){d.alert(`There was an error while POSTing to the API: ${s}`,"error")}});var He=n=>{window.dataLayer=window.dataLayer||[],window.dataLayer.find(e=>e.event===n)||(window.dataLayer.push({event:n}),d.alert(`The GTM event ${n} has been fired.`,"info"))};var Xe=le(Q());var qe=(n=21)=>crypto.getRandomValues(new Uint8Array(n)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");var Ve=n=>Object.keys(n).every(e=>g(e,_));function X(n){for(var e=1;e{if(!n)return;let{hostname:e}=window.location;return e.includes("webflow.io")?e:n},ze=()=>{let n=E.get(T.main);if(!n)return;let e=JSON.parse(decodeURIComponent(n));if(e.consents&&Ve(e.consents))return e.consents},Ye=(n,e,t=120,o)=>{let r={id:n,consents:e},i=encodeURIComponent(JSON.stringify(r));o=We(o),E.set(T.main,i,{expires:t,domain:o})},Ge=()=>{let n=E.get();for(let e in n){if(e===T.main)continue;let t=window.location.host.split(".");for(;t.length>1;)E.remove(e),E.remove(e,{domain:`.${t.join(".")}`}),E.remove(e,{domain:`${t.join(".")}`}),t.splice(0,1)}},Je=()=>!!E.get(T.consentsUpdated),Qe=(n=120,e)=>{e=We(e),E.set(T.consentsUpdated,"true",{expires:n,domain:e})};var Z=class extends Xe.default{constructor(e){super();this.store=e;this.loadConsents(),this.storeElements(),document.readyState!=="complete"&&window.addEventListener("load",()=>{this.storeElements(),this.applyConsents()}),this.applyConsents()}storeElements(){let{store:e}=this,t=document.querySelectorAll(`script[type="${f}"], iframe[${m.src}]`),o=e.getStoredElements();[...t].filter(i=>!o.find(({element:s})=>i===s)).forEach(i=>{let s=ue(i.getAttribute(m.categories[0])||i.getAttribute(m.categories[1]),_,de);if(i instanceof HTMLScriptElement&&e.storeScript({categories:s,element:i,active:!1}),i instanceof HTMLIFrameElement){let a=i.getAttribute(m.src);if(!a)return;i.src="";let c=i.getAttribute(m.placeholder),u=c?y(c,HTMLElement):void 0;e.storeIFrame({categories:s,element:i,src:a,placeholder:u,active:!1})}d.alert(`Stored the element: ${i.outerHTML} in the categories: ${s.join(", ")}`,"info")})}loadConsents(){let e=ze();if(!e)return;d.alert(`The following consents were loaded from the stored cookies: ${JSON.stringify(e)}`,"info"),this.store.storeConsents(e),Je()&&(Ge(),d.alert("Previously denied cookies have been deleted.","info"))}applyConsents(){return p(this,null,function*(){let{store:e}=this;for(let t of e.getActivableElements())yield new Promise(o=>{let{element:r}=t,{src:i,parentElement:s}=r,a;if(t.type==="script")a=Fe(t);else if(t.type==="iframe")a=je(t);else{o(void 0);return}let c=()=>{t.element=a,t.active=!0,o(void 0)};i&&a.addEventListener("load",c),s==null||s.insertBefore(a,r),r.remove(),i||c()});e.getConsentsEntries().forEach(([t,o])=>{o&&He(L.gtmEvent(t))})})}updateConsents(e,t){let{store:o}=this,{cookieMaxAge:r,endpoint:i,domain:s}=o,a=o.storeConsents(e),c=qe();Ye(c,o.getConsents(),r,s),i&&Ue({action:t,endpoint:i,id:c,consents:o.getConsents(),bannerText:o.getBannerText()||""}),a.length&&(Qe(r,s),this.applyConsents(),d.alert(`The following consents were updated: ${a.join(", ")}`,"info")),this.emit("updateconsents")}};function xt(n){if(Array.isArray(n)){for(var e=0,t=Array(n.length);e1),M=[],ee=!1,Se=-1,B=void 0,K=void 0,et=function(e){return M.some(function(t){return!!(t.options.allowTouchMove&&t.options.allowTouchMove(e))})},te=function(e){var t=e||window.event;return et(t.target)||t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)},Ct=function(e){if(K===void 0){var t=!!e&&e.reserveScrollBarGap===!0,o=window.innerWidth-document.documentElement.clientWidth;t&&o>0&&(K=document.body.style.paddingRight,document.body.style.paddingRight=o+"px")}B===void 0&&(B=document.body.style.overflow,document.body.style.overflow="hidden")},St=function(){K!==void 0&&(document.body.style.paddingRight=K,K=void 0),B!==void 0&&(document.body.style.overflow=B,B=void 0)},Tt=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},At=function(e,t){var o=e.targetTouches[0].clientY-Se;return et(e.target)?!1:t&&t.scrollTop===0&&o>0||Tt(t)&&o<0?te(e):(e.stopPropagation(),!0)},tt=function(e,t){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!M.some(function(r){return r.targetElement===e})){var o={targetElement:e,options:t||{}};M=[].concat(xt(M),[o]),Ze?(e.ontouchstart=function(r){r.targetTouches.length===1&&(Se=r.targetTouches[0].clientY)},e.ontouchmove=function(r){r.targetTouches.length===1&&At(r,e)},ee||(document.addEventListener("touchmove",te,xe?{passive:!1}:void 0),ee=!0)):Ct(t)}},ot=function(){Ze?(M.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),ee&&(document.removeEventListener("touchmove",te,xe?{passive:!1}:void 0),ee=!1),Se=-1):St(),M=[]};var nt=le(Q());var oe=class extends nt.default{constructor(e,t){super();this.element=e;this.store=t;l(this,"checkboxes",new Map);this.initElements(),this.listenEvents(),this.updateCheckboxes()}initElements(){let e=ce.filter(t=>{let o=L.checkbox(t),r=this.element.querySelector(`input${o}, ${o} input`);return!r||r.type!=="checkbox"?!0:(r.checked&&W(r,!1),this.checkboxes.set(t,r),!1)});e.length&&d.alert(`The Consents Form is missing the following checkboxes: ${e.map(t=>L.checkbox(t)).join(", ")}.`,"warning")}listenEvents(){this.element.addEventListener("submit",e=>this.handleSubmit(e))}handleSubmit(e){e.preventDefault(),e.stopPropagation();let t={};this.checkboxes.forEach((o,r)=>{var i;t[r]=(i=o.checked)!=null?i:!1}),this.emit("submit",t)}updateCheckboxes(){let e=this.store.getConsents();this.checkboxes.forEach((t,o)=>{!!e[o]!==t.checked&&W(t,e[o])})}submit(){S(this.element,"submit")}};var rt=le(Q());var P=class extends rt.default{constructor(e,t){super();this.selector=e;this.store=t;l(this,"element");l(this,"form");l(this,"displayController");l(this,"scrollableElement");l(this,"disableScrollOnOpen",!1);l(this,"ready",!1);l(this,"isReady",()=>this.ready);document.readyState==="complete"?this.init():window.addEventListener("load",()=>this.init())}init(){let{banner:e,manager:t,preferences:o}=b;if(!this.initElements()){switch(this.selector){case e:d.alert(`No element with the ${e} attribute was found, it is required to have it!`,"error");break;case t:d.alert(`No element with the ${t} attribute was found, did you want to use the Manager component?`,"info");break;case o:d.alert(`No element with the ${o} attribute was found, did you want to use the Preferences component?`,"info");break}return}this.handleAccessibility(),this.listenEvents(),this.ready=!0,this.emit("ready",this.element)}initElements(){this.element=y(this.selector,HTMLElement);let{element:e,store:t}=this;if(!e)return!1;let o=y("form",HTMLFormElement,e);o&&(this.form=new oe(o,t));let r=e.getAttribute(m.displayProperty);this.disableScrollOnOpen=e.getAttribute(m.disableScroll)==="disable",this.disableScrollOnOpen&&(this.scrollableElement=$e(e));let i=y(fe.interactionTrigger,HTMLElement,e);return this.displayController=new A({element:e,interaction:i?{element:i}:void 0,displayProperty:g(r,A.displayProperties)?r:"flex",startsHidden:!0}),!0}handleAccessibility(){let{element:e}=this;!e||U(w).forEach(t=>{let o=e.querySelector(w[t]);!o||(o.setAttribute("role","button"),o.setAttribute("tabindex","0"))})}listenEvents(){let{element:e,form:t}=this;!e||(e.addEventListener("click",o=>this.handleMouseAndKeyboard(o)),e.addEventListener("keydown",o=>this.handleMouseAndKeyboard(o)),t==null||t.on("submit",o=>this.handleFormSubmit(o)))}handleMouseAndKeyboard(e){var a;let{target:t}=e,{allow:o,deny:r,close:i,submit:s}=w;t instanceof Element&&("key"in e&&e.key!=="Enter"||(t.closest(o)?(this.emit("allow"),this.close()):t.closest(r)?(this.emit("deny"),this.close()):t.closest(i)?this.close():t.closest(s)&&((a=this.form)==null||a.submit())))}handleFormSubmit(e){this.emit("formsubmit",e),this.close()}show(e=!0){let{element:t,displayController:o,disableScrollOnOpen:r,scrollableElement:i}=this;!t||!o||o.isVisible()===e||(o[e?"show":"hide"](),r&&(e?tt(i||t,{reserveScrollBarGap:!0}):ot()),this.emit(e?"open":"close"))}open(){this.ready?this.show():this.once("ready").then(()=>this.show())}close(){this.ready?this.show(!1):this.once("ready").then(()=>this.show(!1))}};var ne=class{constructor(){l(this,"mode");l(this,"cookieMaxAge");l(this,"debugMode");l(this,"endpoint");l(this,"componentsSource");l(this,"domain");l(this,"confirmed",!1);l(this,"consents");l(this,"bannerText","empty");l(this,"scripts",[]);l(this,"iFrames",[]);l(this,"userHasConfirmed",()=>this.confirmed);l(this,"getStoredElements",()=>[...this.scripts,...this.iFrames]);l(this,"getActivableElements",()=>this.getStoredElements().filter(({active:e,categories:t})=>!e&&t.every(o=>this.consents[o])));l(this,"getConsents",()=>this.consents);l(this,"getConsentsEntries",()=>pe(this.consents));l(this,"getConsent",e=>this.consents[e]);l(this,"getBannerText",()=>this.bannerText);let{currentScript:e}=document,t=e==null?void 0:e.getAttribute(m.mode);switch(this.mode=g(t,ke)?t:"opt-in",this.mode){case"informational":case"opt-out":this.consents=I({},$);break;default:this.consents=I({},q)}this.cookieMaxAge=parseInt((e==null?void 0:e.getAttribute(m.cookieMaxAge))||Pe);let o=e==null?void 0:e.getAttribute(m.debugMode);this.debugMode=o===""||o==="true",this.debugMode&&d.activate(),this.endpoint=e==null?void 0:e.getAttribute(m.endpoint),this.componentsSource=e==null?void 0:e.getAttribute(m.componentsSource),this.domain=e==null?void 0:e.getAttribute(m.domain),d.alert(`The cookie banner is set to ${this.mode} mode with a consent expiry time of ${this.cookieMaxAge} days.${this.endpoint?`The consents will be POSTed to ${this.endpoint}`:""}`,"info")}storeScript(e){this.scripts.push(ae(I({},e),{type:"script"}))}storeIFrame(e){this.iFrames.push(ae(I({},e),{type:"iframe"}))}storeConsents(e){let t=[];return U(e).forEach(o=>{if(o==="essential")return;let r=e[o];r===void 0||r===this.consents[o]||(this.consents[o]=r,t.push(o))}),this.confirmed=!0,t}storeBannerText(e){e&&e.textContent&&(this.bannerText=e.textContent)}};var re=class{constructor(){l(this,"consentController");l(this,"store",new ne);l(this,"banner");l(this,"preferences");l(this,"manager");this.consentController=new Z(this.store),this.initComponents().then(()=>this.init())}initComponents(){return p(this,null,function*(){let{store:e}=this,{componentsSource:t}=e,{banner:o,preferences:r,manager:i}=b;t&&(yield Le(t)),this.banner=new P(o,e),this.preferences=new P(r,e),this.manager=new P(i,e)})}init(){let{store:e,manager:t,banner:o}=this;document.head.insertAdjacentHTML("beforeend",Me),!/bot|crawler|spider|crawling/i.test(navigator.userAgent)&&(e.userHasConfirmed()?t.open():o.open(),this.listenEvents())}listenEvents(){let{allow:e,deny:t,submit:o}=D,r=["banner","manager","preferences"],{store:i,consentController:s,banner:a,manager:c}=this;document.addEventListener("click",u=>this.handleMouseAndKeyboard(u)),document.addEventListener("keydown",u=>this.handleMouseAndKeyboard(u)),a.isReady()?i.storeBannerText(a.element):a.on("ready",u=>i.storeBannerText(u)),s.on("updateconsents",()=>{r.forEach(u=>{var h;return(h=this[u].form)==null?void 0:h.updateCheckboxes()})}),r.forEach(u=>{this[u].on("allow",()=>{d.alert(`Allow button was clicked in the ${u} component.`,"info"),s.updateConsents($,e)}),this[u].on("deny",()=>{d.alert(`Deny button was clicked in the ${u} component.`,"info"),s.updateConsents(q,t)}),this[u].on("formsubmit",h=>{d.alert(`Consents Form was submitted in the ${u} component with the following consents: ${JSON.stringify(h)}`,"info"),s.updateConsents(h,o)}),u!=="manager"&&this[u].on("close",()=>{d.alert(`The ${u} component was closed.`,"info"),i.mode==="informational"&&(d.alert(`All cookies were accepted because the mode is set to ${i.mode}.`,"warning"),s.updateConsents($,e)),c.open()})})}handleMouseAndKeyboard(e){let{target:t}=e,{banner:o,manager:r,preferences:i}=this;t instanceof Element&&("key"in e&&e.key!=="Enter"||t.closest(w.openPreferences)&&(o.close(),r.close(),i.open(),d.alert("Open Preferences button was clicked.","info")))}};window.FsCC=new re;})();
/*! js-cookie v3.0.1 | MIT */