";function y(i=void 0,l=[],g=!1){const n=new Date().getMonth();for(let t of document.getElementById("table-body").children){const d=i?t.children[0].innerText.toLowerCase().includes(i.trim().toLowerCase()):!0,h=!g||t.children[n+1].innerText.length>0,c=l.has("a")||Array.from(t.classList).some((a)=>l.has(a));if(d&&h&&c)t.style.display="";else t.style.display="none"}}var u=new Date,r=new b(""),f=new b,m=new b(new Set(["a"]));window.addEventListener("load",function(){const i=document.getElementById("filter-container");i.style.display="block";const l=document.getElementById("search");l.oninput=()=>{r.set(l.value)};const g=document.getElementById("season-checkbox");g.onchange=()=>{f.set(g.checked)};const n=document.getElementById("all-checkbox");n.onchange=()=>{c(n.checked,"a")};const t=document.getElementById("vegetable-checkbox");t.onchange=()=>{c(t.checked,"v")};const d=document.getElementById("fruit-checkbox");d.onchange=()=>{c(d.checked,"f")};const h=document.getElementById("salad-checkbox");h.onchange=()=>{c(h.checked,"s")};function c(e,o){let s=m.get();if(o==="a"&&e)s=new Set("a");else if(o==="a"&&s.has("a")&&s.size==1)s=new Set("a");else if(e)s.add(o),s.delete("a");else if(s.delete(o),s.size==0)s=new Set("a");m.set(s)}document.getElementById("clear-search").onclick=()=>r.set("");const a=document.getElementsByTagName("tr");document.onclick=function(e){for(let o=0;oe.children[k+1]).forEach((e)=>{e.style.backgroundImage=p,e.classList.add("active")}),r.subscribe((e)=>document.getElementById("clear-search").disabled=e.trim().length===0),r.subscribe((e)=>l.value=e),r.subscribe((e)=>y(e,m.get(),f.get())),f.subscribe((e)=>y(r.get(),m.get(),e)),m.subscribe((e)=>y(r.get(),e,f.get())),m.subscribe((e)=>{n.checked=e.has("a"),t.checked=e.has("v"),d.checked=e.has("f"),h.checked=e.has("s")})});