1document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("jobs-container"),t=document.querySelectorAll("#category-filter a"),n=(document.querySelectorAll("#location-filter button"),document.getElementById("location-filter")),a=document.getElementById("job-search-input"),o=document.getElementById("loader_job");let l="",s="",c="";const i=async(t,n,a)=>{const{error:l,posts:s}=await(async(t="",n="",a="")=>{e.innerHTML="";const l=new URLSearchParams;l.append("action","fetch_jobs"),t&&l.append("location",t),n&&l.append("category",n),a&&l.append("search",a),l.append("nonce",my_custom_job_block_vars.nonce);try{const e=await fetch(my_custom_job_block_vars.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:l});if(!e.ok)throw new Error(`Error ${e.status}: ${e.statusText}`);const t=await e.json();return t.success?{error:null,posts:t.data}:{error:t.data,posts:[]}}catch(e){return console.log("Fetch error:",e),{error:e.message,posts:[]}}finally{o.style.display="none"}})(t,n,a);l?(console.log(l),"No jobs found."===l&&(e.innerHTML="")):r(s)},r=t=>{e.innerHTML="",t.forEach(t=>{const n=document.createElement("div");n.classList.add("unit__box");const a=`<h3 class="text-24 md:text-26 font-bold md:font-semibold leading-34 md:leading-32 tracking-[0.06px] opacity-50" title="${t.category_name}">\n ${t.category_name}\n </h3>`,o=t.posts.map(e=>{const t=new Date,n=new Date(e.job_deadline).getTime()-t.getTime(),a=Math.ceil(n/864e5);return`<li class="designation__details">\n <div class="w-full flex flex-col lg:flex-row justify-start lg:justify-between items-start lg:items-center gap-4 md:gap-[10px]">\n <a href="${e.link}?country=${e.locations?.[s]||Object.values(e.locations)[0]}" title="${e.title}" class="text-18 md:text-20 font-semibold leading-28 text-primaryInteraction">\n ${e.title}\n </a>\n <span class="light__alert ${a>0?"visible":"invisible"}">\n ${a>0?`${a}${document.getElementById("application_deadline_text").value}`:""}\n </span>\n </div>\n <div class="w-full flex justify-start items-center gap-2">\n <span class="text-16 font-normal leading-24 text-blackColo2">\n ${e.job_nature||""}\n </span>\n <span class="inline-block size-1 bg-blackColor1 rounded-full mt-[3px]"></span>\n <span class="text-16 font-normal leading-24 text-blackColo2">\n ${Object.values(e.locations).join(", ")||""}\n </span>\n </div>\n </li>`}).join("");n.innerHTML=`\n ${a}\n <ul class="designation__box">\n ${o}\n </ul>\n `,e.appendChild(n)})};t.forEach(e=>{e.addEventListener("click",async n=>{n.preventDefault(),t.forEach(e=>e.classList.remove("active")),e.classList.add("active"),o.style.display="block",l=e.getAttribute("data-category"),i(s,l,c)})}),n.addEventListener("change",()=>{o.style.display="block",s=n.value,i(s,l,c)});const d=(()=>{let e;return(...t)=>{clearTimeout(e),e=setTimeout(()=>(async()=>{o.style.display="block",c=a.value,i(s,l,c)})(...t),500)}})();a.addEventListener("input",d),(async()=>{i(s,l,c)})()})
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.