PageSourceSearch

https://www.ccr.fr/wp-content/themes/neve-child/assets/tarteaucitron.js-1.19.0/tarteaucitron.js

js ccr.fr collected 2026-09-24 09:46:42 UTC 125,381 bytes, 2,358 lines download raw bytes

1/*jslint browser: true, evil: true */
2/* min ready */
3
4var scripts = document.getElementsByTagName('script'),
5    tarteaucitronPath = (document.currentScript || scripts[scripts.length - 1]).src.split('?')[0],
6    tarteaucitronForceCDN = (tarteaucitronForceCDN === undefined) ? '' : tarteaucitronForceCDN,
7    tarteaucitronUseMin = (tarteaucitronUseMin === undefined) ? '' : tarteaucitronUseMin,
8    cdn = (tarteaucitronForceCDN === '') ? tarteaucitronPath.split('/').slice(0, -1).join('/') + '/' : tarteaucitronForceCDN,
9    alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch,
10    tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage,
11    tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire,
12    tarteaucitronCustomText = (tarteaucitronCustomText === undefined) ? '' : tarteaucitronCustomText,
13    // tarteaucitronExpireInDay: true for day(s) value - false for hour(s) value
14    tarteaucitronExpireInDay = (tarteaucitronExpireInDay === undefined || typeof tarteaucitronExpireInDay !== "boolean") ? true : tarteaucitronExpireInDay,
15    timeExpire = 31536000000,
16    tarteaucitronProLoadServices,
17    tarteaucitronNoAdBlocker = false,
18    tarteaucitronIsLoaded = false;
19
20
21
22var tarteaucitron = {
23    "version": 1.19,
24    "cdn": cdn,
25    "user": {},
26    "lang": {},
27    "services": {},
28    "added": [],
29    "idprocessed": [],
30    "state": {},
31    "launch": [],
32    "parameters": {},
33    "isAjax": false,
34    "reloadThePage": false,
35    "events": {
36        "init": function () {},
37        "load": function () {},
38    },
39    "init": function (params) {
40        "use strict";
41        var origOpen;
42
43        tarteaucitron.parameters = params;
44        if (alreadyLaunch === 0) {
45            alreadyLaunch = 1;
46            if (window.addEventListener) {
47                window.addEventListener("load", function () {
48                    tarteaucitron.initEvents.loadEvent(false);
49                }, false);
50                window.addEventListener("scroll", function () {
51                    tarteaucitron.initEvents.scrollEvent();
52                }, false);
53
54                window.addEventListener("keydown", function (evt) {
55                    tarteaucitron.initEvents.keydownEvent(false, evt);
56                }, false);
57                window.addEventListener("hashchange", function () {
58                    tarteaucitron.initEvents.hashchangeEvent();
59                }, false);
60                window.addEventListener("resize", function () {
61                    tarteaucitron.initEvents.resizeEvent();
62                }, false);
63            } else {
64                window.attachEvent("onload", function () {
65                    tarteaucitron.initEvents.loadEvent(true);
66                });
vendor: 5,913 bytes, lines 66-207
66
67                window.attachEvent("onscroll", function () {
68                    tarteaucitron.initEvents.scrollEvent();
69                });
70                window.attachEvent("onkeydown", function (evt) {
71                    tarteaucitron.initEvents.keydownEvent(true, evt);
72
73                });
74                window.attachEvent("onhashchange", function () {
75                    tarteaucitron.initEvents.hashchangeEvent();
76                });
77                window.attachEvent("onresize", function () {
78                    tarteaucitron.initEvents.resizeEvent();
79                });
80            }
81
82            if (typeof XMLHttpRequest !== 'undefined') {
83                origOpen = XMLHttpRequest.prototype.open;
84                XMLHttpRequest.prototype.open = function () {
85
86                    if (window.addEventListener) {
87                        this.addEventListener("load", function () {
88                            if (typeof tarteaucitronProLoadServices === 'function') {
89                                tarteaucitronProLoadServices();
90                            }
91                        }, false);
92                    } else if (typeof this.attachEvent !== 'undefined') {
93                        this.attachEvent("onload", function () {
94                            if (typeof tarteaucitronProLoadServices === 'function') {
95                                tarteaucitronProLoadServices();
96                            }
97                        });
98                    } else {
99                        if (typeof tarteaucitronProLoadServices === 'function') {
100                            setTimeout(tarteaucitronProLoadServices, 1000);
101                        }
102                    }
103
104                    try {
105                        origOpen.apply(this, arguments);
106                    } catch (err) {}
107                };
108            }
109        }
110
111        if(tarteaucitron.events.init) {
112            tarteaucitron.events.init();
113        }
114    },
115    "initEvents": {
116        "loadEvent": function (isOldBrowser) {
117            tarteaucitron.load();
118            tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) {
119                if (isOldBrowser) {
120                    elem.attachEvent("onclick", function (event) {
121                        tarteaucitron.userInterface.openPanel();
122                        event.preventDefault();
123                    });
124                } else {
125                    elem.addEventListener("click", function (event) {
126                        tarteaucitron.userInterface.openPanel();
127                        event.preventDefault();
128                    }, false);
129                }
130            }, true);
131        },
132        "keydownEvent": function (isOldBrowser, evt) {
133            if (evt.keyCode === 27) {
134                tarteaucitron.userInterface.closePanel();
135            }
136
137            if (isOldBrowser) {
138                if ( evt.keyCode === 9 && focusableEls.indexOf(evt.target) >= 0) {
139                    if ( evt.shiftKey ) /* shift + tab */ {
140                        if (document.activeElement === firstFocusableEl) {
141                            lastFocusableEl.focus();
142                            evt.preventDefault();
143                        }
144                    } else /* tab */ {
145                        if (document.activeElement === lastFocusableEl) {
146                            firstFocusableEl.focus();
147                            evt.preventDefault();
148                        }
149                    }
150                }
151            }
152        },
153        "hashchangeEvent": function () {
154            if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
155                tarteaucitron.userInterface.openPanel();
156            }
157        },
158        "resizeEvent": function () {
159            var tacElem = document.getElementById('tarteaucitron');
160            var tacCookieContainer = document.getElementById('tarteaucitronCookiesListContainer');
161
162            if (tacElem && tacElem.style.display === 'block') {
163                tarteaucitron.userInterface.jsSizing('main');
164            }
165
166            if (tacCookieContainer && tacCookieContainer.style.display === 'block') {
167                tarteaucitron.userInterface.jsSizing('cookie');
168            }
169        },
170        "scrollEvent": function () {
171            var scrollPos = window.pageYOffset || document.documentElement.scrollTop;
172            var heightPosition;
173            var tacPercentage = document.getElementById('tarteaucitronPercentage');
174            var tacAlertBig = document.getElementById('tarteaucitronAlertBig');
175
176            if (tacAlertBig && !tarteaucitron.highPrivacy) {
177                if (tacAlertBig.style.display === 'block') {
178                    heightPosition = tacAlertBig.offsetHeight + 'px';
179
180                    if (scrollPos > (screen.height * 2)) {
181                        tarteaucitron.userInterface.respondAll(true);
182                    } else if (scrollPos > (screen.height / 2)) {
183                        document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<strong>' + tarteaucitron.lang.alertBigScroll + '</strong> ' + tarteaucitron.lang.alertBig;
184                    }
185
186                    if (tacPercentage) {
187                        if (tarteaucitron.orientation === 'top') {
188                            tacPercentage.style.top = heightPosition;
189                        } else {
190                            tacPercentage.style.bottom = heightPosition;
191                        }
192                        tacPercentage.style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
193                    }
194                }
195            }
196        },
197    },
198    "load": function () {
199        "use strict";
200
201        if (tarteaucitronIsLoaded === true) {
202            return;
203        }
204
205        var cdn = tarteaucitron.cdn,
206            language = tarteaucitron.getLanguage(),
207            useMinifiedJS = ((
vendor: 10,001 bytes, lines 207-423
207cdn.indexOf('cdn.jsdelivr.net') >= 0) || (tarteaucitronPath.indexOf('.min.') >= 0) || (tarteaucitronUseMin !== '')),
208            pathToLang = cdn + 'lang/tarteaucitron.' + language + (useMinifiedJS ? '.min' : '') + '.js',
209            pathToServices = cdn + 'tarteaucitron.services' + (useMinifiedJS ? '.min' : '') + '.js',
210            linkElement = document.createElement('link'),
211            defaults = {
212                "adblocker": false,
213                "hashtag": '#tarteaucitron',
214                "cookieName": 'tarteaucitron',
215                "highPrivacy": true,
216                "orientation": "middle",
217                "bodyPosition": "bottom",
218                "removeCredit": false,
219                "showAlertSmall": false,
220                "showDetailsOnClick": true,
221                "showIcon": true,
222                "iconPosition": "BottomRight",
223                "cookieslist": false,
224                "handleBrowserDNTRequest": false,
225                "DenyAllCta": true,
226                "AcceptAllCta" : true,
227                "moreInfoLink": true,
228                "privacyUrl": "/wp-content/uploads/2025/07/Politique-de-protection-des-donnees-personnelles-CCR_03_07_2025.pdf",
229                "useExternalCss": false,
230                "useExternalJs": false,
231                "mandatory": true,
232                "mandatoryCta": true,
233                "closePopup": false,
234                "groupServices": false,
235                "serviceDefaultState": 'wait',
236                "googleConsentMode": true,
237                "partnersList": false,
238                "alwaysNeedConsent": false
239            },
240            params = tarteaucitron.parameters;
241
242        // flag the tac load
243        tarteaucitronIsLoaded = true;
244
245        // Don't show the middle bar if we are on the privacy policy or more page
246        if (((tarteaucitron.parameters.readmoreLink !== undefined && window.location.href == tarteaucitron.parameters.readmoreLink) || window.location.href == tarteaucitron.parameters.privacyUrl) && tarteaucitron.parameters.orientation == "middle") {
247            tarteaucitron.parameters.orientation = "bottom";
248        }
249
250        // Step -1
251        if (typeof tarteaucitronCustomPremium !== 'undefined') {
252            tarteaucitronCustomPremium();
253        }
254
255        // Step 0: get params
256        if (params !== undefined) {
257
258            for (var k in defaults) {
259                if(!tarteaucitron.parameters.hasOwnProperty(k)) {
260                    tarteaucitron.parameters[k] = defaults[k];
261                }
262            }
263        }
264
265        // global
266        tarteaucitron.orientation = tarteaucitron.parameters.orientation;
267        tarteaucitron.hashtag = tarteaucitron.parameters.hashtag;
268        tarteaucitron.highPrivacy = tarteaucitron.parameters.highPrivacy;
269        tarteaucitron.handleBrowserDNTRequest = tarteaucitron.parameters.handleBrowserDNTRequest;
270        tarteaucitron.customCloserId = tarteaucitron.parameters.customCloserId;
271
272        // google consent mode
273        if (tarteaucitron.parameters.googleConsentMode === true) {
274
275            // set the dataLayer and a function to update
276            window.dataLayer = window.dataLayer || [];
277            window.tac_gtag = function tac_gtag() {
278                dataLayer.push(arguments);
279            };
280
281            // default consent to denied
282            window.tac_gtag('consent', 'default', {
283                ad_storage: 'denied',
284                analytics_storage: 'denied',
285                ad_user_data: 'denied',
286                ad_personalization: 'denied',
287                wait_for_update: 800
288            });
289
290            // if google ads, add a service for personalized ads
291            document.addEventListener('googleads_added', function() {
292
293                // skip if already added
294                if (tarteaucitron.added["gcmads"] === true) {
295                    return;
296                }
297
298                // simple service to control gcm with event
299                tarteaucitron.services.gcmads = {
300                    "key": "gcmads",
301                    "type": "ads",
302                    "name": "Google Ads (personalized ads)",
303                    "uri": "https://support.google.com/analytics/answer/9976101",
304                    "needConsent": true,
305                    "cookies": [],
306                    "js": function() {},
307                    "fallback": function() {}
308                };
309                tarteaucitron.job.push('gcmads');
310
311                // fix the event handler on the buttons
312                var i,
313                    allowBtns = document.getElementsByClassName("tarteaucitronAllow"),
314                    denyBtns = document.getElementsByClassName("tarteaucitronDeny");
315                for (i = 0; i < allowBtns.length; i++) {
316                    tarteaucitron.addClickEventToElement(allowBtns[i], function() {
317                        tarteaucitron.userInterface.respond(this, true);
318                    });
319                }
320                for (i = 0; i < denyBtns.length; i++) {
321                    tarteaucitron.addClickEventToElement(denyBtns[i], function() {
322                        tarteaucitron.userInterface.respond(this, false);
323                    });
324                }
325            });
326
327            // when personalized ads are accepted, accept googleads
328            document.addEventListener('gcmads_allowed', function() {
329                tarteaucitron.setConsent('googleads', true);
330            });
331
332            // personalized ads loaded/allowed, set gcm to granted
333            document.addEventListener('gcmads_loaded', function() {
334                window.tac_gtag('consent', 'update', {
335                    ad_user_data: 'granted',
336                    ad_personalization: 'granted'
337                });
338            });
339            document.addEventListener('gcmads_allowed', function() {
340                window.tac_gtag('consent', 'update', {
341                    ad_user_data: 'granted',
342                    ad_personalization: 'granted'
343                });
344            });
345
346            // personalized ads disallowed, set gcm to denied
347            document.addEventListener('gcmads_disallowed', function() {
348                window.tac_gtag('consent', 'update', {
349                    ad_user_data: 'denied',
350                    ad_personalization: 'denied'
351                });
352            });
353
354            // google ads loaded/allowed, set gcm to granted
355            document.addEventListener('googleads_loaded', function() {
356                window.tac_gtag('consent', 'update', {
357                    ad_storage: 'granted'
358                });
359            });
360            document.addEventListener('googleads_allowed', function() {
361                window.tac_gtag('consent', 'update', {
362                    ad_storage: 'granted'
363                });
364            });
365
366            // google ads disallowed, disable personalized ads and update gcm
367            document.addEventListener('googleads_disallowed', function() {
368                tarteaucitron.setConsent('gcmads', false);
369                window.tac_gtag('consent', 'update', {
370                    ad_storage: 'denied'
371                });
372            });
373
374            // ga4 loaded/allowed, set gcm to granted
375            document.addEventListener('gtag_loaded', function() {
376                window.tac_gtag('consent', 'update', {
377                    analytics_storage: 'granted'
378                });
379            });
380            document.addEventListener('gtag_allowed', function() {
381                window.tac_gtag('consent', 'update', {
382                    analytics_storage: 'granted'
383                });
384            });
385
386            // ga4 disallowed, update gcm
387            document.addEventListener('gtag_disallowed', function() {
388                window.tac_gtag('consent', 'update', {
389                    analytics_storage: 'denied'
390                });
391            });
392
393            // allow gtag/googleads by default if consent mode is on
394            window.addEventListener('tac.root_available', function() {
395                if (typeof tarteaucitron_block !== 'undefined') {
396                    tarteaucitron_block.unblock(/www\.googletagmanager\.com\/gtag\/js/);
397                    tarteaucitron_block.unblock(/www\.googleadservices\.com\/pagead\/conversion/);
398                    tarteaucitron_block.unblock(/AW-/);
399                    tarteaucitron_block.unblock(/google-analytics\.com\/analytics\.js/);
400                    tarteaucitron_block.unblock(/google-analytics\.com\/ga\.js/);
401                }
402            });
403        }
404
405        // Step 1: load css
406        if ( !tarteaucitron.parameters.useExternalCss ) {
407            linkElement.rel = 'stylesheet';
408            linkElement.type = 'text/css';
409            linkElement.href = cdn + 'css/tarteaucitron' + (useMinifiedJS ? '.min' : '') + '.css';
410            document.getElementsByTagName('head')[0].appendChild(linkElement);
411        }
412        // Step 2: load language and services
413        tarteaucitron.addInternalScript(pathToLang, '', function () {
414
415          if(tarteaucitronCustomText !== ''){
416            tarteaucitron.lang = tarteaucitron.AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText);
417          }
418            tarteaucitron.addInternalScript(pathToServices, '', function () {
419
420                // css for the middle bar TODO: add it on the css file
421                if (tarteaucitron.orientation === 'middle') {
422                    var customThemeMiddle = document.createElement('style'),
423                        cssRuleMiddle = 'div#tarteaucitronRoot.tarteaucitronBeforeVisible:before {content: \'\';position: fixed;width: 100%;height: 100%;background: white;top: 0;left: 0;z-index: 999;opacity: 0.5;}div#tarteaucitronAlertBig:before {content: \'' + tarteaucitron.lang.middleBarHead + '\';font-size: 35px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {width: 60%;min-width: 285px;height: auto;margin: auto;left: 50%;top: 50%;transform: translate(-50%, -50%);box-shadow: 0 0 9000px #000;border-radius: 20px;padding: 35px 25px;}
423span#tarteaucitronDisclaimerAlert {padding: 0 30px;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 10px 0 30px;display: block;text-align: center;font-size: 21px;}@media screen and (max-width: 900px) {div#tarteaucitronAlertBig button {margin: 0 auto 10px!important;display: block!important;}}';
424
425                    customThemeMiddle.type = 'text/css';
426                    if (customThemeMiddle.styleSheet) {
427                        customThemeMiddle.styleSheet.cssText = cssRuleMiddle;
428                    } else {
429                        customThemeMiddle.appendChild(document.createTextNode(cssRuleMiddle));
430                    }
431                    document.getElementsByTagName('head')[0].appendChild(customThemeMiddle);
432                }
433
434                // disable the expand option if services grouped by category
435                if (tarteaucitron.parameters.groupServices == true) {
436                    tarteaucitron.parameters.showDetailsOnClick = true;
437                }
438
439                // css for the popup bar TODO: add it on the css file
440                if (tarteaucitron.orientation === 'popup') {
441                    var customThemePopup = document.createElement('style'),
442                        cssRulePopup = 'div#tarteaucitronAlertBig:before {content: \'' + tarteaucitron.lang.middleBarHead + '\';font-size: 22px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {bottom: 0;top: auto!important;left: 8px!important;right: auto!important;transform: initial!important;border-radius: 5px 5px 0 0!important;max-width: 250px!important;width: calc(100% - 16px)!important;min-width: 0!important;padding: 25px 0;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;font-size: 15px!important;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 10px 0 30px;display: block;text-align: center;font-size: 21px;}div#tarteaucitronAlertBig button {margin: 0 auto 10px!important;display: block!important;width: calc(100% - 60px);box-sizing: border-box;}';
443
444                    customThemePopup.type = 'text/css';
445                    if (customThemePopup.styleSheet) {
446                        customThemePopup.styleSheet.cssText = cssRulePopup;
447                    } else {
448                        customThemePopup.appendChild(document.createTextNode(cssRulePopup));
449                    }
450                    document.getElementsByTagName('head')[0].appendChild(customThemePopup);
451                }
452
453                var body = document.body,
454                    div = document.createElement('div'),
455                    html = '',
456                    index,
457                    orientation = 'Top',
458                    modalAttrs = '',
459                    cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other', 'google'],
460                    i;
461
462                cat = cat.sort(function (a, b) {
463                    if (tarteaucitron.lang[a].title > tarteaucitron.lang[b].title) { return 1; }
464                    if (tarteaucitron.lang[a].title < tarteaucitron.lang[b].title) { return -1; }
465                    return 0;
466                });
467
468                // Step 3: prepare the html
469                html += '<div role="heading" aria-level="1" id="tac_title" class="tac_visually-hidden">' + tarteaucitron.lang.title + '</div>';
470                html += '<div id="tarteaucitronPremium"></div>';
471                if (tarteaucitron.reloadThePage) {
472                    html += '<button type="button" id="tarteaucitronBack" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')"></button>';
473                } else {
474                    html += '<button type="button" id="tarteaucitronBack" aria-label="' + tarteaucitron.lang.close + '" title="' + tarteaucitron.lang.close + '"></button>';
475                }
476                html += '<div id="tarteaucitron" role="dialog" aria-modal="true" aria-labelledby="dialogTitle" tabindex="-1">';
477                if (tarteaucitron.reloadThePage) {
478                    html += '   <button type="button" id="tarteaucitronClosePanel" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
479                } else {
480                    html += '   <button type="button" id="tarteaucitronClosePanel">';
481                }
482                html += '       ' + tarteaucitron.lang.close;
483                html += '   </button>';
484                html += '   <div id="tarteaucitronServices">';
485                html += '      <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">';
vendor: 10,474 bytes, lines 486-609
486                html += '         <span class="tarteaucitronH1" role="heading" aria-level="1" id="dialogTitle">'+ tarteaucitron.lang.title + '</span>';
487                html += '         <div id="tarteaucitronInfo">';
488                html += '         ' + tarteaucitron.lang.disclaimer;
489                if (tarteaucitron.parameters.privacyUrl !== "") {
490					html += '   <br/><br/>';
491					html += '   <div class="tarteaucitron-multiple-links">';
492					html += '       <a href="/wp-content/uploads/2025/07/Politique-de-protection-des-donnees-personnelles-CCR_03_07_2025.pdf" target="_blank" rel="noopener">Politique de confidentialité</a> | ';
493					html += '       <a href="/wp-content/uploads/2025/07/Politique-dutilisation-des-cookies-de-CCR-03_07_2025.pdf" target="_blank" rel="noopener">Cookies</a> | ';
494					html += '       <a href="/wp-content/uploads/2025/11/Mentions-Legales-site-CCR-19_11_2025.pdf" target="_blank" rel="noopener">Mentions légales</a>';
495					html += '   </div>';
496                }
497                html += '         </div>';
498                html += '         <div class="tarteaucitronName">';
499                html += '            <span class="tarteaucitronH2" role="heading" aria-level="2">' + tarteaucitron.lang.all + '</span>';
500                html += '         </div>';
501                html += '         <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">';
502                html += '            <button type="button" id="tarteaucitronAllAllowed" class="tarteaucitronAllow">';
503                html += '               <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allowAll;
504                html += '            </button> ';
505                html += '            <button type="button" id="tarteaucitronAllDenied" class="tarteaucitronDeny">';
506                html += '               <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.denyAll;
507                html += '            </button>';
508                html += '         </div>';
509                html += '      </div>';
510                html += '      <div class="tarteaucitronBorder">';
511                html += '         <div class="clear"></div><ul>';
512
513
514                if (tarteaucitron.parameters.mandatory == true) {
515                   html += '<li id="tarteaucitronServicesTitle_mandatory">';
516                   html += '<div class="tarteaucitronTitle">';
517                    if(tarteaucitron.parameters.showDetailsOnClick){
518                        html += '   <button type="button" tabindex="-1"><span class="tarteaucitronPlus" aria-hidden="true"></span> ' + tarteaucitron.lang.mandatoryTitle + '</button>';
519                    }else{
520                        html += '   <span class="asCatToggleBtn">' + tarteaucitron.lang.mandatoryTitle + '</span>';
521                    }
522                   html += '</div>';
523                   html += '<ul id="tarteaucitronServices_mandatory">';
524                   html += '<li class="tarteaucitronLine">';
525                   html += '   <div class="tarteaucitronName">';
526                   html += '       <span class="tarteaucitronH3" role="heading" aria-level="3">' + tarteaucitron.lang.mandatoryText + '</span>';
527                   html += '       <span class="tarteaucitronListCookies" aria-hidden="true"></span><br/>';
528                   html += '   </div>';
529                   if (tarteaucitron.parameters.mandatoryCta == true) {
530                       html += '   <div class="tarteaucitronAsk">';
531                       html += '       <button type="button" class="tarteaucitronAllow" tabindex="-1" disabled>';
532                       html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
533                       html += '       </button> ';
534                       html += '       <button type="button" class="tarteaucitronDeny" tabindex="-1">';
535                       html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
536                       html += '       </button> ';
537                       html += '   </div>';
538                   }
539                   html += '</li>';
540                   html += '</ul></li>';
541                }
542
543                for (i = 0; i < cat.length; i += 1) {
544                    html += '         <li id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
545                    html += '            <div class="tarteaucitronTitle" role="heading" aria-level="2">';
546                    if(tarteaucitron.parameters.showDetailsOnClick)
547                    {
548                        html += '               <button type="button" class="catToggleBtn" aria-expanded="false" data-cat="tarteaucitronDetails' + cat[i] + '"><span class="tarteaucitronPlus" aria-hidden="true"></span> ' + tarteaucitron.lang[cat[i]].title + '</button>';
549                    }else{
550                        html += '               <span class="asCatToggleBtn" data-cat="tarteaucitronInlineDetails' + cat[i] + '">' + tarteaucitron.lang[cat[i]].title + '</span>';
551                    }
552                    html += '            </div>';
553                    html += '            <div id="tarteaucitronDetails' + cat[i] + '" class="tarteaucitronDetails '+ (tarteaucitron.parameters.showDetailsOnClick ? 'tarteaucitronInfoBox' : 'tarteaucitronDetailsInline')+'">';
554                    html += '               ' + tarteaucitron.lang[cat[i]].details;
555                    html += '            </div>';
556                    html += '         <ul id="tarteaucitronServices_' + cat[i] + '"></ul></li>';
557                }
558                html += '             <li id="tarteaucitronNoServicesTitle" class="tarteaucitronLine">' + tarteaucitron.lang.noServices + '</li>';
559                html += '         </ul>';
560                html += '         <div class="tarteaucitronHidden tarteaucitron-spacer-20" id="tarteaucitronScrollbarChild"></div>';
561                if (tarteaucitron.parameters.removeCredit === false) {
562                    html += '     <a class="tarteaucitronSelfLink" href="https://tarteaucitron.io/" rel="nofollow noreferrer noopener" target="_blank" title="tarteaucitron ' + tarteaucitron.lang.newWindow + '"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAAAeCAYAAAAWwoEYAAADl0lEQVRoge1Y0W3bQAx9CjKARlC+9GVUmqDJBHEmiDyB6wkcTxBngtgTxJ0gzgQW4C/9aYOmE6g4lTQo+k6y3Rb94QOERNQd+cjj8XiGwWAwGAwGg8FgMBgMBoPB8F8RNRXe+whEKe7c36ZCAeCRxC9Rig2PUd8kPgAsoxSfQ3YAzAA8D/HwYYCb05kBKKO0teFkmbC1jlKsAnq/Abjn+QBqAIsoRS30ttwG/HNz1wH/XIxWTicLdvtW7xTAGEAMtP685CNsBTe2d/BLydfXAG57SEnMAST0zgYZSUCPk02bCvkJduIzuJzDLfPolbY+tLKmar+/8+IRePy4qdpE03qHuH8fipFb4N2+XdA3AJ/0vaQxt7s9FvkIS2XvtqnwM0rxpOQfbnE5G2LhTCmUO2fHIngOmcv+KG3HafDchB6ntwjYqenR2PqC7sOZ3E7FXHB0vqxoFyUyLh7OEH7LOGouvhhN3eIBeKXv0n5MsufdHqXcwYR5U2EbpV35lSspVPJmQj4TcgRK7jTg5IzmPUhhwM5a2WHUFCx+NgiDucmgh7idikLovHFlL0pxQ9xzX+IIP9Y6FrJsqhjlQpZRAkFVDCjZfcCHt6bqJDmuh5ylCWx0RVnk3oumaknqTH5sqrY0fBWyULaHUIgAgxb46MxV3DbieAhxOxUxjSuljig9lMQ/Bcfoi9BTEv9aLORSndVxYOH525sUDC6u2gWxcNzBNRxPanyh3ktKinOgy3WoxPbtUM0t6RkbQnzBnFPgi9GCOEubY9UffIryz9iKRe8s/FUfEWosJJGxagp85bpUO3VywQ46lOtAWfNxKwa4JXQ+628+bpxYGXXMzp5rXH401VEyXwIdowXFaKWSMFHvMTVmGnc+P3oXV2QOiBCfgex8QtcQCbcQE/H+eoHzrkFo1KM7zVO4jVVj5s6lRiWF7zyXyfRMc97J3tzj87mYqZ7E2YjzUct9GUi4tjHLR8dVkBLjQcuHFleWvQfRNEhFR7uX7pkctOwvZXsft7sAtyldEUIN2UTeLxnEfxKYswzdi88BdbZ8hifUoSMftQvP+muRwN6+Q3DeqqRExP9QmTtcheiHh0Ot1x2i2km1bP9pbufw5zZdyWsOrh7vQae5OZWbsMv30pi7cd/CKj3coPEVaCP4Zhx4eQWhOZ1Y9MTXGyP8/iGjEyfa1T4fO/4Lea9vBoPBYDAYDAaDwWAwGAwGwz8GgF8siXCCbrSRhgAAAABJRU5ErkJggg==" alt="tarteaucitron.io" /></a>';
563                }
564                html += '       </div>';
565                html += '   </div>';
566                html += '</div>';
567
568                if (tarteaucitron.parameters.orientation === 'bottom') {
569                    orientation = 'Bottom';
570                }
571
572                if (tarteaucitron.parameters.orientation === 'middle' || tarteaucitron.parameters.orientation === 'popup') {
573                    modalAttrs = ' role="dialog" aria-modal="true" aria-labelledby="tac_title"';
574                }
575
576                if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
577                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '"' + modalAttrs + '>';
578                    //html += '<div class="tarteaucitronAlertBigWrapper">';
579                    html += '   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';
580                    html += '       ' + tarteaucitron.lang.alertBigPrivacy;
581                    html += '   </span>';
582                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
583                    html += '   <button type="button" id="tarteaucitronPersonalize" aria-label="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '">';
584                    html += '       ' + tarteaucitron.lang.personalize;
585                    html += '   </button>';
586
587                    if (tarteaucitron.parameters.privacyUrl !== "") {
588                        html += '   <button role="link" type="button" id="tarteaucitronPrivacyUrl">';
589                        html += '       ' + tarteaucitron.lang.privacyUrl;
590                        html += '   </button>';
591                    }
592
593                    //html += '   </span>';
594                    //html += '</div>';
595                    html += '</div>';
596                } else {
597                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '"' + modalAttrs + '>';
598                    //html += '<div class="tarteaucitronAlertBigWrapper">';
599                    html += '   <span id="tarteaucitronDisclaimerAlert" role="paragraph">';
600
601                    if (tarteaucitron.parameters.highPrivacy) {
602                        html += '       ' + tarteaucitron.lang.alertBigPrivacy;
603                    } else {
604                        html += '       ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig;
605                    }
606
607                    html += '   </span>';
608                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
609                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronAllow" id="tarteaucitronPersonalize2">';
610                    html += '       <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.acceptAll;
611                    html += '   </button>';
612
613
614                    if (tarteaucitron.parameters.DenyAllCta) {
615                        if (tarteaucitron.reloadThePage) {
616                                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2" aria-label="' + tarteaucitron.lang.denyAll + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.denyAll + ' (' + tarteaucitron.lang.reload + ')">';
617                        } else {
618                                    html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny" id="tarteaucitronAllDenied2">';
619                        }
620                                    html += '       <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.denyAll;
621                                    html += '   </button>';
622                                    //html += '   <br/><br/>';
623                    }
624
625                    html += '   <button type="button" id="tarteaucitronClose
vendor: 5,924 bytes, lines 625-670
625Alert" aria-label="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.personalize + ' ' + tarteaucitron.lang.modalWindow + '">';
626                    html += '       ' + tarteaucitron.lang.personalize;
627                    html += '   </button>';
628
629                    if (tarteaucitron.parameters.privacyUrl !== "") {
630                        html += '   <button type="button" id="tarteaucitronPrivacyUrl" role="link">';
631                        html += '       ' + tarteaucitron.lang.privacyUrl;
632                        html += '   </button>';
633                    }
634
635                    //html += '   </span>';
636                    //html += '</div>';
637                    html += '</div>';
638                    html += '<div id="tarteaucitronPercentage"></div>';
639                }
640
641                if (tarteaucitron.parameters.showIcon === true) {
642                    html += '<div id="tarteaucitronIcon" class="tarteaucitronIcon' + tarteaucitron.parameters.iconPosition + '">';
643                    html += '   <button type="button" id="tarteaucitronManager" aria-label="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '">';
644                    html += '       <img src="' + (tarteaucitron.parameters.iconSrc ? tarteaucitron.parameters.iconSrc : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAGA0lEQVRoge1a207bWBRdBtJwLYZhKDMVmlSK1LxNkPo+ZH6g8B6p5AuALwC+APoFoVLeoT8whPeRSt+CZKmZVu3AiIsRlEtCktGyjy8xzuXYhvahS0JJHJ/4rLP3XnuffcAPfGdQ7mM6jRLSAF4BxqsbewB2lRS2o35mpEQaJcwCyANIdLi1DGBNSWEzqmdHRqRRwjqAJclhtExOSUEP+/xIiDRKhhUWfL7ShTtBuJnqcw+/z4Ql0xNmMEwSSz4kuNIzSgpjSsqYJP/GeE185wYJroedRyiLNEpGLLzzrHSuk+83SgbxvOcyyRaDziWsRVZkSRDinpzPbwVGWIucuohsKynMS47fAQyls/BMSRmKJo3AFhG5wm2N1wF+Zs3zebbFfR0RxrXcJHQlgH+LMW616pR/WiIMEXfW3mtzXyeEGWsjKot8c4TOI98L+iKaR5PS6IUk88RLAO9F8UjrbYoYMOosNavpfmODIiwRXRR/G3ohaWVo1RU/c30jV8ab2mV8qVGzHWBOLyTLZiWs5Rolg/C3ySOi0tXP/k4aEwOwSBKPJs7Rp16ABJTe+p1xVX0It/owqqdDEMRoqd3RFxqDPh20Ig6VEPVC0i5RSCD+6wl6HlW7GksSlUMV11/GrUs5NasFLusDE9ELSVphXemtJwaT/8JyIRvxNNCfBmIiNdR04LII3DSrbe0yjqvyJF/ppptqVlt+MCLCEh/oOkPPP6N38Mb5cnQBGFsEqmXg5j3QMwoMzwGnr4HYbybBq13gZAOom/FO63zdf2qQArCsZrUN2TlJy69eSDKYV+6Q4MpP75ivHzPA53ngaBW4eGuSOt0A/lsGPmXMz0+3TFJcTfFbPfFbfnwlhON+iQhlWmA82CQ4ocQ7c6KcfL3DHuls0yT6Sx4YnLXJDCQOIRRv5yGIJBgP8Sdisj2qubpc5UGJmo+W49ifVmzL8HcpGhQPvZCUKiCliIhEN0tr2OCqHuSA8gwQ/92MkU7gxEmeVqGrTTgpxPXbUrtGWYus0I9thRIraagRQUIDf7Qn4yZhKRiFQIyhfMfUr3yblokVWSJ6k8xSnc7eNN/RjowfCYiFoDUFer1S3gW6JiJ8Nt30EMbEhU+vzSIztuRYjRLsR8IHLjlf7HZ+MrWWEXxNmbvapt4jGSqZRYSkGUetSNTPzHsui5YMQ2ajJUNks6mw4wT54Ok2ShnzzIPCUGshzawCRKy5FqvrTZe0RWzQGvw79m67XZjKmxJrLsICjtZa55gxXy+6F4sYsEtxTqhXdRTLC8ulSDaWoCLsolfN+8YUhOsJV709H7Cudr0LlVEtzqBcN+shEyThdR941OnAbF8pirKJqXyupTRTtQSReiVmXW1j7oBErB0d9xM2WEd5J9ZKYtuR4WKwwBSoORbpGrJ5ZI9lt71irJmGX1px0JYE26uNErawr2zfIcP4OHEKXm66PA3wjpCNEfpJunI4muifPjKvsFCkGjExTq63yxMJsZNMYF/J4HmDC5A3Yq36jy0ClePHVhwuu/b1HSFlEfHD5ZtD1bEK44Qu1mWys6tbWmZyPWckzlPTGiRw/XHCuk+q4Rek+mVrVL/UppwrdDEGNV2kpyuhccgc5Oxm9vWnn+19vJrVpLor0kTUrGacMplb1CfOFyTD4o9uNrHqr2Z+ZMSp1c2XcVSORnh9Q81q3k599ETgkNnjg0nGzi10K7rX+bZpHbrblPcY5A4Zxk2xcjzCvTpd9027Aa0QtouyyrKFRR6D/04DwkFGvHPXM3Qda/Jb4nPgI7hQLVM1q5HIBt2MzQNa57Z1DiiLAGa5Mi+O4Sz3Mpp6laPHO6InII3ITnX1QtI+EOX+m9ZxleOZ/j9PiuKoLi3aqXPuEoSye/Vhkm+LalbLtHhMS0R6zu7aZ3vP2jOjL7QVv4McxhcDnZIelAQibGIbULOapf3PuE1Vs9qeaOTdkVKr00gCQiw4NlBzDvf1Lxx+uP5r3Dgv5KQZRzWn+GRwz8jmDS8itUg7iB6vLuJCF5Uty4A9mVKkFR6MiJDachST/oHvHgD+B4SoUIitpF05AAAAAElFTkSuQmCC') + '" alt="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.icon + ' ' + tarteaucitron.lang.modalWindow + '">';
645                    html += '   </button>';
646                    html += '</div>';
647                }
648
649                if (tarteaucitron.parameters.showAlertSmall === true) {
650                    html += '<div id="tarteaucitronAlertSmall" class="tarteaucitronAlertSmall' + orientation + '">';
651                    html += '   <button type="button" id="tarteaucitronManager" aria-label="' + tarteaucitron.lang.alertSmall + ' ' + tarteaucitron.lang.modalWindow + '" title="' + tarteaucitron.lang.alertSmall + ' ' + tarteaucitron.lang.modalWindow + '">';
652                    html += '       ' + tarteaucitron.lang.alertSmall;
653                    html += '       <span id="tarteaucitronDot">';
654                    html += '           <span id="tarteaucitronDotGreen"></span>';
655                    html += '           <span id="tarteaucitronDotYellow"></span>';
656                    html += '           <span id="tarteaucitronDotRed"></span>';
657                    html += '       </span>';
658                    if (tarteaucitron.parameters.cookieslist === true) {
659                        html += '   </button><!-- @whitespace';
660                        html += '   --><button type="button" id="tarteaucitronCookiesNumber" aria-expanded="false" aria-controls="tarteaucitronCookiesListContainer">0</button>';
661                        html += '   <div id="tarteaucitronCookiesListContainer">';
662                        if (tarteaucitron.reloadThePage) {
663                            html += '       <button type="button" id="tarteaucitronClosePanelCookie" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
664                        } else {
665                            html += '       <button type="button" id="tarteaucitronClosePanelCookie">';
666                        }
667                        html += '           ' + tarteaucitron.lang.close;
668                        html += '       </button>';
669                        html += '       <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';
670                        html += '            <span class="tarteaucitronH2" role="heading" aria-level="
vendor: 13,429 bytes, lines 670-879
6702" id="tarteaucitronCookiesNumberBis">0 cookie</span>';
671                        html += '       </div>';
672                        html += '       <div id="tarteaucitronCookiesList"></div>';
673                        html += '    </div>';
674                    } else {
675                        html += '   </div>';
676                    }
677                    html += '</div>';
678                }
679
680                tarteaucitron.addInternalScript(tarteaucitron.cdn + 'advertising' + (useMinifiedJS ? '.min' : '') + '.js', '', function () {
681                    if (tarteaucitronNoAdBlocker === true || tarteaucitron.parameters.adblocker === false) {
682
683                        // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened
684                        /*var wrapper = document.createElement('div');
685                        wrapper.id = "tarteaucitronContentWrapper";
686
687                        while (document.body.firstChild)
688                        {
689                            wrapper.appendChild(document.body.firstChild);
690                        }
691
692                        // Append the wrapper to the body
693                        document.body.appendChild(wrapper);*/
694
695                        div.id = 'tarteaucitronRoot';
696                        if (tarteaucitron.parameters.bodyPosition === 'top') {
697                            // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
698                            var bodyFirstChild = body.firstChild;
699                            body.insertBefore(div, bodyFirstChild);
700                        }
701                        else {
702                            // Append tarteaucitron: #tarteaucitronRoot last-child of the body
703                            body.appendChild(div, body);
704                        }
705
706                        div.setAttribute('data-nosnippet', 'true');
707                        div.setAttribute('lang', language);
708                        div.setAttribute('role', 'region');
709                        div.setAttribute('aria-labelledby', 'tac_title');
710
711                        div.innerHTML = html;
712
713                        //ie compatibility
714                        var tacRootAvailableEvent;
715                        if(typeof(Event) === 'function') {
716                            tacRootAvailableEvent = new Event("tac.root_available");
717                        }else if (typeof(document.createEvent) === 'function'){
718                            tacRootAvailableEvent = document.createEvent('Event');
719                            tacRootAvailableEvent.initEvent("tac.root_available", true, true);
720                        }
721                        //end ie compatibility
722
723                        if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacRootAvailableEvent);}
724
725                        if (tarteaucitron.job !== undefined) {
726                            tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job);
727                            for (index = 0; index < tarteaucitron.job.length; index += 1) {
728                                tarteaucitron.addService(tarteaucitron.job[index]);
729                            }
730                        } else {
731                            tarteaucitron.job = [];
732                        }
733
734                        if (tarteaucitron.job.length === 0) {
735                            tarteaucitron.userInterface.closeAlert();
736                        }
737
738                        tarteaucitron.isAjax = true;
739
740                        tarteaucitron.job.push = function (id) {
741
742                            // ie <9 hack
743                            if (typeof tarteaucitron.job.indexOf === 'undefined') {
744                                tarteaucitron.job.indexOf = function (obj, start) {
745                                    var i,
746                                        j = this.length;
747                                    for (i = (start || 0); i < j; i += 1) {
748                                        if (this[i] === obj) { return i; }
749                                    }
750                                    return -1;
751                                };
752                            }
753
754                            if (tarteaucitron.job.indexOf(id) === -1) {
755                                Array.prototype.push.call(this, id);
756                            }
757                            tarteaucitron.launch[id] = false;
758                            tarteaucitron.addService(id);
759                        };
760
761                        if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
762                            tarteaucitron.userInterface.openPanel();
763                        }
764
765                        tarteaucitron.cookie.number();
766                        setInterval(tarteaucitron.cookie.number, 60000);
767                    }
768                }, tarteaucitron.parameters.adblocker);
769
770                if (tarteaucitron.parameters.adblocker === true) {
771                    setTimeout(function () {
772                        if (tarteaucitronNoAdBlocker === false) {
773                            html = '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + ' tarteaucitron-display-block" role="alert" aria-live="polite">';
774                            html += '   <p id="tarteaucitronDisclaimerAlert">';
775                            html += '       ' + tarteaucitron.lang.adblock + '<br/>';
776                            html += '       <strong>' + tarteaucitron.lang.adblock_call + '</strong>';
777                            html += '   </p>';
778                            html += '   <button type="button" class="tarteaucitronCTAButton" id="tarteaucitronCTAButton">';
779                            html += '       ' + tarteaucitron.lang.reload;
780                            html += '   </button>';
781                            html += '</div>';
782                            html += '<div role="heading" aria-level="1" id="tac_title" class="tac_visually-hidden">' + tarteaucitron.lang.title + '</div>';
783                            html += '<div id="tarteaucitronPremium"></div>';
784
785                            div.id = 'tarteaucitronRoot';
786                            if (tarteaucitron.parameters.bodyPosition === 'top') {
787                                // Prepend tarteaucitron: #tarteaucitronRoot first-child of the body for better accessibility
788                                var bodyFirstChild = body.firstChild;
789                                body.insertBefore(div, bodyFirstChild);
790                            }
791                            else {
792                                // Append tarteaucitron: #tarteaucitronRoot last-child of the body
793                                body.appendChild(div, body);
794                            }
795
796                            div.setAttribute('data-nosnippet', 'true');
797                            div.setAttribute('lang', language);
798                            div.setAttribute('role', 'region');
799                            div.setAttribute('aria-labelledby', 'tac_title');
800
801                            div.innerHTML = html;
802                        }
803                    }, 1500);
804                }
805                if(tarteaucitron.parameters.closePopup === true){
806                    setTimeout(function() {
807                        var closeElement = document.getElementById('tarteaucitronAlertBig'),
808                            closeButton = document.createElement('button');
809                        if (closeElement) {
810                            closeButton.innerHTML = '<span aria-hidden="true">X</span><span class="tac_visually-hidden">' + tarteaucitron.lang.closeBanner + '</span>';
811                            closeButton.setAttribute('id', 'tarteaucitronCloseCross');
812                            closeElement.insertAdjacentElement('beforeend', closeButton);
813                        }
814                    }, 100);
815                }
816
817                if(tarteaucitron.parameters.groupServices === true) {
818                    var tac_group_style = document.createElement('style');
819                    tac_group_style.innerHTML = '.tarteaucitronTitle{display:none}';
820                    document.head.appendChild(tac_group_style);
821                    var cats = document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
822                    Array.prototype.forEach.call(cats, function(item) {
823                        var cat = item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/, "");
824                        if (cat !== "mandatory") {
825                            var html = '';
826                            html += '<li  class="tarteaucitronLine">';
827                            html += '   <div class="tarteaucitronName">';
828                            html += '       <span class="tarteaucitronH3" role="heading" aria-level="2">'+tarteaucitron.lang[cat].title+'</span>';
829                            html += '       <span>'+tarteaucitron.lang[cat].details+'</span>';
830                            html += '   <button type="button" aria-expanded="false" class="tarteaucitron-toggle-group" id="tarteaucitron-toggle-group-'+cat+'">'+tarteaucitron.lang.alertSmall+' ('+document.getElementById("tarteaucitronServices_"+cat).childElementCount+')</button>';
831                            html += '   </div>';
832                            html += '   <div class="tarteaucitronAsk" id="tarteaucitron-group-'+cat+'">';
833                            html += '       <button type="button" aria-label="' + tarteaucitron.lang.allow + ' ' + tarteaucitron.lang[cat].title + '" class="tarteaucitronAllow" id="tarteaucitron-accept-group-'+cat+'">';
834                            html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
835                            html += '       </button> ';
836                            html += '       <button type="button" aria-label="' + tarteaucitron.lang.deny + ' ' + tarteaucitron.lang[cat].title + '" class="tarteaucitronDeny" id="tarteaucitron-reject-group-'+cat+'">';
837                            html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
838                            html += '       </button>';
839                            html += '   </div>';
840                            html += '</li>';
841                            var ul = document.createElement('ul');
842                            ul.innerHTML = html;
843                            item.insertBefore(ul, item.querySelector('#tarteaucitronServices_'+cat+''));
844                            document.querySelector('#tarteaucitronServices_' + cat).style.display = 'none';
845                            tarteaucitron.addClickEventToId("tarteaucitron-toggle-group-" + cat, function () {
846                                tarteaucitron.userInterface.toggle('tarteaucitronServices_' + cat);
847                               if (document.getElementById('tarteaucitronServices_' + cat).style.display == 'block') {
848                                    tarteaucitron.userInterface.addClass('tarteaucitronServicesTitle_' + cat, 'tarteaucitronIsExpanded');
849                                    document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded', 'true');
850                                } else {
851                                    tarteaucitron.userInterface.removeClass('tarteaucitronServicesTitle_' + cat, 'tarteaucitronIsExpanded');
852                                    document.getElementById('tarteaucitron-toggle-group-'+cat).setAttribute('aria-expanded', 'false');
853                                }
854                                //tarteaucitron.initEvents.resizeEvent();
855                            });
856                            tarteaucitron.addClickEventToId("tarteaucitron-accept-group-" + cat, function () {
857                                tarteaucitron.userInterface.respondAll(true, cat);
858                            });
859                            tarteaucitron.addClickEventToId("tarteaucitron-reject-group-" + cat, function () {
860                                tarteaucitron.userInterface.respondAll(false, cat);
861                            });
862                        }
863                    });
864                }
865
866                // add info about the services on the main banner
867                if (tarteaucitron.parameters.partnersList === true && (tarteaucitron.parameters.orientation === "middle" || tarteaucitron.parameters.orientation === "popup")) {
868                    setTimeout(function() {
869                        var liPartners = "";
870                        var tarteaucitronPartnersCat = [];
871                        tarteaucitron.job.forEach(function (id) {
872                            if (tarteaucitronPartnersCat[tarteaucitron.services[id].type] === undefined) {
873                                tarteaucitronPartnersCat[tarteaucitron.services[id].type] = true;
874                                liPartners += "<li>" + tarteaucitron.lang[tarteaucitron.services[id].type].title + "</li>";
875                            }
876                        });
877                        var tacPartnersInfoParent = document.getElementById('tarteaucitronDisclaimerAlert');
878                        if (tacPartnersInfoParent !== null) {
879                            tacPartnersInfoParent.insertAdjacentHTML('beforeend', '<div class="tarteaucitronPartnersList"><b>
879' + tarteaucitron.lang.ourpartners + ' (' + tarteaucitron.job.length + ')</b> <ul>' + liPartners + '</ul></div>');
880                        }
881                    }, 100);
882                }
883
884                // add a save button
885                setTimeout(function() {
886                    var tacSaveButtonParent = document.getElementById('tarteaucitronServices');
887                    if (tacSaveButtonParent !== null) {
888                        tacSaveButtonParent.insertAdjacentHTML('beforeend', '<div id="tarteaucitronSave"><button class="tarteaucitronAllow" id="tarteaucitronSaveButton">' + tarteaucitron.lang.save + '</button></div>');
889                    }
890                }, 100);
891
892                tarteaucitron.userInterface.color("", true);
893
894                // add a little timeout to be sure everything is accessible
895                setTimeout(function () {
896
897                    // Setup events
898                    tarteaucitron.addClickEventToId("tarteaucitronCloseCross", function () {
899                        tarteaucitron.userInterface.closeAlert();
900                    });
901                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize", function () {
902                        tarteaucitron.userInterface.openPanel();
903                    });
904                    tarteaucitron.addClickEventToId("tarteaucitronPersonalize2", function () {
905                        tarteaucitron.userInterface.respondAll(true);
906                    });
907                    tarteaucitron.addClickEventToId("tarteaucitronManager", function () {
908                        tarteaucitron.userInterface.openPanel();
909                    });
910                    tarteaucitron.addClickEventToId("tarteaucitronBack", function () {
911                        tarteaucitron.userInterface.closePanel();
912                    });
913                    tarteaucitron.addClickEventToId("tarteaucitronClosePanel", function () {
914                        tarteaucitron.userInterface.closePanel();
915                    });
916                    tarteaucitron.addClickEventToId("tarteaucitronClosePanelCookie", function () {
917                        tarteaucitron.userInterface.closePanel();
918                    });
919                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrl", function () {
920                        document.location = tarteaucitron.parameters.privacyUrl;
921                    });
922                    tarteaucitron.addClickEventToId("tarteaucitronPrivacyUrlDialog", function () {
923                        document.location = tarteaucitron.parameters.privacyUrl;
924                    });
925                    tarteaucitron.addClickEventToId("tarteaucitronCookiesNumber", function () {
926                        tarteaucitron.userInterface.toggleCookiesList();
927                    });
928                    tarteaucitron.addClickEventToId("tarteaucitronAllAllowed", function () {
929                        tarteaucitron.userInterface.respondAll(true);
930                    });
931                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied", function () {
932                        tarteaucitron.userInterface.respondAll(false);
933                    });
934                    tarteaucitron.addClickEventToId("tarteaucitronAllDenied2", function () {
935                        tarteaucitron.userInterface.respondAll(false, '', true);
936                        if (tarteaucitron.reloadThePage === true) {
937                            window.location.reload();
938                        }
939                    });
940                    tarteaucitron.addClickEventToId("tarteaucitronCloseAlert", function () {
vendor: 38,815 bytes, lines 941-1703
941                        tarteaucitron.userInterface.openPanel();
942                    });
943                    tarteaucitron.addClickEventToId("tarteaucitronCTAButton", function () {
944                        location.reload();
945                    });
946                    tarteaucitron.addClickEventToId("tarteaucitronSaveButton", function () {
947                        var timeoutSaveButton = 0;
948                        tarteaucitron.job.forEach(function(id) {
949                            if (tarteaucitron.state[id] !== true && tarteaucitron.state[id] !== false) {
950                                timeoutSaveButton = 500;
951                                tarteaucitron.setConsent(id, false);
952                            }
953                        });
954                        setTimeout(tarteaucitron.userInterface.closePanel, timeoutSaveButton);
955                    });
956                    var toggleBtns = document.getElementsByClassName("catToggleBtn"), i;
957                    for (i = 0; i < toggleBtns.length; i++) {
958                        toggleBtns[i].dataset.index = i;
959                        tarteaucitron.addClickEventToElement(toggleBtns[i], function () {
960                            if(!tarteaucitron.parameters.showDetailsOnClick) return false;
961                            tarteaucitron.userInterface.toggle('tarteaucitronDetails' + cat[this.dataset.index], 'tarteaucitronInfoBox');
962                            if (document.getElementById('tarteaucitronDetails' + cat[this.dataset.index]).style.display === 'block') {
963                                this.setAttribute('aria-expanded', 'true');
964                            } else {
965                                this.setAttribute('aria-expanded', 'false');
966                            }
967                            return false;
968                        });
969                    }
970
971                    // accessibility: on click on "Allow" in the site (not in TAC module), move focus to the loaded service's parent 
972                    var allowBtnsInSite = document.querySelectorAll(".tac_activate .tarteaucitronAllow");
973                    for (i = 0; i < allowBtnsInSite.length; i++) {
974                        tarteaucitron.addClickEventToElement(allowBtnsInSite[i], function () {
975                            if(this.closest('.tac_activate') !== null && this.closest('.tac_activate').parentNode !== null) {
976                                this.closest('.tac_activate').parentNode.setAttribute("tabindex", "-1");
977                                this.closest('.tac_activate').parentNode.focus();
978                            }
979                        });
980                    }
981
982                    var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
983                    for (i = 0; i < allowBtns.length; i++) {
984                        tarteaucitron.addClickEventToElement(allowBtns[i], function () {
985                            tarteaucitron.userInterface.respond(this, true);
986                        });
987                    }
988                    var denyBtns = document.getElementsByClassName("tarteaucitronDeny");
989                    for (i = 0; i < denyBtns.length; i++) {
990                        tarteaucitron.addClickEventToElement(denyBtns[i], function () {
991                            tarteaucitron.userInterface.respond(this, false);
992                        });
993                    }
994                    if(tarteaucitron.events.load) {
995                        tarteaucitron.events.load();
996                    }
997                }, 500);
998
999            });
1000        });
1001    },
1002    "addService": function (serviceId) {
1003        "use strict";
1004        var html = '',
1005            s = tarteaucitron.services,
1006            service = s[serviceId];
1007
1008        if (tarteaucitron.parameters.alwaysNeedConsent === true) {
1009            service.needConsent = true;
1010        }
1011
1012        var cookie = tarteaucitron.cookie.read(),
1013            hostname = document.location.hostname,
1014            hostRef = document.referrer.split('/')[2],
1015            isNavigating = (hostRef === hostname && window.location.href !== tarteaucitron.parameters.privacyUrl),
1016            isAutostart = (!service.needConsent),
1017            isWaiting = (cookie.indexOf(service.key + '=wait') >= 0),
1018            isDenied = (cookie.indexOf(service.key + '=false') >= 0),
1019            isAllowed = ((cookie.indexOf(service.key + '=true') >= 0) || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)),
1020            isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0),
1021            isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1"),
1022            currentStatus = (isAllowed) ? tarteaucitron.lang.allowed : tarteaucitron.lang.disallowed,
1023            state = (undefined !== service.defaultState) ? service.defaultState :
1024                    (undefined !== tarteaucitron.parameters.serviceDefaultState ? tarteaucitron.parameters.serviceDefaultState : 'wait');
1025
1026
1027        if (tarteaucitron.added[service.key] !== true) {
1028            tarteaucitron.added[service.key] = true;
1029
1030            html += '<li id="' + service.key + 'Line" class="tarteaucitronLine">';
1031            html += '   <div class="tarteaucitronName">';
1032            html += '       <span class="tarteaucitronH3" role="heading" aria-level="3">' + service.name + '</span>';
1033            html += '       <div class="tarteaucitronStatusInfo">';
1034            html += '          <span class="tacCurrentStatus" id="tacCurrentStatus' + service.key + '">'+currentStatus+'</span>';
1035            html += '          <span class="tarteaucitronReadmoreSeparator"> - </span>';
1036            html += '          <span id="tacCL' + service.key + '" class="tarteaucitronListCookies"></span>';
1037            html += '       </div>';
1038            if (tarteaucitron.parameters.moreInfoLink == true) {
1039
1040                var link = 'https://tarteaucitron.io/service/' + service.key + '/';
1041                if (service.readmoreLink !== undefined && service.readmoreLink !== '') {
1042                    link = service.readmoreLink;
1043                }
1044                if (tarteaucitron.parameters.readmoreLink !== undefined && tarteaucitron.parameters.readmoreLink !== '') {
1045                    link = tarteaucitron.parameters.readmoreLink;
1046                }
1047                html += '       <a href="' + link + '" target="_blank" rel="noreferrer noopener nofollow" title="' + tarteaucitron.lang.more + ' : '+ tarteaucitron.lang.cookieDetail + ' ' + service.name + ' ' + tarteaucitron.lang.ourSite + ' ' + tarteaucitron.lang.newWindow +'" class="tarteaucitronReadmoreInfo">' + tarteaucitron.lang.more + '</a>';
1048                html += '       <span class="tarteaucitronReadmoreSeparator"> - </span>';
1049                html += '       <a href="' + service.uri + '" target="_blank" rel="noreferrer noopener" title="' + tarteaucitron.lang.source + ' ' + service.name + ' ' + tarteaucitron.lang.newWindow + '" class="tarteaucitronReadmoreOfficial">' + tarteaucitron.lang.source + '</a>';
1050            }
1051
1052            html += '   </div>';
1053            html += '   <div class="tarteaucitronAsk">';
1054            html += '       <button type="button" aria-label="' + tarteaucitron.lang.allow + ' ' + service.name + '" id="' + service.key + 'Allowed" class="tarteaucitronAllow">';
1055            html += '           <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
1056            html += '       </button> ';
1057            html += '       <button type="button" aria-label="' + tarteaucitron.lang.deny + ' ' + service.name + '" id="' + service.key + 'Denied" class="tarteaucitronDeny">';
1058            html += '           <span class="tarteaucitronCross" aria-hidden="true"></span> ' + tarteaucitron.lang.deny;
1059            html += '       </button>';
1060            html += '   </div>';
1061            html += '</li>';
1062
1063            tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block');
1064
1065            if (document.getElementById('tarteaucitronServices_' + service.type) !== null) {
1066                document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html;
1067            }
1068
1069            tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none');
1070
1071            tarteaucitron.userInterface.order(service.type);
1072
1073            tarteaucitron.addClickEventToId(service.key + 'Allowed', function () {
1074                tarteaucitron.userInterface.respond(this, true);
1075            });
1076
1077            tarteaucitron.addClickEventToId(service.key + 'Denied', function () {
1078                tarteaucitron.userInterface.respond(this, false);
1079            });
1080        }
1081
1082        tarteaucitron.pro('!' + service.key + '=' + isAllowed);
1083
1084        // allow by default for non EU
1085        if (isResponded === false && tarteaucitron.user.bypass === true) {
1086            isAllowed = true;
1087            tarteaucitron.cookie.create(service.key, true);
1088        }
1089
1090        if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) {
1091            if (!isAllowed || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)) {
1092                tarteaucitron.cookie.create(service.key, true);
1093            }
1094            if (tarteaucitron.launch[service.key] !== true) {
1095                tarteaucitron.launch[service.key] = true;
1096                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.js(); }
1097                tarteaucitron.sendEvent(service.key + '_loaded');
1098            }
1099            tarteaucitron.state[service.key] = true;
1100            tarteaucitron.userInterface.color(service.key, true);
1101        } else if (isDenied) {
1102            if (typeof service.fallback === 'function') {
1103                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
1104            }
1105            tarteaucitron.state[service.key] = false;
1106            tarteaucitron.userInterface.color(service.key, false);
1107        } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
1108            tarteaucitron.cookie.create(service.key, 'false');
1109            if (typeof service.fallback === 'function') {
1110                if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
1111            }
1112            tarteaucitron.state[service.key] = false;
1113            tarteaucitron.userInterface.color(service.key, false);
1114        } else if (!isResponded) {
1115            tarteaucitron.cookie.create(service.key, state);
1116            if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) {
1117                if(true === state && typeof service.js === 'function') {
1118                    service.js();
1119                    tarteaucitron.sendEvent(service.key + '_loaded');
1120                } else if (typeof service.fallback === 'function') {
1121                    service.fallback();
1122                }
1123            }
1124
1125            tarteaucitron.userInterface.color(service.key, state);
1126
1127            if( 'wait' === state ) {
1128                tarteaucitron.userInterface.openAlert();
1129            }
1130        }
1131
1132        tarteaucitron.cookie.checkCount(service.key);
1133        tarteaucitron.sendEvent(service.key + '_added');
1134    },
1135    "sendEvent" : function(event_key) {
1136        if(event_key !== undefined) {
1137            //ie compatibility
1138            var send_event_item;
1139            if(typeof(Event) === 'function') {
1140                send_event_item = new Event(event_key);
1141            }else if (typeof(document.createEvent) === 'function'){
1142                send_event_item = document.createEvent('Event');
1143                send_event_item.initEvent(event_key, true, true);
1144            }
1145            //end ie compatibility
1146
1147            document.dispatchEvent(send_event_item);
1148        }
1149    },
1150    "cleanArray": function cleanArray(arr) {
1151        "use strict";
1152        var i,
1153            len = arr.length,
1154            out = [],
1155            obj = {},
1156            s = tarteaucitron.services;
1157
1158        for (i = 0; i < len; i += 1) {
1159            if (!obj[arr[i]]) {
1160                obj[arr[i]] = {};
1161                if (tarteaucitron.services[arr[i]] !== undefined) {
1162                    out.push(arr[i]);
1163                }
1164            }
1165        }
1166
1167        out = out.sort(function (a, b) {
1168            if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
1169            if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
1170            return 0;
1171        });
1172
1173        return out;
1174    },
1175    "setConsent": function (id, status) {
1176        if (status === true) {
1177            tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
1178        } else if (status === false) {
1179            tarteaucitron.userInterface.respond(document.getElementById(id + 'Denied'), false);
1180        }
1181    },
1182    "userInterface": {
1183        "css": function (id, property, value) {
1184            "use strict";
1185            if (document.getElementById(id) !== null) {
1186
1187                if (property == "display" && value == "none" && (id == "tarteaucitron" || id == "tarteaucitronBack" || id == "tarteaucitronAlertBig")) {
1188                    document.getElementById(id).style["opacity"] = "0";
1189
1190                    /*setTimeout(function() {*/document.getElementById(id).style[property] = value;/*}, 200);*/
1191                } else {
1192
1193                    document.getElementById(id).style[property] = value;
1194
1195                    if (property == "display" && value == "block" && (id == "tarteaucitron" || id == "tarteaucitronAlertBig")) {
1196                        document.getElementById(id).style["opacity"] = "1";
1197                    }
1198
1199                    if (property == "display" && value == "block" && id == "tarteaucitronBack") {
1200                        document.getElementById(id).style["opacity"] = "0.7";
1201                    }
1202
1203                    if (property == "display" && value == "block" && id == "tarteaucitronAlertBig" && (tarteaucitron.parameters.orientation == "middle"|| tarteaucitron.parameters.orientation == "popup")) {
1204                        tarteaucitron.userInterface.focusTrap('tarteaucitronAlertBig');
1205                    }
1206                }
1207            }
1208        },
1209        "addClass": function (id, className) {
1210            "use strict";
1211            if (document.getElementById(id) !== null && document.getElementById(id).classList !== undefined) {
1212                document.getElementById(id).classList.add(className);
1213            }
1214        },
1215        "removeClass": function (id, className) {
1216            "use strict";
1217            if (document.getElementById(id) !== null && document.getElementById(id).classList !== undefined) {
1218                document.getElementById(id).classList.remove(className);
1219            }
1220        },
1221        "respondAll": function (status, type, allowSafeAnalytics) {
1222            "use strict";
1223            var s = tarteaucitron.services,
1224                service,
1225                key,
1226                index = 0;
1227
1228            for (index = 0; index < tarteaucitron.job.length; index += 1) {
1229
1230                if (typeof type !== 'undefined' && type !== '' && s[tarteaucitron.job[index]].type !== type) {
1231                    continue;
1232                }
1233
1234                if (allowSafeAnalytics && typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) {
1235                    continue;
1236                }
1237
1238                service = s[tarteaucitron.job[index]];
1239                key = service.key;
1240                if (tarteaucitron.state[key] !== status) {
1241                    if (status === false && tarteaucitron.launch[key] === true) {
1242                        tarteaucitron.reloadThePage = true;
1243                        if (tarteaucitron.checkIfExist('tarteaucitronClosePanel')) {
1244                            var ariaCloseValue = document.getElementById('tarteaucitronClosePanel').textContent.trim() + ' (' + tarteaucitron.lang.reload + ')';
1245                            document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label", ariaCloseValue);
1246                            document.getElementById('tarteaucitronClosePanel').setAttribute("title", ariaCloseValue);
1247                        }
1248                    }
1249                    if (tarteaucitron.launch[key] !== true && status === true) {
1250
1251                        tarteaucitron.pro('!' + key + '=engage');
1252
1253                        tarteaucitron.launch[key] = true;
1254                        if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
1255                        tarteaucitron.sendEvent(key + '_loaded');
1256                    }
1257                    var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
1258                    tarteaucitron.state[key] = status;
1259                    tarteaucitron.cookie.create(key, status);
1260                    tarteaucitron.userInterface.color(key, status);
1261                    if (status == true) {
1262                        itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
1263                        tarteaucitron.sendEvent(key + '_allowed');
1264                    } else {
1265                        itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
1266                        tarteaucitron.sendEvent(key + '_disallowed');
1267                    }
1268                }
1269            }
1270        },
1271        "respond": function (el, status) {
1272            "use strict";
1273            if (el.id === '') {
1274                return;
1275            }
1276            var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), '');
1277
1278            if (key.substring(0, 13) === 'tarteaucitron' || key === '') {return;}
1279
1280            // return if same state
1281            if (tarteaucitron.state[key] === status) {
1282                return;
1283            }
1284
1285            if (status === false && tarteaucitron.launch[key] === true) {
1286                tarteaucitron.reloadThePage = true;
1287                if (tarteaucitron.checkIfExist('tarteaucitronClosePanel')) {
1288                    var ariaCloseValue = document.getElementById('tarteaucitronClosePanel').textContent.trim() + ' (' + tarteaucitron.lang.reload + ')';
1289                    document.getElementById('tarteaucitronClosePanel').setAttribute("aria-label", ariaCloseValue);
1290                    document.getElementById('tarteaucitronClosePanel').setAttribute("title", ariaCloseValue);
1291                }
1292            }
1293
1294            // if not already launched... launch the service
1295            if (status === true) {
1296                if (tarteaucitron.launch[key] !== true) {
1297
1298                    tarteaucitron.pro('!' + key + '=engage');
1299
1300                    tarteaucitron.launch[key] = true;
1301                    if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
1302                    tarteaucitron.sendEvent(key + '_loaded');
1303                }
1304            }
1305            var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
1306            tarteaucitron.state[key] = status;
1307            tarteaucitron.cookie.create(key, status);
1308            tarteaucitron.userInterface.color(key, status);
1309            if (status == true) {
1310                itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
1311                tarteaucitron.sendEvent(key + '_allowed');
1312            } else {
1313                itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
1314                tarteaucitron.sendEvent(key + '_disallowed');
1315            }
1316        },
1317        "color": function (key, status) {
1318            "use strict";
1319            var c = 'tarteaucitron',
1320                nbDenied = 0,
1321                nbPending = 0,
1322                nbAllowed = 0,
1323                sum = tarteaucitron.job.length,
1324                index,
1325                s = tarteaucitron.services;
1326
1327            if (key !== "") {
1328
1329            if (status === true) {
1330                tarteaucitron.userInterface.addClass(key + 'Line', 'tarteaucitronIsAllowed');
1331                tarteaucitron.userInterface.removeClass(key + 'Line', 'tarteaucitronIsDenied');
1332                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'true');
1333                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'false');
1334            } else if (status === false) {
1335                tarteaucitron.userInterface.removeClass(key + 'Line', 'tarteaucitronIsAllowed');
1336                tarteaucitron.userInterface.addClass(key + 'Line', 'tarteaucitronIsDenied');
1337                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
1338                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'true');
1339            } else {
1340                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
1341                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'false');
1342            }
1343
1344            // check if all services are allowed
1345            var sumToRemove = 0;
1346            for (index = 0; index < sum; index += 1) {
1347
1348                if (typeof s[tarteaucitron.job[index]].safeanalytic !== "undefined" && s[tarteaucitron.job[index]].safeanalytic === true) {
1349                    sumToRemove += 1;
1350                    continue;
1351                }
1352
1353                if (tarteaucitron.state[tarteaucitron.job[index]] === false) {
1354                    nbDenied += 1;
1355                } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) {
1356                    nbPending += 1;
1357                } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) {
1358                    nbAllowed += 1;
1359                }
1360            }
1361            sum -= sumToRemove;
1362
1363            tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%');
1364            tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%');
1365            tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%');
1366
1367            if (nbDenied === 0 && nbPending === 0) {
1368                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
1369                tarteaucitron.userInterface.addClass(c + 'AllAllowed', c + 'IsSelected');
1370
1371                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsAllowed');
1372                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
1373
1374                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'false');
1375                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'true');
1376
1377            } else if (nbAllowed === 0 && nbPending === 0) {
1378                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
1379                tarteaucitron.userInterface.addClass(c + 'AllDenied', c + 'IsSelected');
1380
1381                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
1382                tarteaucitron.userInterface.addClass(c + 'MainLineOffset', c + 'IsDenied');
1383
1384                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'true');
1385                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'false');
1386
1387            } else {
1388                tarteaucitron.userInterface.removeClass(c + 'AllAllowed', c + 'IsSelected');
1389                tarteaucitron.userInterface.removeClass(c + 'AllDenied', c + 'IsSelected');
1390
1391                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsAllowed');
1392                tarteaucitron.userInterface.removeClass(c + 'MainLineOffset', c + 'IsDenied');
1393
1394                document.getElementById(c + 'AllDenied').setAttribute('aria-pressed', 'false');
1395                document.getElementById(c + 'AllAllowed').setAttribute('aria-pressed', 'false');
1396            }
1397
1398            // close the alert if all service have been reviewed
1399            if (nbPending === 0) {
1400                tarteaucitron.userInterface.closeAlert();
1401            }
1402
1403            if (tarteaucitron.services[key].cookies.length > 0 && status === false) {
1404                tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies);
1405            }
1406
1407            if (status === true) {
1408                if (document.getElementById('tacCL' + key) !== null) {
1409                    document.getElementById('tacCL' + key).innerHTML = '...';
1410                }
1411                setTimeout(function () {
1412                    tarteaucitron.cookie.checkCount(key);
1413                }, 2500);
1414            } else {
1415                tarteaucitron.cookie.checkCount(key);
1416            }
1417
1418            }
1419
1420	    // groups
1421            var cats = document.querySelectorAll('[id^="tarteaucitronServicesTitle_"]')
1422            Array.prototype.forEach.call(cats, function(item) {
1423                var cat = item.getAttribute('id').replace(/^(tarteaucitronServicesTitle_)/, ""),
1424                    total = document.getElementById("tarteaucitronServices_"+cat).childElementCount;
1425                var doc = document.getElementById("tarteaucitronServices_"+cat),
1426                    groupdenied = 0,
1427                    groupallowed = 0;
1428                for (var ii = 0; ii < doc.children.length; ii++) {
1429                    if (doc.children[ii].className == "tarteaucitronLine tarteaucitronIsDenied") {
1430                        groupdenied++;
1431                    }
1432                    if (doc.children[ii].className == "tarteaucitronLine tarteaucitronIsAllowed") {
1433                        groupallowed++;
1434                    }
1435                }
1436                if (total === groupallowed) {
1437                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1438                    tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1439
1440                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1441                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'false');
1442                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'true');
1443                    }
1444                }
1445                if (total === groupdenied) {
1446                    tarteaucitron.userInterface.addClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1447                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1448
1449                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1450                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'true');
1451                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'false');
1452                    }
1453                }
1454                if (total !== groupdenied && total !== groupallowed) {
1455                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsDenied');
1456                    tarteaucitron.userInterface.removeClass('tarteaucitron-group-'+cat, 'tarteaucitronIsAllowed');
1457
1458                    if (document.getElementById('tarteaucitron-reject-group-'+cat)) {
1459                        document.getElementById('tarteaucitron-reject-group-'+cat).setAttribute('aria-pressed', 'false');
1460                        document.getElementById('tarteaucitron-accept-group-'+cat).setAttribute('aria-pressed', 'false');
1461                    }
1462                }
1463                groupdenied = 0;
1464                groupallowed = 0;
1465            });
1466
1467        },
1468        "openPanel": function () {
1469            "use strict";
1470
1471            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block');
1472            tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1473            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1474
1475            document.getElementById('tarteaucitronClosePanel').focus();
1476            if (document.getElementsByTagName('body')[0].classList !== undefined) {
1477                document.getElementsByTagName('body')[0].classList.add('tarteaucitron-modal-open');
1478            }
1479            tarteaucitron.userInterface.focusTrap('tarteaucitron');
1480            tarteaucitron.userInterface.jsSizing('main');
1481
1482            //ie compatibility
1483            var tacOpenPanelEvent;
1484            if(typeof(Event) === 'function') {
1485                tacOpenPanelEvent = new Event("tac.open_panel");
1486            }else if (typeof(document.createEvent) === 'function'){
1487                tacOpenPanelEvent = document.createEvent('Event');
1488                tacOpenPanelEvent.initEvent("tac.open_panel", true, true);
1489            }
1490            //end ie compatibility
1491
1492            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacOpenPanelEvent);}
1493        },
1494        "closePanel": function () {
1495            "use strict";
1496
1497            if (document.location.hash === tarteaucitron.hashtag) {
1498                if (window.history) {
1499                    window.history.replaceState('', document.title, window.location.pathname + window.location.search);
1500                } else {
1501                    document.location.hash = '';
1502                }
1503            }
1504            if (tarteaucitron.checkIfExist('tarteaucitron')) {
1505                // accessibility: manage focus on close panel
1506                if (tarteaucitron.checkIfExist('tarteaucitronCloseAlert')) {
1507                    document.getElementById('tarteaucitronCloseAlert').focus();
1508                } else if (tarteaucitron.checkIfExist('tarteaucitronManager')) {
1509                    document.getElementById('tarteaucitronManager').focus();
1510                } else if (tarteaucitron.customCloserId && tarteaucitron.checkIfExist(tarteaucitron.customCloserId)) {
1511                    document.getElementById(tarteaucitron.customCloserId).focus();
1512                }
1513                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1514            }
1515
1516            if (tarteaucitron.checkIfExist('tarteaucitronCookiesListContainer') && tarteaucitron.checkIfExist('tarteaucitronCookiesNumber')) {
1517                // accessibility: manage focus on close cookies list
1518                document.getElementById('tarteaucitronCookiesNumber').focus();
1519                document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-expanded", "false");
1520                tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
1521            }
1522
1523            tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1524                elem.style.display = 'none';
1525            }, true);
1526
1527            if (tarteaucitron.reloadThePage === true) {
1528                window.location.reload();
1529            } else {
1530                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1531            }
1532            if (document.getElementsByTagName('body')[0].classList !== undefined) {
1533                document.getElementsByTagName('body')[0].classList.remove('tarteaucitron-modal-open');
1534            }
1535
1536            //ie compatibility
1537            var tacClosePanelEvent;
1538            if(typeof(Event) === 'function') {
1539                tacClosePanelEvent = new Event("tac.close_panel");
1540            }else if (typeof(document.createEvent) === 'function'){
1541                tacClosePanelEvent = document.createEvent('Event');
1542                tacClosePanelEvent.initEvent("tac.close_panel", true, true);
1543            }
1544            //end ie compatibility
1545
1546            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacClosePanelEvent);}
1547        },
1548        "focusTrap": function(parentElement) {
1549            "use strict";
1550
1551            var focusableEls,
1552                firstFocusableEl,
1553                lastFocusableEl,
1554                filtered;
1555
1556            focusableEls = document.getElementById(parentElement).querySelectorAll('a[href], button');
1557            filtered = [];
1558
1559            // get only visible items
1560            for (var i = 0, max = focusableEls.length; i < max; i++) {
1561                if (focusableEls[i].offsetHeight > 0) {
1562                   filtered.push(focusableEls[i]);
1563                }
1564            }
1565
1566            firstFocusableEl = filtered[0];
1567            lastFocusableEl = filtered[filtered.length - 1];
1568
1569            //loop focus inside tarteaucitron
1570            document.getElementById(parentElement).addEventListener("keydown", function (evt) {
1571
1572                if ( evt.key === 'Tab' || evt.keyCode === 9 ) {
1573
1574                    if ( evt.shiftKey ) /* shift + tab */ {
1575                        if (document.activeElement === firstFocusableEl) {
1576                            lastFocusableEl.focus();
1577                            evt.preventDefault();
1578                        }
1579                    } else /* tab */ {
1580                        if (document.activeElement === lastFocusableEl) {
1581                            firstFocusableEl.focus();
1582                            evt.preventDefault();
1583                        }
1584                    }
1585                }
1586            })
1587        },
1588        "openAlert": function () {
1589            "use strict";
1590            var c = 'tarteaucitron';
1591            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block');
1592            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
1593            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'none');
1594            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'block');
1595            tarteaucitron.userInterface.addClass(c + 'Root',   'tarteaucitronBeforeVisible');
1596
1597            //ie compatibility
1598            var tacOpenAlertEvent;
1599            if(typeof(Event) === 'function') {
1600                tacOpenAlertEvent = new Event("tac.open_alert");
1601            }else if (typeof(document.createEvent) === 'function'){
1602                tacOpenAlertEvent = document.createEvent('Event');
1603                tacOpenAlertEvent.initEvent("tac.open_alert", true, true);
1604            }
1605            //end ie compatibility
1606
1607            if (document.getElementById('tarteaucitronAlertBig') !== null && tarteaucitron.parameters.orientation === 'middle') {
1608                document.getElementById('tarteaucitronAlertBig').focus();
1609            }
1610
1611            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacOpenAlertEvent);}
1612        },
1613        "closeAlert": function () {
1614            "use strict";
1615            var c = 'tarteaucitron';
1616            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none');
1617            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
1618            tarteaucitron.userInterface.css(c + 'Icon', 'display', 'block');
1619            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'none');
1620            tarteaucitron.userInterface.removeClass(c + 'Root',   'tarteaucitronBeforeVisible');
1621            tarteaucitron.userInterface.jsSizing('box');
1622
1623            //ie compatibility
1624            var tacCloseAlertEvent;
1625            if(typeof(Event) === 'function') {
1626                tacCloseAlertEvent = new Event("tac.close_alert");
1627            }else if (typeof(document.createEvent) === 'function'){
1628                tacCloseAlertEvent = document.createEvent('Event');
1629                tacCloseAlertEvent.initEvent("tac.close_alert", true, true);
1630            }
1631            //end ie compatibility
1632
1633            if (typeof(window.dispatchEvent) === 'function') {window.dispatchEvent(tacCloseAlertEvent);}
1634        },
1635        "toggleCookiesList": function () {
1636            "use strict";
1637            var div = document.getElementById('tarteaucitronCookiesListContainer'),
1638                togglediv = document.getElementById('tarteaucitronCookiesNumber');
1639
1640            if (div === null) {
1641                return;
1642            }
1643
1644            if (div.style.display !== 'block') {
1645                tarteaucitron.cookie.number();
1646                div.style.display = 'block';
1647                togglediv.setAttribute("aria-expanded", "true");
1648                tarteaucitron.userInterface.jsSizing('cookie');
1649                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1650                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
1651                tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
1652                    elem.style.display = 'none';
1653                }, true);
1654            } else {
1655                div.style.display = 'none';
1656                togglediv.setAttribute("aria-expanded", "false");
1657                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
1658                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
1659            }
1660        },
1661        "toggle": function (id, closeClass) {
1662            "use strict";
1663            var div = document.getElementById(id);
1664
1665            if (div === null) {
1666                return;
1667            }
1668
1669            if (closeClass !== undefined) {
1670                tarteaucitron.fallback([closeClass], function (elem) {
1671                    if (elem.id !== id) {
1672                        elem.style.display = 'none';
1673                    }
1674                }, true);
1675            }
1676
1677            if (div.style.display !== 'block') {
1678                div.style.display = 'block';
1679            } else {
1680                div.style.display = 'none';
1681            }
1682        },
1683        "order": function (id) {
1684            "use strict";
1685            var main = document.getElementById('tarteaucitronServices_' + id),
1686                allDivs,
1687                store = [],
1688                i;
1689
1690            if (main === null) {
1691                return;
1692            }
1693
1694            allDivs = main.childNodes;
1695
1696            if (typeof Array.prototype.map === 'function' && typeof Enumerable === 'undefined') {
1697                Array.prototype.map.call(main.children, Object).sort(function (a, b) {
1698                //var mainChildren = Array.from(main.children);
1699                //mainChildren.sort(function (a, b) {
1700                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
1701                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
1702                    return 0;
1703                }
1703).forEach(function (element) {
1704                    main.appendChild(element);
1705                });
1706            }
1707        },
1708        "jsSizing": function (type) {
1709            "use strict";
1710            var scrollbarMarginRight = 10,
1711                scrollbarWidthParent,
1712                scrollbarWidthChild,
1713                servicesHeight,
1714                e = window,
1715                a = 'inner',
1716                windowInnerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
1717                mainTop,
1718                mainHeight,
1719                closeButtonHeight,
1720                headerHeight,
1721                cookiesListHeight,
1722                cookiesCloseHeight,
1723                cookiesTitleHeight,
1724                paddingBox,
1725                alertSmallHeight,
1726                cookiesNumberHeight;
1727
1728            if (type === 'box') {
1729                if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) {
1730
1731                    // reset
1732                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px');
1733
1734                    // calculate
1735                    alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight;
1736                    cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight;
1737                    paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2;
1738
1739                    // apply
1740                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px');
1741                }
1742            } else if (type === 'main') {
1743
1744                // get the real window width for media query
1745                if (window.innerWidth === undefined) {
1746                    a = 'client';
1747                    e = document.documentElement || document.body;
1748                }
1749
1750                // height of the services list container
1751                if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
1752
1753                    // reset
1754                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto');
1755
1756                    // calculate
1757                    mainHeight = document.getElementById('tarteaucitron').offsetHeight;
1758                    closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
1759
1760                    // apply
1761                    servicesHeight = (mainHeight - closeButtonHeight + 4);
1762                    tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px');
1763                    tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto');
1764                }
1765
1766                // align the main allow/deny button depending on scrollbar width
1767                if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
1768
1769                    // media query
1770                    if (e[a + 'Width'] <= 479) {
1771                        //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
1772                    } else if (e[a + 'Width'] <= 767) {
1773                        scrollbarMarginRight = 12;
1774                    }
1775
1776                    scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth;
1777                    scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
1778                    //tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
1779                }
1780
1781                // center the main panel
1782                if (document.getElementById('tarteaucitron') !== null) {
1783
1784                    // media query
1785                    if (e[a + 'Width'] <= 767) {
1786                        mainTop = 0;
1787                    } else {
1788                        mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
1789                    }
1790
1791                    if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
1792                        if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
1793                            mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
1794                        }
1795                    }
1796
1797                    // correct
1798                    if (mainTop < 0) {
1799                        mainTop = 0;
1800                    }
1801
1802                    // apply
1803                    tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
1804                }
1805
1806
1807            } else if (type === 'cookie') {
1808
1809                // put cookies list at bottom
1810                if (document.getElementById('tarteaucitronAlertSmall') !== null) {
1811                    tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px');
1812                }
1813
1814                // height of cookies list
1815                if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
1816
1817                    // reset
1818                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto');
1819
1820                    // calculate
1821                    cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight;
1822                    cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight;
1823                    cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight;
1824
1825                    // apply
1826                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookie
vendor: 15,028 bytes, lines 1826-2165
1826sListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px');
1827                }
1828            }
1829        }
1830    },
1831    "cookie": {
1832        "owner": {},
1833        "create": function (key, status) {
1834            "use strict";
1835
1836            if (tarteaucitronForceExpire !== '') {
1837                // The number of day(s)/hour(s) can't be higher than 1 year
1838                if ((tarteaucitronExpireInDay && tarteaucitronForceExpire < 365) || (!tarteaucitronExpireInDay && tarteaucitronForceExpire < 8760)) {
1839                    if (tarteaucitronExpireInDay) {
1840                        // Multiplication to tranform the number of days to milliseconds
1841                        timeExpire = tarteaucitronForceExpire * 86400000;
1842                    } else {
1843                        // Multiplication to tranform the number of hours to milliseconds
1844                        timeExpire = tarteaucitronForceExpire * 3600000;
1845                    }
1846                }
1847            }
1848
1849            var d = new Date(),
1850                time = d.getTime(),
1851                expireTime = time + timeExpire, // 365 days
1852                regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
1853                cookie = tarteaucitron.cookie.read().replace(regex, ""),
1854                value = tarteaucitron.parameters.cookieName + '=' + cookie + '!' + key + '=' + status,
1855                domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? '; domain=' + tarteaucitron.parameters.cookieDomain : '',
1856                secure = location.protocol === 'https:' ? '; Secure' : '';
1857
1858            d.setTime(expireTime);
1859            document.cookie = value + '; expires=' + d.toGMTString() + '; path=/' + domain + secure + '; samesite=lax';
1860
1861            tarteaucitron.sendEvent('tac.consent_updated');
1862        },
1863        "read": function () {
1864            "use strict";
1865            var nameEQ = tarteaucitron.parameters.cookieName + "=",
1866                ca = document.cookie.split(';'),
1867                i,
1868                c;
1869
1870            for (i = 0; i < ca.length; i += 1) {
1871                c = ca[i];
1872                while (c.charAt(0) === ' ') {
1873                    c = c.substring(1, c.length);
1874                }
1875                if (c.indexOf(nameEQ) === 0) {
1876                    return c.substring(nameEQ.length, c.length);
1877                }
1878            }
1879            return '';
1880        },
1881        "purge": function (arr) {
1882            "use strict";
1883            var i;
1884
1885            for (i = 0; i < arr.length; i += 1) {
1886
1887                var rgxpCookie = new RegExp("^(.*;)?\\s*" + arr[i] + "\\s*=\\s*[^;]+(.*)?$");
1888                if (document.cookie.match(rgxpCookie)) {
1889                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
1890                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
1891                    document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
1892                }
1893            }
1894        },
1895        "checkCount": function (key) {
1896            "use strict";
1897            var arr = tarteaucitron.services[key].cookies,
1898                nb = arr.length,
1899                nbCurrent = 0,
1900                html = '',
1901                i,
1902                status = document.cookie.indexOf(key + '=true');
1903
1904            if (status >= 0 && nb === 0) {
1905                html += tarteaucitron.lang.useNoCookie;
1906            } else if (status >= 0) {
1907                for (i = 0; i < nb; i += 1) {
1908                    if (document.cookie.indexOf(arr[i] + '=') !== -1) {
1909                        nbCurrent += 1;
1910                        if (tarteaucitron.cookie.owner[arr[i]] === undefined) {
1911                            tarteaucitron.cookie.owner[arr[i]] = [];
1912                        }
1913                        if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) {
1914                            tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);
1915                        }
1916                    }
1917                }
1918
1919                if (nbCurrent > 0) {
1920                    html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' cookie';
1921                    if (nbCurrent > 1) {
1922                        html += 's';
1923                    }
1924                    html += '.';
1925                } else {
1926                    html += tarteaucitron.lang.useNoCookie;
1927                }
1928            } else if (nb === 0) {
1929                html = tarteaucitron.lang.noCookie;
1930            } else {
1931                html += tarteaucitron.lang.useCookie + ' ' + nb + ' cookie';
1932                if (nb > 1) {
1933                    html += 's';
1934                }
1935                html += '.';
1936            }
1937
1938            if (document.getElementById('tacCL' + key) !== null) {
1939                document.getElementById('tacCL' + key).innerHTML = html;
1940            }
1941        },
1942        "crossIndexOf": function (arr, match) {
1943            "use strict";
1944            var i;
1945            for (i = 0; i < arr.length; i += 1) {
1946                if (arr[i] === match) {
1947                    return true;
1948                }
1949            }
1950            return false;
1951        },
1952        "number": function () {
1953            "use strict";
1954            var cookies = document.cookie.split(';'),
1955                nb = (document.cookie !== '') ? cookies.length : 0,
1956                html = '',
1957                i,
1958                name,
1959                namea,
1960                nameb,
1961                c,
1962                d,
1963                s = (nb > 1) ? 's' : '',
1964                savedname,
1965                regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,
1966                regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn,
1967                host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain;
1968
1969            cookies = cookies.sort(function (a, b) {
1970                namea = a.split('=', 1).toString().replace(/ /g, '');
1971                nameb = b.split('=', 1).toString().replace(/ /g, '');
1972                c = (tarteaucitron.cookie.owner[namea] !== undefined) ? tarteaucitron.cookie.owner[namea] : '0';
1973                d = (tarteaucitron.cookie.owner[nameb] !== undefined) ? tarteaucitron.cookie.owner[nameb] : '0';
1974                if (c + a > d + b) { return 1; }
1975                if (c + a < d + b) { return -1; }
1976                return 0;
1977            });
1978
1979            if (document.cookie !== '') {
1980                for (i = 0; i < nb; i += 1) {
1981                    name = cookies[i].split('=', 1).toString().replace(/ /g, '');
1982                    if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) {
1983                        savedname = tarteaucitron.cookie.owner[name].join(' // ');
1984                        html += '<div class="tarteaucitronHidden">';
1985                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1986                        html += '        ' + tarteaucitron.cookie.owner[name].join(' // ');
1987                        html += '    </span>';
1988                        html += '</div><ul class="cookie-list">';
1989                    } else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) {
1990                        savedname = host;
1991                        html += '<div class="tarteaucitronHidden">';
1992                        html += '     <span class="tarteaucitronTitle tarteaucitronH3" role="heading" aria-level="3">';
1993                        html += '        ' + host;
1994                        html += '    </span>';
1995                        html += '</div><ul class="cookie-list">';
1996                    }
1997                    html += '<li class="tarteaucitronCookiesListMain">';
1998                    html += '    <div class="tarteaucitronCookiesListLeft"><button type="button" class="purgeBtn" data-cookie="' + tarteaucitron.fixSelfXSS(cookies[i].split('=', 1)) + '"><strong>&times;</strong></button> <strong>' + tarteaucitron.fixSelfXSS(name) + '</strong>';
1999                    html += '    </div>';
2000                    html += '    <div class="tarteaucitronCookiesListRight">' + tarteaucitron.fixSelfXSS(cookies[i].split('=').slice(1).join('=')) + '</div>';
2001                    html += '</li>';
2002                }
2003                html += '</ul>';
2004            } else {
2005                html += '<div class="tarteaucitronCookiesListMain">';
2006                html += '    <div class="tarteaucitronCookiesListLeft"><strong>-</strong></div>';
2007                html += '    <div class="tarteaucitronCookiesListRight"></div>';
2008                html += '</div>';
2009            }
2010
2011            html += '<div class="tarteaucitronHidden tarteaucitron-spacer-20"></div>';
2012
2013            if (document.getElementById('tarteaucitronCookiesList') !== null) {
2014                document.getElementById('tarteaucitronCookiesList').innerHTML = html;
2015            }
2016
2017            if (document.getElementById('tarteaucitronCookiesNumber') !== null) {
2018                document.getElementById('tarteaucitronCookiesNumber').innerHTML = nb;
2019                document.getElementById('tarteaucitronCookiesNumber').setAttribute("aria-label", nb + ' cookie' + s + " - " + tarteaucitron.lang.toggleInfoBox);
2020                document.getElementById('tarteaucitronCookiesNumber').setAttribute("title", nb + ' cookie' + s + " - " + tarteaucitron.lang.toggleInfoBox);
2021            }
2022
2023            if (document.getElementById('tarteaucitronCookiesNumberBis') !== null) {
2024                document.getElementById('tarteaucitronCookiesNumberBis').innerHTML = nb + ' cookie' + s;
2025            }
2026
2027            var purgeBtns = document.getElementsByClassName("purgeBtn");
2028            for (i = 0; i < purgeBtns.length; i++) {
2029                tarteaucitron.addClickEventToElement(purgeBtns[i], function () {
2030                    tarteaucitron.cookie.purge([this.dataset.cookie]);
2031                    tarteaucitron.cookie.number();
2032                    tarteaucitron.userInterface.jsSizing('cookie');
2033                    return false;
2034                });
2035            }
2036
2037            for (i = 0; i < tarteaucitron.job.length; i += 1) {
2038                tarteaucitron.cookie.checkCount(tarteaucitron.job[i]);
2039            }
2040        }
2041    },
2042    "fixSelfXSS": function(html) {
2043        return html.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
2044    },
2045    "getLanguage": function () {
2046        "use strict";
2047
2048        var availableLanguages = 'ar,bg,ca,cn,cs,da,de,et,el,en,es,fi,fr,hr,hu,it,ja,kr,lb,lt,lv,nl,no,oc,pl,pt,ro,ru,se,sk,sv,tr,uk,vi,zh',
2049            defaultLanguage = 'en';
2050
2051        if (tarteaucitronForceLanguage !== '') {
2052            if (availableLanguages.indexOf(tarteaucitronForceLanguage) !== -1) {
2053                return tarteaucitronForceLanguage;
2054            }
2055        }
2056
2057        // get the html lang
2058        if (availableLanguages.indexOf(document.documentElement.getAttribute("lang").substr(0, 2)) !== -1) {
2059          return document.documentElement.getAttribute("lang").substr(0, 2);
2060        }
2061
2062        if (!navigator) { return defaultLanguage; }
2063
2064        var lang = navigator.language || navigator.browserLanguage ||
2065                navigator.systemLanguage || navigator.userLang || null,
2066            userLanguage = lang ? lang.substr(0, 2) : null;
2067
2068        if (availableLanguages.indexOf(userLanguage) !== -1) {
2069            return userLanguage;
2070        }
2071
2072        return defaultLanguage;
2073    },
2074    "getLocale": function () {
2075        "use strict";
2076        if (!navigator) { return 'en_US'; }
2077
2078        var lang = navigator.language || navigator.browserLanguage ||
2079                navigator.systemLanguage || navigator.userLang || null,
2080            userLanguage = lang ? lang.substr(0, 2) : null;
2081
2082        if (userLanguage === 'fr') {
2083            return 'fr_FR';
2084        } else if (userLanguage === 'en') {
2085            return 'en_US';
2086        } else if (userLanguage === 'de') {
2087            return 'de_DE';
2088        } else if (userLanguage === 'es') {
2089            return 'es_ES';
2090        } else if (userLanguage === 'it') {
2091            return 'it_IT';
2092        } else if (userLanguage === 'pt') {
2093            return 'pt_PT';
2094        } else if (userLanguage === 'nl') {
2095            return 'nl_NL';
2096        } else if (userLanguage === 'el') {
2097            return 'el_EL';
2098        } else {
2099            return 'en_US';
2100        }
2101    },
2102    "addScript": function (url, id, callback, execute, attrName, attrVal, internal) {
2103        "use strict";
2104        var script,
2105            done = false;
2106
2107        if (execute === false) {
2108            if (typeof callback === 'function') {
2109                callback();
2110            }
2111        } else {
2112            script = document.createElement('script');
2113            if (id !== undefined) {
2114                script.id = id;
2115            }
2116            script.async = true;
2117            script.src = url;
2118
2119            if (attrName !== undefined && attrVal !== undefined) {
2120                script.setAttribute(attrName, attrVal);
2121            }
2122
2123            if (typeof callback === 'function') {
2124                if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
2125                    script.onreadystatechange = script.onload = function () {
2126                        var state = script.readyState;
2127                        if (!done && (!state || /loaded|complete/.test(state))) {
2128                            done = true;
2129                            callback();
2130                        }
2131                    };
2132                } else {
2133                    callback();
2134                }
2135            }
2136
2137            if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
2138                document.getElementsByTagName('head')[0].appendChild(script);
2139            }
2140        }
2141    },
2142    "addInternalScript": function (url, id, callback, execute, attrName, attrVal) {
2143        tarteaucitron.addScript(url, id, callback, execute, attrName, attrVal, true);
2144    },
2145    "checkIfExist": function (elemId) {
2146        "use strict";
2147        return document.getElementById(elemId) !== null && document.getElementById(elemId).offsetWidth !== 0 && document.getElementById(elemId).offsetHeight !== 0;
2148    },
2149    "makeAsync": {
2150        "antiGhost": 0,
2151        "buffer": '',
2152        "init": function (url, id) {
2153            "use strict";
2154            var savedWrite = document.write,
2155                savedWriteln = document.writeln;
2156
2157            document.write = function (content) {
2158                tarteaucitron.makeAsync.buffer += content;
2159            };
2160            document.writeln = function (content) {
2161                tarteaucitron.makeAsync.buffer += content.concat("\n");
2162            };
2163
2164            setTimeout(function () {
2165                document.write = savedWrite;
2166                document.writeln = savedWriteln;
2167            }, 20000);
2168
2169            tarteaucitron.makeAsync.getAndParse(url, id);
2170        },
2171        "getAndParse": function (url, id) {
2172            "use strict";
2173            if (tarteaucitron.makeAsync.antiGhost > 9) {
2174                tarteaucitron.makeAsync.antiGhost = 0;
2175                return;
2176            }
2177            tarteaucitron.makeAsync.antiGhost += 1;
2178            tarteaucitron.addInternalScript(url, '', function () {
2179                if (document.getElementById(id) !== null) {
2180                    document.getElementById(id).innerHTML += "<span class='tarteaucitron-display-none'>&nbsp;</span>" + tarteaucitron.makeAsync.buffer;
2181                    tarteaucitron.makeAsync.buffer = '';
2182                    tarteaucitron.makeAsync.execJS(id);
2183                }
2184            });
2185        },
2186        "execJS": function (id) {
2187            /* not strict because third party scripts may have errors */
2188            var i,
2189                scripts,
2190                childId,
2191                type;
2192
2193            if (document.getElementById(id) === null) {
2194                return;
2195            }
2196
2197            scripts = document.getElementById(id).getElementsByTagName('script');
2198            for (i = 0; i < scripts.length; i += 1) {
2199                type = (scripts[i].getAttribute('type') !== null) ? scripts[i].getAttribute('type') : '';
2200                if (type === '') {
2201                    type = (scripts[i].getAttribute('language') !== null) ? scripts[i].getAttribute('language') : '';
2202                }
2203                if (scripts[i].getAttribute('src') !== null && scripts[i].getAttribute('src') !== '') {
2204                    childId = id + Math.floor(Math.random() * 99999999999);
2205                    document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
2206                    tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
2207                } else if (type.indexOf('javascript') !== -1 || type === '') {
2208                    eval(scripts[i].innerHTML);
2209                }
2210            }
2211        }
2212    },
2213    "fallback": function (matchClass, content, noInner) {
2214        "use strict";
2215        var elems = document.getElementsByTagName('*'),
2216            i,
2217            index = 0;
2218
2219        for (i in elems) {
2220            if (elems[i] !== undefined) {
2221                for (index = 0; index < matchClass.length; index += 1) {
2222                    if ((' ' + elems[i].className + ' ')
2223                            .indexOf(' ' + matchClass[index] + ' ') > -1) {
2224                        if (typeof content === 'function') {
2225                            if (noInner === true) {
2226                                content(elems[i]);
2227                            } else {
2228                                elems[i].innerHTML = content(elems[i]);
2229                            }
2230                        } else {
2231                            elems[i].innerHTML = content;
2232                        }
2233                    }
2234                }
2235            }
2236        }
2237    },
2238    "engage": function (id) {
2239        "use strict";
2240        var html = '',
2241            r = Math.floor(Math.random() * 100000),
2242            engage = tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback;
2243
2244        if (tarteaucitron.lang['engage-' + id] !== undefined) {
2245            engage = tarteaucitron.lang['engage-' + id];
2246        }
2247
2248        html += '<div class="tac_activate tac_activate_' + id + '">';
2249        html += '   <div class="tac_float">';
2250        html += '      ' + engage;
2251        html += '      <button type="button" class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '">';
2252        html += '          <span class="tarteaucitronCheck" aria-hidden="true"></span> ' + tarteaucitron.lang.allow;
2253        html += '       </button>';
2254        html += '   </div>';
2255        html += '</div>';
2256
2257        return html;
2258    },
2259    "extend": function (a, b) {
2260        "use strict";
2261        var prop;
2262        for (prop in b) {
2263            if (b.hasOwnProperty(prop)) {
2264                a[prop] = b[prop];
2265            }
2266        }
2267    },
2268    "proTemp": '',
2269    "proTimer": function () {
2270        "use strict";
2271        setTimeout(tarteaucitron.proPing, (Math.floor(Math.random() * (1200 - 500 + 1)) + 500));
2272    },
2273    "pro": function (list) {
2274        "use strict";
2275        tarteaucitron.proTemp += list;
2276        clearTimeout(tarteaucitron.proTimer);
2277        tarteaucitron.proTimer = setTimeout(tarteaucitron.proPing, (Math.floor(Math.random() * (1200 - 500 + 1)) + 500));
2278    },
2279    "proPing": function () {
2280        "use strict";
2281        if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined && tarteaucitron.proTemp !== '' && tarteaucitronStatsEnabled) {
2282            var div = document.getElementById('tarteaucitronPremium'),
2283                timestamp = new Date().getTime(),
2284                url = 'https://tarteaucitron.io/log/?';
2285
2286            if (div === null) {
2287                return;
2288            }
2289
2290            url += 'account=' + tarteaucitron.uuid + '&';
2291            url += 'domain=' + tarteaucitron.domain + '&';
2292            url += 'status=' + encodeURIComponent(tarteaucitron.proTemp) + '&';
2293            url += '_time=' + timestamp;
2294
2295            div.innerHTML = '<img src="' + url + '" class="tarteaucitron-display-none" alt="" />';
2296
2297            tarteaucitron.proTemp = '';
2298        }
2299
2300        tarteaucitron.cookie.number();
2301    },
2302    "AddOrUpdate" : function(source, custom){
2303        /**
2304         Utility function to Add or update the fields of obj1 with the ones in obj2
2305         */
2306        for(var key in custom){
2307            if(custom[key] instanceof Object){
2308                source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]);
2309            }else{
2310                source[key] = custom[key];
2311            }
2312        }
2313        return source;
2314    },
2315    "getElemWidth": function(elem) {
2316        return tarteaucitron.getElemAttr(elem, 'width') || elem.clientWidth;
2317    },
2318    "getElemHeight": function(elem) {
2319        return tarteaucitron.getElemAttr(elem, 'height') || elem.clientHeight;
2320    },
2321    "getElemAttr": function (elem, attr) {
2322        var attribute = elem.getAttribute('data-' + attr) || elem.getAttribute(attr);
2323
2324        if (typeof attribute === 'string') {
2325            return tarteaucitron.fixSelfXSS(attribute);
2326        }
2327
2328        return "";
2329    },
2330    "addClickEventToId": function (elemId, func) {
2331        tarteaucitron.addClickEventToElement(document.getElementById(elemId), func);
2332    },
2333    "addClickEventToElement": function (e, func) {
2334        if (e) {
2335            if (e.addEventListener) {
2336                e.addEventListener("click", func);
2337            } else {
2338                e.attachEvent("onclick", func);
2339            }
2340        }
2341    },
2342    "triggerJobsAfterAjaxCall": function() {
2343        tarteaucitron.job.forEach(function(e) { tarteaucitron.job.push(e) });
2344        var i;
2345        var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
2346        for (i = 0; i < allowBtns.length; i++) {
2347            tarteaucitron.addClickEventToElement(allowBtns[i], function () {
2348                tarteaucitron.userInterface.respond(this, true);
2349            });
2350        }
2351        var denyBtns = document.getElementsByClassName("tarteaucitronDeny");
2352        for (i = 0; i < denyBtns.length; i++) {
2353            tarteaucitron.addClickEventToElement(denyBtns[i], function () {
2354                tarteaucitron.userInterface.respond(this, false);
2355            });
2356        }
2357    }
2358};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.