PageSourceSearch

https://nextool.ai/assets/SearchPage-CxlvmM9F.js

js nextool.ai collected 2026-10-05 12:18:00 UTC 5,307 bytes, 1 lines download raw bytes

1import{u as z,d as E,f as I,y as L,b as a,j as e}from"./ai-chat-D7vu8HPJ.js";import{r as n,j as q}from"./react-vendor-Dyub6y3P.js";import{d as j,L as $}from"./router-C2AjIaxW.js";import{a as M,b as O}from"./index-BF5VlNj3.js";import{f as _,k as B,m as D,aE as H,v as V,aS as W}from"./lucide-D0uqi5dM.js";import"./supabase-DOz1qNTW.js";function K(){const[s,d]=j(),y=z(),{t:w,locale:h}=E(),r=s.get("q")||"",u=s.get("pricing")||"",m=s.get("category")||"",g=s.get("sort")||"relevant",p=s.get("verified")==="true",o=Math.max(1,Number(s.get("page"))||1),[N,f]=n.useState(r),[S,x]=n.useState([]),[P,A]=n.useState([]),[v,T]=n.useState(0),[b,k]=n.useState(!0),[F,C]=n.useState(!1);M({title:r?`${r} AI tools | Nextool`:"Browse AI Tools by Task & Price | Nextool",description:"Search AI tools by name or task. Filter by category, pricing model, and verified listings to find useful tools for your workflow.",canonical:y("/search/"),noIndex:!0,locale:h}),n.useEffect(()=>{f(r)},[r]),n.useEffect(()=>{I().then(A).catch(()=>{})},[]),n.useEffect(()=>{let t=!0;return k(!0),C(!1),L(r,u||null,o,24,p,m||null,null,g).then(l=>{t&&(x(l.tools),T(l.total))}).catch(()=>{t&&C(!0)}).finally(()=>{t&&k(!1)}),()=>{t=!1}},[r,u,o,p,m,g]);function i(t,l){d(R=>{const c=new URLSearchParams(R);return l?c.set(t,l):c.delete(t),t!=="page"&&c.delete("page"),c})}return a("div",{className:"nt-container",children:[a("header",{className:"nt-page-heading",children:[e("p",{className:"nt-eyebrow",children:"THE AI TOOL DIRECTORY"}),e("h1",{children:h==="az"?"İşinə uyğun AI alətini tap.":"Find the right tool for your work."}),e("p",{children:h==="az"?"Ad, məqsəd, kateqoriya və qiymət modelinə görə axtar.":"Search by name or task. Narrow it down to what matters to you."}),a("form",{role:"search",className:"nt-hero-search nt-search-form",onSubmit:t=>{t.preventDefault(),i("q",N.trim())},children:[e(_,{size:21}),e("label",{className:"sr-only",htmlFor:"directory-search",children:"Search tools"}),e("input",{id:"directory-search",placeholder:"Search tools, tasks, or ideas…",value:N,onChange:t=>f(t.target.value)}),a("button",{className:"nt-button nt-button-dark",type:"submit",children:["Search",e(B,{size:17})]})]}),!r&&e("div",{className:"nt-chip-list",children:["Writing","Video","Coding","Research","Presentations"].map(t=>e($,{to:y(`/search/?q=${t}`),children:t},t))})]}),a("div",{className:"nt-search-layout",children:[a("aside",{className:"nt-filters","aria-label":"Search filters",children:[a("div",{children:[a("label",{htmlFor:"filter-category",children:[e(D,{size:14,className:"inline mr-1"}),w("discover.categories")]}),a("select",{id:"filter-category",value:m,onChange:t=>i("category",t.target.value),children:[e("option",{value:"",children:"All categories"}),P.filter(t=>t.tool_count>0).sort((t,l)=>t.name.localeCompare(l.name)).map(t=>e("option",{value:t.slug,children:t.name},t.id))]})]}),a("div",{children:[e("label",{htmlFor:"filter-pricing",children:"Pricing"}),a("select",{id:"filter-pricing",value:u,onChange:t=>i("pricing",t.target.value),children:[e("option",{value:"",children:"Any price"}),e("option",{value:"free_tier",children:"Free to start"}),e("option",{value:"free",children:"Free"}),e("option",{value:"freemium",children:"Freemium"}),e("option",{value:"paid",children:"Paid"})]})]}),a("label",{className:"nt-filter-check",children:[e("input",{type:"checkbox",checked:p,onChange:t=>i("verified",t.target.checked?"true":"")}),"Verified listings"]}),e("button",{className:"nt-text-link",onClick:()=>{d({}),f("")},children:"Reset all filters"})]}),a("section",{"aria-label":"Tool results","aria-busy":b,children:[a("div",{className:"nt-results-top",children:[e("span",{role:"status",children:b?"Finding tools…":`${v.toLocaleString()} tools${r?` for “${r}”`:""}`}),a("div",{children:[e("label",{htmlFor:"sort-tools",className:"sr-only",children:"Sort tools"}),a("select",{id:"sort-tools",value:g,onChange:t=>i("sort",t.target.value),children:[e("option",{value:"relevant",children:"Recommended"}),e("option",{value:"newest",children:"Newest first"}),e("option",{value:"name",children:"Name A to Z"})]})]})]}),F?a("div",{className:"nt-empty",children:[e("h2",{children:"We had trouble loading tools."}),e("p",{children:"Please try again."}),e("button",{className:"nt-button nt-button-dark",onClick:()=>window.location.reload(),children:"Retry"})]}):b?e("div",{className:"nt-tool-grid",children:Array.from({length:6},(t,l)=>e("div",{className:"nt-card-skeleton"},l))}):S.length?a(q.Fragment,{children:[e("div",{className:"nt-tool-grid",children:S.map(t=>e(O,{tool:t},t.id))}),a("nav",{className:"nt-pagination","aria-label":"Pagination",children:[a("button",{className:"nt-button nt-button-light",disabled:o===1,onClick:()=>i("page",String(o-1)),children:[e(H,{size:16}),"Previous"]}),a("span",{children:[o," / ",Math.max(1,Math.ceil(v/24))]}),a("button",{className:"nt-button nt-button-light",disabled:o*24>=v,onClick:()=>i("page",String(o+1)),children:["Next",e(V,{size:16})]})]})]}):a("div",{className:"nt-empty",children:[e(W,{size:38,className:"mx-auto"}),e("h2",{children:"No matching tools yet."}),e("p",{children:"Try a shorter search or remove a filter."}),e("button",{className:"nt-button nt-button-dark",onClick:()=>d({}),children:"Browse all tools"})]})]})]})]})}export{K as default};

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.