PageSourceSearch

https://eve.univ-lemans.fr/plugins/tarteaucitron/resources/js/tarteaucitron.js

js univ-lemans.fr collected 2026-09-24 08:56:29 UTC 135,445 bytes, 2,589 lines download raw bytes

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

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.