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