1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
18 KiB
JavaScript

/*!
* CookieConsent v2.8.9
* https://www.github.com/orestbida/cookieconsent
* Author Orest Bida
* Released under the MIT License
*/
!function(){'use strict';var n='initCookieConsent';'undefined'!=typeof window&&'function'!=typeof window[n]&&(window[n]=function(n){var t,e,o,i,r,c,a,u,f,d,v,s,l,b,p,m,y,w,g,h,_,k,x,O,j,S,T,J,N,D,C,I,E={mode:'opt-in',current_lang:'en',auto_language:null,autorun:!0,page_scripts:!0,hide_from_bots:!0,cookie_name:'cc_cookie',cookie_expiration:182,cookie_domain:window.location.hostname,cookie_path:'/',cookie_same_site:'Lax',use_rfc_cookie:!1,autoclear_cookies:!0,revision:0,script_selector:'data-cookiecategory'},U={},z={},R=null,A=!0,G=!1,L=!1,M=!1,P=!1,q=!1,B=!0,F=[],H=!1,K=[],Q=[],V=[],W=!1,X=[],Y=[],Z=[],$=[],nn=[],tn=document.documentElement,en=function(n){'number'==typeof(t=n).cookie_expiration&&(E.cookie_expiration=t.cookie_expiration),'number'==typeof t.cookie_necessary_only_expiration&&(E.cookie_necessary_only_expiration=t.cookie_necessary_only_expiration),'boolean'==typeof t.autorun&&(E.autorun=t.autorun),'string'==typeof t.cookie_domain&&(E.cookie_domain=t.cookie_domain),'string'==typeof t.cookie_same_site&&(E.cookie_same_site=t.cookie_same_site),'string'==typeof t.cookie_path&&(E.cookie_path=t.cookie_path),'string'==typeof t.cookie_name&&(E.cookie_name=t.cookie_name),'function'==typeof t.onAccept&&(u=t.onAccept),'function'==typeof t.onFirstAction&&(d=t.onFirstAction),'function'==typeof t.onChange&&(f=t.onChange),'opt-out'===t.mode&&(E.mode='opt-out'),'number'==typeof t.revision&&(t.revision>-1&&(E.revision=t.revision),q=!0),'boolean'==typeof t.autoclear_cookies&&(E.autoclear_cookies=t.autoclear_cookies),!0===t.use_rfc_cookie&&(E.use_rfc_cookie=!0),'boolean'==typeof t.hide_from_bots&&(E.hide_from_bots=t.hide_from_bots),E.hide_from_bots&&(W=navigator&&(navigator.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(navigator.userAgent)||navigator.webdriver)),E.page_scripts=!0===t.page_scripts,'browser'===t.auto_language||!0===t.auto_language?E.auto_language='browser':'document'===t.auto_language&&(E.auto_language='document'),E.auto_language,E.current_lang=vn(t.languages,t.current_lang)},on=function(n){for(var t='accept-',e=a('c-settings'),o=a(t+'all'),i=a(t+'necessary'),r=a(t+'custom'),c=0;c<e.length;c++)e[c].setAttribute('aria-haspopup','dialog'),gn(e[c],'click',(function(n){n.preventDefault(),U.showSettings(0)}));for(c=0;c<o.length;c++)gn(o[c],'click',(function(n){u(n,'all')}));for(c=0;c<r.length;c++)gn(r[c],'click',(function(n){u(n)}));for(c=0;c<i.length;c++)gn(i[c],'click',(function(n){u(n,[])}));function a(t){return(n||document).querySelectorAll('a[data-cc="'+t+'"], button[data-cc="'+t+'"]')}function u(n,t){n.preventDefault(),U.accept(t),U.hideSettings(),U.hide()}},rn=function(n,t){return Object.prototype.hasOwnProperty.call(t,n)?n:hn(t).length>0?Object.prototype.hasOwnProperty.call(t,E.current_lang)?E.current_lang:hn(t)[0]:void 0},cn=function(n){if(!0===t.force_consent&&_n(tn,'force--consent'),!m){m=dn('div');var e=dn('div'),o=dn('div');m.id='cm',e.id='c-inr-i',o.id='cm-ov',m.setAttribute('role','dialog'),m.setAttribute('aria-modal','true'),m.setAttribute('aria-hidden','false'),m.setAttribute('aria-labelledby','c-ttl'),m.setAttribute('aria-describedby','c-txt'),p.appendChild(m),p.appendChild(o),m.style.visibility=o.style.visibility='hidden',o.style.opacity=0}var i=t.languages[n].consent_modal.title;i&&(y||((y=dn('div')).id='c-ttl',y.setAttribute('role','heading'),y.setAttribute('aria-level','2'),e.appendChild(y)),y.innerHTML=i);var r=t.languages[n].consent_modal.description;q&&(r=B?r.replace('{{revision_message}}',''):r.replace('{{revision_message}}',t.languages[n].consent_modal.revision_message||'')),w||((w=dn('div')).id='c-txt',e.appendChild(w)),w.innerHTML=r;var c,a=t.languages[n].consent_modal.primary_btn,u=t.languages[n].consent_modal.secondary_btn;a&&(g||((g=dn('button')).id='c-p-bn',g.className='c-bn','accept_all'===a.role&&(c='all'),gn(g,'click',(function(){U.hide(),U.accept(c)}))),g.innerHTML=t.languages[n].consent_modal.primary_btn.text),u&&(h||((h=dn('button')).id='c-s-bn',h.className='c-bn c_link','accept_necessary'===u.role?gn(h,'click',(function(){U.hide(),U.accept([])})):gn(h,'click',(function(){U.show