PageSourceSearch

https://www.dozorme-claude.fr/wp-content/themes/wat-wp-theme/js/libs/tarteaucitron.js

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

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.