(()=>{"use strict";function e(){Math.round(window.scrollY)>50?document.querySelector(".header").classList.add("active"):document.querySelector(".header").classList.remove("active")}!function(){const e=document.querySelectorAll("a");window.location.origin.includes("localhost")&&e.forEach((e=>{const t=e.getAttribute("href");if(""===t||"/"===t||null===t||t.includes("pdf")||e.className.includes("external")||t.includes("mailto:")||t.includes("tel:")||e.setAttribute("href",t+".php"),t.includes("#")){var n=t.slice(0,t.indexOf("#"))+".php"+t.slice(t.indexOf("#"));e.setAttribute("href",n)}}))}(),window.addEventListener("scroll",e),e();const t=document.getElementById("newsletter-form"),n=document.getElementById("newsletter-email");t&&t.addEventListener("submit",(function(e){e.preventDefault();let o="",s=!1;/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(n.value)||(o+="Por favor ingrese un email valido ",s=!0),s?(Swal.fire({title:"Error",html:o,icon:"error",confirmButtonText:"CERRAR"}),document.querySelector("body").style.cssText="padding-right: 0"):(Swal.fire({title:"Registro exitoso",text:"Te enviaremos información sobre lanzamientos, promociones y muchas cosas mas",icon:"success",confirmButtonText:"CERRAR"}),document.querySelector("body").style.cssText="padding-right: 0",y(t))}));const o=document.getElementById("contact-form"),s=document.getElementById("contact-name"),a=document.getElementById("contact-email"),c=document.getElementById("contact-phone"),i=document.getElementById("contact-city"),r=document.getElementById("contact-message");o&&o.addEventListener("submit",(function(e){e.preventDefault();let t="",n=!1;s.value.length<6&&(t+="Ingrese su nombre completo ",n=!0),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(a.value)||(t+="Ingrese un email valido ",n=!0),c.value.length<7&&(t+="Ingrese un numero de teléfono valido ",n=!0),i.value.length<4&&(t+="Ingrese su ciudad de residencia ",n=!0),r.value.length<10&&(t+="Ingrese su mensaje o consulta ",n=!0),n?(Swal.fire({title:"Error",html:t,icon:"error",confirmButtonText:"CERRAR"}),document.querySelector("body").style.cssText="padding-right: 0"):(Swal.fire({title:"Mensaje enviado",text:"Hemos recibido tu solicitud, muy pronto nos pondremos en contacto contigo",icon:"success",confirmButtonText:"CERRAR"}),document.querySelector("body").style.cssText="padding-right: 0",y(o))}));const l=document.getElementById("download-form"),d=document.getElementById("download-name"),m=document.getElementById("download-phone"),u=document.getElementById("download-city"),f=document.getElementById("download-country"),g=document.getElementById("download-policies");function y(e){let t;"download-form"===e.id?t="https://script.google.com/macros/s/AKfycbxFhK7OY2wynKmc0jAIiEuyZFLtTHSN3QKwuFViQ0F5033TlLYO/exec":"newsletter-form"===e.id?t="https://script.google.com/macros/s/AKfycbwW69kd5H156Y0hzvg-ykROtqcKDcaVyig0S8fzB7nCgh6GP_M/exec":"contact-form"===e.id&&(t="https://script.google.com/macros/s/AKfycbwsfFulOmfLTddtesxx-lIGEm7Jr3foybnbJIUG58vQ6QFq3qE/exec"),fetch(t,{method:"POST",body:new FormData(e)}).then((t=>{e.reset(),"download-form"===e.id&&window.location.assign("/descargar")})).catch((e=>{Swal.fire({title:"Error",text:"Ha ocurrido un error al crear tu solicitud, intenta nuevamente.",icon:"error",confirmButtonText:"CERRAR"}),console.log("Error:",e)}))}l&&l.addEventListener("submit",(function(e){e.preventDefault();let t="",n=!1;d.value.length<6&&(t+="Ingrese su nombre completo ",n=!0),m.value.length<7&&(t+="Ingrese un numero de teléfono valido ",n=!0),u.value.length<4&&(t+="Ingrese su ciudad de residencia ",n=!0),f.value.length<4&&(t+="Ingrese su pais de residencia ",n=!0),!1===g.checked&&(t+="Confirme la aceptación de las politicas",n=!0),n?(Swal.fire({title:"Error",html:t,icon:"error",confirmButtonText:"CERRAR"}),document.querySelector("body").style.cssText="padding-right: 0"):(y(l),sessionStorage.setItem("idDownload","success"))}));const v=document.getElementById("map1"),h=document.getElementById("map2"),w=[-74.132471,4.616401],b=[-74.081589,4.60061];if(v&&h){mapboxgl.accessToken="pk.eyJ1IjoiYmFydG9sb21lb2plYW5zIiwiYSI6ImNrNjYwaGo2dzByemczam9kZ3JsMXh4ZXYifQ.xc1ZJyjaO8vwuzhTxjNfeA";let E=new mapboxgl.Map({container:"map1",style:"mapbox://styles/mapbox/streets-v9",center:w,zoom:12.5}),x=new mapboxgl.Map({container:"map2",style:"mapbox://styles/mapbox/streets-v9",center:b,zoom:12.5});function I(e,t){let n=document.createElement("div");n.className="map-marker",new mapboxgl.Marker(n).setLngLat(t).addTo(e)}function L(e,t){let n=document.createElement("a");n.classList.add("map-link"),n.innerText="Como llegar »",n.setAttribute("target","_blank");const o=t.reverse();n.setAttribute("href",`https://waze.com/ul?ll=${o}&z=8&navigate=yes`),e.append(n)}I(E,w),I(x,b),L(v,w),L(h,b),E.addControl(new mapboxgl.NavigationControl),x.addControl(new mapboxgl.NavigationControl)}const p=document.querySelectorAll(".country-item.distributor");p&&p.forEach((e=>{e.addEventListener("click",(function(){const e=this.getAttribute("data-tab"),t=document.getElementById(e);t.classList.contains("active")?t.classList.remove("active"):(document.querySelectorAll(".box-distributor").forEach((e=>e.classList.remove("active"))),t.classList.add("active"))}))})),document.addEventListener("DOMContentLoaded",(function(){var e,t=document.querySelectorAll("img.lazy");function n(){e&&clearTimeout(e),e=setTimeout((function(){var e=window.pageYOffset;t.forEach((function(t){t.offsetTop{null===sessionStorage.getItem("daysoff")&&function(){let e=document.createElement("div");e.classList.add("dayoff"),e.innerHTML='\n