!function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){return e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(e){return t(arguments[1])||""})},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return t.length<2?void 0:t.pop().split(";").shift()},setCookie:function(e,t,i,o,n,s){var a=new Date;a.setHours(a.getHours()+24*(i||365));var c=[e+"="+t,"expires="+a.toUTCString(),"samesite=lax;path="+(n||"/")];o&&c.push("domain="+o),s&&c.push("secure"),document.cookie=c.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,o=0;if(0===e.length)return o;for(t=0,i=e.length;t=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),o=38+(t>>8&255),n=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(o<255?o<1?0:o:255)+(n<255?n<1?0:n:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss",allowall:"allowall",savesettings:"savesettings",detailed:"detailed"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var o={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",savesettings:"Save Settings",link:"Learn more",href:"https://www.cookiesandyou.com",close:"x",target:"_blank",policy:"Cookie Policy"},elements:{header:'{{header}} ',message:'{{message}}',messagelink:'{{message}} {{link}}',messageswitchlink:'{{message}} {{link}}
{{allswitches}}
',dismiss:'{{dismiss}}',allow:'{{allow}}',deny:'{{deny}}',savesettings:'{{savesettings}}',allowall:'{{allow}}',link:'{{link}}',close:'{{close}}',closeCustomText:'{{close}}',switch:'{{label}}'},window:'',revokeBtn:'
{{policy}}
',blockingScreen:'
',blockScreen:!1,makeButtonsEqual:!1,compliance:{info:'
{{dismiss}}
',"opt-in":'
{{deny}}{{allow}}
',"opt-out":'
{{deny}}{{allow}}
',detailed:'
{{savesettings}}
',detailedRev:'
{{savesettings}}{{allowall}}
'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-closeCustomText":"{{messagelink}}{{compliance}}{{closeCustomText}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}",detailed:"{{messageswitchlink}}{{compliance}}","detailed-close":"{{messageswitchlink}}{{compliance}}{{close}}","detailed-closeCustomText":"{{messageswitchlink}}{{compliance}}{{closeCustomText}}"},cookietypes:null,statsUrl:null,statsSendOnOpen:!1,statsCountOpens:!1,layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!0,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],disableWithiniFrames:"0",overrideHTML:null};function n(){this.initialise.apply(this,arguments)}function s(){var e;try{e=localStorage.getItem("beautiful_cookie_banner_open_counter"),e=parseInt(e,10)}catch(e){return console.error(e),0}return("number"!=typeof e||isNaN(e))&&(e=0),e}function a(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function c(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function r(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function l(){var e=this.options,i="top"==e.position||"bottom"==e.position?"banner":"floating";return t.isMobile()&&(i="floating"),i}function h(e){var t=s.call(this);return{href:window.location.href,referrer:document.referrer,cookieName:this.options.cookie.name,mainStatus:e,openCount:t,cookieTypeConsent:[]}}function u(e){if(this.options.statsUrl)try{var t=new XMLHttpRequest;t.withCredentials=!1,t.open("POST",this.options.statsUrl),t.setRequestHeader("Content-Type","application/json"),t.send(JSON.stringify(e))}catch(e){console.error(e)}}function p(o){var n=this.options,s=document.createElement("div"),a=n.container&&1===n.container.nodeType?n.container:document.body;s.innerHTML=o;var c=s.children[0];return c.style.display="none",t.hasClass(c,"cc-window")&&e.hasTransition&&t.addClass(c,"cc-invisible"),this.onButtonClick=function(o){if("keyup"===o.type&&13!==o.keyCode)return;var n=t.traverseDOMPath(o.target,"cc-btn")||o.target;if(t.hasClass(n,"cc-btn")){var s=n.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),a=s&&s[1]||!1;a&&(this.setStatus(a),this.close(!0))}t.hasClass(n,"cc-close")&&"opt-out"===this.options.type&&(this.setStatus(e.status.allow),this.close(!0));t.hasClass(n,"cc-close")&&"detailed"===this.options.type&&(this.setStatus(e.status.savesettings),this.close(!0));t.hasClass(n,"cc-close")&&"detailedRev"===this.options.type&&(this.setStatus(e.status.savesettings),this.close(!0));t.hasClass(n,"cc-close")&&"opt-in"===this.options.type&&(this.setStatus(e.status.deny),this.close(!0));t.hasClass(n,"cc-close")&&"info"===this.options.type&&(this.setStatus(e.status.allow),this.close(!0));t.hasClass(n,"cc-revoke")&&this.revokeChoice()}.bind(this),c.addEventListener("click",this.onButtonClick),c.addEventListener("keyup",this.onButtonClick),n.autoAttach&&(a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)),c}function d(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function v(e,t){for(var i=0,o=e.length;i=0;n&&t(o);return n}).call(this)&&(this.options.enabled=!1),v(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),v(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var n=this.options.window.replace("{{classes}}",function(){var i=this.options;positionStyle=l.call(this);var o=["cc-"+positionStyle,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&o.push("cc-static");i.showCloseX&&o.push("cc-addedcloseX");o.push.apply(o,r.call(this));(function(i){var o=t.hash(JSON.stringify(i)),n="cc-color-override-"+o,s=t.isPlainObject(i);this.customStyleSelector=s?n:null,s&&function(i,o,n){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},a=o.popup,c=o.button,r=o.highlight,l=o.switches;a&&(a.text=a.text?a.text:t.getContrast(a.background),a.link=a.link?a.link:a.text,s[n+".cc-window"]=["color: "+a.text,"background-color: "+a.background],s[n+".cc-revoke"]=["color: "+a.text,"background-color: "+a.background],s[n+" .cc-link,"+n+" .cc-link:active,"+n+" .cc-link:visited"]=["color: "+a.link],c&&(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[n+" .cc-btn"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background],c.padding&&s[n+" .cc-btn"].push("padding: "+c.padding),"transparent"!=c.background&&(s[n+" .cc-btn:hover, "+n+" .cc-btn:focus"]=["background-color: "+(c.hover||d(c.background))]),r?(r.text=r.text?r.text:t.getContrast(r.background),r.border=r.border?r.border:"transparent",s[n+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text,"border-color: "+r.border,"background-color: "+r.background]):s[n+" .cc-highlight .cc-btn:first-child"]=["color: "+a.text]));l&&(s[".cc-slider"]=["background-color: "+l.background+"!important"],s[".cc-slider:before"]=["background-color: "+l.switch+"!important"],s[".cc-switch-label"]=["color: "+l.text],s["input:checked+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"],s["input:focus+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"]);var h=document.createElement("style");document.head.appendChild(h),e.customStyles[i]={references:1,element:h.sheet};var u=-1;for(var p in s)s.hasOwnProperty(p)&&h.sheet.insertRule(p+"{"+s[p].join(";")+"}",++u)}(o,i,"."+n);return s}).call(this,this.options.palette);this.customStyleSelector&&o.push(this.customStyleSelector);return o}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message);if(i.cookietypes){var o="",n=this.options.cookie;i.cookietypes.forEach(function(e){var s=e.checked,a=t.getCookie(n.name+"_"+e.cookie_suffix);"deny"===a&&(s=""),"allow"===a&&(s="checked"),o+=i.elements.switch.replace(/\{\{cc\-cookietype\-id\}\}/g,e.cookie_suffix).replace(/\{\{label\}\}/g,e.label).replace(/\{\{checked\}\}/g,s).replace(/\{\{disabled\}\}/g,e.disabled).replace(/\{\{theme\}\}/g,i.theme)}),i.elements.messageswitchlink=i.elements.messageswitchlink.replace(/\{\{allswitches\}\}/g,o).replace("{{allswitchesclasses}}",function(){positionStyle=l.call(this);var e=["cc-"+positionStyle];this.customStyleSelector&&e.push(this.customStyleSelector);return e}.call(this).join(" "))}Object.keys(i.elements).forEach(function(o){e[o]=t.interpolateString(i.elements[o],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var s=i.compliance[i.type];s||(s=i.compliance.info);e.compliance=t.interpolateString(s,function(t){return e[t]});var a=function(e){if(!e.showCloseX)return e.layouts[e.layout];if("detailed"===e.type||"detailedRev"===e.type)return"x"!==e.content.close?e.layouts["detailed-closeCustomText"]:e.layouts["detailed-close"];if("x"!==e.content.close)return e.layouts["basic-closeCustomText"];return e.layouts["basic-close"]}(i);a||(a=i.layouts.basic);return t.interpolateString(a,function(t){return e[t]})}.call(this));this.options.makeButtonsEqual&&(n=n.replace("cc-highlight",""));var s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(n=s),this.options.static){var a=p.call(this,'
'+n+"
");a.style.display="",this.element=a.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=p.call(this,n);(function(){var i=this.setStatus.bind(this),o=this.close.bind(this),n=this.options.dismissOnTimeout,s=e.status.dismiss;"detailed"===this.options.type&&(s=e.status.savesettings);"detailedRev"===this.options.type&&(s=e.status.allowall);"opt-in"!==this.options.type&&"opt-out"!==this.options.type||(s=e.status.allow);"number"==typeof n&&n>=0&&this.options.enabled&&(this.dismissTimeout=window.setTimeout(function(){i(s),o(!0)},Math.floor(n)));var a=this.options.dismissOnScroll;if("number"==typeof a&&a>=0){var c=function(e){window.pageYOffset>Math.floor(a)&&(i(s),o(!0),window.removeEventListener("scroll",c,{passive:!0}),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=c,window.addEventListener("scroll",c,{passive:!0}))}var r=this.options.dismissOnWindowClick,l=this.options.ignoreClicksFrom;if(r){var h=function(e){for(var n=!1,a=e.path.length,c=l.length,r=0;rn&&(i=!0),i?t.hasClass(o,"cc-active")||t.addClass(o,"cc-active"):t.hasClass(o,"cc-active")&&t.removeClass(o,"cc-active")},200);this.onMouseMove=n,window.addEventListener("mousemove",n)}}}.call(this),this.options.autoOpen&&this.autoOpen(),function(){try{links=document.querySelectorAll('a[id="nsc_bar_link_show_banner"]')}catch(e){links=[]}if(this.shortCodeLink=function(){this.revokeChoice()}.bind(this),links.length>0)for(var e=0;e=0},n.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss||i==e.status.allowall},n.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&1==this.options.revokable&&this.toggleRevokeButton(!0)},n.prototype.setStatus=function(i){var o=this.options.cookie,n=t.getCookie(o.name),s=Object.keys(e.status).indexOf(n)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(o.name,i,o.expiryDays,o.domain,o.path,o.secure),function(e){var i=this.options,o=this.options.cookie,n=h.call(this,e);i.cookietypes&&i.cookietypes.forEach(function(i){try{var s;s="allowall"==e?"allow":document.querySelector("input[id="+i.cookie_suffix+"]").checked?"allow":"deny",t.setCookie(o.name+"_"+i.cookie_suffix,s,o.expiryDays,o.domain,o.path,o.secure),n.cookieTypeConsent.push({name:i.cookie_suffix,status:s})}catch(e){}});(function(){try{localStorage.removeItem("beautiful_cookie_banner_open_counter")}catch(e){console.error(e)}}).call(this),u.call(this,n)}.call(this,i),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},n.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},n.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},n}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}},function(t){e(s(t))}):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function o(e,t,i){var o,n=document.createElement("script");n.type="text/"+(e.type||"javascript"),n.src=e.src||e,n.async=!1,n.onreadystatechange=n.onload=function(){var e=n.readyState;clearTimeout(o),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),n.onreadystatechange=n.onload=null)},document.body.appendChild(n),o=setTimeout(function(){t.done=!0,t(),n.onreadystatechange=n.onload=null},i)}function n(e,t,i,o,n){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(o?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(n))for(var a=0,c=n.length;a3&&t(s)}),s.send(o)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,o,n){var s=new e.Law(i.law);"detailed"!=i.type&&"detailedRev"!=i.type||(i.layout="detailed"),o||(o=function(){}),n||(n=function(){});var a=Object.keys(e.status),c=t.getCookie("cookieconsent_status");a.indexOf(c)>=0?o(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),o(new e.Popup(i))},function(t){delete i.law,delete i.location,n(t,new e.Popup(i))})},e.getCountryCode=function(t,i,o){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},o):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{});