1'use strict'; 2 3$(function () { 4 (function (o, h, d) { 5 if (!o || !h) return false; 6 var toggle = function (value) { 7 _open.checked = !(typeof value === 'undefined') ? !value : true; 8 $html[_open.checked ? "removeClass" : "addClass"]('sta-noScroll'); 9 }; 10 var _open = document.getElementById('sta-cookies'), 11 cookieInputs = {}, 12 baseDefault = { 13 'functional': false, 14 'analytics': false, 15 'publicity': false 16 }, 17 $html = $('html'), 18 cookie = JSON.parse(h.getCookie('controlCookies')), 19 avoidCookiePage = location.pathname.split('/').slice(-1).pop() !== 'cookies.html'; 20 21 if (!cookie && avoidCookiePage) { 22 cookie = Object.assign({}, baseDefault); 23 toggle(true); 24 }; 25 26 Object.keys(baseDefault).forEach(function (key) { 27 var input = document.getElementById(key); 28 if (input) { 29 cookieInputs[key] = input; 30 input.checked = cookie[key]; 31 $(input).change(function () { 32 cookie[key] = this.checked; 33 }); 34 }; 35 }); 36 37 $(o.querySelector('.fn-disableAll')).click(function () { 38 for (var ele in cookieInputs) { 39 cookieInputs[ele].checked = false; 40 cookie[ele] = false; 41 } 42 }); 43 44 $(o.querySelector('.fn-enableAll')).click(function () { 45 for (var ele in cookieInputs) { 46 cookieInputs[ele].checked = true; 47 cookie[ele] = true; 48 } 49 }); 50 51 $(o.querySelector('.sta-cookie_info .fn-confirm:not(.fn-disableAll)')).click(function () { 52 for (var ele in cookieInputs) { 53 cookieInputs[ele].checked = true; 54 cookie[ele] = true; 55 } 56 }); 57 58 59 $(o.querySelectorAll('.fn-confirm')).click(function () { 60 var dm = document.domain, 61 dm = dm.indexOf('booking-channel.com') !== -1 ? dm : '.' + h.getDomain(dm); 62 h.setCookie('controlCookies', JSON.stringify(cookie), undefined, dm, toggle); 63 if (d) d.push({ 'event': 'controlCookies' }); 64 }); 65 66 67 })(document.querySelector('.tpl-cookie'), window.hotusa && hotusa(), window.dataLayer); 68});
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.