From 0a09c195f3242ef1208868f2ad555362b8c59274 Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Sat, 6 Feb 2021 03:08:13 +0100 Subject: [PATCH] cookieconsent 4.0 --- docs/app.js | 46 ++- docs/main.css | 376 ++++++++++++++++++++++++ package-lock.json | 6 - package.json | 1 - src/js/cookieconsent.min.js | 1 + src/js/{cookieconsent.js => cookies.js} | 3 +- src/js/index.js | 4 +- 7 files changed, 426 insertions(+), 11 deletions(-) create mode 100644 src/js/cookieconsent.min.js rename src/js/{cookieconsent.js => cookies.js} (94%) diff --git a/docs/app.js b/docs/app.js index c0bee0e..16ab169 100644 --- a/docs/app.js +++ b/docs/app.js @@ -9,6 +9,16 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ +/***/ "./node_modules/CookieConsent/build/cookieconsent.min.js": +/*!***************************************************************!*\ + !*** ./node_modules/CookieConsent/build/cookieconsent.min.js ***! + \***************************************************************/ +/***/ (() => { + +eval("!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=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:\"❌\",target:\"_blank\",policy:\"Cookie Policy\"},elements:{header:'{{header}} ',message:'{{message}}',messagelink:'{{message}} {{link}}',dismiss:'{{dismiss}}',allow:'{{allow}}',deny:'{{deny}}',link:'{{link}}',close:'{{close}}'},window:'
\\x3c!--googleoff: all--\\x3e{{children}}\\x3c!--googleon: all--\\x3e
',revokeBtn:'
{{policy}}
',compliance:{info:'
{{dismiss}}
',\"opt-in\":'
{{deny}}{{allow}}
',\"opt-out\":'
{{deny}}{{allow}}
'},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=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,'
'+o+\"
\");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;uo&&(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;r3&&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=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||{});\n\n//# sourceURL=webpack://hollow-knight-completion-check/./node_modules/CookieConsent/build/cookieconsent.min.js?"); + +/***/ }), + /***/ "./src/js/HKCheckCompletion.js": /*!*************************************!*\ !*** ./src/js/HKCheckCompletion.js ***! @@ -41,6 +51,17 @@ eval("/* eslint-disable */\n\n\n(function (root) {\n function checkInt(value) { /***/ }), +/***/ "./src/js/cookieconsent.js": +/*!*********************************!*\ + !*** ./src/js/cookieconsent.js ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var CookieConsent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! CookieConsent */ \"./node_modules/CookieConsent/build/cookieconsent.min.js\");\n/* harmony import */ var CookieConsent__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(CookieConsent__WEBPACK_IMPORTED_MODULE_0__);\nvar _this = undefined;\n\n\nvar cc = new (CookieConsent__WEBPACK_IMPORTED_MODULE_0___default())({\n //...options,\n palette: {\n popup: {\n background: \"#3c404d\",\n text: \"#d6d6d6\"\n },\n button: {\n background: \"#3e6d8c\",\n text: \"#d9f3ff\"\n }\n },\n theme: \"edgeless\",\n type: \"opt-in\",\n content: {\n message: \"This website uses cookies for Google Analytics, for pure statistics purposes.\",\n dismiss: 'Got it!',\n allow: 'Allow cookies',\n deny: 'Decline',\n link: 'Learn more',\n href: 'https://www.cookiesandyou.com',\n close: '❌',\n policy: 'Cookie Policy',\n target: '_blank'\n }\n}); // cc.on(\"initialized\", (...args) => console.log(args));\n\ncc.on(\"initialized\", function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n console.log(args);\n var type = _this.options.type;\n\n var didConsent = _this.hasConsented();\n\n if (type == 'opt-in' && didConsent) {// enable cookies\n }\n\n if (type == 'opt-out' && !didConsent) {// disable cookies\n }\n});\ncc.on(\"revokeChoice\", function () {\n console.log(\"Popup Reset\");\n var type = _this.options.type;\n\n if (type == 'opt-in') {// disable cookies\n }\n\n if (type == 'opt-out') {// enable cookies\n }\n});\ncc.on(\"statusChanged\", function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n console.log(args);\n var type = _this.options.type;\n\n var didConsent = _this.hasConsented();\n\n if (type == 'opt-in' && didConsent) {// enable cookies\n }\n\n if (type == 'opt-out' && !didConsent) {// disable cookies\n }\n});\ncc.on(\"error\", console.error);\ncc.on(\"popupOpened\", function () {\n return console.log(\"Popup Open\");\n});\ncc.on(\"popupClosed\", function () {\n return console.log(\"Popup Closed\");\n});\n\n//# sourceURL=webpack://hollow-knight-completion-check/./src/js/cookieconsent.js?"); + +/***/ }), + /***/ "./src/js/hk-database.js": /*!*******************************!*\ !*** ./src/js/hk-database.js ***! @@ -52,6 +73,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./src/css/cookieconsent.css": +/*!***********************************!*\ + !*** ./src/css/cookieconsent.css ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://hollow-knight-completion-check/./src/css/cookieconsent.css?"); + +/***/ }), + /***/ "./src/css/fontello.css": /*!******************************!*\ !*** ./src/css/fontello.css ***! @@ -210,6 +242,18 @@ eval("module.exports = __webpack_require__.p + \"img/thumbnail1200x628.jpg\";\n\ /******/ } /******/ /************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => module['default'] : +/******/ () => module; +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports @@ -275,7 +319,7 @@ eval("module.exports = __webpack_require__.p + \"img/thumbnail1200x628.jpg\";\n\ /*!*************************!*\ !*** ./src/js/index.js ***! \*************************/ -eval("/* global require */\n// CSS\n__webpack_require__(/*! ../css/fontello.css */ \"./src/css/fontello.css\");\n\n__webpack_require__(/*! ../css/simpleicon.css */ \"./src/css/simpleicon.css\");\n\n__webpack_require__(/*! ../css/style.css */ \"./src/css/style.css\"); // required for meta tags (social) to be visible by Webpack\n\n\n__webpack_require__(/*! ../img/thumbnail1200x628.jpg */ \"./src/img/thumbnail1200x628.jpg\"); // Instantly load test save file from .json (fast Debugging script)\n// require(\"./LoadJson.js\");\n// Load Save File for opening files, decoding, decryption\n\n\n__webpack_require__(/*! ./LoadSaveFile.js */ \"./src/js/LoadSaveFile.js\"); // Main script for analyzing the decoded save file and generating the page on the fly\n\n\n__webpack_require__(/*! ./HKCheckCompletion.js */ \"./src/js/HKCheckCompletion.js\");\n\n//# sourceURL=webpack://hollow-knight-completion-check/./src/js/index.js?"); +eval("/* global require */\n// Cookie Consent https://github.com/osano/cookieconsent\n__webpack_require__(/*! ./cookieconsent.js */ \"./src/js/cookieconsent.js\"); // CSS\n\n\n__webpack_require__(/*! ../css/cookieconsent.css */ \"./src/css/cookieconsent.css\");\n\n__webpack_require__(/*! ../css/fontello.css */ \"./src/css/fontello.css\");\n\n__webpack_require__(/*! ../css/simpleicon.css */ \"./src/css/simpleicon.css\");\n\n__webpack_require__(/*! ../css/style.css */ \"./src/css/style.css\"); // required for meta tags (social) to be visible by Webpack\n\n\n__webpack_require__(/*! ../img/thumbnail1200x628.jpg */ \"./src/img/thumbnail1200x628.jpg\"); // Instantly load test save file from .json (fast Debugging script)\n// require(\"./LoadJson.js\");\n// Load Save File for opening files, decoding, decryption\n\n\n__webpack_require__(/*! ./LoadSaveFile.js */ \"./src/js/LoadSaveFile.js\"); // Main script for analyzing the decoded save file and generating the page on the fly\n\n\n__webpack_require__(/*! ./HKCheckCompletion.js */ \"./src/js/HKCheckCompletion.js\");\n\n//# sourceURL=webpack://hollow-knight-completion-check/./src/js/index.js?"); })(); /******/ })() diff --git a/docs/main.css b/docs/main.css index 4aab023..0d18f57 100644 --- a/docs/main.css +++ b/docs/main.css @@ -1,3 +1,379 @@ +.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 +} @font-face { font-family: 'fontello'; src: url(data:application/vnd.ms-fontobject;base64,PBkAAJQYAAABAAIAAAAAAAIABQMAAAAAAAABAJABAAAAAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAi8fOhAAAAAAAAAAAAAAAAAAAAAAAABAAZgBvAG4AdABlAGwAbABvAAAADgBSAGUAZwB1AGwAYQByAAAAFgBWAGUAcgBzAGkAbwBuACAAMQAuADAAAAAQAGYAbwBuAHQAZQBsAGwAbwAAAAAAAAEAAAAPAIAAAwBwR1NVQiCLJXoAAAD8AAAAVE9TLzI+IFLkAAABUAAAAFZjbWFwF5O3DwAAAagAAAGyY3Z0IAAAAAAAAAncAAAADmZwZ21iLvl6AAAJ7AAADgxnYXNwAAAAEAAACdQAAAAIZ2x5ZjFTZqkAAANcAAACsmhlYWQbxGU1AAAGEAAAADZoaGVhB4QDngAABkgAAAAkaG10eBG2//8AAAZsAAAAFGxvY2EBQAHtAAAGgAAAAAxtYXhwAQAOcgAABowAAAAgbmFtZc2dGBkAAAasAAACzXBvc3QOhs7+AAAJfAAAAFZwcmVwfrY7tgAAF/gAAACcAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAEDiwGQAAUAAAJ6ArwAAACMAnoCvAAAAeAAMQECAAACAAUDAAAAAAAAAAAA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AQYxIwUDAAECTAAGBQEFBgGAAgEAAQMBAAOAAAUAAQAFAWcAAwQEA1kAAwMEXwAEAwRPIyg2FhQjIgcGHSsBNCYrATU0JisBIgYdASMiBhQfARYyPwE2BRQGByEiJjc0NjcnNDYzMhYXNjMyFhUUBx4BAsoKCH0KB2wHCn0ICgXEBRAFxAUBZXxa/aFnlAFOQgGodleQISg1O1QXSF4BTAgKxAgKCgjEChAFxAUFxAZ2WXwBkmhIfB4YdqhiUCNUOysiEXYAAAAAAgAA/7EDWQMLABQAJAAxQC4JAQIBAUwAAQACAAECgAAEAAABBABpAAIDAwJZAAICA18AAwIDTzU0FxQWBQYbKyUBNjQvASYiBwEnJiIPAQYUHwEWMgERFAYHISImNRE0NjchMhYBfgFXCws5CxwL/vt2Ch4KOQoKyAscAeZeQ/3pQ15eQwIXQ159AVcKHgo5Cwv++3YLCzkKHgrICgH3/ehCXgFgQQIYQl4BYAAAAAABAAAAAQAAhM7Hi18PPPUADwPoAAAAANw5EMoAAAAA3DkQyv///5IEMAMqAAAACAACAAAAAAAAAAEAAANS/2oAAAQv/////wQwAAEAAAAAAAAAAAAAAAAAAAAFA+gAAAKuAAADmAAABC///wNZAAAAAAAAAD4AlAECAVkAAQAAAAUANAADAAAAAAACABAAMACNAAAAWg4MAAAAAAAAABIA3gABAAAAAAAAADUAAAABAAAAAAABAAgANQABAAAAAAACAAcAPQABAAAAAAADAAgARAABAAAAAAAEAAgATAABAAAAAAAFAAsAVAABAAAAAAAGAAgAXwABAAAAAAAKACsAZwABAAAAAAALABMAkgADAAEECQAAAGoApQADAAEECQABABABDwADAAEECQACAA4BHwADAAEECQADABABLQADAAEECQAEABABPQADAAEECQAFABYBTQADAAEECQAGABABYwADAAEECQAKAFYBcwADAAEECQALACYByUNvcHlyaWdodCAoQykgMjAyMSBieSBvcmlnaW5hbCBhdXRob3JzIEAgZm9udGVsbG8uY29tZm9udGVsbG9SZWd1bGFyZm9udGVsbG9mb250ZWxsb1ZlcnNpb24gMS4w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0VYIyEbIVlZQiuwCGWwAyRQeLEFARVFWDBZLQBLuADIUlixAQGOWbABuQgACABjcLEAB0KxAAAqsQAHQrEACiqxAAdCsQAKKrEAB0K5AAAACyqxAAdCuQAAAAsquQADAABEsSQBiFFYsECIWLkAAwBkRLEoAYhRWLgIAIhYuQADAABEWRuxJwGIUVi6CIAAAQRAiGNUWLkAAwAARFlZWVlZsQAOKrgB/4WwBI2xAgBEswVkBgBERA==); diff --git a/package-lock.json b/package-lock.json index 187fd2b..6b7fe7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1937,12 +1937,6 @@ } } }, - "cookieconsent": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/cookieconsent/-/cookieconsent-3.1.1.tgz", - "integrity": "sha512-v8JWLJcI7Zs9NWrs8hiVldVtm3EBF70TJI231vxn6YToBGj0c9dvdnYwltydkAnrbBMOM/qX1xLFrnTfm5wTag==", - "dev": true - }, "core-js-compat": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz", diff --git a/package.json b/package.json index c404067..0744e8d 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "@babel/preset-env": "^7.12.11", "babel-loader": "^8.2.2", "clean-webpack-plugin": "^3.0.0", - "cookieconsent": "^3.1.1", "css-loader": "^5.0.1", "css-minimizer-webpack-plugin": "^1.2.0", "eslint": "^7.18.0", diff --git a/src/js/cookieconsent.min.js b/src/js/cookieconsent.min.js new file mode 100644 index 0000000..32f7e83 --- /dev/null +++ b/src/js/cookieconsent.min.js @@ -0,0 +1 @@ +!function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(i,o,function(t){return e[t]}.bind(null,o));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(1),o=n(16);const c=new(n.n(o).a);class s{constructor(e={},t={}){this.options=Object(i.j)(e,t),this.on=c.on.bind(c),this.emit=c.emit.bind(c)}}},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"k",function(){return l}),n.d(t,"e",function(){return u}),n.d(t,"l",function(){return d}),n.d(t,"d",function(){return p}),n.d(t,"m",function(){return h}),n.d(t,"a",function(){return f}),n.d(t,"h",function(){return m}),n.d(t,"g",function(){return b}),n.d(t,"f",function(){return g}),n.d(t,"c",function(){return v}),n.d(t,"i",function(){return y}),n.d(t,"j",function(){return k});var i=n(12),o=n(3),c=n(13),s=n(14),r=n(15);const a=i.a,l=i.b,u=(e,t)=>e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,(e,n)=>t(n)||""),d=(e,t)=>{let n=!1;return function(){n||(e(...arguments),n=!0,setTimeout(function(){n=!1},t))}},p=e=>{let t,n=0,i=0,o=e.length;if(0===e.length)return n;for(;i(t,[n,i])=>(t[n]=i instanceof Object&&!(i instanceof Array)?e[n]instanceof Object&&!(e[n]instanceof Array)?Object.entries(i).reduce(w(e[n]),{}):i:e.hasOwnProperty(n)?e[n]:i,t),k=(e,t)=>Object.entries(e).reduce(w(t),{})},function(e,t,n){"use strict";n.d(t,"e",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"b",function(){return c}),n.d(t,"d",function(){return s}),n.d(t,"a",function(){return r});const i=["DENY","ALLOW","DISMISS"],o="DENY",c="ALLOW",s="DISMISS",r=["UNCATEGORIZED","ESSENTIAL","PERSONALIZATION","ANALYTICS","MARKETING"]},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"a",function(){return o}),n.d(t,"c",function(){return c}),n.d(t,"b",function(){return s});const i=e=>"#"==e[0]?e.substr(1):3==e.length?e[0]+e[0]+e[1]+e[1]+e[2]+e[2]:e,o=e=>{return e=i(e),128<=(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3?"#000":"#fff"},c=e=>{const t=parseInt(i(e),16),n=38+(t>>16),o=38+(255&t>>8),c=38+(255&t);return"#"+(16777216+65536*(255>n?1>n?0:n:255)+256*(255>o?1>o?0:o:255)+(255>c?1>c?0:c:255)).toString(16).slice(1)},s=e=>(e=i(e),"000000"===e?"#222":c(e))},function(e,t,n){"use strict";n.r(t),function(e){var t=n(6),i=(n.n(t),n(11));"undefined"==typeof exports?window.CookieConsent=i.a:e.exports=i.a}.call(this,n(5)(e))},function(e){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){var i=n(7);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(9)(i,o),i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(8)(!1)).push([e.i,'.cc-window{opacity:1;-webkit-transition:opacity 1s ease;-moz-transition:opacity 1s ease;-ms-transition:opacity 1s ease;-o-transition:opacity 1s ease;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{-webkit-transition:transform 1s ease;-moz-transition:transform 1s ease;-ms-transition:transform 1s ease;-o-transition:transform 1s ease;transition:transform 1s ease}.cc-animate.cc-revoke.cc-top{transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-top{transform:translateY(0)}.cc-animate.cc-revoke.cc-active.cc-bottom{transform:translateY(0)}.cc-revoke:hover{transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;-webkit-transition:max-height 1s;-moz-transition:max-height 1s;-ms-transition:max-height 1s;-o-transition:max-height 1s;transition:max-height 1s}.cc-window,.cc-revoke{position:fixed;overflow:hidden;box-sizing:border-box;font-family:Helvetica, Calibri, Arial, sans-serif;font-size:16px;line-height:1.5em;display:flex;flex-wrap:nowrap;z-index:9998}.cc-revoke{z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;flex-direction:row}.cc-revoke{padding:0.5em}.cc-revoke:hover{text-decoration:underline}.cc-header{font-size:18px;font-weight:bold}.cc-btn,.cc-link,.cc-close,.cc-revoke{cursor:pointer}.cc-link{opacity:0.8;display:inline-block;padding:0.2em;text-decoration:underline}.cc-link:hover{opacity:1}.cc-link:active,.cc-link:visited{color:initial}.cc-btn{display:block;padding:0.4em 0.8em;font-size:0.9em;font-weight:bold;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:hover,.cc-highlight .cc-btn:first-child:focus{background-color:transparent;text-decoration:underline}.cc-close{display:block;position:absolute;top:0.5em;right:0.5em;font-size:1.6em;opacity:0.9;line-height:0.75}.cc-close:hover,.cc-close:focus{opacity:1}.cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:0.5em;border-bottom-right-radius:0.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:0.5em;border-top-right-radius:0.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{flex:1 0 auto}.cc-window.cc-banner{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;flex:1 1 auto;max-width:100%;margin-right:1em}.cc-compliance{display:flex;align-items:center;justify-content:space-between}.cc-floating .cc-compliance>.cc-btn{flex:1}.cc-btn+.cc-btn{margin-left:0.5em}.cc-window.cc-type-categories{display:inline-flex;flex-direction:column;overflow:visible}.cc-window.cc-type-categories .form{text-align:right}.cc-window.cc-type-categories .cc-btn{margin:0}.cc-window.cc-type-categories .cc-btn.cc-save{margin:0;display:inline-block}.cc-categories{display:inline-flex}.cc-categories .cc-category{display:flex;max-width:100%;margin:0 2px;position:relative}.cc-categories .cc-btn{border-right:none;outline:none;text-transform:capitalize}.cc-categories .cc-btn input[type=checkbox]{float:left;height:26px;width:calc( 100% - 22px);display:block;position:absolute;top:0;left:2px;cursor:pointer}.cc-categories .cc-btn:not(.cc-info):not(.cc-save){padding-left:26px}.cc-categories .cc-info{border-left:none;border-right:2px solid lightgrey;padding:4px;font-variant:all-small-caps}.cc-categories .cc-info:focus+.cc-tooltip{display:block}.cc-categories .cc-tooltip{display:none;position:absolute;z-index:3;width:190px;bottom:46px;padding:8px;border:thin solid lightgrey;box-shadow:1px 1px 4px rgba(150,150,150,0.7)}.cc-categories .cc-tooltip:after{content:"";width:10px;height:10px;transform:rotate(45deg);position:absolute;bottom:-7px;left:10px;box-shadow:2px 1px 1px rgba(200,200,200,0.5)}.cc-categories .cc-tooltip p{margin:0}@media print{.cc-window,.cc-revoke{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-right,.cc-window.cc-left{left:0;right:0}.cc-window.cc-banner{flex-direction:column;align-items:unset}.cc-window.cc-banner .cc-compliance{flex:1 1 auto}.cc-window.cc-banner .cc-message{margin-right:0;margin-bottom:1em}.cc-window.cc-floating{max-width:none}.cc-window.cc-type-categories{flex-direction:column}.cc-window .cc-message{margin-bottom:1em}.cc-window .cc-categories{flex-direction:column;width:100%;margin-right:8px}.cc-window .cc-category{margin:4px 0}.cc-window .cc-category .cc-btn:not(.cc-info){width:calc( 100% - 16px);min-width:140px}}@media screen and (max-width: 854px){.cc-window.cc-type-categories .cc-btn.cc-save{margin:8px 0}}@media screen and (max-width: 790px){.cc-window.cc-type-categories .cc-categories{display:flex;flex-direction:column}.cc-categories .cc-category{margin:4px 0}.form{width:100%;max-width:350px}.cc-btn:not(.cc-info):not(.cc-save){width:calc( 100% - 16px)}}.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;flex:none}.cc-theme-classic{overflow:visible;justify-content:space-between}.cc-theme-classic .cc-btn{position:relative;border-radius:5px;outline:none}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-theme-classic .cc-category .cc-btn{border-radius:5px 0 0 5px;padding-right:2px;padding-left:28px;font-weight:normal;border-right:none;box-sizing:border-box}.cc-theme-classic .cc-category .cc-btn input[type=checkbox]{position:absolute;left:0;top:-1px;width:100%;height:26px;opacity:0;cursor:pointer;z-index:1}.cc-theme-classic .cc-category .cc-btn input[type=checkbox]+.cc-btn-checkbox{display:block;font-size:2rem;position:absolute;top:2px;left:6px;z-index:0;outline:none}.cc-theme-classic .cc-category .cc-btn input[type=checkbox]+.cc-btn-checkbox:before{content:"\\1F5F5"}.cc-theme-classic .cc-category .cc-btn input[type=checkbox]:checked+.cc-btn-checkbox:after{content:"\\2713";position:absolute;top:-4px;left:0;font-size:2.3rem;text-shadow:0 1px 3px rgba(150,150,150,0.5)}.cc-theme-classic .cc-category .cc-btn.cc-info{margin:0;padding:0 4px;border-radius:0 5px 5px 0}.cc-theme-classic .cc-category .cc-btn:last-child{min-width:0}.cc-theme-classic .cc-category .cc-tooltip{border-radius:5px}.cc-theme-classic .cc-category .cc-tooltip:after{border-bottom:thin solid lightgrey;border-right:thin solid lightgrey}.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:0.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}.cc-window.cc-theme-edgeless.cc-type-categories .cc-categories .cc-btn{padding:0.4em 0.8em;padding-left:26px}.cc-window.cc-theme-edgeless.cc-type-categories .cc-categories .cc-btn.cc-info{padding:0.4em 4px}.cc-window.cc-theme-edgeless.cc-type-categories .cc-categories .cc-tooltip{border:none}\n',""])},function(e){"use strict";function t(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=function(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}(i),c=i.sources.map(function(e){return"/*# sourceURL=".concat(i.sourceRoot).concat(e," */")});return[n].concat(c).concat([o]).join("\n")}return[n].join("\n")}e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var i=t(n,e);return n[2]?"@media ".concat(n[2],"{").concat(i,"}"):i}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var i,o={},c=0;c{const t=this.options.cookie&&this.options.cookie.name?this.options.cookie.name:"cookieconsent_status_",n=Object(a.b)(t+e);return Object(a.h)(n)?{[e]:n}:void 0}).filter(e=>!!e&&e[Object.keys(e)[0]]);0this.emit("initialized",t)):this.options.legal&&this.options.legal.countryCode?this.initializationComplete({code:this.options.legal.countryCode}):this.options.location?new c.a(this.options.location).locate(this.initializationComplete.bind(this),this.initializationError.bind(this)):this.initializationComplete({})}initializationComplete(e){e.code&&(this.options=new o.a(this.options.legal).applyLaw(this.options,e.code)),this.popup=new s.a(this.options),setTimeout(()=>this.emit("initialized",this.popup),0)}initializationError(e){setTimeout(()=>this.emit("error",e,new s.a(this.options)),0)}getCountryLaws(e){return new o.a(this.options.legal).get(e)}isOpen(){return this.popup.isOpen()}close(){return this.popup.close(),this}revokeChoice(){return this.popup.revokeChoice(),this}open(){return this.popup.open(),this}toggleRevokeButton(e){return this.popup.toggleRevokeButton(e),this}setStatuses(e){return this.popup.setStatuses(e),this}clearStatuses(){return this.popup.clearStatuses(),this}destroy(){return this.popup.destroy(),this}}r.e.reduce((e,t)=>(Object.defineProperty(l,t,{get:function(){return t},set:function(){},enumerable:!1,writeable:!1,configurable:!1}),e),l)},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});const i=e=>{const t=(" "+document.cookie).split(" "+e+"=");return 2>t.length?void 0:t.pop().split(";").shift()},o=function(e,t,n,i,o,c){const s=new Date;s.setHours(s.getHours()+24*("number"==typeof n?n:365)),document.cookie=e+"="+t+";expires="+s.toUTCString()+";path="+(o||"/")+(i?";domain="+i:"")+(c?";secure":"")}},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return c});var i=n(3);const o=(e,t)=>e&&e.parentNode?e.classList.contains(t)?e:o(e.parentNode,t):null,c=(e,t,n)=>{const o={},{popup:c,button:s,highlight:r,saveButton:a}=t;c&&(c.text=c.text?c.text:Object(i.a)(c.background),c.link=c.link?c.link:c.text,o[n+" .cc-tooltip, "+n+" .cc-tooltip:after"]=["color: "+c.text,"background-color: "+c.background],o[n+".cc-window"]=["color: "+c.text,"background-color: "+c.background],o[n+".cc-revoke"]=["color: "+c.text,"background-color: "+c.background],o[n+" .cc-link,"+n+" .cc-link:active,"+n+" .cc-link:visited"]=["color: "+c.link],s&&(s.text=s.text?s.text:Object(i.a)(s.background),s.border=s.border?s.border:"transparent",o[n+" .cc-btn"]=["color: "+s.text,"border-color: "+s.border,"background-color: "+s.background],s.padding&&o[n+" .cc-btn"].push("padding: "+s.padding),"transparent"!=s.background&&(o[n+" .cc-btn:hover, "+n+" .cc-btn:focus"]=["background-color: "+(s.hover||Object(i.b)(s.background))]),r?(r.text=r.text?r.text:Object(i.a)(r.background),r.border=r.border?r.border:"transparent",o[n+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text,"border-color: "+r.border,"background-color: "+r.background]):o[n+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text]),a&&(o[`${n} .cc-btn.cc-save`]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background]));const l=document.createElement("style");return l.id=e,document.head.appendChild(l),Object.entries(o).forEach(([e,t],n)=>l.sheet.insertRule(`${e}{${t.join(";")}}`,n)),l}},function(e,t,n){"use strict";n.d(t,"c",function(){return o}),n.d(t,"a",function(){return c}),n.d(t,"b",function(){return s});var i=n(2);const o=e=>0<=i.e.indexOf(e),c=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),s=e=>"object"==typeof e&&null!==e&&e.constructor==Object},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});const i=(e,t,n)=>{let i;const o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=s.onload=function(){const e=o.readyState;clearTimeout(i),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),i=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},n)},o=(e,t,n,i,o)=>{const c=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(c.open(i?"POST":"GET",e,1),c.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(let e=0,t=o.length;ec&&!r.warned){r.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=r.length,console}return e}function o(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;te||d(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");p=e}}),t.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||d(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},t.prototype.getMaxListeners=function(){return n(this)},t.prototype.emit=function(e){for(var t=[],n=1;no)return this;0===o?n.shift():function(e,t){for(;t+1{let i=n?n.responseText:"";e.__JSONP_DATA&&(i=e.__JSONP_DATA,delete e.__JSONP_DATA),this.runServiceCallback.call(this,t,e,i)},this.options.timeout,e.data,e.headers)}}runServiceCallback(e,t,n){const i=t.callback(t=>{i||this.onServiceResult(e,t)},n);i&&this.onServiceResult(e,i)}onServiceResult(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)}runNextServiceOnError(e,t){if(e){this.logError(e);const t=this.getNextService();t?this.runService(t,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)}getCurrentServiceOpts(){const e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}:"function"==typeof e?e():Object(c.g)(e)?e:{}}completeService(e,t){this.currentServiceIndex=-1,e&&e(t)}logError(){}}},function(e,t){"use strict";const n=e=>new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error);t.a={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{const i=JSON.parse(t);return i.error?n(i):{code:i.country}}catch(e){return n({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{const i=JSON.parse(t);return"ERROR"==i.statusCode?n({error:i.statusMessage}):{code:i.countryCode}}catch(e){return n({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){return window.geoip2?void geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(n(t))}},function(t){e(n(t))}):void e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(0),o=n(22),c=n(2),s=n(1);class r extends i.a{constructor(e){super(o.a,e),this.userCategories={UNCATEGORIZED:"DISMISS",ESSENTIAL:"ALLOW",PERSONALIZATION:"DISMISS",ANALYTICS:"DISMISS",MARKETING:"DISMISS"},this.customStyles={},this.hasTransition=!!function(){const e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(let n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n+"ransition"])return t[n];return""}(),this.canUseCookies()&&(this.options.enabled=!1),this.options.blacklistPage.includes(location.pathname)&&(this.options.enabled=!1),this.options.whitelistPage.includes(location.pathname)&&(this.options.enabled=!0);let t=this.options.window.replace("{{classes}}",this.getPopupClasses().join(" ")).replace("{{children}}",this.getPopupInnerMarkup());const n=this.options.overrideHTML;if("string"==typeof n&&n.length&&(t=n),this.options.static){const e=this.appendMarkup(`
${t}
`);e.style.display="",this.element=e.firstChild,this.element.style.display="none",this.element.classList.add("cc-invisible")}else this.element=this.appendMarkup(t);this.applyAutoDismiss(),this.applyRevokeButton(),this.options.autoOpen&&this.autoOpen()}open(){if(this.element)return this.isOpen()||(this.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.emit("popupOpened")),this}close(e){if(this.element)return this.isOpen()&&(this.hasTransition?this.fadeOut():this.element.style.display="none",e&&this.options.revokable&&this.toggleRevokeButton(!0),this.emit("popupClosed")),this}fadeIn(){const e=this.element;this.hasTransition&&e&&(this.afterTransition&&this.afterFadeOut(e),e.classList.contains("cc-invisible"))&&(e.style.display="",this.options.static&&(this.element.parentNode.style.maxHeight=this.element.clientHeight+"px"),this.openingTimeout=setTimeout(()=>this.afterFadeIn(e),20))}afterFadeIn(e){this.openingTimeout=null,e.classList.remove("cc-invisible")}fadeOut(){this.hasTransition&&this.element&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),this.afterFadeIn(this.element)),!this.element.classList.contains("cc-invisible")&&(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=()=>this.afterFadeOut(this.element),this.element.addEventListener(this.transitionEnd,this.afterTransition),this.element.classList.add("cc-invisible")))}afterFadeOut(e){e.style.display="none",e.removeEventListener(this.transitionEnd,this.afterTransition),this.afterTransition=null}isOpen(){return this.element&&""===this.element.style.display&&(!this.hasTransition||!this.element.classList.contains("cc-invisible"))}toggleRevokeButton(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")}revokeChoice(e){this.options.enabled=!0,this.clearStatuses(),this.emit("revokeChoice"),e||this.autoOpen()}hasAnswered(){return this.getStatuses().some(e=>!!e)}hasConsented(){return this.getStatuses().map(e=>e===c.b||e===c.d)}autoOpen(){const e=this.hasAnswered();!e&&this.options.enabled?this.open():e&&this.options.revokable&&this.toggleRevokeButton(!0)}setStatuses(){const{name:e,expiryDays:t,domain:n,path:i,secure:o}=this.options.cookie,r=(r,a)=>{if(Object(s.h)(a)){const l=e+"_"+r,u=0<=c.e.indexOf(Object(s.b)(l));Object(s.k)(l,a,t,n,i,o),this.emit("statusChanged",l,a,u)}else this.clearStatuses()};0===arguments.length?c.a.forEach(e=>r(e,this.userCategories[e])):1===arguments.length?c.a.forEach(e=>r(e,arguments[0])):1{r(this.userCategories[t],e)})}getStatuses(){return c.a.map(e=>Object(s.b)(this.options.cookie.name+"_"+e))}clearStatuses(){const{name:e,domain:t,path:n}=this.options.cookie;c.a.forEach(i=>{Object(s.k)(e+"_"+i,"",-1,t,n)})}canUseCookies(){if(!window.navigator.cookieEnabled||window.CookiesOK||window.navigator.CookiesOK)return!0;const e=this.getStatuses(),t=0({[c.a[t]]:Object(s.h)(e)})).filter(e=>e[Object.keys(e)[0]]).length;return e.forEach((e,t)=>this.userCategories[c.a[t]]===e?e:this.userCategories[c.a[t]]),t}getPositionClasses(){return this.options.position.split("-").map(e=>"cc-"+e)}getPopupClasses(){const e=this.options;let t="top"==e.position||"bottom"==e.position?"banner":"floating";Object(s.f)()&&e.mobileForceFloat&&(t="floating");const n=["cc-"+t,"cc-type-"+e.type,"cc-theme-"+e.theme];return e.static&&n.push("cc-static"),n.push.apply(n,this.getPositionClasses()),this.attachCustomPalette(this.options.palette),this.customStyleSelector&&n.push(this.customStyleSelector),n}getPopupInnerMarkup(){const e={},t=this.options;t.showLink||(t.elements.link="",t.elements.messagelink=t.elements.message),Object.keys(t.elements).forEach(n=>{e[n]=Object(s.e)(t.elements[n],e=>{const n=t.content[e];return e&&"string"==typeof n&&n.length?n:""})});let n=t.compliance[t.type];n||(n=t.compliance.info),e.compliance=Object(s.e)(n,t=>e[t]);let i=t.layouts[t.layout];return i||(i=t.layouts.basic),Object(s.e)(i,t=>e[t])}appendMarkup(e){const t=this.options,n=document.createElement("div"),i=t.container&&1===t.container.nodeType?t.container:document.body;n.innerHTML=e;const o=n.children[0];if(o.style.display="none",o.classList.contains("cc-window")&&this.hasTransition&&o.classList.add("cc-invisible"),o.addEventListener("click",e=>this.handleButtonClick(e)),o.querySelectorAll('.cc-btn [type="checkbox"]').forEach(e=>{e.addEventListener("change",()=>{this.userCategories[e.name]=e.checked?"ALLOW":"DENY"}),e.addEventListener("click",e=>e.stopPropagation())}),o.querySelectorAll(".cc-info").forEach(e=>{e.addEventListener("mousedown",function(e){this===document.activeElement&&(this.blur(),e.preventDefault())})}),t.autoAttach)try{i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o)}catch(e){throw new Error("No container to attach too. Make sure the DOM has loaded. Is your script loaded just before the `` tag?")}return o}handleButtonClick(e){const t=Object(s.m)(e.target,"cc-btn")||e.target;if(t.classList.contains("cc-btn")&&t.classList.contains("cc-save"))return this.setStatuses(),void this.close(!0);if(!t.classList.contains("cc-btn"))return t.classList.contains("cc-close")?(this.setStatuses(c.d),void this.close(!0)):t.classList.contains("cc-revoke")?void this.revokeChoice():void 0;{const e=t.className.match(new RegExp("\\bcc-("+c.e.map(e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).join("|")+")\\b")),n=e&&e[1]||!1;n&&(this.setStatuses(n),this.close(!0))}}attachCustomPalette(e){const t=Object(s.d)(JSON.stringify(e)),n="cc-color-override-"+t,i=Object(s.g)(e);return this.customStyleSelector=i?n:null,i&&Object(s.a)(t,e,"."+n),i}getEventPath(e){const t=e.composedPath?e.composedPath():function(e,t){for(;t;)e.push(t),t=t.parentNode;return e}([],e.target);return t||void 0}applyAutoDismiss(){var e=Math.floor;const{enabled:t,dismissOnTimeout:n,dismissOnScroll:i,dismissOnLinkClick:o,dismissOnWindowClick:s,dismissOnKeyPress:r}=this.options;t&&("number"==typeof n&&0<=n?this.dismissTimeout=setTimeout(()=>{this.setStatuses(c.d),this.close(!0)},e(n)):"number"==typeof i&&0<=i?(this.onWindowScroll=()=>{window.pageYOffset>e(i)&&(this.setStatuses(c.d),this.close(!0),window.removeEventListener("scroll",this.onWindowScroll,{passive:!0}),this.onWindowScroll=null)},window.addEventListener("scroll",this.onWindowScroll,{passive:!0})):s?(this.onWindowClick=e=>{getEventPath(e).some(e=>this.options.ignoreClicksFrom.some(t=>e.classList&&e.classList.contains(t)))||(this.setStatuses(c.d),this.close(!0),window.removeEventListener("click",this.onWindowClick),window.removeEventListener("touchend",this.onWindowClick),this.onWindowClick=null)},window.addEventListener("click",this.onWindowClick),window.addEventListener("touchend",this.onWindowClick)):o?(this.onLinkClick=e=>{getEventPath(e).some(e=>void 0!==e.tagName&&"A"===e.tagName)&&(this.setStatuses(c.d),this.close(!0),window.removeEventListener("click",this.onLinkClick),this.onLinkClick=null)},window.addEventListener("click",this.onLinkClick)):r&&(this.onKeyPress=e=>{const{keyCode:t}=e;13===t?(this.setStatuses(c.b),this.close(!0)):27===t&&(this.setStatuses(c.d),this.close(!0))},window.addEventListener("onkeypress",this.onKeyPress)))}applyRevokeButton(){if("info"!=this.options.type&&(this.options.revokable=!0),Object(s.f)()&&(this.options.animateRevokable=!1),this.options.revokable){const e=this.getPositionClasses();this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector),this.options.theme&&e.push("cc-theme-"+this.options.theme);const t=this.options.revokeBtn.replace("{{classes}}",e.join(" ")).replace("{{policy}}",this.options.content.policy);this.revokeBtn=this.appendMarkup(t);const n=this.revokeBtn;if(this.options.animateRevokable){const e=Object(s.l)(function(e){let t=!1;const i=window.innerHeight-20;(n.classList.contains("cc-top")&&e.clientY<20||n.classList.contains("cc-bottom")&&e.clientY>i)&&(t=!0),t&&!n.classList.contains("cc-active")?n.classList.add("cc-active"):!t&&n.classList.contains("cc-active")&&n.classList.remove("cc-active")},200);this.onMouseMove=e,window.addEventListener("mousemove",e)}}}destroy(){this.element&&this.element.remove(),this.revokeBtn&&this.revokeBtn.remove(),this.onWindowScroll&&window.removeEventListener("scroll",this.onWindowScroll),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),window.removeEventListener("touchend",this.onWindowClick)),this.onLinkClick&&window.removeEventListener("click",this.onLinkClick),this.onKeyPress&&window.addEventListener("onkeypress",this.onKeyPress)}}},function(e,t,n){"use strict";var i=n(2);t.a={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"localhost",expiryDays:365,secure:!1},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:"❌",target:"_blank",policy:"Cookie Policy"},elements:{header:'{{header}} ',message:'{{message}}',messagelink:'{{message}} {{link}}',dismiss:`{{dismiss}}`,allow:`{{allow}}`,deny:`{{deny}}`,link:'{{link}}',close:'{{close}}',categories:'
    '+i.a.map((e,t)=>`
  • This is the category for cookies that don't fit the '${e.toLowerCase()}' category.

  • `).join("")+"
",save:''},window:'',modal:"",revokeBtn:'
{{policy}}
',compliance:{info:'
{{dismiss}}
',"opt-in":'
{{dismiss}}{{allow}}{{customize}}
',"opt-out":'
{{dismiss}}{{deny}}
',categories:'
{{categories}}{{save}}
'},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,dismissOnLinkClick:!1,dismissOnKeyPress:!1,ignoreClicksFrom:["cc-revoke","cc-btn","cc-link"],autoOpen:!0,autoAttach:!0,mobileForceFloat:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null}}]); \ No newline at end of file diff --git a/src/js/cookieconsent.js b/src/js/cookies.js similarity index 94% rename from src/js/cookieconsent.js rename to src/js/cookies.js index a75717a..8478751 100644 --- a/src/js/cookieconsent.js +++ b/src/js/cookies.js @@ -1,4 +1,5 @@ -import CC from "CookieConsent"; +// Cookie Consent https://github.com/osano/cookieconsent +import CC from "./cookieconsent.min.js"; const cc = new CC({ //...options, diff --git a/src/js/index.js b/src/js/index.js index b589178..86cc555 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1,7 +1,7 @@ /* global require */ -// Cookie Consent https://github.com/osano/cookieconsent -require("./cookieconsent.js"); +// Handle cookies +require("./cookies.js"); // CSS require("../css/cookieconsent.css");