import{i as e,o as t,r as n}from"./searxng.core.min.js";var r,i=async()=>{if(!r){try{r=await(await n(`GET`,`engine_descriptions.json`)).json()}catch(e){console.error(`Error fetching engineDescriptions:`,e)}if(r)for(let[e,[n,i]]of Object.entries(r)){let r=document.querySelectorAll(`[data-engine-name="${e}"] .engine-description`),a=` (${t.translations?.Source}: ${i})`;for(let e of r)e.innerHTML=n+a}}},a=(e,t)=>{for(let n of t)n.offsetParent&&(n.checked=!e)},o=document.querySelectorAll(`[data-engine-name]`);for(let t of o)e(`mouseenter`,t,i);var s=document.querySelectorAll(`tbody input[type=checkbox][class~=checkbox-onoff]`),c=document.querySelectorAll(`.enable-all-engines`);for(let t of c)e(`click`,t,()=>a(!0,s));var l=document.querySelectorAll(`.disable-all-engines`);for(let t of l)e(`click`,t,()=>a(!1,s));var u=document.querySelector(`#copy-hash`);u&&e(`click`,u,async e=>{e.preventDefault();let{copiedText:t,hash:n}=u.dataset;if(t&&n)try{await navigator.clipboard.writeText(n),u.innerText=t}catch(e){console.error(`Failed to copy hash:`,e)}}); //# sourceMappingURL=preferences.min.js.map