1function criarLinhaPreco(e){const t=document.createElement("div");t.className="preco-linha wtReserva_configItens wtReserva_configSelec",t.setAttribute("data-tarifa-id",e.id),t.setAttribute("data-preco",e.preco),t.setAttribute("data-tipo-pessoa",e.tipo_pessoa);const o=`qtd_${e.tipo_pessoa}_${e.id}`,a=`preco_${e.tipo_pessoa}_${e.id}`;t.innerHTML=`\n <div class="wtReserva_configItens wtReserva_configQtd">\n <font>${e.descricao_formatada}</font>\n <input type="text" id="${o}" value="0" readonly="">\n <div class="formReserva_btnNum">\n <strong id="${a}"> ${$("#atv_moeda_simbolo").val()} ${parseFloat(e.preco).toFixed(2)}</strong>\n <button type="button" id="mais_${o}" class="mais">\n <i class="fa-solid fa-plus" aria-hidden="true"></i>\n </button>\n <button type="button" id="menos_${o}" class="menos">\n <i class="fa-solid fa-minus" aria-hidden="true"></i>\n </button>\n </div>\n </div>\n `;const n=t.querySelector(`#mais_${o}`),r=t.querySelector(`#menos_${o}`),s=t.querySelector(`#${o}`);t.querySelector(`#${a}`);return n.addEventListener("click",function(){const e=parseInt(s.value)||0;s.value=e+1,atualizarPrecoTotal()}),r.addEventListener("click",function(){const e=parseInt(s.value)||0;e>0&&(s.value=e-1,atualizarPrecoTotal())}),t}function atualizarPrecoTotal(){let e=0;document.querySelectorAll(".preco-linha").forEach(t=>{const o=parseInt(t.querySelector('input[type="text"]').value)||0,a=parseFloat(t.getAttribute("data-preco"))||0;e+=o*a});const t=document.querySelector(".wtReserva_confiValor span")||document.querySelector(".wtReserva_valor span")||document.querySelector('[class*="valor"] span');t&&(t.innerHTML=$("#atv_moeda_simbolo").val()+` ${e.toFixed(2)}`,console.log("ð° Valor no topo atualizado:",e)),"function"==typeof window._atualizarLabelValor&&window._atualizarLabelValor()}function esconderSecaoPrecos(){const e=document.querySelector(".configReserva");if(!e)return;const t=e.querySelectorAll(".preco-linha");t.forEach(e=>{e.remove()}),console.log("ðï¸ Elementos de preço dinâmico removidos:",t.length)}function detaqTabsToggle(e){var t=$(e).closest(".detaqTabs-content"),o=t.find(".detaqTabs_respotas");if(o.data("aberto"))o.animate({maxHeight:660},400),o.data("aberto",!1),t.find(".detaqTabs-verTudo").show(),t.find(".detaqTabs-verMenos").hide();else{var a=o[0].scrollHeight;o.animate({maxHeight:a},400),o.data("aberto",!0),t.find(".detaqTabs-verTudo").hide(),t.find(".detaqTabs-verMenos").show()}}function initCarousel(){const e=document.querySelector(".wikiDestaq_tipoDepoimentos_cont ul");if(!e)return;if(e.classList.contains("carousel-ready"))return;e.classList.add("carousel-ready");const t=e.querySelectorAll("li"),o=t.length,a=window.innerWidth>=900,n=a?3:1,r=a?20:10;if(o<=n)return;const s=document.createElement("div");s.className="carousel-wrapper";const i=document.createElement("div");i.className="carousel-viewport",e.parentNode.insertBefore(s,e),s.appendChild(i),i.appendChild(e);const c=document.createElement("button"),l=document.createElement("button");c.className="carousel-prev disabled",l.className="carousel-next",c.innerHTML='<i class="fa-regular fa-chevron-left"></i>',l.innerHTML='<i class="fa-regular fa-chevron-right"></i>',s.appendChild(c),s.appendChild(l),e.style.display="flex",e.style.transition="transform 0.4s ease",e.style.willChange="transform",e.style.gap=r+"px",t.forEach(e=>{e.style.flex=`0 0 calc((100% - ${(n-1)*r}px) / ${n})`});let d=0;const u=o-n;function f(){const o=t[0].offsetWidth+r,a=-d*o;e.style.transform=`translateX(${a}px)`,c.classList.toggle("disabled",0===d),l.classList.toggle("disabled",d>=u)}c.addEventListener("click",()=>{d>0&&(d--,f())}),l.addEventListener("click",()=>{d<u&&(d++,f())}),f()}console.log("ð¯ pesquisa.js carregado!"),window.atualizarHorariosPorData=function(e){console.log("ð
Data selecionada no calendário:",e),console.log("ð Chamando carregarHorariosDisponiveis..."),"function"==typeof window.carregarHorariosDisponiveis?window.carregarHorariosDisponiveis(e):console.error("â carregarHorariosDisponiveis não está definida!")},window.carregarHorariosDisponiveis=function(e=null){console.log("ð carregarHorariosDisponiveis chamada com data:",e);try{let t=document.getElementById("A047_cd_cidade")?.value||document.querySelector("[data-cidade-id]")?.getAttribute("data-cidade-id")||window.cidadeId||document.querySelector('meta[name="cidade-id"]')?.getAttribute("content");
1if(!t){const e=window.location.pathname.match(/\/(\d+)(?:\?|$)/);e&&(t=e[1])}if(!t)return void console.error("â ID da cidade não encontrado. Verifique se o campo A047_cd_cidade está disponÃvel na página.");if(console.log("ðï¸ Cidade ID:",t),!t)return void console.error("ID da cidade não encontrado");const o=e||(new Date).toISOString().split("T")[0];console.log("ð
Data final para busca:",o),console.log("ð Fazendo requisição para:",`/api/atividade/${t}/horarios/${o}`),fetch(`/api/atividade/${t}/horarios/${o}`).then(e=>e.json()).then(e=>{console.log("ð Resultado da API:",e);const t=document.getElementById("selectHorario");if(t)if(t.innerHTML='<option value="" selected disabled>Selecione um horário</option>',e.success&&e.data){console.log("ð Tipo de data recebida:",Array.isArray(e.data)?"array":"objeto");let a=Array.isArray(e.data)?e.data:[e.data];if(a.length>0){const e=a.map(e=>{const t=e.A070_horario.trim();return 8===t.length?t.substring(0,5):t}).filter(e=>""!==e);console.log("ð Horários processados:",e);const n=[...new Set(e)].sort();console.log("ð Horários únicos:",n),n.forEach(e=>{const o=document.createElement("option");o.value=e,o.textContent=e,t.appendChild(o)}),console.log("â
Dropdown populado com",n.length,"horários");const r=t.cloneNode(!0);t.parentNode.replaceChild(r,t),r.addEventListener("change",function(){const e=this.value;e&&(console.log("ð Horário selecionado:",e),carregarCategoriasDisponiveis(o,e))})}else{const e=document.createElement("option");e.value="",e.textContent="Não há horários disponÃveis",t.appendChild(e),console.log("â Nenhum horário disponÃvel")}}else{const e=document.createElement("option");e.value="",e.textContent="Não há horários disponÃveis",t.appendChild(e),console.log("â Resposta da API inválida")}else console.error("Elemento selectHorario não encontrado")}).catch(e=>{console.error("Erro ao carregar horários:",e);const t=document.getElementById("selectHorario");t&&(t.innerHTML='<option value="" selected disabled>Selecione um horário</option><option value="">Erro ao carregar horários</option>')})}catch(e){console.error("Erro ao carregar horários:",e)}},window.carregarCategoriasDisponiveis=function(e,t){console.log("ð
1·ï¸ carregarCategoriasDisponiveis chamada com:",{data:e,horario:t});try{let o=document.getElementById("A047_cd_cidade")?.value||document.querySelector("[data-cidade-id]")?.getAttribute("data-cidade-id")||window.cidadeId||document.querySelector('meta[name="cidade-id"]')?.getAttribute("content");if(!o){const e=window.location.pathname.match(/\/(\d+)(?:\?|$)/);e&&(o=e[1])}if(!o)return void console.error("â ID da cidade não encontrado. Verifique se o campo A047_cd_cidade está disponÃvel na página.");if(console.log("ðï¸ Cidade ID:",o),!o)return void console.error("ID da cidade não encontrado");console.log("ð Fazendo requisição para:",`/api/atividade/${o}/categorias/${e}/${t}`),fetch(`/api/atividade/${o}/categorias/${e}/${t}`).then(e=>e.json()).then(e=>{console.log("ð Resultado da API categorias:",e);const t=document.getElementById("selectCategoria");if(t)if(t.innerHTML='<option value="" selected disabled>Selecione uma categoria</option>',e.success&&e.data&&e.data.length>0){console.log("ð Tipo de data recebida:",Array.isArray(e.data)?"array":"objeto");let o=Array.isArray(e.data)?e.data:[e.data];if(o.length>0){const e=o.map(e=>e.A073_nm_tarifario).filter(e=>""!==e);
1console.log("ð·ï¸ Categorias processadas:",e);const a=[...new Set(e)].sort();console.log("ð·ï¸ Categorias únicas:",a),a.forEach(e=>{const o=document.createElement("option");o.value=e,o.textContent=e,t.appendChild(o)}),console.log("â
Dropdown de categorias populado com",a.length,"categorias"),t.addEventListener("change",function(){const e=this.value;e?(console.log("ð·ï¸ Categoria selecionada:",e),carregarDetalhesCategoria(e)):esconderSecaoPrecos()})}else{const e=document.createElement("option");e.value="",e.textContent="Não há categorias disponÃveis",t.appendChild(e),console.log("â Nenhuma categoria disponÃvel")}}else{const e=document.createElement("option");e.value="",e.textContent="Não há categorias disponÃveis",t.appendChild(e),console.log("â Resposta da API inválida")}else console.error("Elemento selectCategoria não encontrado")}).catch(e=>{console.error("Erro ao carregar categorias:",e);const t=document.getElementById("selectCategoria");t&&(t.innerHTML='<option value="" selected disabled>Selecione uma categoria</option><option value="">Erro ao carregar categorias</option>')})}catch(e){console.error("Erro ao carregar categorias:",e)}},window.carregarDetalhesCategoria=function(e){console.log("ð carregarDetalhesCategoria chamada com:",e);try{let a=document.getElementById("A047_cd_cidade")?.value||document.querySelector("[data-cidade-id]")?.getAttribute("data-cidade-id")||window.cidadeId||document.querySelector('meta[name="cidade-id"]')?.getAttribute("content");if(!a){const e=window.location.pathname.match(/\/(\d+)(?:\?|$)/);e&&(a=e[1])}if(!a)return void console.error("â ID da cidade não encontrado. Verifique se o campo A047_cd_cidade está disponÃvel na página.");
1if(console.log("ðï¸ Cidade ID:",a),!a)return void console.error("ID da cidade não encontrado");const n=document.querySelector(".calendarioReserva .dias .selecionado");var t=n?`${n.getAttribute("data-ano")}-${String(parseInt(n.getAttribute("data-mes"),10)+1).padStart(2,"0")}-${String(n.getAttribute("data-dia")).padStart(2,"0")}`:"",o=document.getElementById("selectHorario").value;console.log("ð Fazendo requisição para:",`/api/atividade/${a}/detalhes-categoria/${encodeURIComponent(e)}`),fetch(`/api/atividade/${a}/detalhes-categoria/${encodeURIComponent(e)}/${t}/${o}`).then(e=>e.json()).then(e=>{if(console.log("ð Resultado da API detalhes:",e),e.success&&e.data&&e.data.length>0){console.log("ð Detalhes recebidos:",e.data),console.log("ð·ï¸ Processando detalhes da categoria:",e.data);const t=document.querySelector(".configReserva");if(!t)return void console.log("â Seção .configReserva não encontrada");const o=t.querySelectorAll(".preco-linha");o.forEach(e=>{e.remove()}),console.log("ð§¹ Elementos de preço existentes removidos:",o.length),e.data.forEach(e=>{if(!e.desativado){const o=criarLinhaPreco(e);t.appendChild(o)}}),console.log("â
Seção de preços criada e populada com",e.data.length,"itens"),console.log("â
Detalhes da categoria carregados com sucesso")}else console.log("â Nenhum detalhe encontrado para a categoria")}).catch(e=>{console.error("Erro ao carregar detalhes da categoria:",e)})}catch(e){console.error("Erro ao carregar detalhes da categoria:",e)}},$(document).on("click",".detaqTabs_tab",function(){const e=$(this),t=e.closest("section"),o=t.find(".detaqTabs"),a=e.index();o.find(".detaqTabs_tab").removeClass("active"),e.addClass("active"),o.animate({scrollLeft:e.position().left+o.scrollLeft()-o.width()/2+e.outerWidth()/2},300);var n=t.find(".detaqTabs-content").hide().eq(a).show();if("function"==typeof fnDetaqCarrega&&n.length&&n.attr("data-cd-pergunta")){var r=n.find(".detaqTabs_respotas");r.length&&"0"===r.attr("data-loaded")&&fnDetaqCarrega(n,!1,10)}}),window.addEventListener("load",()=>{setTimeout(initCarousel,300)});let __wtCarouselLastWidth=window.innerWidth,__wtCarouselResizeTimer=null;function voltarCalendario(e){var t=e instanceof jQuery?e:e instanceof Element?$(e).closest(".wtReserva"):$(e);0!==t.length&&(t.find(".configReserva").slideUp("fast"),t.find(".calendarioReserva").slideDown("fast"))}if(window.addEventListener("resize",()=>{clearTimeout(__wtCarouselResizeTimer),__wtCarouselResizeTimer=setTimeout(()=>{Math.abs(window.innerWidth-__wtCarouselLastWidth)<50||(__wtCarouselLastWidth=window.innerWidth,location.reload())},250)}),$(document).ready(function(){if($("#popupAvalia").length){const d="popupAvalia";if(!localStorage.getItem(d)){setTimeout(e,3e4);$(document).on("mouseleave",function(t){t.clientY<0&&e()})}function e(){localStorage.getItem(d)||($("#popupAvalia").fadeIn(300),localStorage.setItem(d,"true"))}}$(".wtMenu_abas").length&&$(window).width()<=900&&$(".wtMenu_abas ul").each(function(){const e=$(this);let t=0;e.children("li").each(function(){t+=$(this).outerWidth(!0)}),e.css("display","flex"),t<=e.width()?e.css("justify-content","center"):e.css("justify-content","flex-start")}),setTimeout(function(){$(".pagInfo_resumo").length&&$(".pagInfo_resumo").each(function(){$(this).outerHeight()>180&&($(this).addClass("pagInfo_fade"),$(this).siblings(".pagInfo_btnCompleto").show())})},200);const t=$(".wtMenu_abas").first(),o=t.find("a.menu-link"),a=t.length?t.offset().top:0;let n=!1;t.find("li:has(ul)").each(function(){$(this).addClass("no-pointer-events")}),t.find("li:has(ul)").on("click",function(e){e.stopPropagation();const t=$(this),o=t.children("ul");t.siblings("li").each(function(){$(this).find("ul").slideUp("fast"),$(this).find("> a").removeClass("active")}),o.is(":visible")?(o.slideUp("fast"),t.find("> a").removeClass("active")):(o.slideDown("fast"),t.children("> a").addClass("active"))}),t.find("li:has(ul) > a").on("click",function(e){e.preventDefault()}),$(document).on("click",function(e){$(e.target).closest(".wtMenu_abas").length||t.find("ul ul").slideUp("fast")}),o.on("click",function(e){const a=$(this),r=a.attr("href"),s=$(r),i=a.closest("li");t.find("li:has(ul)").not(i.parents("li").addBack()).each(function(){$(this).find("ul").slideUp("fast"),$(this).find("> a").removeClass("active")});const c=i.parent().is(t),l=i.children("ul").length>0;if(o.removeClass("active"),c&&l)return a.addClass("active"),void e.preventDefault();s.length?(e.preventDefault(),n=!0,a.addClass("active"),$("html, body").animate({scrollTop:s.offset().top-(t.hasClass("fixed")?t.outerHeight():80)},600,function(){setTimeout(()=>{n=!1},300)})):a.addClass("active")}),$(window).on("scroll",function(){const e=$(window).scrollTop()+80+10;$(window).scrollTop()>=a?t.addClass("fixed"):t.removeClass("fixed"),n||o.each(function(){const t=$(this).attr("href"),a=$(t);a.length&&a.position().top<=e&&a.position().top+a.height()>e&&(o.removeClass("active"),$(this).addClass("active"))})}),$(".input_personalizado input").keyup(function(){$(this).val(this.value.replace(/\D/g,""))});var r=window.location.href;if($("body").hasClass("bodyPesquisaApp")){var s="";(s=($("h1").first().text()||document.title||"").replace(/wikitravel/gi,"").trim())||(s=r),shareWhats="https://wa.me//?text="+encodeURIComponent(s+" "+r),shareFace="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(r)}else shareWhats="https://wa.me//?text="+encodeURIComponent(r),shareFace="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(r);if($(".shareBtn_whats").attr("href",shareWhats),$(".shareBtn_facebook").attr("href",shareFace),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){var i=$(".wtHeader").outerHeight();$(".wtHeader_bg").css("height",i+"px")}if(definirCorTextoContraste(),$(document).on("click",".listaZoom_overlay",function(){$(".listaZoom_overlay").fadeOut(300),$(".listaZoom_overlay img").fadeOut(300)}),0===$(".wtReserva").length)return;const c=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],l=["DOM","SEG","TER","QUA","QUI","SEX","SAB"];$(".calendarioReserva").each(function(){const e=$(this),t=e.closest(".wtReserva"),o=e.find(".dias"),a=e.find("#mes-ano"),n=e.find("#anterior"),r=e.find("#proximo"),s=t.find(".wtReserva_data span"),i=e.closest("#wtReserva_guia").length>0;let d=new Date,u=d.getMonth(),f=d.getFullYear();async function p(){o.off("click"),o.empty(),l.forEach(function(e){o.append(`<div style="font-weight:bold;">${e}</div>`)});let e=new Date(f,u,1).getDay(),p=new Date(f,u+1,0).getDate();a.text(`${c[u]} ${f}`);let v=new Set;if(i)for(let e=1;e<=p;e++){const t=new Date(f,u,e),o=new Date(d.getFullYear(),d.getMonth(),d.getDate()),a=new Date;a.setMonth(a.getMonth()+6),t>=o&&t<=a&&v.add(e)}else try{let e=document.getElementById("A047_cd_cidade")?.value||document.querySelector("[data-cidade-id]")?.getAttribute("data-cidade-id")||window.cidadeId||document.querySelector('meta[name="cidade-id"]')?.getAttribute("content");
1if(!e){const t=window.location.pathname.match(/\/(\d+)(?:\?|$)/);t&&(e=t[1])}if(e){const t=String(u+1),o=await fetch(`/api/atividade/${e}/datas/${f}/${t}`),a=await o.json();a&&a.success&&Array.isArray(a.data)&&a.data.forEach(e=>{const t=e.split("-"),o=Number(t[2]);isNaN(o)||v.add(o)})}}catch(e){console.error("Erro ao carregar dias disponÃveis:",e)}for(let t=0;t<e;t++)o.append("<div></div>");for(let e=1;e<=p;e++){let t=new Date(f,u,e),a=$(`<div><span>${e}</span></div>`);a.attr("data-dia",e),a.attr("data-mes",u),a.attr("data-ano",f);const n=e===d.getDate()&&u===d.getMonth()&&f===d.getFullYear(),r=t<new Date(d.getFullYear(),d.getMonth(),d.getDate()),i=v.has(e);n&&i&&(a.addClass("clicavel hoje selecionado"),s.html(`${e} de ${c[u]} de ${f}`)),r?a.addClass("sem-evento"):i?a.addClass("clicavel"):a.addClass("sem-evento"),o.append(a)}o.on("click",".clicavel",function(){const e=parseInt($(this).attr("data-dia")),a=parseInt($(this).attr("data-mes")),n=parseInt($(this).attr("data-ano"));console.log("ðï¸ Clique no calendário capturado! Dia:",e,"Mês:",a,"Ano:",n),o.find("div").removeClass("selecionado"),$(this).addClass("selecionado");let r=`${e} de ${c[a]} de ${n}`;s.html(r),t.find(".calendarioReserva").slideUp("fast"),t.find(".configReserva").slideDown("fast");try{const t=`${n}-${String(a+1).padStart(2,"0")}-${String(e).padStart(2,"0")}`;console.log("ð
Data ISO formatada:",t),console.log("ð Verificando funções disponÃveis:"),console.log(" - window.atualizarHorariosPorData:",typeof window.atualizarHorariosPorData),console.log(" - window.carregarHorariosDisponiveis:",typeof window.carregarHorariosDisponiveis),"function"==typeof window.atualizarHorariosPorData?(console.log("â
Chamando window.atualizarHorariosPorData"),window.atualizarHorariosPorData(t)):"function"==typeof window.carregarHorariosDisponiveis?(console.log("â
Chamando window.carregarHorariosDisponiveis (fallback)"),window.carregarHorariosDisponiveis(t)):console.log("â Nenhuma função de horários encontrada!")}catch(e){console.error("â Erro ao disparar atualização de horários:",e)}}),function(){let e=d.getMonth(),t=d.getFullYear();if(f<t||f===t&&u<=e?n.addClass("disable"):n.removeClass("disable"),i){const e=new Date;e.setMonth(e.getMonth()+6),f>e.getFullYear()||f===e.getFullYear()&&u>e.getMonth()?r.addClass("disable"):r.removeClass("disable")}}()}n.on("click",function(){$(this).hasClass("disable")||(u--,u<0&&(u=11,f--),p())}),r.on("click",function(){if(!$(this).hasClass("disable")){if(u++,u>11&&(u=0,f++),i){const e=new Date;e.setMonth(e.getMonth()+6),(f>e.getFullYear()||f===e.getFullYear()&&u>e.getMonth())&&(u=e.getMonth(),f=e.getFullYear())}p()}}),p()})}),$(".pagInfo_btnToggle").length&&jQuery(function(e){e(".pagInfo_btnToggle").on("click",function(){const t=e(".pagInfo_resumo"),o=e(".pagInfo_completo"),a=e(".pagInfo_btnCompleto"),n=e(".pagInfo_btnResumo");t.toggle(),o.toggle(),a.toggle(),n.toggle()})}),$("#carrossel_capa").length){function montarCarrossel(){const e=$(".carrossel-container").children();if(0===e.length)return;let t,o=0;function a(t){e.removeClass("ativo").eq(t).addClass("ativo")}function n(){e.eq(o).removeClass("ativo"),o=(o+1)%e.length,a(o)}function r(){clearInterval(t),t=setInterval(n,8e3)}a(o),$(".carrossel-next").off("click").on("click",function(){n(),r()}),$(".carrossel-prev").off("click").on("click",function(){e.eq(o).removeClass("ativo"),o=(o-1+e.length)%e.length,a(o),r()}),t=setInterval(n,8e3)}$(document).ready(function(){const e=setInterval(()=>{$(".carrossel-container > *").length>0&&(montarCarrossel(),clearInterval(e))},100)})}function listaZoom(e){var t=$(e).attr("src");$(".listaZoom_overlay img").attr("src",t),$(".listaZoom_overlay").fadeIn(300),setTimeout(()=>{$(".listaZoom_overlay img").fadeIn()},700)}function popupMostraAdsv(){$("#popupQrcode_Qr").removeClass("popupQrcode_abaSel"),$("#popupQrcode_adsv").addClass("popupQrcode_abaSel"),$(".popupQrcode_imgContainer").addClass("popupQrcode_imgAdsv"),$("#popupQrcode_btnAdsv").show(),$("#popupQrcode_btnQr").hide()}function popupMostraQrcode(){$("#popupQrcode_adsv").removeClass("popupQrcode_abaSel"),$("#popupQrcode_Qr").addClass("popupQrcode_abaSel"),$(".popupQrcode_imgContainer").removeClass("popupQrcode_imgAdsv"),$("#popupQrcode_btnAdsv").hide(),$("#popupQrcode_btnQr").show()}function copyLink(){var e=window.location.href;navigator.clipboard.writeText(e)}function informaCode(){$(".identificaUser").slideUp("slow"),setTimeout(()=>{$(".validaCode").slideDown("slow")},550)}function verAvaliacoes(){$("#wtPopup_avaliacoes").fadeIn("slow")}function avaliar(){$("#avaEnvia").show(),$("#avaConfirma").hide(),$("#formAvalia").show(),$("#formConfirma").hide(),$("#wtPopup_avaliacoes").fadeOut("slow"),$("#wtPopup_avaliar").fadeIn("slow")}function avaConfirma(){$("#avaEnvia").hide(),$("#avaConfirma").show(),$("#formAvalia").slide
1Up("slow"),setTimeout(()=>{$("#formConfirma").slideDown("slow")},50)}function definirCorTextoContraste(){var e=$(".wtHeader"),t=e.find(".txtEmbed");calcularLuminosidade(e.css("background-color"))>.5?t.css("color","black"):t.css("color","white")}function calcularLuminosidade(e){var t=e.match(/\d+/g);return(.299*t[0]+.587*t[1]+.114*t[2])/255}function wtClima_resumo(){$(".wtClima_local font").toggleClass("wtClima_fechar"),$(".wtClima_historico").slideToggle(),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&$(".wtClima_proxDias").slideToggle(),$("html, body").animate({scrollTop:$(".wtClima").offset().top-10},600)}$(".infoDestino_item").click(function(){$(this).find(".infoDestino_resposta").is(":visible")?($(this).find(".infoDestino_resposta").slideUp("slow"),$(this).find(".infoDestino_pergunta").removeClass("infoDestino_respostaON")):($(".infoDestino_resposta").slideUp("slow"),$(this).find(".infoDestino_resposta").slideDown("slow"),$(this).find(".infoDestino_pergunta").addClass("infoDestino_respostaON"))}),$(".infoDestino_selec input").click(function(e){$(this).parents(".infoDestino_item").toggleClass("infoDestino_itemSel"),e.stopPropagation()}),$(".selectStar_star1").hover(function(){$(this).parent(".selectStar").addClass("selectStar_1_hover")},function(){$(this).parent(".selectStar").removeClass("selectStar_1_hover")}),$(".selectStar_star2").hover(function(){$(this).parent(".selectStar").addClass("selectStar_2_hover")},function(){$(this).parent(".selectStar").removeClass("selectStar_2_hover")}),$(".selectStar_star3").hover(function(){$(this).parent(".selectStar").addClass("selectStar_3_hover")},function(){$(this).parent(".selectStar").removeClass("selectStar_3_hover")}),$(".selectStar_star4").hover(function(){$(this).parent(".selectStar").addClass("selectStar_4_hover")},function(){$(this).parent(".selectStar").removeClass("selectStar_4_hover")}),$(".selectStar_star5").hover(function(){$(this).parent(".selectStar").addClass("selectStar_5_hover")},function(){$(this).parent(".selectStar").removeClass("selectStar_5_hover")}),$(".selectStar_star1").click(function(){$(this).parent(".selectStar").addClass("selectStar_1"),$(this).parent(".selectStar").removeClass("selectStar_2"),$(this).parent(".selectStar").removeClass("selectStar_3"),$(this).parent(".selectStar").removeClass("selectStar_4"),$(this).parent(".selectStar").removeClass("selectStar_5")}),$(".selectStar_star2").click(function(){$(this).parent(".selectStar").removeClass("selectStar_1"),$(this).parent(".selectStar").addClass("selectStar_2"),$(this).parent(".selectStar").removeClass("selectStar_3"),$(this).parent(".selectStar").removeClass("selectStar_4"),$(this).parent(".selectStar").removeClass("selectStar_5")}),$(".selectStar_star3").click(function(){$(this).parent(".selectStar").removeClass("selectStar_1"),$(this).parent(".selectStar").removeClass("selectStar_2"),$(this).parent(".selectStar").addClass("selectStar_3"),$(this).parent(".selectStar").removeClass("selectStar_4"),$(this).parent(".selectStar").removeClass("selectStar_5")}),$(".selectStar_star4").click(function(){$(this).parent(".selectStar").removeClass("selectStar_1"),$(this).parent(".selectStar").removeClass("selectStar_2"),$(this).parent(".selectStar").removeClass("selectStar_3"),$(this).parent(".selectStar").addClass("selectStar_4"),$(this).parent(".selectStar").removeClass("selectStar_5")}),$(".selectStar_star5").click(function(){$(this).parent(".selectStar").removeClass("selectStar_1"),$(this).parent(".selectStar").removeClass("selectStar_2"),$(this).parent(".selectStar").removeClass("selectStar_3"),$(this).parent(".selectStar").removeClass("selectStar_4"),$(this).parent(".selectStar").addClass("selectStar_5")}),$("#lpBusca").click(function(e){e.stopPropagation(),$(this).siblings(".wtSection_listaCidades").slideDown("slow"),$("html, body").animate({scrollTop:$(".wtSection_todosEstados").offset().top},1e3)}),$(".lpBusca").click(function(e){e.stopPropagation()}),$(".wtSection_listaCidades").click(function(e){e.stopPropagation()}
1),$("body").click(function(){$(".wtSection_listaCidades").slideUp("slow")}),$("#lpBusca2").click(function(e){e.stopPropagation(),$(this).siblings(".wtSection_listaCidades").slideDown("slow")}),$(".lpBusca").click(function(e){e.stopPropagation()}),$(".wtSection_listaCidades").click(function(e){e.stopPropagation()}),$("body").click(function(){$(".wtSection_listaCidades").slideUp("slow")}),$(".infoDestino_galeriaAbas li").click(function(){$(".infoDestino_galeriaAbas li").removeClass("infoDestino_abaActive"),$(this).addClass("infoDestino_abaActive")}),document.addEventListener("DOMContentLoaded",function(){const e=document.querySelector(".wtFiltroWrapper");if(!e)return;const t=e.querySelector(".wtFiltroLetras");if(!t)return;const o=document.querySelectorAll(".listaTitulo");if(!o.length)return;const a=t.querySelectorAll("li"),n=Array.from(o).map(e=>e.id.replace("lista_",""));a.forEach(e=>{const t=e.querySelector("a");if(!t)return;const o=t.getAttribute("href").replace("#lista_","");n.includes(o)||e.remove()}),t.querySelectorAll("a").forEach(e=>{e.addEventListener("click",function(){t.querySelectorAll("li").forEach(e=>e.classList.remove("selected")),this.parentElement.classList.add("selected")})}),window.__wtObserver&&window.__wtObserver.disconnect(),window.__wtObserver=new IntersectionObserver(e=>{e.forEach(e=>{if(!e.isIntersecting)return;const o=e.target.id;t.querySelectorAll("li").forEach(e=>e.classList.remove("selected"));const a=t.querySelector(`a[href="#${o}"]`);a&&a.parentElement.classList.add("selected")})},{rootMargin:"-25% 0px -65% 0px"}),o.forEach(e=>window.__wtObserver.observe(e))}),$(function(){const e=$(".wtmenuDinamico");e.length&&(e.find("ul").hide(),e.find("li").has("ul").each(function(){const e=$(this),t=e.parents("ul").length;e.addClass("hasSubmenu");const o=1===t?"fa-chevron-down":"fa-chevron-right";e.children("a").addClass("noLink").append(`<i class="fa-solid ${o} arrow"></i>`)}),e.on("click","a",function(t){const o=$(this).parent("li"),a=o.children("ul");if(a.length)return t.preventDefault(),$(window).width()<=900&&($(".menuScroll").css("overflow","visible"),$("html, body").css("overflow","hidden"),$(".wtSection_regiao, .wtHeader").css("z-index","30")),o.siblings().removeClass("open selected").find("li").removeClass("open selected").end().find("ul").stop(!0,!0).slideUp(200),void(o.hasClass("open")?(o.removeClass("open selected"),a.stop(!0,!0).slideUp(200)):(o.addClass("open selected"),a.stop(!0,!0).slideDown(200)));e.find("li").removeClass("selected open"),e.find("ul").stop(!0,!0).slideUp(200),o.addClass("selected")}),$(document).on("click",function(t){$(t.target).closest(e).length||(e.find("li").removeClass("open selected"),e.find("ul").stop(!0,!0).slideUp(200))}),$(window).width())}),function(){"use strict";function e(e){var t=window.jQuery?jQuery(e):null;if(t&&"function"==typeof fnDetaqCarrega){var o=t.find(".detaqTabs_respotas");o.length&&"0"===o.attr("data-loaded")&&"1"===t.attr("data-tem-atividade")&&(fnDetaqCarrega(t,!1,10),"function"==typeof fnDetaqCarregaChips&&fnDetaqCarregaChips(t))}}function t(){document.addEventListener("scroll",function(e){var t=e.target;t&&t.classList&&t.classList.contains("cv2_trilho")&&function(e){var t=e.closest(".cv2_prat");if(!t)return;var o=e.scrollWidth-e.clientWidth-1;t.querySelectorAll(".cv2_pratSeta").forEach(function(t){var a=parseInt(t.getAttribute("data-dir"),10)<0?e.scrollLeft<=0:e.scrollLeft>=o;t.classList.toggle("cv2_pratSeta--off",a||o<=0)})}(t)},!0)}function o(){document.querySelector(".cv2_prat")&&(!function(){var t=document.querySelectorAll(".cv2_prat");if(t.length)if("IntersectionObserver"in window){var o=new IntersectionObserver(function(t){t.forEach(function(t){t.isIntersecting&&(o.unobserve(t.target),e(t.target))})},{rootMargin:"400px 0px"});Array.prototype.forEach.call(t,function(e){o.observe(e)}),document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&a()}),setTimeout(a,2500)}else Array.prototype.forEach.call(t,e);function a(){Array.prototype.forEach.call(document.querySelectorAll(".cv2_prat"),function(t){var a=t.getBoundingClientRect();a.top>window.innerHeight||a.bottom<0||(o.unobserve(t),e(t))})}}(),document.addEventListener("click",function(e){var t=e.target.closest?e.target.closest(".cv2_pratSeta"):null;if(t){var o=t.closest(".cv2_prat"),a=o&&o.querySelector(".cv2_trilho");if(a){var n=a.querySelector(".detaqTabs_card"),r=n?n.offsetWidth+16:280,s=Math.max(r,a.clientWidth-r);a.scrollBy({left:s*parseInt(t.getAttribute("data-dir"),10),behavior:"smooth"})}}}),t())}window.cv2PratVerTudo=function(e){var t=e.closest(".cv2_prat");if(t){var o=t.querySelector(".cv2_trilho"),a=t.querySelector(".cv2_pratNav"),n=t.classList.toggle("cv2_prat--grade");a&&(a.style.display=n?"none":""),o&&(o.scrollLeft=0),e.getAttribute("data-rot-abrir")||e.setAttribute("data-rot-abrir",e.textContent.trim()),e.textContent=n&&e.getAttribute("data-rot-fechar")||e.getAttribute("data-rot-abrir"),n&&window.jQuery&&"function"==typeof fnDetaqCarrega&&o&&jQuery(o).attr("data-limit")&&fnDetaqCarrega(jQuery(t),!1,null)}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()}(),function(){"use strict";function e(e){return e===document.documentElement?window.pageYOffset||e.scrollTop||0:e.scrollTop}function t(t){var o=[];return document.querySelectorAll("[data-nav]").forEach(function(e){var t=function(e){var t=e.getAttribute("data-alvo");return t?document.querySelector(t):e}(e);if(function(e){return!!e&&null!==e.offsetParent&&e.getBoundingClientRect().height>10}(t)){var a=(e.getAttribute("data-nav")||"").trim();a&&o.push({rot:a,alvo:t})}}),o.length<2?null:(t.innerHTML="",o.forEach(function(o,a){var n=document.createElement("button");
1n.type="button",n.className="cv2_navItem",n.setAttribute("role","listitem"),n.textContent=o.rot,n.addEventListener("click",function(){var t,a,n=(t=document.documentElement,a=document.body,t.scrollHeight>t.clientHeight+1?t:a.scrollHeight>a.clientHeight+1?a:t);n.scrollTo({top:o.alvo.getBoundingClientRect().top+e(n)-90+20,behavior:"smooth"})}),t.appendChild(n),o.botao=n}),o)}function o(e){var t=null;function o(){for(var o=e[0],a=0;a<e.length;a++)e[a].alvo.getBoundingClientRect().top-90<=0&&(o=e[a]);if(o!==t){t&&t.botao.classList.remove("cv2_navItem--on"),o.botao.classList.add("cv2_navItem--on"),t=o;var n=o.botao.parentNode;if(n&&n.scrollWidth>n.clientWidth){var r=o.botao;n.scrollTo({left:r.offsetLeft-n.clientWidth/2+r.offsetWidth/2,behavior:"smooth"})}}}var a=0,n=null;function r(){var e=Date.now();if(e-a>=80)return a=e,void o();n||(n=setTimeout(function(){n=null,a=Date.now(),o()},80))}window.addEventListener("scroll",r,{passive:!0}),document.body.addEventListener("scroll",r,{passive:!0}),o()}function a(){var e=document.querySelector(".cv2_nav");if(e){var a=e.querySelector(".cv2_navItens");if(a){window.wtNavRemonta=function(){var n=t(a);n?(e.style.display="",o(n)):e.style.display="none"};var n=t(a);n?(o(n),setTimeout(function(){var e=t(a);e&&e.length!==n.length&&o(e)},2500)):e.style.display="none"}}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a()}(),function(){"use strict";var e=function(){var e=[];try{for(var t=new Intl.DateTimeFormat(document.documentElement.lang||navigator.language||"pt-BR",{weekday:"short"}),o=0;o<7;o++)e.push(t.format(new Date(Date.UTC(2024,0,1+o))).replace(".",""))}catch(t){e=["seg","ter","qua","qui","sex","sab","dom"]}return e}();function t(e){return e?String(e).slice(0,5):""}function o(o,a,n){if(a.length){var r={},s={};a.forEach(function(e){e.destino&&(r[e.destino]=1),e.origem&&(s[e.origem]=1)});var i=Object.keys(r).length>1,c=Object.keys(s).length>1,l=i||c,d='<ul class="cv2_vooLista'+(l?" cv2_vooLista--aer":"")+(i&&c?" cv2_vooLista--aer2":"")+'">';a.forEach(function(o){var a=t(o.chegada)||t(o.partida),r="1111111"===o.dias,s=[c&&o.origem||"",i&&o.destino||""].filter(Boolean).join("â");d+='<li><span class="cv2_vooHora">'+(a||"--:--")+"</span>"+(l?'<span class="cv2_vooAer">'+s+"</span>":"")+'<span class="cv2_vooNum">'+(o.numero||"")+'</span><span class="cv2_vooCiaMin">'+(o.companhia||"")+'</span><span class="cv2_vooDias">'+(r?n.todosOsDias:function(t){if(!t||7!==t.length)return"";for(var o=[],a=0;a<7;a++)"1"===t[a]&&o.push(e[a]);return o.join(" ")}(o.dias))+"</span></li>"}),o.innerHTML=d+"</ul>"}else o.innerHTML='<p class="cv2_vooVazio">'+n.vazio+"</p>"}document.addEventListener("click",function(e){var t=e.target&&e.target.closest?e.target.closest(".cv2_voosMais"):null;if(t){var a=t.closest(".cv2_voosCard");if(!(c=a&&a.querySelector(".cv2_voos")))return;var n=c.classList.toggle("cv2_voos--recolhido");t.textContent=n?t.getAttribute("data-mais")||t.textContent:t.getAttribute("data-menos")||"Ver menos"}else{var r=e.target&&e.target.closest?e.target.closest(".cv2_vooLinha"):null;if(r&&!e.target.closest(".cv2_vooNome a")&&!e.target.closest(".cv2_vooHorarios")){var s=r.querySelector(".cv2_vooVer");if(s){var i=r&&r.querySelector(".cv2_vooHorarios"),c=s.closest(".cv2_voos");if(i&&c){var l=!i.hidden;if(i.hidden=l,s.setAttribute("aria-expanded",String(!l)),r.classList.toggle("cv2_vooLinha--aberta",!l),!l&&"1"!==i.dataset.carregado){var d=c.getAttribute("data-cd-cidade"),u=s.getAttribute("data-iata");if(d&&u){var f={vazio:s.getAttribute("data-vazio")||"Sem horários disponÃveis.",todosOsDias:s.getAttribute("data-todos")||"todos os dias"};i.innerHTML='<p class="cv2_vooVazio">â¦</p>',fetch("/ajax/voos/horarios/"+encodeURIComponent(d)+"/"+encodeURIComponent(u),{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){i.dataset.carregado="1",o(i,e&&e.voos||[],f)}).catch(function(){i.dataset.carregado="1",o(i,[],f)})}else i.hidden=!0}}}}}})}(),function(){"use strict";var e=window.WT_FOTO_AUTO={tentadas:0,ok:0,falhas:0,desligado:!1,fila:0},t={},o=[],a=!1;function n(){if(!a)if(e.desligado)!function(){var t;for(;t=o.shift();)t.aoFalhar&&t.aoFalhar();e.fila=0}();else{var t=o.shift();e.fila=o.length,t&&(a=!0,function(t){return e.tentadas++,fetch("/ajax/foto/auto-refresh/"+encodeURIComponent(t.cod),{method:"POST",credentials:"same-origin"}).then(function(t){return 401===t.status?(e.desligado=!0,null):t.json().catch(function(){return null})}
1).then(function(o){if(o&&o.atualizado&&o.url)return e.ok++,t.img.src=o.url,void((n=(a=t.box)&&a.querySelector?a.querySelector(".detaqTabs_fotoReload"):null)&&n.classList.remove("wtFotoReload--visible"));var a,n;e.falhas++,t.aoFalhar&&t.aoFalhar()}).catch(function(){e.falhas++,t.aoFalhar&&t.aoFalhar()})}(t).then(function(){a=!1,setTimeout(n,250)}))}}window.wtFotoAutoRefresh=function(a,r){var s=a&&a.closest?a.closest("[data-cod-imagem]"):null,i=s&&s.getAttribute("data-cod-imagem");return!(!i||t[i]||e.desligado||!(e.tentadas+o.length<12)||-1===document.cookie.indexOf("tkntrmactfull="))&&(t[i]=1,o.push({cod:i,img:a,box:s,aoFalhar:r}),e.fila=o.length,n(),!0)}}(),function(){"use strict";function e(e){var t=e&&e.closest?e.closest(".cv2_top3sec"):null;t&&"1"!==t.dataset.semFoto&&(t.dataset.semFoto="1",t.style.display="none","function"==typeof window.wtNavRemonta&&window.wtNavRemonta())}window.wtTop3SemFoto=function(t){t&&(t.onerror=null),e(t)},window.addEventListener("load",function(){for(var t=document.querySelectorAll('.cv2_top3sec img[src*="sem_imagem"], .cv2_top3sec img[src*="semImagem"], .cv2_top3sec img[src*="evt_semImg"]'),o=0;o<t.length;o++)e(t[o]);for(var a=document.querySelectorAll(".cv2_top3sec img"),n=0;n<a.length;n++)a[n].complete&&!a[n].naturalWidth&&e(a[n])})}(),function(){"use strict";function e(){var e=document.querySelector(".cv2_capta");if(e){var t=0;e.querySelectorAll(".cv2_captaItem").forEach(function(e){e.hasAttribute("hidden")||t++}),e.style.display=t?"":"none";var o=e.querySelector(".cv2_captaSub");o&&o.getAttribute("data-tpl")&&(o.textContent=o.getAttribute("data-tpl").replace("{n}",t))}}window.wtAgendaSemEventos=function(){var t=document.querySelector(".cv2_captaItem--eventos");t&&t.removeAttribute("hidden"),e()},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}();
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.