1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2920],{80497:(e,t,s)=>{"use strict";s.d(t,{L:()=>r});let r={async submitContactForm(e){try{let t=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,leadType:"contact"})}),s=await t.json();if(!t.ok)throw Error(s.message||"Failed to submit contact form: ".concat(t.status));return{message:s.message||"Contact form submitted successfully",success:"ok"===s.status||!0===s.success}}catch(e){throw console.error("Error submitting contact form:",e),e}},async createContact(e){try{let t=await fetch("https://api.tooljunction.io/api/v1/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!t.ok)throw Error(s.message||"Failed to create contact: ".concat(t.status));return s}catch(e){throw console.error("Error creating contact:",e),e}},async updateContact(e,t){try{let s=await fetch("https://api.tooljunction.io/api/v1/contact/".concat(e),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await s.json();if(!s.ok)throw Error(r.message||"Failed to update contact: ".concat(s.status));return r}catch(e){throw console.error("Error updating contact:",e),e}}}},86193:(e,t,s)=>{"use strict";s.d(t,{default:()=>N});var r=s(95155),a=s(66942),o=s(20639),l=s(37586),n=s(84382),i=s(5917),c=s(52987),d=s(23664),m=s(52619),x=s.n(m),h=s(22544),u=s(54879),g=s(12115),b=s(20063),p=s(80497);let y=["General question","Listing / submission help","Advertising & partnerships","Press & media","Billing / account","Something else"],f=u.Ik({name:u.Yj().min(2,"Name must be at least 2 characters."),email:u.Yj().email("Please enter a valid email address."),subject:u.Yj().min(3,"Please choose a topic."),message:u.Yj().min(10,"Message must be at least 10 characters.")}),j=[{icon:o.A,title:"List your product",body:"Get your AI tool listed and found on Google & ChatGPT.",href:"/list-your-product"},{icon:l.A,title:"Advertise with us",body:"Category takeovers, homepage, sidebar, newsletter.",href:"/advertise"},{icon:n.A,title:"Browse the blog",body:"Guides, tool roundups, and AI tool analyses.",href:"/blog"}];function N(){var e,t,s,o;let l=(0,b.useSearchParams)(),[n,m]=(0,g.useState)("idle"),[u,N]=(0,g.useState)(""),{register:v,handleSubmit:k,setValue:S,reset:C,formState:{errors:E}}=(0,h.mN)({resolver:(0,a.u)(f),defaultValues:{name:"",email:"",subject:y[0],message:""}});async function P(e){if("loading"!==n){m("loading"),N("");try{await p.L.submitContactForm(e),m("ok"),C()}catch(e){m("error"),N(e instanceof Error?e.message:"Something went wrong. Please try again.")}}}return(0,g.useEffect)(()=>{let e=l.get("subject");e&&S("subject",decodeURIComponent(e))},[l,S]),(0,r.jsxs)("div",{className:"min-h-screen bg-slate-50",children:[(0,r.jsx)("section",{className:"bg-white border-b border-hairline",children:(0,r.jsxs)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-16 sm:py-20 text-center",children:[(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 text-[11px] font-medium text-gray-500 bg-gray-100 border border-hairline rounded-full px-3 py-1 mb-5",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),"We reply within 1 business day"]}),(0,r.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-extrabold tracking-[-0.02em] text-ink",children:"Get in touch"}),(0,r.jsx)("p",{className:"mt-4 text-[15px] text-gray-500 max-w-lg mx-auto leading-relaxed",children:"Questions about listings, advertising, or partnerships? Drop a note â we read every message."})]})}),(0,r.jsxs)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-12 grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,r.jsx)("div",{className:"lg:col-span-2",children:"ok"===n?(0,r.jsxs)("div",{className:"bg-white border border-hairline rounded-xl p-8 text-center",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-full bg-emerald-50 border border-emerald-200 flex items-center justify-center mx-auto mb-3",children:(0,r.jsx)(i.A,{className:"w-5 h-5 text-emerald-600",strokeWidth:2.5})}),(0,r.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Thanks â your message is in."}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mb-5",children:"We'll reply within one business day."}),(0,r.jsx)("button",{onClick:()=>m("idle"),className:"text-sm font-semibold text-brand-orange hover:text-brand-red",children:"Send another message"})]}):(0,r.jsxs)("form",{onSubmit:k(P),className:"bg-white border border-hairline rounded-xl p-6 space-y-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,r.jsx)(w,{label:"Your name",error:null==(e=E.name)?void 0:e.message,children:(0,r.jsx)("input",{type:"text",...v("name"),className:"w-full text-sm border border-hairline rounded-lg px-3 py-2 focus:outline-none focus:border-gray-400"})}),(0,r.jsx)(w,{label:"Work email",error:null==(t=E.email)?void 0:t.message,children:(0,r.jsx)("input",{type:"email",...v("email"),className:"w-full text-sm border border-hairline rounded-lg px-3 py-2 focus:outline-none focus:border-gray-400"})})]}),(0,r.jsx)(w,{label:"Topic",error:null==(s=E.subject)?void 0:s.message,children:(0,r.jsx)("select",{...v("subject"),className:"w-full text-sm border border-hairline rounded-lg px-3 py-2 focus:outline-none focus:border-gray-400 bg-white",children:y.map(e=>(0,r.jsx)("option",{children:e},e))})}),(0,r.jsx)(w,{label:"Message",error:null==(o=E.message)?void 0:o.message,children:(0,r.jsx)("textarea",{...v("message"),rows:5,placeholder:"Share a bit of context and we'll take it from there.",className:"w-full text-sm border border-hairline rounded-lg px-3 py-2 focus:outline-none focus:border-gray-400 resize-none"})}),"error"===n&&(0,r.jsx)("p",{className:"text-xs text-red-500",children:u}),(0,r.jsxs)("div",{className:"flex items-center justify-between pt-1",children:[(0,r.jsxs)("p",{className:"text-[11px] text-gray-400",children:["Or email us at"," ",(0,r.jsx)("a",{href:"mailto:[email protected]",className:"text-gray-600 hover:text-gray-900 underline underline-offset-2",children:"[email protected]"})]}),(0,r.jsxs)("button",{type:"submit",disabled:"loading"===n,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-brand-orange hover:bg-brand-red text-white text-sm font-semibold rounded-full transition-colors disabled:opacity-60",children:["loading"===n?"Sendingâ¦":"Send message","loading"!==n&&(0,r.jsx)(c.A,{className:"w-4 h-4"})]})]})]})}),(0,r.jsxs)("aside",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"bg-white border border-hairline rounded-xl p-5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-lg bg-gray-100 flex items-center justify-center",children:(0,r.jsx)(d.A,{className:"w-4 h-4 text-gray-600"})}),(0,r.jsx)("h2",{className:"text-sm font-semibold text-gray-900",children:"Prefer email?"})]}),(0,r.jsxs)("p",{className:"text-[13px] text-gray-500 leading-relaxed mb-3",children:["Reach us directly at"," ",(0,r.jsx)("a",{href:"mailto:[email protected]",className:"text-gray-800 font-medium hover:text-brand-orange",children:"[email protected]"}),". We read every message and reply within one business day."]})]}),(0,r.jsxs)("div",{className:"bg-white border border-hairline rounded-xl p-5",children:[(0,r.jsx)("p",{className:"text-[11px] font-semibold text-gray-400 tracking-[0.08em] uppercase mb-3",children:"Might be faster"}),(0,r.jsx)("div",{className:"space-y-3",children:j.map(e=>{let t=e.icon;return(0,r.jsxs)(x(),{href:e.href,className:"flex items-start gap-3 group",children:[(0,r.jsx)("div",{className:"w-7 h-7 rounded-lg bg-gray-50 border border-hairline flex items-center justify-center flex-shrink-0 group-hover:border-gray-300",children:(0,r.jsx)(t,{className:"w-3.5 h-3.5 text-gray-500"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[13px] font-semibold text-gray-900 group-hover:text-brand-orange",children:e.title}),(0,r.jsx)("p",{className:"text-[12px] text-gray-500 leading-snug mt-0.5",children:e.body})]})]},e.href)})})]})]})]})]})}function w(e){let{label:t,error:s,children:a}=e;return(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:"text-[11px] font-medium text-gray-500 mb-1 block",children:t}),a,s&&(0,r.jsx)("span",{className:"text-[11px] text-red-500 mt-1 block",children:s})]})}},91831:(e,t,s)=>{Promise.resolve().then(s.bind(s,86193))}},e=>{e.O(0,[2619,6626,2761,8441,1255,7358],()=>e(e.s=91831)),_N_E=e.O()}]);
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.