1$(document).ready(function() { 2 $('.navbar-nav .btn-socio-torcedor .nav-link').addClass('btn btn-xs btn-dark').removeClass('nav-link'); 3 $('.navbar-nav .btn-create-user .nav-link').addClass('btn btn-xs btn-light').removeClass('nav-link'); 4 5 $("#owl-banners").owlCarousel({ 6 autoPlay: true, 7 items : 1, 8 mouseDrag: true, 9 touchDrag: true, 10 nav: false , 11 dots: true, 12 }); 13 14 // CAMAROTES 15 $("#owl-camarotes").owlCarousel({ 16 autoPlay: true, 17 items : 7, 18 mouseDrag: true, 19 touchDrag: true, 20 nav: true , 21 dots: false, 22 margin: 10, 23 responsive:{ 24 0:{ 25 items:1 26 }, 27 600:{ 28 items:2 29 }, 30 728:{ 31 items:3 32 }, 33 960:{ 34 items:3 35 }, 36 1200:{ 37 items:4 38 }, 39 1400:{ 40 items:6 41 } 42 } 43 }); 44 $("#owl-camarotes-small").owlCarousel({ 45 autoPlay: true, 46 items : 4, 47 mouseDrag: true, 48 touchDrag: true, 49 dots: true, 50 margin: 10, 51 responsive:{ 52 0:{ 53 items:1 54 }, 55 480:{ 56 items:2 57 }, 58 600:{ 59 items:3 60 }, 61 728:{ 62 items:4 63 }, 64 } 65 }); 66 67 $("body").on("click touchstart", ".stadium_areas__anchor", function(event) { 68 event.preventDefault(); 69 clearTimeout(markersTime); 70 $('.stadium__gates').empty(); 71 $('html, body').animate({ 72 scrollTop: $('#estadio').offset().top - 100 73 }, 200); 74 $('.stadium_areas__anchor').removeClass('actived').attr('aria-expanded', false); 75 $(this).addClass('actived').attr('aria-expanded', true); 76 $('.satidum__overlayed').attr('src', ta.template_url + '/assets/images/' + $(this).data('layer-image')); 77 78 var _self = $(this); 79 $(this).find('.stadium_areas__gate').each(function() { 80 var TEMPLATE = $('<div class="gate"><span class="gate_name"> </span><div class="marker"><div class="pin"> </div><div class="pin-effect"> </div></div></div>'); 81 TEMPLATE.css({'top': $(this).data('gate-top') + '%', 'left': $(this).data('gate-left') + '%'}).show(); 82 TEMPLATE.find('.gate_name').html($(this).html()); 83 TEMPLATE.appendTo($('.stadium__gates')); 84 }); 85 86 $('.stadium__image').addClass('actived').attr('aria-expanded', true); 87 88 let acessibilityText = $(this).parents('.stadium_areas__list').prev().text(); 89 acessibilityText += ' ' + $(this).find('.stadium_areas__name').text(); 90 acessibilityText += ' acesso pelo ' + $(this).find('.stadium_areas__gate').text(); 91 $('[aria-live="polite"]').html(acessibilityText); 92 93 removeMarkers(); 94 }); 95 96 $(document).on("click", "#main-tab-header button", function(event) { 97 event.preventDefault(); 98 $('html, body').animate({ 99 scrollTop: $('#main-tab-content').offset().top - 68 100 }, 200); 101 }) 102 103 var markersTime; 104 function removeMarkers() { 105 markersTime = setTimeout(function() { 106 $('.stadium__gates').empty(); 107 $('.stadium__pins .marker').hide(); 108 $('.stadium_areas__anchor, .stadium__image').removeClass('actived'); 109 $('.satidum__overlayed').attr('src', ta.template_url + '/assets/images/estadio.png'); 110 clearTimeout(markersTime); 111 }, 20000); 112 } 113 114 window.addEventListener( 115 "message", 116 function (e) { 117 if (e.data && e.data.access_token && e.data.currentUser) { 118 const expiresIn = e.data.expires_in; 119 const currentUser = e.data.currentUser; 120 const accessToken = e.data.access_token; 121 setCookieTA(expiresIn, accessToken, currentUser, true); 122 bsOffcanvas.hide(); 123 $('body').addClass('show-user'); 124 $('.navbar-toggler').trigger( "click" ); 125 } 126 if (e.data && e.data.totalAcessoFrameHeight) { 127 let container = document.getElementById("totalacesso-iframe"); 128 if (container) { 129 container.style.height = e.data.totalAcessoFrameHeight + "px"; 130 } 131 } 132 }, 133 false 134 ); 135 136 let expiresInCookie = $.cookie('expires_in'); 137 let accessTokenCookie = $.cookie('access_token'); 138 let currentUserCookie = $.cookie('current_user'); 139 140 if (expiresInCookie && accessTokenCookie && currentUserCookie) {
141 setCookieTA(expiresInCookie, accessTokenCookie, currentUserCookie, false); 142 $('body').addClass('show-user'); 143 } 144 145 $(document).on('click', '.btn-logout', function(event) { 146 event.preventDefault(); 147 $.cookie('expires_in', '', { expires: 0, path: '/' }); 148 $.cookie('access_token', '', { expires: 0, path: '/' }); 149 $.cookie('current_user', '', { expires: 0, path: '/' }); 150 document.location.reload(true); 151 $('body').removeClass('show-user'); 152 }); 153 154 const countdown = $("#countdown"); 155 if (countdown) { 156 $('#countdown-input').countdown(countdown.attr("data-hour"), function(event) { 157 $(this).html( 158 event.strftime('<span class="day"><span>%D</span> dia</span> <span class="hour"><span>%H</span> hora</span> <span class="minute"><span>%M</span> minutos</span> <span class="seconds"><span>%S</span> segundos</span>') 159 ); 160 }); 161 } 162 163 $('button[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) { 164 var target = $(e.target).attr("data-bs-target") // activated tab 165 const element = document.querySelector(target); 166 element?.setAttribute("tabindex", "-1"); 167 element?.focus(); 168 }); 169 var myCollapsible = document.getElementById('home-faq'); 170 if (myCollapsible) { 171 myCollapsible.addEventListener('shown.bs.collapse', function (e) { 172 $(e.target).find(".html-editor p").attr("tabindex", "-1"); 173 $(e.target).find(".html-editor p").focus(); 174 }) 175 } 176 177 $('#owl-banners .owl-item').attr('aria-selected','false'); 178 $('#owl-banners .owl-dots').attr('aria-selected','false'); 179 $('#owl-banners .owl-dots').attr('aria-hidden','true'); 180 $('#owl-banners .owl-dots .owl-dot').attr('aria-hidden','true'); 181 $('#owl-banners .owl-dots .owl-dot').attr('aria-selected','false'); 182 $('#owl-banners .owl-dots .owl-dot').attr('tabindex','-1'); 183 184 185 186 // CARROUSEL PLANOS 187 $("#owl-planos").owlCarousel({ 188 autoPlay: true, 189 items : 5, 190 mouseDrag: true, 191 touchDrag: true, 192 nav: true , 193 dots: false, 194 margin: 10, 195 responsive:{ 196 0:{ 197 items:1 198 }, 199 728:{ 200 items:2 201 }, 202 1024:{ 203 items:3 204 }, 205 1200:{ 206 items:5 207 }, 208 } 209 }); 210}); 211 212function setCookieTA(expiresIn, accessToken, currentUser, set) { 213 if (expiresIn && accessToken) { 214 let user; 215 let userPicture; 216 let userEmail; 217 if (currentUser) { 218 user = $.parseJSON(currentUser); 219 userName = user.firstName; 220 userPicture = user.pictureUrl; 221 userEmail = user.email; 222 } else { 223 user.userName = "Anônimo"; 224 } 225 if (!userPicture) { 226 userPicture = "https://cdn2.totalacesso.com/applications/whitelabel/spfc/user-avatar-spfc.png"; 227 $("#imageUser").addClass('no-image'); 228 229 } 230 231 $("#nameUser").html(userName); 232 $("#emailUser").html(userEmail); 233 $("#imageUser").css('background-image', 'url(' + userPicture + ')'); 234 235 if (set) { 236 $.post(ta.ajax_url, 237 { 238 action: 'setCookieTA', 239 expiresIn, 240 currentUser, 241 accessToken, 242 } 243 ).done(function(data){ 244 245 }); 246 } 247 248 let container = document.getElementById("totalacesso-iframe"); 249 if (container && user.email) { 250 let urlIframe = $('#totalacesso-iframe').attr('src'); 251 let promocode = user.email; 252 if (urlIframe.indexOf("?") > -1 ) { 253 urlIframe += '&promocode=' + promocode; 254 } else { 255 urlIframe += '?promocode=' + promocode; 256 } 257 258 $('#totalacesso-iframe').attr('src', urlIframe); 259 } 260 } 261}
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.