Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alanorth/hugo-theme-bootstrap4-blog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorAlan Orth <alan.orth@gmail.com>2020-05-13 13:19:41 +0300
committerAlan Orth <alan.orth@gmail.com>2020-05-13 13:19:41 +0300
commit3b360d2eefe246a18e5ed33f007942d9128762e6 (patch)
tree2089eb7d4bcf73daac7651217871592304d8e594 /assets
parente840f783e76d86304c3098705250687901a955ea (diff)
Use haven for GDPR popup instead of cookieconsent
Haven is newer and more well maintained (and also it is actually open source instead of open core with an upsell to a paid subscrip- tion). Haven is configured to be 100% *opt-in* for Google Analytics, which means it does not load or send a hit until the user agrees. This is mostly a drop-in replacement, but translations need to make sure the following strings are updated: - cookieAccept - cookieDecline
Diffstat (limited to 'assets')
-rw-r--r--assets/css/cookieconsent.min.css6
-rw-r--r--assets/js/cookieconsent.min.js1
-rw-r--r--assets/js/haven.umd.min.js12
3 files changed, 12 insertions, 7 deletions
diff --git a/assets/css/cookieconsent.min.css b/assets/css/cookieconsent.min.css
deleted file mode 100644
index d4d4390..0000000
--- a/assets/css/cookieconsent.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-.cc-window{opacity:1;-webkit-transition:opacity 1s ease;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{-webkit-transition:transform 1s ease;-webkit-transition:-webkit-transform 1s ease;transition:-webkit-transform 1s ease;transition:transform 1s ease;transition:transform 1s ease,-webkit-transform 1s ease}.cc-animate.cc-revoke.cc-top{-webkit-transform:translateY(-2em);transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{-webkit-transform:translateY(2em);transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-top{-webkit-transform:translateY(0);transform:translateY(0)}.cc-animate.cc-revoke.cc-active.cc-bottom{-webkit-transform:translateY(0);transform:translateY(0)}.cc-revoke:hover{-webkit-transform:translateY(0);transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;-webkit-transition:max-height 1s;transition:max-height 1s}
-.cc-revoke,.cc-window{position:fixed;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Helvetica,Calibri,Arial,sans-serif;font-size:16px;line-height:1.5em;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.cc-revoke{padding:.5em}.cc-revoke:hover{text-decoration:underline}.cc-header{font-size:18px;font-weight:700}.cc-btn,.cc-close,.cc-link,.cc-revoke{cursor:pointer}.cc-link{opacity:.8;display:inline-block;padding:.2em;text-decoration:underline}.cc-link:hover{opacity:1}.cc-link:active,.cc-link:visited{color:initial}.cc-btn{display:block;padding:.4em .8em;font-size:.9em;font-weight:700;border-width:2px;border-style:solid;text-align:center;white-space:nowrap}.cc-highlight .cc-btn:first-child{background-color:transparent;border-color:transparent}.cc-highlight .cc-btn:first-child:focus,.cc-highlight .cc-btn:first-child:hover{background-color:transparent;text-decoration:underline}.cc-close{display:block;position:absolute;top:.5em;right:.5em;font-size:1.6em;opacity:.9;line-height:.75}.cc-close:focus,.cc-close:hover{opacity:1}
-.cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:.5em;border-top-right-radius:.5em}.cc-revoke.cc-left{left:3em;right:unset}.cc-revoke.cc-right{right:3em;left:unset}.cc-top{top:1em}.cc-left{left:1em}.cc-right{right:1em}.cc-bottom{bottom:1em}.cc-floating>.cc-link{margin-bottom:1em}.cc-floating .cc-message{display:block;margin-bottom:1em}.cc-window.cc-floating .cc-compliance{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto}.cc-window.cc-banner{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cc-banner.cc-top{left:0;right:0;top:0}.cc-banner.cc-bottom{left:0;right:0;bottom:0}.cc-banner .cc-message{display:block;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;max-width:100%;margin-right:1em}.cc-compliance{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:justify;align-content:space-between}.cc-floating .cc-compliance>.cc-btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.cc-btn+.cc-btn{margin-left:.5em}
-@media print{.cc-revoke,.cc-window{display:none}}@media screen and (max-width:900px){.cc-btn{white-space:normal}}@media screen and (max-width:414px) and (orientation:portrait),screen and (max-width:736px) and (orientation:landscape){.cc-window.cc-top{top:0}.cc-window.cc-bottom{bottom:0}.cc-window.cc-banner,.cc-window.cc-floating,.cc-window.cc-left,.cc-window.cc-right{left:0;right:0}.cc-window.cc-banner{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner .cc-compliance{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.cc-window.cc-floating{max-width:none}.cc-window .cc-message{margin-bottom:1em}.cc-window.cc-banner{-webkit-box-align:unset;-ms-flex-align:unset;align-items:unset}.cc-window.cc-banner .cc-message{margin-right:0}}
-.cc-floating.cc-theme-classic{padding:1.2em;border-radius:5px}.cc-floating.cc-type-info.cc-theme-classic .cc-compliance{text-align:center;display:inline;-webkit-box-flex:0;-ms-flex:none;flex:none}.cc-theme-classic .cc-btn{border-radius:5px}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-floating.cc-type-info.cc-theme-classic .cc-btn{display:inline-block}
-.cc-theme-edgeless.cc-window{padding:0}.cc-floating.cc-theme-edgeless .cc-message{margin:2em;margin-bottom:1.5em}.cc-banner.cc-theme-edgeless .cc-btn{margin:0;padding:.8em 1.8em;height:100%}.cc-banner.cc-theme-edgeless .cc-message{margin-left:1em}.cc-floating.cc-theme-edgeless .cc-btn+.cc-btn{margin-left:0} \ No newline at end of file
diff --git a/assets/js/cookieconsent.min.js b/assets/js/cookieconsent.min.js
deleted file mode 100644
index 1e3dccf..0000000
--- a/assets/js/cookieconsent.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!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,n,o,s){var r=new Date;r.setHours(r.getHours()+24*(i||365));var a=[e+"="+t,"expires="+r.toUTCString(),"path="+(o||"/")];n&&a.push("domain="+n),s&&a.push("secure"),document.cookie=a.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,n=0;if(0===e.length)return n;for(t=0,i=e.length;t<i;++t)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){return e=this.normaliseHex(e),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o: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"},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 n={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",link:"Learn more",href:"https://www.cookiesandyou.com",close:"&#x274c;",target:"_blank",policy:"Cookie Policy"},elements:{header:'<span class="cc-header">{{header}}</span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0" class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}">\x3c!--googleoff: all--\x3e{{children}}\x3c!--googleon: all--\x3e</div>',revokeBtn:'<div class="cc-revoke {{classes}}">{{policy}}</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function r(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function c(n){var o=this.options,s=document.createElement("div"),r=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var a=s.children[0];return a.style.display="none",t.hasClass(a,"cc-window")&&e.hasTransition&&t.addClass(a,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0));t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),a.addEventListener("click",this.onButtonClick),o.autoAttach&&(r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a)),a}function l(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i<n;++i){var o=e[i];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}return o.prototype.initialise=function(i){this.options&&this.destroy(),t.deepExtend(this.options={},n),t.isPlainObject(i)&&t.deepExtend(this.options,i),function(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var i=Object.keys(e.status),n=this.getStatus(),o=i.indexOf(n)>=0;o&&t(n);return o}.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options,n="top"==i.position||"bottom"==i.position?"banner":"floating";t.isMobile()&&(n="floating");var o=["cc-"+n,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&o.push("cc-static");o.push.apply(o,a.call(this));(function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],a.padding&&s[o+" .cc-btn"].push("padding: "+a.padding),"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(a.hover||l(a.background))]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var h=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++h)}(n,i,"."+o);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);Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var n=i.compliance[i.type];n||(n=i.compliance.info);e.compliance=t.interpolateString(n,function(t){return e[t]});var o=i.layouts[i.layout];o||(o=i.layouts.basic);return t.interpolateString(o,function(t){return e[t]})}.call(this)),s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var r=c.call(this,'<div class="cc-grower">'+o+"</div>");r.style.display="",this.element=r.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=c.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout;"number"==typeof o&&o>=0&&(this.dismissTimeout=window.setTimeout(function(){i(e.status.dismiss),n(!0)},Math.floor(o)));var s=this.options.dismissOnScroll;if("number"==typeof s&&s>=0){var r=function(t){window.pageYOffset>Math.floor(s)&&(i(e.status.dismiss),n(!0),window.removeEventListener("scroll",r),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=r,window.addEventListener("scroll",r))}var a=this.options.dismissOnWindowClick,c=this.options.ignoreClicksFrom;if(a){var l=function(o){for(var s=!1,r=o.path.length,a=c.length,u=0;u<r;u++)if(!s)for(var h=0;h<a;h++)s||(s=t.hasClass(o.path[u],c[h]));s||(i(e.status.dismiss),n(!0),window.removeEventListener("click",l),window.removeEventListener("touchend",l),this.onWindowClick=null)}.bind(this);this.options.enabled&&(this.onWindowClick=l,window.addEventListener("click",l),window.addEventListener("touchend",l))}}).call(this),function(){"info"!=this.options.type&&(this.options.revokable=!0);t.isMobile()&&(this.options.animateRevokable=!1);if(this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var i=this.options.revokeBtn.replace("{{classes}}",e.join(" ")).replace("{{policy}}",this.options.content.policy);this.revokeBtn=c.call(this,i);var n=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle(function(e){var i=!1,o=window.innerHeight-20;t.hasClass(n,"cc-top")&&e.clientY<20&&(i=!0),t.hasClass(n,"cc-bottom")&&e.clientY>o&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen()},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&r.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=r.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),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 n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r<a;++r){var c=o[r].split(":",2);s.setRequestHeader(c[0].replace(/^\s+|\s+$/g,""),c[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(s.onreadystatechange=function(){s.readyState>3&&t(s)}),s.send(n)}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<this.options.services.length&&!e);return e},i.prototype.getServiceByIdx=function(e){var i=this.options.services[e];if("function"==typeof i){var n=i();return n.name&&t.deepExtend(n,this.options.serviceDefinitions[n.name](n)),n}return"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},i.prototype.locate=function(e,t){var i=this.getNextService();i?(this.callbackComplete=e,this.callbackError=t,this.runService(i,this.runNextServiceOnError.bind(this))):t(new Error("No services to run"))},i.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,function(i,n){if("callback"===n){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(n in t.interpolateUrl)return t.interpolateUrl[n]})},i.prototype.runService=function(e,t){var i=this;e&&e.url&&e.callback&&(e.isScript?n:o)(this.setupUrl(e),function(n){var o=n?n.responseText:"";e.__JSONP_DATA&&(o=e.__JSONP_DATA,delete e.__JSONP_DATA),i.runServiceCallback.call(i,t,e,o)},this.options.timeout,e.data,e.headers)},i.prototype.runServiceCallback=function(e,t,i){var n=this,o=t.callback(function(t){o||n.onServiceResult.call(n,e,t)},i);o&&this.onServiceResult.call(this,e,o)},i.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},i.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},i.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}:"function"==typeof e?e():t.isPlainObject(e)?e:{}},i.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},i.prototype.logError=function(e){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.warn("The service["+t+"] ("+i.url+") responded with the following error",e)},i}(),e.Law=function(){var e={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","ES","SE","GB","UK","GR","EU"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};function i(e){this.initialise.apply(this,arguments)}return i.prototype.initialise=function(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i)},i.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=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,n,o){var s=new e.Law(i.law);n||(n=function(){}),o||(o=function(){});var r=Object.keys(e.status),a=t.getCookie("cookieconsent_status");r.indexOf(a)>=0?n(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))},function(t){delete i.law,delete i.location,o(t,new e.Popup(i))})},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{}); \ No newline at end of file
diff --git a/assets/js/haven.umd.min.js b/assets/js/haven.umd.min.js
new file mode 100644
index 0000000..d7e302e
--- /dev/null
+++ b/assets/js/haven.umd.min.js
@@ -0,0 +1,12 @@
+/*!
+ * @chiiya/haven v0.5.11
+ * (c) Elisha Witte <elishawitte@gmail.com>
+ * Released under the MIT License.
+ */
+/*!
+ * @chiiya/haven v0.5.11
+ * (c) Elisha Witte <elishawitte@gmail.com>
+ * Released under the MIT License.
+ */
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).haven={})}(this,(function(e){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function t(e,n){for(var o=0;o<n.length;o++){var t=n[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function i(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}function a(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function r(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function c(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(n){a(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,n){if(e){if("string"==typeof e)return u(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,n):void 0}}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,t=new Array(n);o<n;o++)t[o]=e[o];return t}function f(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=l(e))){var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var t,i,a=!0,r=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return a=e.done,e},e:function(e){r=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(r)throw i}}}}function d(e){return e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}var v=function(){function e(){o(this,e)}return i(e,null,[{key:"set",value:function(e,n,o){var t=this.resolveOptions(o),i=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),a=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),r=this.encodeAttributes(t);document.cookie="".concat(a,"=").concat(i).concat(r)}},{key:"get",value:function(e){var n,o=f(document.cookie?document.cookie.split("; "):[]);try{for(o.s();!(n=o.n()).done;){var t=n.value.split("=");if(e===d(t[0])){var i=t.slice(1).join("=");return'"'===i.charAt(0)&&(i=i.slice(1,-1)),i=d(i)}}}catch(e){o.e(e)}finally{o.f()}}},{key:"getAll",value:function(){var e,n={},o=f(document.cookie?document.cookie.split("; "):[]);try{for(o.s();!(e=o.n()).done;){var t=e.value.split("="),i=d(t[0]),a=t.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1)),a=d(a),n[i]=a}}catch(e){o.e(e)}finally{o.f()}return n}},{key:"remove",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=this.resolveOptions(Object.assign(n,{expires:-1}));if(e instanceof RegExp)return this.removeByRegex(e,o);var t=this.encodeAttributes(o);document.cookie="".concat(e,"=''").concat(t),this.set(e,"",o)}},{key:"removeByRegex",value:function(e,n){var o=this;Object.keys(this.getAll()).map((function(t){if(e.test(t)){var i=o.encodeAttributes(n);document.cookie="".concat(t,"=''").concat(i),o.set(t,"",n)}}))}},{key:"encodeAttributes",value:function(e){for(var n="",o=0,t=Object.keys(e);o<t.length;o++){var i=t[o],a=e[i];a&&(n+="; ".concat(i),!0!==a&&(n+="=".concat(a.split(";")[0])))}return n}},{key:"resolveOptions",value:function(e){return e&&"number"==typeof e.expires&&(e.expires=new Date(Date.now()+864e5*e.expires)),e&&e.expires instanceof Date&&(e.expires=e.expires.toUTCString()),Object.assign({path:"/"},e)}}]),e}(),p=new(function(){function e(){o(this,e),this.subscriptions={},this.counter=0}return i(e,[{key:"on",value:function(e,n){var o=this,t=this.counter+=1;return void 0===this.subscriptions[e]&&(this.subscriptions[e]={}),this.subscriptions[e][t]=n,{unsubscribe:function(){delete o.subscriptions[e][t]}}}},{key:"emit",value:function(e,n){if(void 0!==this.subscriptions[e])for(var o=0,t=Object.keys(this.subscriptions[e]);o<t.length;o++){var i=t[o];this.subscriptions[e][i](n)}}}]),e}()),h={prefix:"cookies",cookieAttributes:{expires:365},domains:[],cookies:{},lang:"en",type:"opt-in",services:[],notification:{position:"bottom",policyUrl:"/cookie-policy",styles:{background:"#3C366B",textColor:"#FFF",linkColor:"#F7FAFC",buttonBackgroundColor:"#F1D600",buttonBackgroundColorHover:"#F6E05E",buttonTextColor:"#1A202C"}},preferences:{styles:{textColor:"#666666",toggleBorder:"#666666",toggleBackground:"#9FD6AE"}},translations:{en:{notification:{message:"This website uses cookies to ensure you get the best experience on our website.",policy:"Learn more",accept:"Allow cookies",decline:"Decline"},preferences:{description:"This website uses the following cookies:"},purposes:{functional:{name:"Functional",description:"Functional cookies are absolutely necessary for core functions such as navigating the page or accessing secure areas. The website cannot function properly without these cookies.\n"},analytics:{name:"Analytics",description:"Analytics cookies serve to improve the performance and functionality of this website by collecting and reporting information anonymously.\n"},marketing:{name:"Marketing",description:"Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.\n"},preferences:{name:"Preferences",description:"Preference cookies are used to remember settings and customizations that change the way the website behaves or looks.\n"}}},de:{notification:{message:"Wir verwenden Cookies, um Ihnen den bestmöglichen Service auf unserer Website zu bieten.",policy:"Cookie-Einstellungen ändern",accept:"Annehmen",decline:"Ablehnen"},preferences:{description:"Diese Website setzt folgende Cookies ein:"},purposes:{functional:{name:"Funktionale Cookies",description:"Funktionale Cookies sind für Kernfunktionen wie das Navigieren auf der Seite oder den Zugriff auf geschützte Bereiche zwingend erforderlich. Ohne diese Cookies kann die Website nicht richtig funktionieren.\n"},analytics:{name:"Analyse-Cookies",description:"Analyse-Cookies dienen dazu, die Leistung und Funktionalität dieser Website zu verbessern, indem sie Informationen anonym sammeln und melden.\n"},marketing:{name:"Marketing-Cookies",description:"Marketing-Cookies werden verwendet, um Besucher auf Websites zu tracken. Ziel ist es, Anzeigen zu schalten, die für den einzelnen Nutzer relevant und ansprechend sind und damit für Publisher und Drittwerber wertvoller sind.\n"},preferences:{name:"Präferenz-Cookies",description:"Präferenz-Cookies werden verwendet, um Einstellungen und Anpassungen zu speichern, die das Verhalten oder das Aussehen der Website verändern.\n"}}}}},k=function(e){var n=h.translations[h.lang];if(void 0!==n){var o,t=n,i=f(e.split("."));try{for(i.s();!(o=i.n()).done;){var a=o.value;if(!t[a])return;t=t[a]}}catch(e){i.e(e)}finally{i.f()}return t}console.error("HAVEN: No translations found for language `".concat(h.lang,"`"))},g=function(){if(h.purposes)return h.purposes;var e=h.services.map((function(e){return e.purposes||[]})).flat();return s(new Set(s(e)))};function y(e){return e&&"object"===n(e)&&!Array.isArray(e)}function m(e,n){var o=Object.assign({},e);return y(e)&&y(n)&&Object.keys(n).forEach((function(t){y(n[t])&&t in e?o[t]=m(e[t],n[t]):Object.assign(o,a({},t,n[t]))})),o}function b(e){return null!==document.querySelector('script[src="'.concat(e,'"]'))}var w=function(){function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"opt-in",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,e),this.prefix=n,this.type=t,this.attributes=i}return i(e,[{key:"enableFunctionalCookie",value:function(){e.setCookie("".concat(this.prefix,"-functional"),"true",this.attributes),p.emit("functional-enabled")}},{key:"hasFunctionalCookie",value:function(){return e.cookieExists("".concat(this.prefix,"-functional"))}},{key:"enableCookies",value:function(n){e.setCookie("".concat(this.prefix,"-").concat(n),"true",this.attributes),p.emit("".concat(n,"-enabled"))}},{key:"disableCookies",value:function(n){e.setCookie("".concat(this.prefix,"-").concat(n),"false",this.attributes),p.emit("".concat(n,"-disabled"))}},{key:"hasAllCookiesSet",value:function(){var n,o=f(g());try{for(o.s();!(n=o.n()).done;){var t=n.value;if(!e.cookieExists("".concat(this.prefix,"-").concat(t)))return!1}}catch(e){o.e(e)}finally{o.f()}return!0}},{key:"hasCookiesEnabled",value:function(n){var o=e.getCookie("".concat(this.prefix,"-").concat(n));return"opt-in"===this.type?"true"===o:void 0===o||"true"===o}},{key:"hasAllNecessaryCookiesEnabled",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=f(n);try{for(o.s();!(e=o.n()).done;){var t=e.value;if(!this.hasCookiesEnabled(t))return!1}}catch(e){o.e(e)}finally{o.f()}return!0}},{key:"enableAllCookies",value:function(){var e=this;["functional"].concat(s(g())).map((function(n){return e.enableCookies(n)}))}},{key:"disableAllCookies",value:function(){var e=this;g().map((function(n){return e.disableCookies(n)}))}}],[{key:"getCookie",value:function(e){return v.get(e)}},{key:"setCookie",value:function(e,n,o){v.set(e,n,o)}},{key:"removeCookie",value:function(e,n){v.remove(e,n)}},{key:"cookieExists",value:function(e){return void 0!==v.get(e)&&""!==v.get(e)}}]),e}(),C=function(){function e(){o(this,e)}return i(e,null,[{key:"resolve",value:function(e){e.domains&&Array.isArray(e.domains)&&(e.domains=this.normalizeDomains(e.domains)),this.resolveBaseConfiguration(e),h.notification=m(h.notification,e.notification),h.translations=m(h.translations,e.translations)}},{key:"resolveBaseConfiguration",value:function(e){for(var n=0,o=["prefix","cookies","type","services","purposes"];n<o.length;n++){var t=o[n];void 0!==e[t]&&(h[t]=e[t])}var i=e.domains||[];h.domains=i.length>0?i:this.getDomains(),h.lang=this.detectLanguage(e),void 0!==e.cookieAttributes&&(h.cookieAttributes=Object.assign(h.cookieAttributes,e.cookieAttributes))}},{key:"detectLanguage",value:function(e){var n=(e.lang||document.documentElement.lang||"en").toLowerCase(),o=/^(\w{2})-(\w{2})$/.exec(n);return null===o?n:o[1]}},{key:"getDomains",value:function(){var e=[],n=window.location.hostname,o=n.match(/(?:[A-Za-z0-9-]+\.)*([A-Za-z0-9-]+\.co.uk|\.com.br|\.co.jp|\.com.au)\b/);null!==o&&e.push(o[1]);var t=n.match(/(?:[A-Za-z0-9-]+\.)*([A-Za-z0-9-]+\.(?:[A-za-z]{2}|[A-Za-z]{3,}))\b/);return null!==t&&e.push(t[1]),e.push(n),this.normalizeDomains(e)}},{key:"normalizeDomains",value:function(e){return e.map((function(e){return e.startsWith(".")?e:".".concat(e)}))}}]),e}(),x=["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],A=function(){function e(){o(this,e)}return i(e,null,[{key:"create",value:function(){var e,n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode((e=h.notification.styles,"\n .hv-notification {\n align-items: center;\n background: ".concat(e.background,";\n box-sizing: border-box;\n color: ").concat(e.textColor,";\n display: flex;\n font-family: ").concat(x.join(", "),";\n font-size: 16px;\n justify-content: space-between;\n left: 0;\n line-height: 1.5;\n opacity: 1;\n overflow: hidden;\n padding: 16px 32px;\n position: fixed;\n right: 0;\n transition: opacity 1s ease;\n width: 100%;\n z-index: 9999;\n }\n\n .hv-notification--hidden {\n opacity: 0;\n }\n\n .hv-notification--top {\n top: 0;\n }\n\n .hv-notification--bottom {\n bottom: 0;\n }\n\n .hv-notification__message {\n margin: 0 16px 0 0;\n }\n\n .hv-notification__message a {\n color: ").concat(e.linkColor,";\n text-decoration: underline;\n }\n\n .hv-notification__message a:hover {\n color: ").concat(e.textColor,";\n }\n\n .hv-notification-button {\n align-items: center;\n border: 0;\n cursor: pointer;\n display: inline-flex;\n font-size: 14px;\n font-weight: 500;\n justify-content: center;\n outline: 0;\n padding: 8px 32px;\n transition: background-color 0.2s ease, color 0.2s ease;\n }\n\n .hv-notification__decline {\n background: transparent;\n color: ").concat(e.textColor,";\n }\n\n .hv-notification__decline:hover {\n text-decoration: underline;\n }\n\n .hv-notification__accept {\n background: ").concat(e.buttonBackgroundColor,";\n color: ").concat(e.buttonTextColor,";\n }\n\n .hv-notification__accept:hover {\n background: ").concat(e.buttonBackgroundColorHover,";\n }\n ")))),document.head.appendChild(n);var o=document.createElement("div");o.innerHTML=function(){var e=h.notification;return'\n <div id="cookie-notification" role="alert" class="hv-notification hv-notification--'.concat(e.position,'" data-display="flex" style="display: none;">\n <p class="hv-notification__message">\n ').concat(k("notification.message"),' <a href="').concat(e.policyUrl,'" target="_blank">').concat(k("notification.policy"),'</a>\n </p>\n <div class="hv-notification__actions">\n <button id="cookie-notification__decline" class="hv-notification-button hv-notification__decline">').concat(k("notification.decline"),'</button>\n <button id="cookie-notification__accept" class="hv-notification-button hv-notification__accept">').concat(k("notification.accept"),"</button>\n </div>\n </div>\n ")}(),document.body.appendChild(o)}}]),e}(),j=!0,S=!1,_=function(){function e(){o(this,e),this.cookieNotification=null,this.cookiesAccept=null,this.cookiesDecline=null,this.cookieManager=new w(h.prefix,h.type,h.cookieAttributes)}return i(e,[{key:"init",value:function(){var e=this;this.cookieNotification=document.getElementById("cookie-notification"),null===this.cookieNotification&&(A.create(),this.cookieNotification=document.getElementById("cookie-notification")),this.cookiesAccept=document.getElementById("cookie-notification__accept"),this.cookiesDecline=document.getElementById("cookie-notification__decline"),null===this.cookieNotification||this.cookieManager.hasAllCookiesSet()||this.showCookieNotification(),null!==this.cookiesAccept&&this.cookiesAccept.addEventListener("click",(function(n){n.preventDefault(),e.cookieManager.enableAllCookies(),e.hideCookieNotification(),e.togglePreferences(j)})),null!==this.cookiesDecline&&this.cookiesDecline.addEventListener("click",(function(n){n.preventDefault(),e.cookieManager.disableAllCookies(),e.cookieManager.enableFunctionalCookie(),e.hideCookieNotification(),e.togglePreferences(S)}))}},{key:"showCookieNotification",value:function(){null!==this.cookieNotification&&(this.cookieNotification.style.display=this.cookieNotification.dataset.display||"block",this.cookieNotification.classList.remove("hv-notification--hidden"))}},{key:"hideCookieNotification",value:function(){null!==this.cookieNotification&&(this.cookieNotification.style.display="none")}},{key:"togglePreferences",value:function(e){var n,o=f(g());try{for(o.s();!(n=o.n()).done;){var t=n.value,i=document.getElementById("cookie-preferences--".concat(t));i&&(i.checked=e)}}catch(e){o.e(e)}finally{o.f()}}}]),e}(),E=["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],I=function(){function e(){o(this,e)}return i(e,null,[{key:"create",value:function(e){var n,o=document.createElement("style");o.type="text/css",o.appendChild(document.createTextNode((n=h.preferences.styles,"\n .hv-preference {\n align-items: center;\n box-sizing: border-box;\n display: flex;\n font-family: ".concat(E.join(", "),";\n font-size: 16px;\n justify-content: space-between;\n line-height: 1.5;\n width: 100%;\n }\n\n .hv-preference__purpose {\n font-size: 20px;\n margin: 0;\n }\n\n .hv-preference__description {\n margin-top: 10px;\n width: 100%;\n }\n\n .hv-toggle {\n display: none;\n }\n\n .hv-toggle:checked + label::before {\n background: ").concat(n.toggleBackground,";\n left: auto;\n right: 20px;\n transform: translateX(16px);\n }\n\n .hv-toggle:disabled + label {\n cursor: not-allowed;\n opacity: .5;\n }\n\n .hv-toggle-label {\n border: 1px solid ").concat(n.toggleBorder,";\n border-radius: 9999px;\n cursor: pointer;\n display: inline-block;\n height: 24px;\n margin: 0;\n position: relative;\n width: 48px;\n }\n\n .hv-toggle-label::before {\n background: ").concat(n.toggleBorder,';\n border-radius: 9999px;\n content: "";\n height: 16px;\n left: 4px;\n position: absolute;\n transition: transform .3s ease, background-color .3s ease;\n top: 3px;\n width: 16px;\n }\n ')))),document.head.appendChild(o);var t,i=document.createElement("div");i.innerHTML=(t=["functional"].concat(s(g())),"\n <p>".concat(k("preferences.description"),"</p>\n ").concat(t.map((function(e){return'\n <div class="hv-preference">\n <h3 class="hv-preference__purpose">'.concat(k("purposes.".concat(e,".name")),'</h3>\n <input type="checkbox" class="hv-toggle" id="cookie-preferences--').concat(e,'" ').concat("functional"===e?"disabled checked":"",'>\n <label for="cookie-preferences--').concat(e,'" class="hv-toggle-label"></label>\n </div>\n <p class="hv-preference__description">').concat(k("purposes.".concat(e,".description")),"</p>\n ")})).join(""),"\n ")),e.appendChild(i)}}]),e}(),O=function(){function e(){o(this,e),this.saveButton=null,this.cookieManager=new w(h.prefix,h.type,h.cookieAttributes)}return i(e,[{key:"init",value:function(){var e=document.getElementById("cookie-preferences");null!==e&&I.create(e),this.attachListeners()}},{key:"attachListeners",value:function(){var e,n=this,o=g(),t={},i=f(o);try{var a=function(){var o=e.value,i=document.getElementById("cookie-preferences--".concat(o));null!==i&&(t[o]=i,i.checked=n.cookieManager.hasCookiesEnabled(o),i.addEventListener("change",(function(){n.cookieManager.enableFunctionalCookie(),i.checked?n.cookieManager.enableCookies(o):n.cookieManager.disableCookies(o)})))};for(i.s();!(e=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}var r=document.getElementById("cookie-preferences__save");null!==r&&r.addEventListener("click",(function(){n.cookieManager.enableFunctionalCookie();var e,i=f(o);try{for(i.s();!(e=i.n()).done;){var a=e.value;t[a].checked?n.cookieManager.enableCookies(a):n.cookieManager.disableCookies(a)}}catch(e){i.e(e)}finally{i.f()}var r=document.getElementById("cookie-notification");null!==r&&(r.style.display="none")}))}}]),e}(),N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.id?(b("https://connect.facebook.net/en_US/fbevents.js")||B(),window.fbq("init",e.id),window.fbq("track","PageView")):console.error("FACEBOOK_PIXEL: No ID specified. Please specify an ID using `options.id`.")},B=function(){if(!window.fbq){var e=window.fbq=function(){e.callMethod?e.callMethod.apply(e,arguments):e.queue.push(arguments)};window._fbq||(window._fbq=e),e.push=e,e.loaded=!0,e.version="2.0",e.queue=[];var n=document.createElement("script");n.async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(n,o)}},D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.id?(b("https://www.google-analytics.com/analytics.js")||z(),void 0!==e.name?M(e):F(e)):console.error("GOOGLE_ANALYTICS: No ID specified. Please specify an ID using `options.id`.")},z=function(){window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;var e=document.getElementsByTagName("script")[0],n=document.createElement("script");n.src="https://www.google-analytics.com/analytics.js",e.parentNode.insertBefore(n,e)},M=function(e){window.ga("create",e.id,"auto",e.name),!1!==e.anonymizeIp&&window.ga("".concat(e.name,".set"),"anonymizeIp",!0),window.ga("".concat(e.name,".send"),"pageview")},F=function(e){window.ga("create",e.id,"auto"),!1!==e.anonymizeIp&&window.ga("set","anonymizeIp",!0),window.ga("send","pageview")},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.id?b("https://www.googletagmanager.com/gtm.js?id=".concat(e.id))||L(e):console.error("GOOGLE_TAG_MANAGER: No ID specified. Please specify an ID using `options.id`.")},L=function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"gtm.js","gtm.start":(new Date).getTime()});var n=document.getElementsByTagName("script")[0],o=document.createElement("script");o.src="https://www.googletagmanager.com/gtm.js?id=".concat(e.id),n.parentNode.insertBefore(o,n)},T=function(){function e(){o(this,e),this.injected={},this.cookieManager=new w(h.prefix,h.type,h.cookieAttributes)}return i(e,[{key:"injectServices",value:function(){var e,n=f(h.services);try{for(n.s();!(e=n.n()).done;){var o=e.value;this.injectService(o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"injectService",value:function(e){if(this.shouldBeInjected(e)){var n=this.getInjectorFunction(e);void 0!==n&&(n(e.options||{}),p.emit("service-loaded",e.name)),this.injected[e.name]=!0}}},{key:"shouldBeInjected",value:function(e){return!1!==e.inject&&!this.injected[e.name]&&(e.required||this.cookieManager.hasAllNecessaryCookiesEnabled(e.purposes))}},{key:"getInjectorFunction",value:function(e){var n;if(!0===e.inject){var o=e.type||e.name;return void 0===(n=this.getDefaultInjector(o))?void console.error("No default injector found for ".concat(o,". Please specify your own implementation.")):n}if(e.inject)return e.inject}},{key:"getDefaultInjector",value:function(e){switch(e){case"google-analytics":return D;case"google-tag-manager":return P;case"facebook-pixel":return N;default:return}}},{key:"registerService",value:function(e,n,o){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=c({name:e,purposes:n,inject:o},t);h.services.push(i),this.injectService(i)}}]),e}(),U=function(){function e(){o(this,e)}return i(e,null,[{key:"removeCookies",value:function(){var e,n=this,o=f(h.services);try{for(o.s();!(e=o.n()).done;){var t=e.value;this.removeCookiesSetByService(t)}}catch(e){o.e(e)}finally{o.f()}h.cookies&&Object.values(h.cookies).map((function(e){return n.removeSimpleCookies(e)})),window.location.reload()}},{key:"removeCookiesForPurpose",value:function(e){var n,o=f(h.services);try{for(o.s();!(n=o.n()).done;){var t=n.value;-1!==t.purposes.indexOf(e)&&this.removeCookiesSetByService(t)}}catch(e){o.e(e)}finally{o.f()}h.cookies&&h.cookies[e]&&this.removeSimpleCookies(h.cookies[e])}},{key:"removeCookiesSetByService",value:function(e){e.cookies&&e.cookies.length&&this.removeSimpleCookies(e.cookies);var n=e.type||e.name;"google-analytics"===n&&this.removeGoogleAnalyticsCookies(e.options),"facebook-pixel"===n&&this.removeFacebookPixelCookies(e.options)}},{key:"removeGoogleAnalyticsCookies",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=["_ga","_gid","_gat","AMP_TOKEN"],o=["_dc_gtm_","_gac_","_gat_gtag_","_gat_"];this.removeSimpleCookies(n),void 0!==e.id&&this.removeCompositeCookies(o,e.id),void 0!==e.name&&this.removeCompositeCookies(o,e.name)}},{key:"removeFacebookPixelCookies",value:function(){this.removeSimpleCookies(["_fbp"])}},{key:"removeSimpleCookies",value:function(e){var n,o=f(e);try{for(o.s();!(n=o.n()).done;){var t,i=n.value,a=f(h.domains);try{for(a.s();!(t=a.n()).done;){var r=t.value;w.removeCookie(i,{domain:r})}}catch(e){a.e(e)}finally{a.f()}w.removeCookie(i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"removeCompositeCookies",value:function(e,n){var o,t=f(e);try{for(t.s();!(o=t.n()).done;){var i,a=o.value,r=f(h.domains);try{for(r.s();!(i=r.n()).done;){var c=i.value;w.removeCookie("".concat(a).concat(n),{domain:c})}}catch(e){r.e(e)}finally{r.f()}w.removeCookie("".concat(a).concat(n))}}catch(e){t.e(e)}finally{t.f()}}}]),e}(),q=function(){function e(n){o(this,e),C.resolve(n),this.cookieNotification=new _,this.cookiePreferences=new O,this.cookieManager=new w(h.prefix,h.type,h.cookieAttributes),this.serviceLoader=new T}return i(e,[{key:"init",value:function(){var e=this;/complete|interactive|loaded/.test(document.readyState)?(this.cookieNotification.init(),this.cookiePreferences.init()):document.addEventListener("DOMContentLoaded",(function(){e.cookieNotification.init(),e.cookiePreferences.init()})),this.registerDefaultListeners(),this.checkInitialState()}},{key:"checkInitialState",value:function(){var e,n=f(g());try{for(n.s();!(e=n.n()).done;){var o=e.value;this.cookieManager.hasCookiesEnabled(o)&&p.emit("".concat(o,"-enabled"))}}catch(e){n.e(e)}finally{n.f()}}},{key:"registerDefaultListeners",value:function(){var e,n=this,o=f(g());try{var t=function(){var o=e.value;p.on("".concat(o,"-enabled"),(function(){n.serviceLoader.injectServices()})),p.on("".concat(o,"-disabled"),(function(){U.removeCookiesForPurpose(o)}))};for(o.s();!(e=o.n()).done;)t()}catch(e){o.e(e)}finally{o.f()}}},{key:"registerService",value:function(e,n,o){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.serviceLoader.registerService(e,n,o,t)}}],[{key:"on",value:function(e,n){return p.on(e,n)}},{key:"create",value:function(n){return e.instance&&console.warn("Replacing an existing Haven instance. Are you sure this behaviour is intended?"),e.instance=new e(n),e.instance.init(),e.instance}},{key:"getInstance",value:function(){if(e.instance)return e.instance;console.error("No Haven instance found. Make sure to create a Haven instance before attempting to access it.")}},{key:"removeCookies",value:function(e,n){var o,t=f(e);try{for(t.s();!(o=t.n()).done;){var i=o.value;w.removeCookie(i,n)}}catch(e){t.e(e)}finally{t.f()}}}]),e}();window.Haven=q,e.CookieManager=w,e.Haven=q,Object.defineProperty(e,"__esModule",{value:!0})}));
+//# sourceMappingURL=haven.umd.min.js.map