1 2/*Ã */ 3var btCookies = btCookies || {}; 4var btCookiesHelper = btCookiesHelper || {}; 5 6jQuery.expr[':'].focus = function( elem ) { 7 return elem === document.activeElement && ( elem.type || elem.href ); 8}; 9 10jQuery.cookie = function (key, value, options) { 11 if (arguments.length > 1 && String(value) !== "[object Object]") { 12 options = jQuery.extend({}, options); 13 14 if (value === null || value === undefined) { 15 options.expires = -1; 16 } 17 18 if (typeof options.expires === 'number') { 19 var days = options.expires, t = options.expires = new Date(); 20 t.setDate(t.getDate() + days); 21 } 22 23 value = String(value); 24 return (document.cookie = [ 25 encodeURIComponent(key), '=', 26 options.raw ? value : encodeURIComponent(value), 27 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 28 options.path ? '; path=' + options.path : '', 29 options.domain ? '; domain=' + options.domain : '', 30 options.secure ? '; secure' : '' 31 ].join('')); 32 } 33 34 // key and possibly options given, get cookie... 35 options = value || {}; 36 var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; 37 return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; 38}; 39 40 41btCookies = function () { 42 /*elenco cookie tecnici e profilazione*/ 43var _technicalProvidersList = []; 44 var _profilingProvidersList = []; 45 var _providersLastUpdate = new Date("1900-01-01"); 46 var _lastUpdate = null; 47 var _daysOfValidity = 365; 48 var _promises = []; 49 50 function isTecnicalProvider(provider){ 51 return (_technicalProvidersList.length>0 && _technicalProvidersList.indexOf(provider)!=-1); 52 } 53 54 function hasProfilingProvider(provider){ 55 return (_profilingProvidersList.length>0 && _profilingProvidersList.indexOf(provider)!=-1); 56 } 57 58 // Sets cookie to the page. Please use your domian name 59 function setCookie(newLevel) { 60 if (newLevel!=0) 61 { 62 _lastUpdate = ((new Date()).getTime()/1000).toString() 63 jQuery.cookie("cookie_level", newLevel + "." + _lastUpdate , {path: '/', expires: _daysOfValidity, created: new Date() }); 64 } 65 else 66 { 67 _lastUpdate = null; 68 jQuery.cookie("cookie_level", 0, {path: '/', expires: -1 }); 69 } 70 if (window.btCookiesHelper!=null) btCookiesHelper.isProfilingActive = (newLevel==2); 71 } 72 73 // Returns cookie value 74 function getCookie() { 75 temp = jQuery.cookie("cookie_level"); 76 if (temp==null) return null; 77 pos = temp.indexOf('.'); 78 79 /*i vecchi cookie senza data accettazione non sono validi*/ 80 /*Se i provider del canale sono stati aggiornati dopo l'accettazione dell'utente il cookie viene invalidato*/ 81 if (pos==-1 || (new Date(temp.substr(pos+1)*1000)) <= _providersLastUpdate) { 82 jQuery.cookie("cookie_level", 0, {path: '/', expires: -1 }); 83 return null; 84 }else{ 85 return temp.substr(0,pos) ; 86 } 87 } 88 89 // Cookie notification on first visit 90 function BanCookieNotif(noGui) { 91 var currentLevel = getCookie(); 92 if ((noGui==null || !noGui) && _profilingProvidersList.length>0) 93 { 94 var jq_popup = jQuery('#bannercookie'); 95 96 jQuery('#bannercookieoverlay').css('display','none'); 97 98 if (currentLevel !== null || _profilingProvidersList.length==0) { 99 jq_popup.hide(); 100 jQuery('iframe').each(function(e) { 101 if (jQuery(this).attr('cookieyt') != undefined) { 102 jQuery(this).attr('src', jQuery(this).attr('cookieyt')); 103 jQuery(this).removeAttr('cookieyt'); 104 } 105 }); 106 jQuery('#bannercookie').css('display','none'); 107 108 } else { 109 jq_popup.show(); 110 jQuery('a').each(function() { 111 if (jQuery(this).attr('data-widget-id')!= undefined) { 112 jQuery(this).removeClass("twitter-timeline"); 113 } 114 }); 115 } 116 } 117 LoadProviders(currentLevel); 118 } 119 120 //Creathe the notification popup, and append it to the body 121 function addCookieSettings() { 122 jQuery('body').append('<div id="bannerCookieButton" class="c-cookie-button">Cookie Policy</div>'); 123 jQuery("#bannerCookieButton").click(function(e) { 124 document.location.href="/cookie.asp"; 125 }); 126 } 127 128 //Creathe the notification popup, and append it to the body 129 function addBannerCookie() { 130 jQuery.ajax({ 131 url: WEB_URL + '/include/configCookie.asp', 132 method: "POST", 133 data: "hCmd=BANNER", 134 async:false, 135 success: function (data) { 136 var notifHtml = data.replace("\[CTA_COOKIES\]","" + 137 "<div id=\"ctacookie\">" + 138 "<div class=\"l-cta-cookie\"><input title=\"Accetta tutti i cookie\" type=\"button\" class=\"c-button-cookie\" id=\"btnAcceptAll\" value=\"ACCETTA TUTTI\"></div>" + 139 "<input title=\"Gestisci Cookie\" type=\"button\" class=\"c-informativa-cookie\" value=\"GESTISCI COOKIE\">" + 140 "</div>"); 141 jQuery('body').prepend(notifHtml); 142 var scriptAccessibilita = "<scr"+"ipt data-obct type='text/javascript'>" + 143 "jQuery(function () {" + 144 " \"use strict\"; " + 145 " var informativaCookie = $('#bannercookie'); " + 146 " var buttonChiudiInformativaCookie = informativaCookie.children('#pulsanteX').children('#btnPulsanteX'); " + 147 " var ctaSecondariaInformativaCookie = informativaCookie.children('#ctacookie').children('.c-informativa-cookie'); " + 148 " function manageButtonChiudiInformativaCookieFunctions(e) {" + 149 " if (e.shiftKey === true && e.key === \"Tab\") {" + 150 " e.preventDefault(); " + 151 " ctaSecondariaInformativaCookie.focus();" + 152 " } " + 153 " }; " + 154 " function focusButtonChiudiInformativaCookie(e) { " + 155 " if (e.shiftKey === false && e.key === \"Tab\") { " + 156 " e.preventDefault(); " + 157 " buttonChiudiInformativaCookie.focus(); " + 158 " } " + 159 " }; " +
160 " buttonChiudiInformativaCookie.keydown(manageButtonChiudiInformativaCookieFunctions); " + 161 " ctaSecondariaInformativaCookie.keydown(focusButtonChiudiInformativaCookie); " + 162 "});</scr" + "ipt>"; 163 jQuery('body').append(scriptAccessibilita); 164 BanCookieSelection(); 165 } 166 }).fail(function( data, textStatus, data2 ) { 167 }); 168 } 169 170 function BanCookieSelection() { 171 // Submit cookie form 172 173 jQuery('.c-informativa-cookie').click(function(e) { 174 document.location.href="/cookie.asp"; 175 }); 176 177 jQuery("#bannercookie").on("keydown", function(event) { 178 if (event.key === 'Escape') { 179 var levelBefore = getCookie(); 180 currentLevel = 1; 181 setCookie(currentLevel); 182 BanCookieNotif(); 183 //btn.focus(); 184 } 185 }); 186 187 jQuery('#btnAcceptTechincal,#pulsanteX').click(function(e) { 188 var levelBefore = getCookie(); 189 currentLevel = 1; 190 setCookie(currentLevel); 191 BanCookieNotif(); 192 }); 193 194 jQuery('#btnAcceptAll').click(function(e) { 195 var levelBefore = getCookie(); 196 currentLevel = 2; 197 setCookie(currentLevel); 198 BanCookieNotif(); 199 200 }); 201 } 202 203 function setCookieSelection() { 204 var levelBefore = getCookie(); 205 if (levelBefore == null){ 206 currentLevel = 2 207 } 208 setCookie(currentLevel); 209 BanCookieNotif(); 210 } 211 212 return { 213 cookies: (function () { 214 var supportedCookies = { 215 'necessary': 1, 216 'profiling': 2 217 }; 218 }()), 219 220 initCookies: function() { 221 currentLevel = getCookie(); 222 if (currentLevel) { 223 setCookieLevel(currentLevel); 224 } 225 addChangeSetting(); 226 }, 227 228 initBannerCookies: function(noGui) { 229 currentLevel = getCookie(); 230 231 if (currentLevel == null && (!noGui || noGui==null) && _profilingProvidersList.length>0) 232 addBannerCookie(); 233 else if ((!noGui || noGui==null) && _profilingProvidersList.length>0) 234 addCookieSettings(); 235 236 BanCookieNotif(noGui); 237 }, 238 239 setCookiesLevel: function(level){ 240 setCookie(level); 241 BanCookieNotif(); 242 return _lastUpdate; 243 }, 244 245 hasProfilingCookies: function(){ 246 return _profilingProvidersList.length>0; 247 }, 248 249 getCookiesLevel: function(){ 250 return getCookie(); 251 }, 252 253 addPromise: function(f,a){ 254 _promises.push({funct: f,args: a}); 255 }, 256 257 keys: { 258 GOOGLE_ANALYTICS: null, 259 GOOGLE_PIXEL: null, 260 GOOGLE_ADWORDS: null, 261 GOOGLE_TAG_MANAGER: null, 262 FACEBOOK_PIXEL: null, 263 ADFORM: null, 264 LINKEDIN: null, 265 LINKEDIN_PIXEL: null, 266 NATIVE_OUTBRAIN: null, 267 XENIOO_WEBCHAT: null, 268 MATOMO: null, 269 ADOBE_ANALYTICS:null 270 } 271 272 }; 273 274 function setProviderKey(name,value){ 275 if (value!=null && value.length>0) btCookies.keys[name] = value; 276 } 277 278 function LoadProviders(cookie_level){ 279 var bCookieLevel2 = (cookie_level!==null && cookie_level==2); 280 var sBodyScript = ""; 281 var sHeadScript = ""; 282 283 } 284}(); 285 286btCookiesHelper = function(){ 287 return { 288 isProfilingActive : (btCookies!=null && btCookies.getCookiesLevel()==2), 289 isTecnicalActive: (btCookies != null || btCookies.getCookiesLevel() <= 2), 290 GOOGLE : { 291 gtag_manager: function(key,callback){ 292 if(window.gtag!=null) { 293 if (callback!=null) callback(); 294 }else{ 295 (function (w, d, s, l, i) { 296 w[l] = w[l] || []; 297 w[l].push({ 298 'gtm.start': 299 new Date().getTime(), 300 event: 'gtm.js' 301 }); 302 var f = d.getElementsByTagName(s)[0], 303 j = d.createElement(s), 304 dl = l != 'dataLayer' ? '&l=' + l : ''; 305 j.async = true; 306 j.src = 307 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 308 if(callback!=null) {j.addEventListener('load', callback);} 309 310 f.parentNode.insertBefore(j, f); 311 })(window, document, 'script', 'dataLayer', key); 312 } 313 }, 314 315 gtag_loader : function(key,callback){ 316 if(window.gtag!=null){ 317 callback(); 318 }else if(key!=null && key.length>0){ 319 var base_key = key.indexOf("\\")!=-1 ? key.split("\\")[0] : key; 320 jQuery.getScript("https://www.googletagmanager.com/gtag/js?id=" + base_key,function(){ 321 callback(); 322 }); 323 } 324 }, 325 326 gtag_report_conversion_ex : function(key,event,url){ 327 if (key==null || key.length==0 || window.gtag==null){ 328 329 if (typeof(url) != 'undefined') { 330 window.setTimeout(function(){window.location.href=url},500); 331 } 332 return; 333 } 334 if (btCookiesHelper.isProfilingActive){ 335 this.gtag_loader(key,function(){ 336 var callback = function () { 337 if (typeof(url) != 'undefined') { 338 window.location = url; 339 } 340 }; 341 gtag('event', event==null ? "conversion" : event, { 342 'send_to': key, 343 'event_callback': callback 344 });
345 }); 346 }else{ 347 btCookies.addPromise(this.gtag_report_conversion_ex,[key,event,url]); 348 } 349 350 return false; 351 }, 352 353 gtag_report_conversion : function(key,url){ 354 this.gtag_report_conversion_ex(key,"conversion",url); 355 }, 356 357 gtag_conversion : function(key,event,label){ 358 if (key==null || key.length==0) return false; 359 360 if (btCookiesHelper.isProfilingActive){ 361 this.gtag_loader(key,function(){gtag('event', event==null ? "conversion" : event, {'send_to': key, 'event_label': label});}); 362 }else{ 363 btCookies.addPromise(this.gtag_conversion,[key,event,label]); 364 } 365 return false; 366 } 367 }, 368 369 ADFORM : { 370 ClickTrack : function (key,page){ 371 if(key==null || page==null || key.length==0 || page.length==0) return false; 372 if (btCookiesHelper.isProfilingActive){ 373 if (window.adf){ 374 adf.ClickTrack(this,key,page,{}); 375 }else{ 376 var _self = this; 377 jQuery.getScript("https://s2.adform.net/banners/scripts/st/trackpoint-sync.js",function(){ 378 adf.ClickTrack(_self,key,page,{}); 379 }); 380 } 381 }else{
382 btCookies.addPromise(this.ClickTrack,[key,page]); 383 } 384 }, 385 386 TrackPoint : function(key,page){ 387 if (key==null || page==null || key.length==0 || page.length==0) return false; 388 389 if (!btCookiesHelper.isProfilingActive){ 390 btCookies.addPromise(this.TrackPoint,[key,page]); 391 return false; 392 } 393 394 var page2 = encodeURI(page); //page.replace(/\s/gm,"%20"); 395 var sAdFormScript= 396 ("<scr" + "ipt type=\"text/jav" + "ascript\" >" + 397 "window._adftrack = Array.isArray(window._adftrack) ? window._adftrack : (window._adftrack ? [window._adftrack] : []);" + 398 "window._adftrack.push({" + 399 "HttpHost: 'track.adform.net'," + 400 "pm: {ADFORMKEY}," + 401 "divider: encodeURIComponent('|')," + 402 "pagename: encodeURIComponent('{ADFORMPAGE}')});" + 403 "(function () { var s = document.createElement('script'); s.type = 'text/jav" + "ascript';" + 404 "s.async = true; s.src = 'https://s2.adform.net/banners/scripts/st/trackpoint-async.js';" + 405 "var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); })();" + 406 "</sc" + "ript>" + 407 "<noscr" + "ipt>" + 408 "<p style=\"margin:0;padding:0;border:0;\">" + 409 "<img src='https://track.adform.net/Serving/TrackPoint/?pm={ADFORMKEY}&ADFPageName={ADFORMPAGE2}&ADFdivider=|' width='1' height='1' alt='' />" + 410 "</p></noscr" + "ipt>") 411 .replace(new RegExp("\{ADFORMKEY\}", 'g'), key) 412 .replace(new RegExp("\{ADFORMPAGE\}", 'g'), page) 413 .replace(new RegExp("\{ADFORMPAGE2\}", 'g'), page2); 414 415 jQuery('body').prepend(sAdFormScript); 416 } 417 }, 418 419 LINKEDIN: { 420 insight : function(key){ 421 if (key==null || key.length==0) { 422 return false; 423 } else if (!btCookiesHelper.isProfilingActive) {
424 btCookies.addPromise(this.insight,[key]); 425 return false; 426 } 427 window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; 428 window._linkedin_data_partner_ids.push(key); 429 jQuery.getScript("https://snap.licdn.com/li.lms-analytics/insight.min.js",function(){ 430 jQuery('body').prepend('<noscript><img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=' + key + '&fmt=gif" /></noscript>'); 431 }); 432 }, 433 434 pixel : function(key,conversion_id){ 435 if (key==null || key.length==0 || conversion_id==null || conversion_id.length==0) return false; 436 if (!btCookiesHelper.isProfilingActive) { 437 btCookies.addPromise(this.pixel,[key,conversion_id]); 438 } else { 439 jQuery('body').prepend('<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=' + key + '&conversionId=' + conversion_id + '&fmt=gif" />'); 440 } 441 } 442 }, 443 XENIOO: { 444 startChat: function(key){ 445 if ((key==null || key.length==0) && (btCookies.keys["XENIOO_WEBCHAT"]==null || btCookies.keys["XENIOO_WEBCHAT"].length==0)) { 446 return false; 447 }else if ((key==null || key.length==0) && btCookies.keys["XENIOO_WEBCHAT"]!=null && btCookies.keys["XENIOO_WEBCHAT"].length>0) { 448 key = btCookies.keys["XENIOO_WEBCHAT"]; 449 } 450 451 if (!btCookiesHelper.isProfilingActive){ 452 btCookies.addPromise(this.startChat,[key]); 453 }else{ 454 if (document.getElementById("xeniooscript")==null){ 455 var script = document.createElement('script'); 456 script.type = 'text/javascript'; 457 script.async = !0; 458 script.id="xeniooscript"; 459 script.setAttribute('data-id', 'xenioo'); 460 script.setAttribute('data-node','app02'); 461 script.addEventListener('load', function(event) { 462 xenioowebchat.Start(key); 463 }); 464 script.src = 'https://static.xenioo.com/webchat/xenioowebchat.js'; 465 document.getElementsByTagName('body')[0].appendChild(script); 466 }else{ 467 xenioowebchat.Start(key); 468 } 469 } 470 } 471 }, 472 ADOBE_ANALYTICS: { 473 LibraryUrl: "https://assets.adobedtm.com/085f4a7ced4b/8bbaf2821a5a/launch-8451ed91426a.min.js" 474 ,PageViewTrack: function (key) { 475 if (key == null || key.length == 0) return false; 476 if ((btCookiesHelper.isTecnicalActive)||(btCookiesHelper.isProfilingActive)) { 477 loadExtScript('adobe-track', this.LibraryUrl, function () { 478 return (typeof _satellite !== 'undefined'); 479 }, function () { 480 //is profile active 481 //if (btCookiesHelper.isProfilingActive && typeof _satellite.cookie.get().consenso === "undefined") { 482 if (jQuery.cookie("consenso") == null) { 483 let DateConsentAdobe = new Date(); 484 DateConsentAdobe.setFullYear(DateConsentAdobe.getFullYear() + 2); 485 let timestamp = DateConsentAdobe.getTime(); 486 _satellite.cookie.set("consenso", '{"adobe":{"accepted":true,"date":'+timestamp+'}}') 487 } 488 if (window.oJsonDataSatellite && typeof (window.oJsonDataSatellite === 'object')) { 489 490 for (let x in window.oJsonDataSatellite) { 491 if (x != "iccrea_method") { 492 493 _satellite.setVar( x , oJsonDataSatellite[x]); 494 } 495 } 496 _satellite.track(oJsonDataSatellite.iccrea_method); 497 } 498 }); 499 } 500 501 }, 502 ClickTrack: function (key, oJsonDataActionSatellite) { 503 504 if (key == null || key.length == 0) return false; 505 if ((btCookiesHelper.isTecnicalActive) || (btCookiesHelper.isProfilingActive)) { 506 if (oJsonDataActionSatellite != null && typeof (oJsonDataActionSatellite === 'object')) { 507 508 for (let x in oJsonDataActionSatellite) { 509 if (x != "iccrea_method") { 510 _satellite.setVar(x , oJsonDataActionSatellite[x]); 511 } 512 } 513 _satellite.track(oJsonDataActionSatellite.iccrea_method); 514 } 515 } 516 return false; 517 }, 518 RelaxTrack: function(key, destinationURL) { 519 520 if (key == null || key.length == 0) return false; 521 loadExtScript('adobe-track', this.LibraryUrl, function () { 522 return (typeof Visitor !== 'undefined'); 523 }, function () { 524 var urlForAppend = destinationURL.replace('#', '$') 525 var visitor = Visitor.getInstance("663A4FFF5C8050E80A495ECF@AdobeOrg", { 526 overwriteCrossDomainMCIDAndAID: true 527 });
528 var destinationURLWithVisitorIDs = visitor.appendVisitorIDsTo(urlForAppend); 529 var finalDestinationUrl = destinationURLWithVisitorIDs.replace('$', "#") 530 document.location.href = finalDestinationUrl; 531 }); 532 } 533 } 534 } 535}(); 536 537function loadExtScript(scriptId, src, test, callback) { 538 539 if (document.getElementById(scriptId) == null) { 540 var s = document.createElement('script'); 541 s.src = src; 542 s.id = scriptId; 543 document.body.appendChild(s); 544 } 545 546 var callbackTimer = setInterval(function () { 547 var call = false; 548 try { 549 call = test.call(); 550 } catch (e) { } 551 552 if (call) { 553 clearInterval(callbackTimer); 554 callback.call(); 555 } 556 }, 100); 557}
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.