document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),document.querySelector(this.getAttribute("href")).scrollIntoView({behavior:"smooth"})})});function shuffleAvatars(){const e=document.querySelector(".swiper-wrapper");for(let t=e.children.length;t>=0;t--)e.appendChild(e.children[Math.random()*t|0])}function initializeSwiper(){shuffleAvatars(),new Swiper(".swiper",{slidesPerView:1,slidesPerGroup:1,loop:!0,breakpoints:{500:{slidesPerView:2,slidesPerGroup:2,spaceBetween:10,pagination:{enabled:!0}},769:{slidesPerView:3,slidesPerGroup:3,spaceBetween:20,pagination:{enabled:!0}},950:{slidesPerView:4,slidesPerGroup:4,spaceBetween:30,pagination:{enabled:!0}}},pagination:{el:".swiper-pagination",clickable:!0,enabled:!1},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}}),document.querySelector(".swiper-wrapper").style.display="flex",document.querySelector(".pagination-wrapper").style.display="flex"}function expandContent(e){const t=e.target,n=t.parentNode;if(n){const e=n.querySelectorAll(".expandable-on-mobile"),s=Array.from(e);t.classList.add("hidden"),s.forEach(e=>{e.classList.add("expanded")})}}function filterJobs(){const s=document.querySelectorAll("select"),n=document.querySelector("#search"),o=document.querySelector(".positions-wrapper"),e=document.createElement("span");e.textContent="Looks like we don't have any openings that fit the criteria at this time. Please check back later!",e.style.display="none",e.className="no-positions",o.prepend(e);function t(){const t=document.querySelector("#location").value.toLowerCase(),s=document.querySelector("#level").value.toLowerCase(),o=document.querySelector("#stack").value.toLowerCase(),a=n.value.toLowerCase();let r=document.querySelectorAll(".positions .position"),i=!1;r.forEach(function(n){const r=n.getAttribute("data-location").toLowerCase(),c=n.getAttribute("data-level").toLowerCase(),l=n.getAttribute("data-stack").toLowerCase(),d=n.getAttribute("data-position").toLowerCase(),u=t==="all"||r===t,h=s==="all"||c===s,m=o==="all"||l.includes(o),f=d.includes(a);u&&h&&m&&f?(n.style.display="flex",i=!0):n.style.display="none",i?(e.style.display="none",e.className="no-positions"):(e.style.display="flex",e.className="no-positions visible")})}return s.forEach(function(e){e.addEventListener("change",t)}),n.addEventListener("input",t),t}function clearInput(){const t=document.querySelector("#search"),e=document.querySelector(".positions .close");e.style.display="none",t.addEventListener("input",function(){t.value?e.style.display="block":e.style.display="none"}),e.addEventListener("click",function(){t.value="",e.style.display="none",filterPositions()})}let filterPositions;document.querySelector(".positions-wrapper")&&(filterPositions=filterJobs(),clearInput()),initializeSwiper()