From 5a3a83351b93b15ab46370b17e8631fc0943657b Mon Sep 17 00:00:00 2001 From: Marco Monti Date: Tue, 25 Jun 2024 12:46:08 +0200 Subject: [PATCH 1/2] COC-33 | Added new option on the config object to fully customize CSS, updated Readme --- build/cookieconsent.js | 175 +++++++++++++++++--- build/cookieconsent.min.js | 2 +- docs_src/src/assets/js/cookieconsent.min.js | 2 +- package.json | 2 +- readme.md | 8 + src/lib/Configuration.js | 1 + src/lib/Interface.js | 14 +- 7 files changed, 174 insertions(+), 30 deletions(-) diff --git a/build/cookieconsent.js b/build/cookieconsent.js index 6f332b9..0377428 100644 --- a/build/cookieconsent.js +++ b/build/cookieconsent.js @@ -1021,32 +1021,93 @@ class Interface { constructor() { this.elements = {}; } - buildStyle() { - return el('style', '#cconsent-bar, #cconsent-bar * { box-sizing:border-box }', '#cconsent-bar .visually-hide, #cconsent-modal .visually-hide { position: absolute !important; overflow: hidden !important; clip: rect(1px 1px 1px 1px) !important; clip: rect(1px, 1px, 1px, 1px) !important;width: 1px !important; height: 1px !important; }', '#cconsent-bar { background-color:' + window.CookieConsent.config.theme.barColor + '; color:' + window.CookieConsent.config.theme.barTextColor + '; padding:15px; text-align:right; font-family:sans-serif; font-size:14px; line-height:18px; position:fixed; bottom:0; left:0; width:100%; z-index:9998; transform: translateY(0); transition: transform .6s ease-in-out; transition-delay: .3s;}', '#cconsent-bar.ccb--hidden {transform: translateY(100%); display:block; visible:hidden;}', '#cconsent-bar .ccb__wrapper { display:flex; flex-wrap:wrap; justify-content:space-between; max-width:1800px; margin:0 auto;}', '#cconsent-bar .ccb__left { align-self:center; text-align:left; margin: 15px 0;}', '#cconsent-bar .ccb__right { align-self:center; white-space: nowrap;}', '#cconsent-bar .ccb__right > div {display:inline-block; color:#FFF;}', '#cconsent-bar button { line-height:normal; font-size:14px; border:0; padding:10px 10px; color:' + window.CookieConsent.config.theme.barMainButtonTextColor + '; background-color:' + window.CookieConsent.config.theme.barMainButtonColor + ';}', '#cconsent-bar button.consent-give { line-height:normal; font-size:14px; border:none; padding:10px 10px; color:' + window.CookieConsent.config.theme.barMainButtonTextColor + '; background-color:' + window.CookieConsent.config.theme.barMainButtonColor + ';}', '#cconsent-bar button.consent-decline { line-height:normal; font-size:14px; border:none; padding:10px 10px; color:' + window.CookieConsent.config.theme.barMainButtonColor + '; background-color:' + window.CookieConsent.config.theme.barMainButtonTextColor + '; margin-right: 10px; border: 1px solid ' + window.CookieConsent.config.theme.barMainButtonColor + '}', '#cconsent-bar button.ccb__edit { -moz-appearance:none; -webkit-appearance:none; appearance:none; margin-right:15px; border:0; padding:0; text-decoration:underline; color:' + window.CookieConsent.config.theme.barTextColor + '; background:none; }', '#cconsent-bar a:hover, #cconsent-bar button:hover { cursor:pointer; }', '#cconsent-modal, #cconsent-init-modal { display:none; font-size:14px; line-height:18px; color:#666; width: 100vw; height: 100vh; position:fixed; left:0; top:0; right:0; bottom:0; font-family:sans-serif; font-size:14px; background-color:rgba(0,0,0,0.6); z-index:9999; align-items:center; justify-content:center;}', '@media (max-width: 600px) { #cconsent-modal, #cconsent-init-modal { height: 100% } }', '#cconsent-modal button, #cconsent-init-modal button { border: 0 }', '#cconsent-modal h2, #cconsent-init-modal h2, #cconsent-modal h3, #cconsent-init-modal h3 {color:#333; margin-top:0}', '#cconsent-modal.ccm--visible, #cconsent-init-modal.ccm--visible {display:flex}', '#cconsent-modal .ccm__content, #cconsent-init-modal .ccm__content { max-width:600px; max-height:600px; overflow-Y:auto; background-color:#EFEFEF; display:flex; flex-direction:column; justify-content:space-between; }', '@media (max-width: 600px) { #cconsent-modal .ccm__content, #cconsent-init-modal .ccm__content { max-width:100vw; height:100%; max-height:initial; }}', '#cconsent-modal .ccm__content > .ccm__content__heading, #cconsent-init-modal .ccm__content > .ccm__content__heading { border-bottom:1px solid #D8D8D8; padding:35px 35px 20px; background-color:#EFEFEF; position:relative; }', '#cconsent-modal .ccm__content > .ccm__content__heading h2, #cconsent-init-modal .ccm__content > .ccm__content__heading h2 { font-size:21px; font-weight:600; color:#333; margin:0 }', '#cconsent-modal .ccm__content > .ccm__content__heading p, #cconsent-init-modal .ccm__content > .ccm__content__heading p { margin-top:1rem; margin-bottom:1rem; }', '#cconsent-modal .ccm__content > .ccm__content__heading .ccm__cheading__close, #cconsent-init-modal .ccm__content > .ccm__content__heading .ccm__cheading__close { -moz-appearance:none; -webkit-appearance:none; appearance:none; padding:0; border:0; font-weight:600; color:#888; cursor:pointer; font-size:26px; position:absolute; right:15px; top:15px; width:26px; height:26px; background:none; text-align:center; }', '#cconsent-modal .ccm__content > .ccm__content__heading .ccm__cheading__close:focus-visible, #cconsent-init-modal .ccm__content > .ccm__content__heading .ccm__cheading__close:focus-visible { box-shadow: 0 0 0 0.25rem ' + window.CookieConsent.config.theme.focusColor + '; }', '#cconsent-modal .ccm__content > .ccm__content__body { background-color:#FFF; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup { margin:0; border-bottom: 1px solid #D8D8D8; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head {color:#333; font-weight:600; cursor:pointer; position:relative; padding:0; margin:0; transition: background-color .5s ease-out; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head:hover { background-color:#F9F9F9 }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status { order: 1; position:absolute; left:35px; font-weight: 600; display:inline-block; margin-right: 20px; pointer-events: none; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status.ccm__tab-head__status--checked { font-size:1em; color:#28a834; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status.ccm__tab-head__status--unchecked { font-size:1.4em; color:#e56385; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__text { order: 2; pointer-events: none; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-head .ccm__tab-head__icon-wedge { transition: transform .3s ease-out; transform-origin: center; position:absolute;right:25px; top:50%; transform:rotate(0deg); transform:translateY(-50%); order: 3;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-head .ccm__tab-head__icon-wedge > svg { pointer-events: none; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-head .ccm__tab-head__icon-wedge { transform:translateY(-50%) rotate(-180deg) }', '#cconsent-modal .ccm__tab-trigger { appearance: none; background: none; display: flex; flex-direction: row; width: 100%; padding:17px 35px 17px 56px; color:#333; font-weight:600; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content {padding:0; margin:0}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-content { max-height: 0; overflow: hidden; opacity: 0; transition: all .5s ease-out; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-content__inner { display: flex; flex-direction: row; padding:25px 35px; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-head { background-color:#f9f9f9 }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-content { max-height: 900px; opacity: 1; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose {order:1;}', '@media (max-width: 600px) { #cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-content {flex-direction:column} }', '@media (max-width: 600px) { #cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose { margin-bottom:20px; } }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-component {display:flex; margin-right:35px; align-items:center;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__status {font-weight:600;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group {background:none; width:40px; height:20px; margin:0 10px; position:relative;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__slider {position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; border-radius:10px; -webkit-transition: .4s; transition: .4s; pointer-events: none;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__slider:before {position: absolute; content: ""; height: 12px; width: 12px; left: 4px; bottom: 4px; background-color: white; border-radius:50%; -webkit-transition: .4s; transition: .4s;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group[aria-checked="true"] .ccm__switch__slider {background-color: #28A834;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group:focus-visible {box-shadow: 0 0 0 2px' + window.CookieConsent.config.theme.focusColor + ';}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group[aria-checked="true"] .ccm__switch__slider:before {-webkit-transform: translateX(20px); -ms-transform: translateX(20px); transform: translateX(20px);}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__desc {order:2;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content h3 {font-size:18px; margin-bottom:10px; line-height:1;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content p {color:#444; margin-bottom:0}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list:not(:empty) {margin-top:30px;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list .ccm__list__title {color:#333; font-weight:600;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list ul { margin:15px 0; padding-left:15px }', '#cconsent-modal .ccm__footer, #cconsent-init-modal .ccm__footer { padding:35px; background-color:#EFEFEF; text-align:center; display: flex; align-items:center; justify-content:flex-end; }', '#cconsent-modal .ccm__footer button, #cconsent-init-modal .ccm__footer button { line-height:normal; font-size:14px; transition: background-color .5s ease-out; background-color:' + window.CookieConsent.config.theme.modalMainButtonColor + '; color:' + window.CookieConsent.config.theme.modalMainButtonTextColor + '; border:none; padding:13px; min-width:110px; border-radius: 2px; cursor:pointer; height: 100%; }', '#cconsent-modal .ccm__footer button:hover, #cconsent-init-modal .ccm__footer button:hover { background-color:' + Utilities.lightenDarkenColor(window.CookieConsent.config.theme.modalMainButtonColor, -20) + '; }', '#cconsent-modal .ccm__footer button + button, #cconsent-init-modal .ccm__footer button + button { margin-left: 10px; }'); - } - buildBar() { - return el('div#cconsent-bar.ccb--hidden', el(`div.ccb__wrapper`, el('div.ccb__left', el('div.cc-text', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barMainText'))), el('div.ccb__right', el('div.ccb__button', el('button.ccb__edit', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barLinkSetting'), { - 'aria-hidden': 'true', - tabindex: '-1' - }), window.CookieConsent.config.showRejectAllButton && el('button.consent-decline', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barBtnRejectAll'), { - 'aria-hidden': 'true', - tabindex: '-1' - }), el('button.consent-give', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barBtnAcceptAll'), { - 'aria-hidden': 'true', - tabindex: '-1' - })))), { - role: 'region', - 'aria-label': Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'cookieBarLabel'), - 'aria-hidden': 'true', - tabindex: '-1' - }); - } - buildModal() { - // Cookie names list middleware - var listCookies = function (category) { - var list = []; - for (let service in window.CookieConsent.config.services) { - window.CookieConsent.config.services[service].category === category && list.push(window.CookieConsent.config.services[service]); + Interface_createClass(Interface, [{ + key: "buildStyle", + value: function buildStyle() { + return el('style', '#cconsent-bar, #cconsent-bar * { box-sizing:border-box }', '#cconsent-bar .visually-hide, #cconsent-modal .visually-hide { position: absolute !important; overflow: hidden !important; clip: rect(1px 1px 1px 1px) !important; clip: rect(1px, 1px, 1px, 1px) !important;width: 1px !important; height: 1px !important; }', '#cconsent-bar { background-color:' + window.CookieConsent.config.theme.barColor + '; color:' + window.CookieConsent.config.theme.barTextColor + '; padding:15px; text-align:right; font-family:sans-serif; font-size:14px; line-height:18px; position:fixed; bottom:0; left:0; width:100%; z-index:9998; transform: translateY(0); transition: transform .6s ease-in-out; transition-delay: .3s;}', '#cconsent-bar.ccb--hidden {transform: translateY(100%); display:block; visible:hidden;}', '#cconsent-bar .ccb__wrapper { display:flex; flex-wrap:wrap; justify-content:space-between; max-width:1800px; margin:0 auto;}', '#cconsent-bar .ccb__left { align-self:center; text-align:left; margin: 15px 0;}', '#cconsent-bar .ccb__right { align-self:center; white-space: nowrap;}', '#cconsent-bar .ccb__right > div {display:inline-block; color:#FFF;}', '#cconsent-bar button { line-height:normal; font-size:14px; border:0; padding:10px 10px; color:' + window.CookieConsent.config.theme.barMainButtonTextColor + '; background-color:' + window.CookieConsent.config.theme.barMainButtonColor + ';}', '#cconsent-bar button.consent-give { line-height:normal; font-size:14px; border:none; padding:10px 10px; color:' + window.CookieConsent.config.theme.barMainButtonTextColor + '; background-color:' + window.CookieConsent.config.theme.barMainButtonColor + ';}', '#cconsent-bar button.consent-decline { line-height:normal; font-size:14px; border:none; padding:10px 10px; color:' + window.CookieConsent.config.theme.barMainButtonColor + '; background-color:' + window.CookieConsent.config.theme.barMainButtonTextColor + '; margin-right: 10px; border: 1px solid ' + window.CookieConsent.config.theme.barMainButtonColor + '}', '#cconsent-bar button.ccb__edit { -moz-appearance:none; -webkit-appearance:none; appearance:none; margin-right:15px; border:0; padding:0; text-decoration:underline; color:' + window.CookieConsent.config.theme.barTextColor + '; background:none; }', '#cconsent-bar a:hover, #cconsent-bar button:hover { cursor:pointer; }', '#cconsent-modal, #cconsent-init-modal { display:none; font-size:14px; line-height:18px; color:#666; width: 100vw; height: 100vh; position:fixed; left:0; top:0; right:0; bottom:0; font-family:sans-serif; font-size:14px; background-color:rgba(0,0,0,0.6); z-index:9999; align-items:center; justify-content:center;}', '@media (max-width: 600px) { #cconsent-modal, #cconsent-init-modal { height: 100% } }', '#cconsent-modal button, #cconsent-init-modal button { border: 0 }', '#cconsent-modal h2, #cconsent-init-modal h2, #cconsent-modal h3, #cconsent-init-modal h3 {color:#333; margin-top:0}', '#cconsent-modal.ccm--visible, #cconsent-init-modal.ccm--visible {display:flex}', '#cconsent-modal .ccm__content, #cconsent-init-modal .ccm__content { max-width:600px; max-height:600px; overflow-Y:auto; background-color:#EFEFEF; display:flex; flex-direction:column; justify-content:space-between; }', '@media (max-width: 600px) { #cconsent-modal .ccm__content, #cconsent-init-modal .ccm__content { max-width:100vw; height:100%; max-height:initial; }}', '#cconsent-modal .ccm__content > .ccm__content__heading, #cconsent-init-modal .ccm__content > .ccm__content__heading { border-bottom:1px solid #D8D8D8; padding:35px 35px 20px; background-color:#EFEFEF; position:relative; }', '#cconsent-modal .ccm__content > .ccm__content__heading h2, #cconsent-init-modal .ccm__content > .ccm__content__heading h2 { font-size:21px; font-weight:600; color:#333; margin:0 }', '#cconsent-modal .ccm__content > .ccm__content__heading p, #cconsent-init-modal .ccm__content > .ccm__content__heading p { margin-top:1rem; margin-bottom:1rem; }', '#cconsent-modal .ccm__content > .ccm__content__heading .ccm__cheading__close, #cconsent-init-modal .ccm__content > .ccm__content__heading .ccm__cheading__close { -moz-appearance:none; -webkit-appearance:none; appearance:none; padding:0; border:0; font-weight:600; color:#888; cursor:pointer; font-size:26px; position:absolute; right:15px; top:15px; width:26px; height:26px; background:none; text-align:center; }', '#cconsent-modal .ccm__content > .ccm__content__heading .ccm__cheading__close:focus-visible, #cconsent-init-modal .ccm__content > .ccm__content__heading .ccm__cheading__close:focus-visible { box-shadow: 0 0 0 0.25rem ' + window.CookieConsent.config.theme.focusColor + '; }', '#cconsent-modal .ccm__content > .ccm__content__body { background-color:#FFF; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup { margin:0; border-bottom: 1px solid #D8D8D8; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head {color:#333; font-weight:600; cursor:pointer; position:relative; padding:0; margin:0; transition: background-color .5s ease-out; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head:hover { background-color:#F9F9F9 }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status { order: 1; position:absolute; left:35px; font-weight: 600; display:inline-block; margin-right: 20px; pointer-events: none; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status.ccm__tab-head__status--checked { font-size:1em; color:#28a834; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status.ccm__tab-head__status--unchecked { font-size:1.4em; color:#e56385; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__text { order: 2; pointer-events: none; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-head .ccm__tab-head__icon-wedge { transition: transform .3s ease-out; transform-origin: center; position:absolute;right:25px; top:50%; transform:rotate(0deg); transform:translateY(-50%); order: 3;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-head .ccm__tab-head__icon-wedge > svg { pointer-events: none; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-head .ccm__tab-head__icon-wedge { transform:translateY(-50%) rotate(-180deg) }', '#cconsent-modal .ccm__tab-trigger { appearance: none; background: none; display: flex; flex-direction: row; width: 100%; padding:17px 35px 17px 56px; color:#333; font-weight:600; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content {padding:0; margin:0}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-content { max-height: 0; overflow: hidden; opacity: 0; transition: all .5s ease-out; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-content__inner { display: flex; flex-direction: row; padding:25px 35px; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-head { background-color:#f9f9f9 }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-content { max-height: 900px; opacity: 1; }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose {order:1;}', '@media (max-width: 600px) { #cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-content {flex-direction:column} }', '@media (max-width: 600px) { #cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose { margin-bottom:20px; } }', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-component {display:flex; margin-right:35px; align-items:center;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__status {font-weight:600;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group {background:none; width:40px; height:20px; margin:0 10px; position:relative;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__slider {position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; border-radius:10px; -webkit-transition: .4s; transition: .4s; pointer-events: none;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__slider:before {position: absolute; content: ""; height: 12px; width: 12px; left: 4px; bottom: 4px; background-color: white; border-radius:50%; -webkit-transition: .4s; transition: .4s;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group[aria-checked="true"] .ccm__switch__slider {background-color: #28A834;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group:focus-visible {box-shadow: 0 0 0 2px' + window.CookieConsent.config.theme.focusColor + ';}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group[aria-checked="true"] .ccm__switch__slider:before {-webkit-transform: translateX(20px); -ms-transform: translateX(20px); transform: translateX(20px);}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__desc {order:2;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content h3 {font-size:18px; margin-bottom:10px; line-height:1;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content p {color:#444; margin-bottom:0}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list:not(:empty) {margin-top:30px;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list .ccm__list__title {color:#333; font-weight:600;}', '#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list ul { margin:15px 0; padding-left:15px }', '#cconsent-modal .ccm__footer, #cconsent-init-modal .ccm__footer { padding:35px; background-color:#EFEFEF; text-align:center; display: flex; align-items:center; justify-content:flex-end; }', '#cconsent-modal .ccm__footer button, #cconsent-init-modal .ccm__footer button { line-height:normal; font-size:14px; transition: background-color .5s ease-out; background-color:' + window.CookieConsent.config.theme.modalMainButtonColor + '; color:' + window.CookieConsent.config.theme.modalMainButtonTextColor + '; border:none; padding:13px; min-width:110px; border-radius: 2px; cursor:pointer; height: 100%; }', '#cconsent-modal .ccm__footer button:hover, #cconsent-init-modal .ccm__footer button:hover { background-color:' + Utilities.lightenDarkenColor(window.CookieConsent.config.theme.modalMainButtonColor, -20) + '; }', '#cconsent-modal .ccm__footer button + button, #cconsent-init-modal .ccm__footer button + button { margin-left: 10px; }'); + } + }, { + key: "injectCustomStyles", + value: function injectCustomStyles(customCSS) { + if (customCSS) { + var style = document.createElement('style'); + style.appendChild(document.createTextNode(customCSS)); + document.head.appendChild(style); + } + } + }, { + key: "buildBar", + value: function buildBar() { + return el('div#cconsent-bar.ccb--hidden', el("div.ccb__wrapper", el('div.ccb__left', el('div.cc-text', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barMainText'))), el('div.ccb__right', el('div.ccb__button', el('button.ccb__edit', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barLinkSetting'), { + 'aria-hidden': 'true', + tabindex: '-1' + }), window.CookieConsent.config.showRejectAllButton && el('button.consent-decline', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barBtnRejectAll'), { + 'aria-hidden': 'true', + tabindex: '-1' + }), el('button.consent-give', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'barBtnAcceptAll'), { + 'aria-hidden': 'true', + tabindex: '-1' + })))), { + role: 'region', + 'aria-label': Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'cookieBarLabel'), + 'aria-hidden': 'true', + tabindex: '-1' + }); + } + }, { + key: "buildModal", + value: function buildModal() { + // Cookie names list middleware + var listCookies = function listCookies(category) { + var list = []; + for (var service in window.CookieConsent.config.services) { + window.CookieConsent.config.services[service].category === category && list.push(window.CookieConsent.config.services[service]); + } + if (list.length) { + var listItems = []; + for (var item in list) { + listItems.push(el('li', Language.getTranslation(list[item], window.CookieConsent.config.language.current, 'name'))); + } + return [el('div.ccm__list', el('span.ccm__list__title', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'modalAffectedSolutions')), el('ul', listItems))]; + } + }; + function modalTabGroups() { + var contentItems = []; + var i = 0; + for (var key in window.CookieConsent.config.categories) { + var tabId = Math.random().toString(16).slice(2); + contentItems.push(el('dl.ccm__tabgroup' + '.' + key + (window.CookieConsent.config.categories[key].checked ? '.checked-5jhk' : ''), { + 'data-category': key + }, el('dt.ccm__tab-head', el('button#ccm__tab-trigger--' + tabId + '.ccm__tab-trigger', el('span.ccm__tab-head__text', Language.getTranslation(window.CookieConsent.config.categories[key], window.CookieConsent.config.language.current, 'name')), el('span.ccm__tab-head__status' + (window.CookieConsent.config.categories[key].checked ? '.ccm__tab-head__status--checked' : '.ccm__tab-head__status--unchecked'), window.CookieConsent.config.categories[key].checked ? '✔' : '×', { + 'aria-label': window.CookieConsent.config.categories[key].checked ? Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'checked') : Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'unchecked') + }), el('span.ccm__tab-head__icon-wedge', el(document.createElementNS("http://www.w3.org/2000/svg", "svg"), { + version: "1.2", + preserveAspectRatio: "none", + viewBox: "0 0 24 24", + class: "icon-wedge-svg", + "data-id": "e9b3c566e8c14cfea38af128759b91a3", + style: "opacity: 1; mix-blend-mode: normal; fill: rgb(51, 51, 51); width: 32px; height: 32px;" + }, el(document.createElementNS("http://www.w3.org/2000/svg", "path"), { + 'xmlns:default': "http://www.w3.org/2000/svg", + class: "icon-wedge-angle-down", + d: "M17.2,9.84c0-0.09-0.04-0.18-0.1-0.24l-0.52-0.52c-0.13-0.13-0.33-0.14-0.47-0.01c0,0-0.01,0.01-0.01,0.01 l-4.1,4.1l-4.09-4.1C7.78,8.94,7.57,8.94,7.44,9.06c0,0-0.01,0.01-0.01,0.01L6.91,9.6c-0.13,0.13-0.14,0.33-0.01,0.47 c0,0,0.01,0.01,0.01,0.01l4.85,4.85c0.13,0.13,0.33,0.14,0.47,0.01c0,0,0.01-0.01,0.01-0.01l4.85-4.85c0.06-0.06,0.1-0.15,0.1-0.24 l0,0H17.2z", + style: "fill: rgb(51, 51, 51);" + }))), { + 'aria-expanded': 'false', + 'aria-controls': 'ccm__tab-content--' + tabId + })), el('dd#ccm__tab-content--' + tabId + '.ccm__tab-content', el('div.ccm__tab-content__inner', el('div.ccm__tab-content__desc', el('h3#ccm__tab-content__title--' + tabId, Language.getTranslation(window.CookieConsent.config.categories[key], window.CookieConsent.config.language.current, 'name')), el('p', Language.getTranslation(window.CookieConsent.config.categories[key], window.CookieConsent.config.language.current, 'description')), el('div.ccm__list', listCookies(key))), el('div.ccm__tab-content__choose', !window.CookieConsent.config.categories[key].needed && el('div.ccm__switch-component', el('span.ccm__switch__status.status-off', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'off')), el('button.ccm__switch-group', el('span.ccm__switch__text.visually-hide', Language.getTranslation(window.CookieConsent.config.categories[key], window.CookieConsent.config.language.current, 'name')), el('span.ccm__switch__slider'), { + 'role': 'switch', + 'data-category': key, + 'aria-checked': window.CookieConsent.config.categories[key].checked, + 'aria-label': Language.getTranslation(window.CookieConsent.config.categories[key], window.CookieConsent.config.language.current, 'name') + }), el('span.ccm__switch__status.status-on', Language.getTranslation(window.CookieConsent.config, window.CookieConsent.config.language.current, 'on'))))), { + 'role': 'region', + 'aria-labelledby': 'ccm__tab-trigger--' + tabId, + 'aria-hidden': 'true' + }))); + i++; + } + return contentItems; } if (list.length) { var listItems = []; @@ -1138,6 +1199,7 @@ class Interface { tabStatus.classList.add('ccm__tab-head__status--unchecked'); } } +<<<<<<< HEAD } render(name, elem, callback) { if (typeof callback === 'undefined') callback = function () {}; @@ -1164,6 +1226,66 @@ class Interface { that.buildCookie(cookie => { that.setCookie(cookie); }); +======= + }, { + key: "buildInterface", + value: function buildInterface(callback) { + if (typeof callback === 'undefined') callback = function callback() {}; + var that = this; + Utilities.ready(function () { + if (window.CookieConsent.config.noUI) { + that.writeBufferToDOM(); + that.buildCookie(function (cookie) { + that.setCookie(cookie); + }); + callback(); + return; + } + if (window.CookieConsent.config.customCSS) { + that.injectCustomStyles(window.CookieConsent.config.customCSS); + } else { + that.render('style', that.buildStyle()); + } + + //show the bar only if layout mode is 'bar' + if (window.CookieConsent.config.mode == 'bar') { + that.render('bar', that.buildBar(), function (bar) { + // Show the bar after a while + if (!window.CookieConsent.config.cookieExists) { + setTimeout(function () { + var _ref, _ref2; + var buttonSettings = bar.querySelector('.ccb__edit'); + var buttonConsentGive = bar.querySelector('.consent-give'); + var buttonConsentDecline = bar.querySelector('.consent-decline'); + bar.classList.remove('ccb--hidden'); + bar.setAttribute('aria-hidden', 'false'); + bar.setAttribute('tabindex', '0'); + buttonSettings.setAttribute('tabindex', '0'); + buttonSettings.setAttribute('aria-hidden', 'false'); + buttonConsentGive.setAttribute('tabindex', '0'); + buttonConsentGive.setAttribute('aria-hidden', 'false'); + (_ref = buttonConsentDecline !== null) !== null && _ref !== void 0 ? _ref : buttonConsentDecline.setAttribute('tabindex', '0'); + (_ref2 = buttonConsentDecline !== null) !== null && _ref2 !== void 0 ? _ref2 : buttonConsentDecline.setAttribute('aria-hidden', 'false'); + }, window.CookieConsent.config.UITimeout); + } + }); + } + that.render('modal', that.buildModal()); + + //show init modal if layout mode is 'modal' + if (window.CookieConsent.config.mode == 'modal') { + that.render('modalInit', that.buildInitialModal(), function (modal) { + if (!window.CookieConsent.config.cookieExists) { + setTimeout(function () { + modal.classList.add('ccm--visible'); + modal.setAttribute('aria-hidden', 'false'); + modal.setAttribute('tabindex', '0'); + modal.querySelector('.ccm__footer').style.justifyContent = 'center'; + }, window.CookieConsent.config.UITimeout); + } + }); + } +>>>>>>> b5aaf77 (COC-33 | Added new option on the config object to fully customize CSS, updated Readme) callback(); return; } @@ -1493,6 +1615,7 @@ class Configuration { modalMainButtonTextColor: '#fff', focusColor: 'rgb(40 168 52 / 75%)' }, + customCSS: null, language: { current: 'en', locale: { diff --git a/build/cookieconsent.min.js b/build/cookieconsent.min.js index 966f352..331bfc0 100644 --- a/build/cookieconsent.min.js +++ b/build/cookieconsent.min.js @@ -1 +1 @@ -(()=>{"use strict";class e{static ready(e){(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?e():document.addEventListener("DOMContentLoaded",e)}static objectType(e){return Object.prototype.toString.call(e).slice(8,-1)}static lightenDarkenColor(e,t){var o=!1;"#"==e[0]&&(e=e.slice(1),o=!0);var n=parseInt(e,16),i=(n>>16)+t;i>255?i=255:i<0&&(i=0);var c=(n>>8&255)+t;c>255?c=255:c<0&&(c=0);var a=(255&n)+t;return a>255?a=255:a<0&&(a=0),(o?"#":"")+(a|c<<8|i<<16).toString(16)}static removeCookie(){document.cookie="cconsent=; expires=Thu, 01 Jan 1980 00:00:00 UTC; path=/;",localStorage.removeItem("consentMode"),window.CookieConsent.config.cookieExists=!1}static listGlobalServices(e){let t=[];if(void 0===window.CookieConsent)return t;if(void 0===e)for(let e in window.CookieConsent.config.services)t.push(e);else for(let o in window.CookieConsent.config.services)window.CookieConsent.config.services[o].category===e&&t.push(o);return t}static dispatchEvent(e,t){"function"==typeof Event?t=new Event(t):(t=document.createEvent("Event")).initEvent(t,!0,!0),e.dispatchEvent(t)}}class t{createBlacklist(t){var o={};for(var n in window.CookieConsent.config.services)window.CookieConsent.config.services[n].type===t&&!1===window.CookieConsent.config.categories[window.CookieConsent.config.services[n].category].needed&&!1===window.CookieConsent.config.categories[window.CookieConsent.config.services[n].category].wanted&&(o[n]=window.CookieConsent.config.services[n]);var i=[];for(var n in o){if("String"===(t=e.objectType(o[n].search)))i.push(o[n].search);else if("Array"===t)for(let e=0;e=0&&!1===window.CookieConsent.config.categories[window.CookieConsent.config.services[e].category].wanted)return void window.CookieConsent.buffer.appendChild.push({this:this,category:window.CookieConsent.config.services[e].category,arguments});return Node.prototype.appendChild.apply(this,arguments)}}overrideInsertBefore(){Element.prototype.insertBefore=function(e){if("SCRIPT"===arguments[0].tagName)for(let e in window.CookieConsent.config.services)if("dynamic-script"===window.CookieConsent.config.services[e].type&&arguments[0].outerHTML.indexOf(window.CookieConsent.config.services[e].search)>=0&&!1===window.CookieConsent.config.categories[window.CookieConsent.config.services[e].category].wanted)return void window.CookieConsent.buffer.insertBefore.push({this:this,category:window.CookieConsent.config.services[e].category,arguments});return Node.prototype.insertBefore.apply(this,arguments)}}}class n extends t{constructor(){super()}init(){this.filterTags()}filterTags(){e.ready((()=>{var e=super.createBlacklist("script-tag"),t=document.querySelectorAll('script[type="text/plain"]');for(var o of t)if(e.indexOf(o.dataset.consent)<0){var n=document.createElement("script"),i=o.parentNode;for(var c of(o.type="text/javascript",o.attributes))n.setAttribute(c.nodeName,c.nodeValue);n.innerHTML=o.innerHTML,i.insertBefore(n,o),i.removeChild(o)}}))}}class i extends t{constructor(){super()}init(){this.filterWrappers()}filterWrappers(){var e=super.createBlacklist("wrapped");window.CookieConsent.wrapper=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0;e.indexOf(t)<0&&o()}}}class c extends t{constructor(){super()}init(){this.filterlocalCookies()}getCookieDescriptor(){var e;return(e=Object.getOwnPropertyDescriptor(document,"cookie")||Object.getOwnPropertyDescriptor(HTMLDocument.prototype,"cookie"))||((e={}).get=HTMLDocument.prototype.__lookupGetter__("cookie"),e.set=HTMLDocument.prototype.__lookupSetter__("cookie")),e}filterlocalCookies(){var e=super.createBlacklist("localcookie"),t=this.getCookieDescriptor();Object.defineProperty(document,"cookie",{configurable:!0,get:function(){return t.get.apply(document)},set:function(){var o=arguments;if(e.length){var n=arguments[0].split("=")[0];Array.prototype.forEach.call(e,(function(e){n.indexOf(e)<0&&t.set.apply(document,o)}))}else t.set.apply(document,o)}})}}function a(e,t){var o=function(e){for(var t=e.split(/([#.])/),o="",n="",i=[],c=0;c0;)o[n]=arguments[n+1];var i=typeof e;if("string"===i)t=M(e).cloneNode(!1);else if(y(e))t=e.cloneNode(!1);else{if("function"!==i)throw new Error("At least one argument required");var c=e;t=new(Function.prototype.bind.apply(c,[null].concat(o)))}return C(v(t),o,!0),t}var T=A;function M(e){return x[e]||(x[e]=a(e))}function S(e){for(var t=[],o=arguments.length-1;o-- >0;)t[o]=arguments[o+1];for(var n=L(e,t,v(e).firstChild);n;){var i=n.nextSibling;r(e,n),n=i}}function L(e,t,o){for(var n=o,i=new Array(t.length),c=0;c0;)t[o]=arguments[o+1];var n=M(e);return A.bind.apply(A,[this,n].concat(t))};var B=function(e,t,o){this.View=e,this.initData=o,this.oldLookup={},this.lookup={},this.oldViews=[],this.views=[],null!=t&&(this.key="function"==typeof t?t:function(e){return function(t){return t[e]}}(t))};B.prototype.update=function(e,t){for(var o=this,n=o.View,i=o.key,c=o.initData,a=null!=i,r=this.lookup,s={},d=new Array(e.length),l=this.views,_=0;_0;)o[n]=arguments[n+1];var i=typeof e;if("string"===i)t=O(e).cloneNode(!1);else if(y(e))t=e.cloneNode(!1);else{if("function"!==i)throw new Error("At least one argument required");var c=e;t=new(Function.prototype.bind.apply(c,[null].concat(o)))}return C(v(t),o,!0),t}function O(e){return N[e]||(N[e]=a(e,I))}D.extend=function(e){var t=O(e);return D.bind(this,t)},D.ns=I;class q{setLocale(e){window.CookieConsent.config.language.current=e}static getTranslation(e,t,o){var n;return e.hasOwnProperty("language")?e.language.hasOwnProperty("locale")?(n=e.language.locale.hasOwnProperty(t)?t:"en",e.language.locale[n].hasOwnProperty(o)?e.language.locale[n][o]:"[Missing translation]"):"[Missing locale object]":"[Missing language object]"}}class F{constructor(){this.elements={}}buildStyle(){return T("style","#cconsent-bar, #cconsent-bar * { box-sizing:border-box }","#cconsent-bar .visually-hide, #cconsent-modal .visually-hide { position: absolute !important; overflow: hidden !important; clip: rect(1px 1px 1px 1px) !important; clip: rect(1px, 1px, 1px, 1px) !important;width: 1px !important; height: 1px !important; }","#cconsent-bar { background-color:"+window.CookieConsent.config.theme.barColor+"; color:"+window.CookieConsent.config.theme.barTextColor+"; padding:15px; text-align:right; font-family:sans-serif; font-size:14px; line-height:18px; position:fixed; bottom:0; left:0; width:100%; z-index:9998; transform: translateY(0); transition: transform .6s ease-in-out; transition-delay: .3s;}","#cconsent-bar.ccb--hidden {transform: translateY(100%); display:block; visible:hidden;}","#cconsent-bar .ccb__wrapper { display:flex; flex-wrap:wrap; justify-content:space-between; max-width:1800px; margin:0 auto;}","#cconsent-bar .ccb__left { align-self:center; text-align:left; margin: 15px 0;}","#cconsent-bar .ccb__right { align-self:center; white-space: nowrap;}","#cconsent-bar .ccb__right > div {display:inline-block; color:#FFF;}","#cconsent-bar button { line-height:normal; font-size:14px; border:0; padding:10px 10px; color:"+window.CookieConsent.config.theme.barMainButtonTextColor+"; background-color:"+window.CookieConsent.config.theme.barMainButtonColor+";}","#cconsent-bar button.consent-give { line-height:normal; font-size:14px; border:none; padding:10px 10px; color:"+window.CookieConsent.config.theme.barMainButtonTextColor+"; background-color:"+window.CookieConsent.config.theme.barMainButtonColor+";}","#cconsent-bar button.consent-decline { line-height:normal; font-size:14px; border:none; padding:10px 10px; color:"+window.CookieConsent.config.theme.barMainButtonColor+"; background-color:"+window.CookieConsent.config.theme.barMainButtonTextColor+"; margin-right: 10px; border: 1px solid "+window.CookieConsent.config.theme.barMainButtonColor+"}","#cconsent-bar button.ccb__edit { -moz-appearance:none; -webkit-appearance:none; appearance:none; margin-right:15px; border:0; padding:0; text-decoration:underline; color:"+window.CookieConsent.config.theme.barTextColor+"; background:none; }","#cconsent-bar a:hover, #cconsent-bar button:hover { cursor:pointer; }","#cconsent-modal, #cconsent-init-modal { display:none; font-size:14px; line-height:18px; color:#666; width: 100vw; height: 100vh; position:fixed; left:0; top:0; right:0; bottom:0; font-family:sans-serif; font-size:14px; background-color:rgba(0,0,0,0.6); z-index:9999; align-items:center; justify-content:center;}","@media (max-width: 600px) { #cconsent-modal, #cconsent-init-modal { height: 100% } }","#cconsent-modal button, #cconsent-init-modal button { border: 0 }","#cconsent-modal h2, #cconsent-init-modal h2, #cconsent-modal h3, #cconsent-init-modal h3 {color:#333; margin-top:0}","#cconsent-modal.ccm--visible, #cconsent-init-modal.ccm--visible {display:flex}","#cconsent-modal .ccm__content, #cconsent-init-modal .ccm__content { max-width:600px; max-height:600px; overflow-Y:auto; background-color:#EFEFEF; display:flex; flex-direction:column; justify-content:space-between; }","@media (max-width: 600px) { #cconsent-modal .ccm__content, #cconsent-init-modal .ccm__content { max-width:100vw; height:100%; max-height:initial; }}","#cconsent-modal .ccm__content > .ccm__content__heading, #cconsent-init-modal .ccm__content > .ccm__content__heading { border-bottom:1px solid #D8D8D8; padding:35px 35px 20px; background-color:#EFEFEF; position:relative; }","#cconsent-modal .ccm__content > .ccm__content__heading h2, #cconsent-init-modal .ccm__content > .ccm__content__heading h2 { font-size:21px; font-weight:600; color:#333; margin:0 }","#cconsent-modal .ccm__content > .ccm__content__heading p, #cconsent-init-modal .ccm__content > .ccm__content__heading p { margin-top:1rem; margin-bottom:1rem; }","#cconsent-modal .ccm__content > .ccm__content__heading .ccm__cheading__close, #cconsent-init-modal .ccm__content > .ccm__content__heading .ccm__cheading__close { -moz-appearance:none; -webkit-appearance:none; appearance:none; padding:0; border:0; font-weight:600; color:#888; cursor:pointer; font-size:26px; position:absolute; right:15px; top:15px; width:26px; height:26px; background:none; text-align:center; }","#cconsent-modal .ccm__content > .ccm__content__heading .ccm__cheading__close:focus-visible, #cconsent-init-modal .ccm__content > .ccm__content__heading .ccm__cheading__close:focus-visible { box-shadow: 0 0 0 0.25rem "+window.CookieConsent.config.theme.focusColor+"; }","#cconsent-modal .ccm__content > .ccm__content__body { background-color:#FFF; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup { margin:0; border-bottom: 1px solid #D8D8D8; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head {color:#333; font-weight:600; cursor:pointer; position:relative; padding:0; margin:0; transition: background-color .5s ease-out; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head:hover { background-color:#F9F9F9 }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status { order: 1; position:absolute; left:35px; font-weight: 600; display:inline-block; margin-right: 20px; pointer-events: none; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status.ccm__tab-head__status--checked { font-size:1em; color:#28a834; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__status.ccm__tab-head__status--unchecked { font-size:1.4em; color:#e56385; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-head__text { order: 2; pointer-events: none; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-head .ccm__tab-head__icon-wedge { transition: transform .3s ease-out; transform-origin: center; position:absolute;right:25px; top:50%; transform:rotate(0deg); transform:translateY(-50%); order: 3;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-head .ccm__tab-head__icon-wedge > svg { pointer-events: none; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-head .ccm__tab-head__icon-wedge { transform:translateY(-50%) rotate(-180deg) }","#cconsent-modal .ccm__tab-trigger { appearance: none; background: none; display: flex; flex-direction: row; width: 100%; padding:17px 35px 17px 56px; color:#333; font-weight:600; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content {padding:0; margin:0}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-content { max-height: 0; overflow: hidden; opacity: 0; transition: all .5s ease-out; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup .ccm__tab-content__inner { display: flex; flex-direction: row; padding:25px 35px; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-head { background-color:#f9f9f9 }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-content { max-height: 900px; opacity: 1; }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose {order:1;}","@media (max-width: 600px) { #cconsent-modal .ccm__content > .ccm__content__body .ccm__tabgroup.ccm__tabgroup--open .ccm__tab-content {flex-direction:column} }","@media (max-width: 600px) { #cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose { margin-bottom:20px; } }","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-component {display:flex; margin-right:35px; align-items:center;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__status {font-weight:600;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group {background:none; width:40px; height:20px; margin:0 10px; position:relative;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__slider {position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; border-radius:10px; -webkit-transition: .4s; transition: .4s; pointer-events: none;}",'#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch__slider:before {position: absolute; content: ""; height: 12px; width: 12px; left: 4px; bottom: 4px; background-color: white; border-radius:50%; -webkit-transition: .4s; transition: .4s;}','#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group[aria-checked="true"] .ccm__switch__slider {background-color: #28A834;}',"#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group:focus-visible {box-shadow: 0 0 0 2px"+window.CookieConsent.config.theme.focusColor+";}",'#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__choose .ccm__switch-group[aria-checked="true"] .ccm__switch__slider:before {-webkit-transform: translateX(20px); -ms-transform: translateX(20px); transform: translateX(20px);}',"#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__tab-content__desc {order:2;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content h3 {font-size:18px; margin-bottom:10px; line-height:1;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content p {color:#444; margin-bottom:0}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list:not(:empty) {margin-top:30px;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list .ccm__list__title {color:#333; font-weight:600;}","#cconsent-modal .ccm__content > .ccm__content__body .ccm__tab-content .ccm__list ul { margin:15px 0; padding-left:15px }","#cconsent-modal .ccm__footer, #cconsent-init-modal .ccm__footer { padding:35px; background-color:#EFEFEF; text-align:center; display: flex; align-items:center; justify-content:flex-end; }","#cconsent-modal .ccm__footer button, #cconsent-init-modal .ccm__footer button { line-height:normal; font-size:14px; transition: background-color .5s ease-out; background-color:"+window.CookieConsent.config.theme.modalMainButtonColor+"; color:"+window.CookieConsent.config.theme.modalMainButtonTextColor+"; border:none; padding:13px; min-width:110px; border-radius: 2px; cursor:pointer; height: 100%; }","#cconsent-modal .ccm__footer button:hover, #cconsent-init-modal .ccm__footer button:hover { background-color:"+e.lightenDarkenColor(window.CookieConsent.config.theme.modalMainButtonColor,-20)+"; }","#cconsent-modal .ccm__footer button + button, #cconsent-init-modal .ccm__footer button + button { margin-left: 10px; }")}buildBar(){return T("div#cconsent-bar.ccb--hidden",T("div.ccb__wrapper",T("div.ccb__left",T("div.cc-text",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"barMainText"))),T("div.ccb__right",T("div.ccb__button",T("button.ccb__edit",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"barLinkSetting"),{"aria-hidden":"true",tabindex:"-1"}),window.CookieConsent.config.showRejectAllButton&&T("button.consent-decline",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"barBtnRejectAll"),{"aria-hidden":"true",tabindex:"-1"}),T("button.consent-give",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"barBtnAcceptAll"),{"aria-hidden":"true",tabindex:"-1"})))),{role:"region","aria-label":q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"cookieBarLabel"),"aria-hidden":"true",tabindex:"-1"})}buildModal(){var e=function(e){var t=[];for(let o in window.CookieConsent.config.services)window.CookieConsent.config.services[o].category===e&&t.push(window.CookieConsent.config.services[o]);if(t.length){var o=[];for(let e in t)o.push(T("li",q.getTranslation(t[e],window.CookieConsent.config.language.current,"name")));return[T("div.ccm__list",T("span.ccm__list__title",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalAffectedSolutions")),T("ul",o))]}};return T("dialog#cconsent-modal",T("div.ccm__content",T("div.ccm__content__heading",T("h2#ccm__content__title",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalMainTitle")),T("p",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalMainText"),window.CookieConsent.config.modalMainTextMoreLink?T("a",{href:window.CookieConsent.config.modalMainTextMoreLink,target:"_blank",rel:"noopener noreferrer"},q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"learnMore")):null),T("button.ccm__cheading__close","×",{"aria-label":q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"closeAriaLabel")})),T("div.ccm__content__body",T("div.ccm__tabs",function(){let t=[];for(let o in window.CookieConsent.config.categories){let n=Math.random().toString(16).slice(2);t.push(T("dl.ccm__tabgroup."+o+(window.CookieConsent.config.categories[o].checked?".checked-5jhk":""),{"data-category":o},T("dt.ccm__tab-head",T("button#ccm__tab-trigger--"+n+".ccm__tab-trigger",T("span.ccm__tab-head__text",q.getTranslation(window.CookieConsent.config.categories[o],window.CookieConsent.config.language.current,"name")),T("span.ccm__tab-head__status"+(window.CookieConsent.config.categories[o].checked?".ccm__tab-head__status--checked":".ccm__tab-head__status--unchecked"),window.CookieConsent.config.categories[o].checked?"✔":"×",{"aria-label":window.CookieConsent.config.categories[o].checked?q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"checked"):q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"unchecked")}),T("span.ccm__tab-head__icon-wedge",T(document.createElementNS("http://www.w3.org/2000/svg","svg"),{version:"1.2",preserveAspectRatio:"none",viewBox:"0 0 24 24",class:"icon-wedge-svg","data-id":"e9b3c566e8c14cfea38af128759b91a3",style:"opacity: 1; mix-blend-mode: normal; fill: rgb(51, 51, 51); width: 32px; height: 32px;"},T(document.createElementNS("http://www.w3.org/2000/svg","path"),{"xmlns:default":"http://www.w3.org/2000/svg",class:"icon-wedge-angle-down",d:"M17.2,9.84c0-0.09-0.04-0.18-0.1-0.24l-0.52-0.52c-0.13-0.13-0.33-0.14-0.47-0.01c0,0-0.01,0.01-0.01,0.01 l-4.1,4.1l-4.09-4.1C7.78,8.94,7.57,8.94,7.44,9.06c0,0-0.01,0.01-0.01,0.01L6.91,9.6c-0.13,0.13-0.14,0.33-0.01,0.47 c0,0,0.01,0.01,0.01,0.01l4.85,4.85c0.13,0.13,0.33,0.14,0.47,0.01c0,0,0.01-0.01,0.01-0.01l4.85-4.85c0.06-0.06,0.1-0.15,0.1-0.24 l0,0H17.2z",style:"fill: rgb(51, 51, 51);"}))),{"aria-expanded":"false","aria-controls":"ccm__tab-content--"+n})),T("dd#ccm__tab-content--"+n+".ccm__tab-content",T("div.ccm__tab-content__inner",T("div.ccm__tab-content__desc",T("h3#ccm__tab-content__title--"+n,q.getTranslation(window.CookieConsent.config.categories[o],window.CookieConsent.config.language.current,"name")),T("p",q.getTranslation(window.CookieConsent.config.categories[o],window.CookieConsent.config.language.current,"description")),T("div.ccm__list",e(o))),T("div.ccm__tab-content__choose",!window.CookieConsent.config.categories[o].needed&&T("div.ccm__switch-component",T("span.ccm__switch__status.status-off",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"off")),T("button.ccm__switch-group",T("span.ccm__switch__text.visually-hide",q.getTranslation(window.CookieConsent.config.categories[o],window.CookieConsent.config.language.current,"name")),T("span.ccm__switch__slider"),{role:"switch","data-category":o,"aria-checked":window.CookieConsent.config.categories[o].checked,"aria-label":q.getTranslation(window.CookieConsent.config.categories[o],window.CookieConsent.config.language.current,"name")}),T("span.ccm__switch__status.status-on",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"on"))))),{role:"region","aria-labelledby":"ccm__tab-trigger--"+n,"aria-hidden":"true"})))}return t}())),T("div.ccm__footer",T("button#ccm__footer__consent-modal-submit",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalBtnSave")),window.CookieConsent.config.showRejectAllButton&&T("button.consent-decline",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalBtnRejectAll")),T("button.consent-give",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalBtnAcceptAll")))),{"aria-labelledby":"ccm__content__title","aria-hidden":"true"})}buildInitialModal(){return T("dialog#cconsent-init-modal",T("div.ccm__content",T("div.ccm__content__heading",T("h2#init__ccm__content__title",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalMainTitle")),T("p",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"modalMainText"),window.CookieConsent.config.modalMainTextMoreLink?T("a",{href:window.CookieConsent.config.modalMainTextMoreLink,target:"_blank",rel:"noopener noreferrer"},q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"learnMore")):null)),T("div.ccm__footer",T("button.consent-decline",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"initModalBtnDisagree")),T("button.ccm__edit",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"initModalBtnOptions")),T("button.consent-give",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"initModalBtnAgree")))),{"aria-labelledby":"init__ccm__content__title","aria-hidden":"true"})}modalRedrawIcons(){var e=this.elements.modal.querySelectorAll(".ccm__tabgroup");for(let n of e){var t=n.querySelector("button.ccm__switch-group"),o=n.querySelector(".ccm__tab-head__status");window.CookieConsent.config.categories[n.dataset.category].checked?n.classList.contains("checked-5jhk")||(n.classList.add("checked-5jhk"),t.setAttribute("aria-checked","true"),o.classList.remove("ccm__tab-head__status--unchecked"),o.setAttribute("aria-label",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"checked")),o.textContent="✔",o.classList.add("ccm__tab-head__status--checked")):(n.classList.contains("checked-5jhk")&&n.classList.remove("checked-5jhk"),t.setAttribute("aria-checked","false"),o.setAttribute("aria-label",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"unchecked")),o.textContent="×",o.classList.add("ccm__tab-head__status--unchecked"))}}render(e,t,o){if(void 0===o&&(o=function(){}),void 0!==this.elements[e])return this.elements[e].parentNode.replaceChild(t,this.elements[e]),this.elements[e]=t,o(t),t;var n=m(document.body,t,document.body.firstChild);return n&&(this.elements[e]=n),o(n),n}buildInterface(t){void 0===t&&(t=function(){});var o=this;e.ready((function(){if(window.CookieConsent.config.noUI)return o.writeBufferToDOM(),o.buildCookie((e=>{o.setCookie(e)})),void t();o.render("style",o.buildStyle()),"bar"==window.CookieConsent.config.mode&&o.render("bar",o.buildBar(),(e=>{window.CookieConsent.config.cookieExists||setTimeout((()=>{var t=e.querySelector(".ccb__edit"),o=e.querySelector(".consent-give"),n=e.querySelector(".consent-decline");e.classList.remove("ccb--hidden"),e.setAttribute("aria-hidden","false"),e.setAttribute("tabindex","0"),t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","false"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","false"),null!==n??n.setAttribute("tabindex","0"),null!==n??n.setAttribute("aria-hidden","false")}),window.CookieConsent.config.UITimeout)})),o.render("modal",o.buildModal()),"modal"==window.CookieConsent.config.mode&&o.render("modalInit",o.buildInitialModal(),(e=>{window.CookieConsent.config.cookieExists||setTimeout((()=>{e.classList.add("ccm--visible"),e.setAttribute("aria-hidden","false"),e.setAttribute("tabindex","0"),e.querySelector(".ccm__footer").style.justifyContent="center"}),window.CookieConsent.config.UITimeout)})),t()}))}addEventListeners(e){var t=!1,o=document.querySelector("body"),n=document.querySelectorAll(".consent-give");for(let e of n)e.addEventListener("click",(()=>{var n=document.querySelector(".ccb__edit"),i=document.querySelector(".consent-decline");for(let e in window.CookieConsent.config.categories)window.CookieConsent.config.categories[e].wanted=window.CookieConsent.config.categories[e].checked=!0;this.writeBufferToDOM(),this.buildCookie((e=>{this.setCookie(e)})),this.elements.bar?.classList.add("ccb--hidden"),this.elements.bar?.setAttribute("aria-hidden","true"),this.elements.bar?.setAttribute("tabindex","-1"),this.elements.modal.classList.remove("ccm--visible"),this.elements.modal.setAttribute("aria-hidden","true"),this.elements.modal.setAttribute("tabindex","-1"),this.elements.modalInit?.classList.remove("ccm--visible"),this.elements.modalInit?.setAttribute("aria-hidden","true"),this.elements.modalInit?.setAttribute("tabindex","-1"),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),n.setAttribute("tabindex","-1"),n.setAttribute("aria-hidden","true"),null!==i??i.setAttribute("tabindex","-1"),null!==i??i.setAttribute("aria-hidden","true"),o.focus(),t=!1,this.modalRedrawIcons()}));var i=document.querySelectorAll(".consent-decline");for(let e of i)e.addEventListener("click",(()=>{var n=document.querySelector(".ccb__edit"),i=document.querySelector(".consent-give");for(let e in window.CookieConsent.config.categories)window.CookieConsent.config.categories[e].wanted=window.CookieConsent.config.categories[e].checked=window.CookieConsent.config.categories[e].needed;this.writeBufferToDOM(),this.buildCookie((e=>{this.setCookie(e)})),this.elements.bar?.classList.add("ccb--hidden"),this.elements.bar?.setAttribute("aria-hidden","true"),this.elements.bar?.setAttribute("tabindex","-1"),this.elements.modal.classList.remove("ccm--visible"),this.elements.modal.setAttribute("aria-hidden","true"),this.elements.modal.setAttribute("tabindex","-1"),this.elements.modalInit?.classList.remove("ccm--visible"),this.elements.modalInit?.setAttribute("aria-hidden","true"),this.elements.modalInit?.setAttribute("tabindex","-1"),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),n.setAttribute("tabindex","-1"),n.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),o.focus(),t=!1,this.modalRedrawIcons()}));Array.prototype.forEach.call(document.querySelectorAll(".ccm__edit, .ccb__edit"),(e=>{e.addEventListener("click",(()=>{t=!0,this.elements.modal.classList.add("ccm--visible"),this.elements.modal.setAttribute("aria-hidden","false"),this.elements.modal.setAttribute("tabindex","0"),this.elements.modal.querySelector(".ccm__cheading__close").focus(),this.elements.modalInit?.classList.remove("ccm--visible"),this.elements.modalInit?.setAttribute("aria-hidden","true"),this.elements.modalInit?.setAttribute("tabindex","-1")}))})),this.elements.modal.querySelector(".ccm__tabs").addEventListener("click",(e=>{if(e.target.classList.contains("ccm__tab-trigger")||e.target.classList.contains("ccm__tab-head__icon-wedge")){function a(e){var t=e.parentNode;return"DL"!==t.nodeName?a(t):t}var t=a(e.target);t.classList.contains("ccm__tabgroup--open")?(t.classList.remove("ccm__tabgroup--open"),e.target.setAttribute("aria-expanded","false"),t.querySelector(".ccm__tab-content").setAttribute("aria-hidden","true")):(t.classList.add("ccm__tabgroup--open"),e.target.setAttribute("aria-expanded","true"),t.querySelector(".ccm__tab-content").setAttribute("aria-hidden","false"))}if(e.target.classList.contains("ccm__switch-group")){var o=e.target.getAttribute("aria-checked"),n=e.target.textContent.trim(),i=document.querySelector(".ccm__tabgroup."+e.target.dataset.category),c=document.querySelector(".ccm__tabgroup."+e.target.dataset.category+" .ccm__tab-head__status");window.CookieConsent.config.categories[e.target.dataset.category].wanted=window.CookieConsent.config.categories[e.target.dataset.category].checked="true"!==o,e.target.setAttribute("aria-checked","true"!==o),i.classList.remove("checked-5jhk"),c.classList.remove("ccm__tab-head__status--checked"),c.classList.remove("ccm__tab-head__status--unchecked"),"true"!==o?(e.target.setAttribute("aria-label",n+" "+q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"enabled")),i.classList.add("checked-5jhk"),c.setAttribute("aria-label",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"checked")),c.textContent="✔",c.classList.add("ccm__tab-head__status--checked")):(e.target.setAttribute("aria-label",n+" "+q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"disabled")),i.classList.remove("checked-5jhk"),c.setAttribute("aria-label",q.getTranslation(window.CookieConsent.config,window.CookieConsent.config.language.current,"unchecked")),c.textContent="×",c.classList.add("ccm__tab-head__status--unchecked"))}})),this.elements.modal.querySelector(".ccm__cheading__close").addEventListener("click",(e=>{this.elements.modal.classList.remove("ccm--visible"),this.elements.modal.setAttribute("aria-hidden","true"),this.elements.modal.setAttribute("tabindex","-1"),window.CookieConsent.config.cookieExists||(this.elements.modalInit?.classList.add("ccm--visible"),this.elements.modalInit?.setAttribute("aria-hidden","false"),this.elements.modalInit?.setAttribute("tabindex","0")),t=!1})),document.addEventListener("keydown",(e=>{!t||e.keyCode&&27!==e.keyCode||(this.elements.modal.classList.remove("ccm--visible"),this.elements.modal.setAttribute("aria-hidden","true"),this.elements.modal.setAttribute("tabindex","-1"),window.CookieConsent.config.cookieExists||(this.elements.modalInit?.classList.add("ccm--visible"),this.elements.modalInit?.setAttribute("aria-hidden","false"),this.elements.modalInit?.setAttribute("tabindex","0")),t=!1)})),document.getElementById("ccm__footer__consent-modal-submit").addEventListener("click",(()=>{let e=this.elements.modal.querySelectorAll(".ccm__switch input");Array.prototype.forEach.call(e,(e=>{window.CookieConsent.config.categories[e.dataset.category].wanted=e.checked}));var n=document.querySelector(".ccb__edit"),i=document.querySelector(".consent-give"),c=document.querySelector(".consent-decline");this.buildCookie((e=>{this.setCookie(e,(()=>{this.elements.modal.classList.remove("ccm--visible"),this.elements.modal.setAttribute("aria-hidden","true"),this.elements.modal.setAttribute("tabindex","-1"),this.elements.modalInit?.classList.remove("ccm--visible"),this.elements.modalInit?.setAttribute("aria-hidden","true"),this.elements.modalInit?.setAttribute("tabindex","-1"),this.elements.bar?.classList.add("ccb--hidden"),this.elements.bar?.setAttribute("aria-hidden","true"),this.elements.bar?.setAttribute("tabindex","-1"),n.setAttribute("tabindex","-1"),n.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),null!==c??c.setAttribute("tabindex","-1"),null!==c??c.setAttribute("aria-hidden","true"),o.focus(),t=!1}))})),this.writeBufferToDOM()}))}writeBufferToDOM(){for(let e of window.CookieConsent.buffer.appendChild)!0===window.CookieConsent.config.categories[e.category].wanted&&Node.prototype.appendChild.apply(e.this,e.arguments);for(let e of window.CookieConsent.buffer.insertBefore)!0===window.CookieConsent.config.categories[e.category].wanted&&(e.arguments[1]=null===e.arguments[0].parentNode?e.this.lastChild:e.arguments[1],Node.prototype.insertBefore.apply(e.this,e.arguments))}updateConsentMode(e){if(window.dataLayer||!1){function t(){dataLayer.push(arguments)}t("consent","update",e.consentMode),localStorage.setItem("consentMode",JSON.stringify(e.consentMode))}}buildCookie(t){let o={version:window.CookieConsent.config.cookieVersion,categories:{},services:[],consentMode:{}};for(let e in window.CookieConsent.config.categories)o.categories[e]={wanted:window.CookieConsent.config.categories[e].wanted};for(let e in window.CookieConsent.config.consentModeControls)o.consentMode[e]=window.CookieConsent.config.categories[window.CookieConsent.config.consentModeControls[e]]?.wanted?"granted":"denied";return o.services=e.listGlobalServices(),this.updateConsentMode(o),t&&t(o),o}setCookie(e,t){const o=new Date(Date.now()+31536e6).toUTCString();document.cookie=`cconsent=${JSON.stringify(e)}; expires=${o}; path=/;`,window.CookieConsent.config.cookieExists=!0,t&&t()}}class R{constructor(e){window.CookieConsent.buffer={appendChild:[],insertBefore:[]},window.CookieConsent.wrapper=function(){},window.CookieConsent.setConfiguration=this.setConfiguration.bind(this),window.CookieConsent.config={active:!0,cookieExists:!1,cookieVersion:1,mode:"bar",modalMainTextMoreLink:null,showRejectAllButton:!1,UITimeout:1e3,noUI:!1,theme:{barColor:"#2b7abb",barTextColor:"#fff",barMainButtonColor:"#fff",barMainButtonTextColor:"#2b7abb",modalMainButtonColor:"#1e6ef4",modalMainButtonTextColor:"#fff",focusColor:"rgb(40 168 52 / 75%)"},language:{current:"en",locale:{en:{cookieBarLabel:"Cookie consent",barMainText:"This website uses cookies to ensure you get the best experience on our website.",closeAriaLabel:"close",barLinkSetting:"Cookie Settings",barBtnAcceptAll:"Accept all cookies",barBtnRejectAll:"Reject all cookies",modalMainTitle:"Cookie settings",modalMainText:"Cookies are small piece of data sent from a website and stored on the user's computer by the user's web browser while the user is browsing. Your browser stores each message in a small file, called cookie. When you request another page from the server, your browser sends the cookie back to the server. Cookies were designed to be a reliable mechanism for websites to remember information or to record the user's browsing activity.",modalBtnSave:"Save current settings",modalBtnAcceptAll:"Accept all cookies and close",modalBtnRejectAll:"Reject all cookies and close",initModalBtnAgree:"I agree",initModalBtnDisagree:"I do not agree",initModalBtnOptions:"Manage options",modalAffectedSolutions:"Affected solutions:",learnMore:"Learn More",on:"On",off:"Off",enabled:"is enabled.",disabled:"is disabled.",checked:"checked",unchecked:"unchecked"},hu:{cookieBarLabel:"Hozzájárulás sütik engedélyzéséhez",barMainText:"Ez a weboldal Sütiket használ a jobb felhasználói élmény érdekében.",closeAriaLabel:"bezár",barLinkSetting:"Süti beállítások",barBtnAcceptAll:"Minden süti elfogadása",barBtnRejectAll:"Minden süti elutasítása",modalMainTitle:"Süti beállítások",modalMainText:"A HTTP-süti (általában egyszerűen süti, illetve angolul cookie) egy információcsomag, amelyet a szerver küld a webböngészőnek, majd a böngésző visszaküld a szervernek minden, a szerver felé irányított kérés alkalmával. Amikor egy weboldalt kérünk le a szervertől, akkor a böngésző elküldi a számára elérhető sütiket. A süti-ket úgy tervezték, hogy megbízható mechanizmust biztosítsanak a webhelyek számára az információk megőrzésére vagy a felhasználók böngészési tevékenységének rögzítésére.",modalBtnSave:"Beállítások mentése",modalBtnAcceptAll:"Minden Süti elfogadása",modalBtnRejectAll:"Minden süti elutasítása",initModalBtnAgree:"Egyetértek",initModalBtnDisagree:"Nem értek egyet",initModalBtnOptions:"Beállítások kezelése",modalAffectedSolutions:"Mire lesz ez hatással:",learnMore:"Tudj meg többet",on:"Be",off:"Ki",enabled:"bekapcsolva.",disabled:"kikapcsolva.",checked:"kipipálva",unchecked:"nincs kipipálva"}}},categories:{},consentModeControls:{},services:{}},this.setConfiguration(e)}setConfiguration(t){this.mergeDeep(window.CookieConsent.config,t),this.cookieToConfig(),e.dispatchEvent(document,"CCConfigSet")}cookieToConfig(){function t(){return e.removeCookie(),location.reload(),!1}return document.cookie.split(";").filter((e=>{if(e.indexOf("cconsent")>=0){var o=JSON.parse(e.split("=")[1]);if(void 0===o.version)return t();if(o.version!==window.CookieConsent.config.cookieVersion)return t();for(let e in o.categories)if(void 0===window.CookieConsent.config.categories[e])return t();for(let e in o.consentMode)if(void 0===window.CookieConsent.config.consentModeControls[e])return t();if(o.services.forEach((function(e){if(void 0===window.CookieConsent.config.services[e])return t()})),!window.CookieConsent.config.noUI)for(let e in o.categories)window.CookieConsent.config.categories[e].checked=window.CookieConsent.config.categories[e].wanted=!0===o.categories[e].wanted;return window.CookieConsent.config.cookieExists=!0,!0}})),!1}isObject(e){return e&&"object"==typeof e&&!Array.isArray(e)}mergeDeep(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n-1&&this.removeCookie(o.services[n].cookies[i]);else if("RegExp"===c){let c=o.services[n].cookies[i];for(let o in t)t[o].match(c.name)&&this.removeCookie({name:t[o],domain:"String"===e.objectType(c.domain)?c.domain:null})}}}removeCookie(t){let o="String"===e.objectType(t.domain)?`domain=${t.domain};`:"";document.cookie=`${t.name}=; expires=Thu, 01 Jan 1980 00:00:00 UTC; ${o} path=/;`}}const U=new class{init(e){new R(e);const t=new V,a=new o,r=new n,s=new i,d=new c;t.init(),a.init(),r.init(),s.init(),d.init();const l=new F;l.buildInterface((()=>{l.addEventListeners()}))}};window.CookieConsent=window.CookieConsent||{},window.CookieConsent.init=U.init})(); \ No newline at end of file +(()=>{"use strict";function e(e,t){for(var n=0;n>16)+t;i>255?i=255:i<0&&(i=0);var c=(o>>8&255)+t;c>255?c=255:c<0&&(c=0);var r=(255&o)+t;return r>255?r=255:r<0&&(r=0),(n?"#":"")+(r|c<<8|i<<16).toString(16)}},{key:"removeCookie",value:function(){document.cookie="cconsent=; expires=Thu, 01 Jan 1980 00:00:00 UTC; path=/;",localStorage.removeItem("consentMode"),window.CookieConsent.config.cookieExists=!1}},{key:"listGlobalServices",value:function(e){var t=[];if(void 0===window.CookieConsent)return t;if(void 0===e)for(var n in window.CookieConsent.config.services)t.push(n);else for(var o in window.CookieConsent.config.services)window.CookieConsent.config.services[o].category===e&&t.push(o);return t}},{key:"dispatchEvent",value:function(e,t){"function"==typeof Event?t=new Event(t):(t=document.createEvent("Event")).initEvent(t,!0,!0),e.dispatchEvent(t)}}],(o=null)&&e(n.prototype,o),i&&e(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();function n(e,t){for(var n=0;n=0&&!1===window.CookieConsent.config.categories[window.CookieConsent.config.services[t].category].wanted)return void window.CookieConsent.buffer.appendChild.push({this:this,category:window.CookieConsent.config.services[t].category,arguments});return Node.prototype.appendChild.apply(this,arguments)}}},{key:"overrideInsertBefore",value:function(){Element.prototype.insertBefore=function(e){if("SCRIPT"===arguments[0].tagName)for(var t in window.CookieConsent.config.services)if("dynamic-script"===window.CookieConsent.config.services[t].type&&arguments[0].outerHTML.indexOf(window.CookieConsent.config.services[t].search)>=0&&!1===window.CookieConsent.config.categories[window.CookieConsent.config.services[t].category].wanted)return void window.CookieConsent.buffer.insertBefore.push({this:this,category:window.CookieConsent.config.services[t].category,arguments});return Node.prototype.insertBefore.apply(this,arguments)}}}],n&&c(t.prototype,n),o&&c(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(o);function d(e){return d="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},d(e)}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 c,r=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){a=!0,c=e},f:function(){try{r||null==n.return||n.return()}finally{if(a)throw c}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;e.indexOf(t)<0&&n()}}}],n&&v(t.prototype,n),o&&v(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o);function S(e){return S="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},S(e)}function T(e,t){for(var n=0;n0;)n[o]=arguments[o+1];var i=typeof e;if("string"===i)t=ee(e).cloneNode(!1);else if($(e))t=e.cloneNode(!1);else{if("function"!==i)throw new Error("At least one argument required");var c=e;t=new(Function.prototype.bind.apply(c,[null].concat(n)))}return G(X(t),n,!0),t}var Z=Q;function ee(e){return K[e]||(K[e]=L(e))}function te(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var o=ne(e,t,X(e).firstChild);o;){var i=o.nextSibling;P(e,o),o=i}}function ne(e,t,n){for(var o=n,i=new Array(t.length),c=0;c0;)t[n]=arguments[n+1];var o=ee(e);return Q.bind.apply(Q,[this,o].concat(t))};var oe=function(e,t,n){this.View=e,this.initData=n,this.oldLookup={},this.lookup={},this.oldViews=[],this.views=[],null!=t&&(this.key="function"==typeof t?t:function(e){return function(t){return t[e]}}(t))};oe.prototype.update=function(e,t){for(var n=this,o=n.View,i=n.key,c=n.initData,r=null!=i,a=this.lookup,s={},l=new Array(e.length),d=this.views,u=0;u0;)n[o]=arguments[o+1];var i=typeof e;if("string"===i)t=de(e).cloneNode(!1);else if($(e))t=e.cloneNode(!1);else{if("function"!==i)throw new Error("At least one argument required");var c=e;t=new(Function.prototype.bind.apply(c,[null].concat(n)))}return G(X(t),n,!0),t}function de(e){return se[e]||(se[e]=L(e,ae))}function ue(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 c,r=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){a=!0,c=e},f:function(){try{r||null==n.return||n.return()}finally{if(a)throw c}}}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n