1window.WA = window.WA || {}; 2window.WA.consent = window.WA.consent || {}; 3 4window.WA.consent.getCookieSettings = function (cookieName) { 5 var cookieStart; 6 var cookieEnd; 7 8 if (document.cookie.length > 0) 9 { 10 cookieStart = document.cookie.indexOf(cookieName + "="); 11 if (cookieStart != -1) 12 { 13 cookieStart = cookieStart + cookieName.length + 1; 14 cookieEnd = document.cookie.indexOf(";", cookieStart); 15 if (cookieEnd == -1) 16 { 17 cookieEnd = document.cookie.length; 18 } 19 return unescape(document.cookie.substring(cookieStart, cookieEnd)); 20 } 21 } 22 return false; 23}; 24 25window.cookie_preferences = window.WA.consent.getCookieSettings('cookie_preferences'); 26window.cookie_statistics = window.WA.consent.getCookieSettings('cookie_statistics'); 27window.cookie_marketing = window.WA.consent.getCookieSettings('cookie_marketing'); 28 29window.WA.consent.isGranted = function (value) { 30 return value === true || value === 'true'; 31}; 32 33window.WA.consent.getGoogleConsentMode = function () { 34 return { 35 'ad_storage': String(window.cookie_marketing) !== 'false' ? 'granted' : 'denied', 36 'analytics_storage': String(window.cookie_statistics) !== 'false' ? 'granted' : 'denied', 37 'ad_personalization': String(window.cookie_statistics) !== 'false' ? 'granted' : 'denied', 38 'ad_user_data': String(window.cookie_statistics) !== 'false' ? 'granted' : 'denied' 39 }; 40}; 41 42window.WA.consent.getGoogleConsentUpdateMode = function () { 43 var consent = {}; 44 45 if (window.WA.consent.isGranted(window.cookie_marketing)) { 46 consent.ad_storage = 'granted'; 47 } 48 49 if (window.WA.consent.isGranted(window.cookie_statistics)) { 50 consent.analytics_storage = 'granted'; 51 consent.ad_user_data = 'granted'; 52 consent.ad_personalization = 'granted'; 53 } 54 55 return consent; 56}; 57 58window.WA.consent.getSemConsentMode = function () { 59 return { 60 'ad_storage': String(window.cookie_marketing) !== 'false' ? 'granted' : 'denied', 61 'ad_user_data': String(window.cookie_marketing) !== 'false' ? 'granted' : 'denied', 62 'ad_personalization': String(window.cookie_marketing) !== 'false' ? 'granted' : 'denied', 63 'analytics_storage': String(window.cookie_statistics) !== 'false' ? 'granted' : 'denied', 64 'functionality_storage': String(window.cookie_preferences) !== 'false' ? 'granted' : 'denied' 65 }; 66}; 67 68window.WA.consent.updateGoogleConsent = function () { 69 var consent; 70 var key; 71 72 if (typeof gtag !== 'function') { 73 return; 74 } 75 76 consent = window.WA.consent.getGoogleConsentUpdateMode(); 77 for (key in consent) { 78 if (consent.hasOwnProperty(key)) { 79 gtag('consent', 'update', consent); 80 return; 81 } 82 } 83}; 84 85window.WA.consent.updateSemConsent = function () { 86 if (typeof SEM !== 'function') { 87 return; 88 } 89 90 SEM('updateConsent', { 91 consent_mode: window.WA.consent.getSemConsentMode() 92 }); 93};
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.