PageSourceSearch

https://www.amf-france.org/modules/custom/mde_tarteaucitron/src/ta…/tarteaucitron.js?tlv81u

js amf-france.org collected 2026-09-27 20:54:26 UTC 101,738 bytes, 2,226 lines download raw bytes

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

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.