`)),n.innerHTML=r.join("")}else n.innerHTML='
No results found
'},i=(e,t)=>{let r;return function(){let n=this,a=arguments;clearTimeout(r),r=setTimeout(()=>e.apply(n,a),t)}},l=()=>{r.addEventListener("input",i(e=>{e.preventDefault();let t=r.value.toLowerCase();""!==t?s(t):n.innerHTML=""},100))},u=async()=>{try{let e=await fetch("/api/search.json");o=await e.json(),l()}catch(n){console.error(n),alert("There was an error fetching data.")}finally{setTimeout(()=>{t.setAttribute("aria-busy","false"),r.focus()},150)}},c=()=>{t.hasAttribute("open")?t.removeAttribute("open"):t.setAttribute("open",""),document.body.classList.toggle("antialiased"),document.body.classList.toggle("overflow-hidden")},$=()=>{"false"!==t.getAttribute("aria-busy")||t.hasAttribute("open")||(c(),o?setTimeout(()=>{r.focus()},150):(t.setAttribute("aria-busy","true"),u()))},d=()=>{t.hasAttribute("open")&&(r.value="",n.innerHTML="",c())};e.addEventListener("click",()=>{$()}),t.addEventListener("click",e=>{(e.target===t||e.target===a)&&d()}),window.addEventListener("keydown",e=>{e.ctrlKey&&"KeyK"===e.code&&(e.preventDefault(),$()),"Escape"===e.key&&(e.preventDefault(),d())})}(),function(){let e=document.querySelector("[data-countdown]");if(!e)return;let t=e.dataset.countdown,r=new Date(t).getTime(),n="true"===e.dataset.full;function a(){let t=new Date().getTime(),a=r-t;if(a<=0){clearInterval(o);return}let s=Math.floor(a%864e5/36e5),i=Math.floor(a%36e5/6e4),l=Math.floor(a%6e4/1e3);n?e.innerHTML=`Ends: ${Math.floor(a/864e5)}d, ${s}h, ${i}min, ${l}s`:e.innerHTML=`Ends: ${s}h, ${i}min, ${l}s`}let o=setInterval(a,1e3);a()}();