1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15817,e=>{"use strict";e.s(["ModalProvider",()=>eS,"popModal",()=>eP,"pushModal",()=>eC],15817);var t,s,r,n,o,a,i=e.i(391398),l=e.i(191788),c=e.i(135598),d=function(){return(d=Object.assign||function(e){for(var t,s=1,r=arguments.length;s<r;s++)for(var n in t=arguments[s])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function m(e,t,s){if(s||2==arguments.length)for(var r,n=0,o=t.length;n<o;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var u=e.i(815363),p=e.i(617699),h=e.i(988930),x=e.i(492785),f=e.i(472892),g=e.i(200571),j=e.i(547272),b=e.i(679935),v=e.i(81133),y=e.i(292905),N=e.i(638035),F=e.i(558021);let w=new Uint8Array(16),k=[];for(let e=0;e<256;++e)k.push((e+256).toString(16).slice(1));var I=e.i(821384),C=e.i(807527),P=e.i(619790);let S=I.z.object({firstName:I.z.string().min(1,{message:"First name is required"}),lastName:I.z.string().min(1,{message:"Last name is required"}),email:I.z.email({message:"Invalid email address"}),heardAbout:I.z.string().min(1,{message:"Please let us know how you heard about us"}),motivation:I.z.string().min(1,{message:"Motivation is required"}),linkedinUrl:I.z.union([I.z.url({message:"Must be a valid URL"}),I.z.literal("")]).optional(),githubUrl:I.z.union([I.z.url({message:"Must be a valid URL"}),I.z.literal("")]).optional(),portfolioUrl:I.z.union([I.z.url({message:"Must be a valid URL"}),I.z.literal("")]).optional()});var L=e.i(261576),T=e.i(537737),z=e.i(119004),A=e.i(130453),M=e.i(837048),U=e.i(190132),_=e.i(357006),E=e.i(479293),R=e.i(671185),D=e.i(55037),O=e.i(474864),B=e.i(993953),V=e.i(674534),H=Object.defineProperty,q=(e,t)=>H(e,"name",{value:t,configurable:!0}),W="Checkbox",[G,Y]=(0,E.createContextScope)(W),[$,K]=G(W);function X(e){let{__scopeCheckbox:t,checked:s,children:r,defaultChecked:n,disabled:o,form:a,name:c,onCheckedChange:d,required:m,value:u="on",internal_do_not_use_render:p}=e,[h,x]=(0,D.useControllableState)({prop:s,defaultProp:n??!1,onChange:d,caller:W}),[f,g]=l.useState(null),[j,b]=l.useState(null),v=l.useRef(!1),[y,N]=l.useReducer(e=>e+1,0),F=!f||!!a||!!f.closest("form"),w={checked:h,disabled:o,setChecked:x,control:f,setControl:g,name:c,form:a,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:N,required:m,defaultChecked:!es(n)&&n,isFormControl:F,bubbleInput:j,setBubbleInput:b};return(0,i.jsx)($,{scope:t,...w,children:et(p)?p(w):r})}q(X,"CheckboxProvider");var J=l.forwardRef(q(function({__scopeCheckbox:e,onKeyDown:t,onClick:s,...r},n){let{control:o,value:a,disabled:c,checked:d,required:m,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:h,onUserInteraction:x,isFormControl:f,bubbleInput:g}=K("CheckboxTrigger",e),j=(0,_.useComposedRefs)(n,u),b=l.useRef(d);return l.useEffect(()=>{let e=o?.form;if(e){let t=q(()=>p(b.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[o,p]),(0,i.jsx)(V.Primitive.button,{type:"button",role:"checkbox","aria-checked":es(d)?"mixed":d,"aria-required":m,"data-state":er(d),"data-disabled":c?"":void 0,disabled:c,value:a,...r,ref:j,onKeyDown:(0,R.composeEventHandlers)(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,R.composeEventHandlers)(s,e=>{x(),p(e=>!!es(e)||!e),g&&f&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})})},"CheckboxTrigger")),Q=l.forwardRef(q(function(e,t){let{__scopeCheckbox:s,name:r,checked:n,defaultChecked:o,required:a,disabled:l,value:c,onCheckedChange:d,form:m,...u}=e;return(0,i.jsx)(X,{__scopeCheckbox:s,checked:n,defaultChecked:o,disabled:l,required:a,onCheckedChange:d,name:r,form:m,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(J,{...u,ref:t,__scopeCheckbox:s}),e&&(0,i.jsx)(ee,{__scopeCheckbox:s})]})})},"Checkbox")),Z=l.forwardRef(q(function(e,t){let{__scopeCheckbox:s,forceMount:r,...n}=e,o=K("CheckboxIndicator",s);return(0,i.jsx)(B.Presence,{present:r||es(o.checked)||!0===o.checked,children:(0,i.jsx)(V.Primitive.span,{"data-state":er(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),ee=l.forwardRef(q(function({__scopeCheckbox:e,onClick:t,...s}
1,r){let{control:n,hasConsumerStoppedPropagationRef:o,userInteractionCount:a,checked:c,defaultChecked:d,required:m,disabled:u,name:p,value:h,form:x,bubbleInput:f,setBubbleInput:g}=K("CheckboxBubbleInput",e),j=(0,_.useComposedRefs)(r,g),b=(0,O.useSize)(n),v=l.useRef(!1),y=l.useRef(c),N=l.useRef(a);l.useEffect(()=>{if(!f)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=a!==N.current;N.current=a;let s=y.current!==c;y.current=c;let r=!(t&&o.current);if(s&&e){v.current=!t;let s=new Event("click",{bubbles:r});f.indeterminate=es(c),e.call(f,!es(c)&&c),f.dispatchEvent(s),v.current=!1}},[f,c,o,a]);let F=l.useRef(!es(c)&&c);return(0,i.jsx)(V.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??F.current,required:m,disabled:u,name:p,value:h,form:x,...s,tabIndex:-1,ref:j,onClick:(0,R.composeEventHandlers)(t,e=>{v.current&&e.stopPropagation()}),style:{...s.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function et(e){return"function"==typeof e}function es(e){return"indeterminate"===e}function er(e){return es(e)?"indeterminate":e?"checked":"unchecked"}q(et,"isFunction"),q(es,"isIndeterminate"),q(er,"getState");var en=e.i(56206),eo=e.i(97011);function ea({className:e,...t}){return(0,i.jsx)(Q,{className:function(...e){let t=e.filter(e=>null!=e);return(0,eo.twMerge)((0,en.clsx)(t))}("group peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=indeterminate]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-primary-foreground",e),"data-slot":"checkbox",...t,children:(0,i.jsxs)(Z,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",children:[(0,i.jsx)(U.MinusIcon,{className:"hidden size-3.5 text-primary-foreground group-data-[state=indeterminate]:block"}),(0,i.jsx)(M.CheckIcon,{className:"hidden size-3.5 group-data-[state=checked]:block"})]})})}var ei=e.i(196118),el=e.i(942374),ec=e.i(126019),ed=e.i(41158);let em="linear-gradient(to bottom, var(--color-blue-900) 0%, var(--color-blue-800) 30%, var(--primary) 70%, var(--color-blue-500) 100%)",eu=I.z.object({firstName:I.z.string().min(1,{message:"First name is required"}),lastName:I.z.string().min(1,{message:"Last name is required"}),email:I.z.email({message:"Invalid email address"}),agreeToTerms:I.z.boolean().refine(e=>!0===e,{message:"Please accept the terms and privacy policy to continue"})}),ep=I.z.object({code:I.z.string().length(6,{message:"Your verification code must be 6 characters."})}),eh=[{icon:T.BinocularsIcon,title:"AI Brand Visibility Report",description:"Discover how well AI assistants know your brand."},{icon:z.FileTextIcon,title:"Unique data insights and market reports",description:"Exclusive AI search trends, benchmarks, and market insights."},{icon:A.ShieldIcon,title:"Guides and resources",description:"Best practices and guides for AI search."}],ex=e=>{let t,s,r=(0,L.c)(5),{compact:n}=e,o=void 0!==n&&n,a=o?"space-y-2.5":"space-y-4";return r[0]!==o?(t=eh.map(e=>(0,i.jsxs)("div",{className:"flex items-start gap-3",children:[(0,i.jsx)("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-white/10",children:(0,i.jsx)(e.icon,{className:"size-4.5 text-white",weight:"duotone"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:o?"font-medium text-sm text-white":"font-medium text-white",children:e.title}),(0,i.jsx)("p",{className:"text-white/70 text-xs",children:e.description})]})]},e.title)),r[0]=o,r[1]=t):t=r[1],r[2]!==a||r[3]!==t?(s=(0,i.jsx)("div",{className:a,children:t}),r[2]=a,r[3]=t,r[4]=s):s=r[4],s},ef=I.z.object({firstName:I.z.string().min(1,{message:"First name is required"}).max(50),lastName:I.z.string().min(1,{message:"Last name is required"}).max(50),email:I.z.email({message:"Invalid email address"}).max(255)});function eg(e){b.toast.error(e.message||"Failed to sign up. Please try again.")}function ej(e){return e.preventDefault()}function eb(e){let{field:t}=e;return(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"First Name"}
1),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{maxLength:50,placeholder:"First name",...t})}),(0,i.jsx)(g.FormMessage,{})]})}function ev(e){let{field:t}=e;return(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"Last Name"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{maxLength:50,placeholder:"Last name",...t})}),(0,i.jsx)(g.FormMessage,{})]})}function ey(e){let{field:t}=e;return(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"Work Email"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{maxLength:255,placeholder:"[email protected]",type:"email",...t})}),(0,i.jsx)(g.FormMessage,{})]})}var eN=e.i(858508),eF=e.i(203828),ew=e.i(194182),ek=e.i(593407);function eI(e){return e.preventDefault()}let{pushModal:eC,popModal:eP,ModalProvider:eS}=(s={apply:({jobId:e,onSuccess:t})=>{let s=(0,P.useTRPC)(),r=(0,N.usePostHog)(),[n,o]=(0,l.useState)("apply"),[a,c]=(0,l.useState)(null),[d,m]=(0,l.useState)(""),I=C.jobs.find(t=>t.id===e),L=(0,F.useForm)({resolver:(0,u.zodResolver)(S),defaultValues:{firstName:"",lastName:"",email:"",heardAbout:"",motivation:"",linkedinUrl:"",githubUrl:"",portfolioUrl:""}}),T=(0,y.useMutation)(s.storage.generateUploadUrl.mutationOptions()),z=(0,y.useMutation)(s.applicants.createApplication.mutationOptions()),A=async s=>{if(!a){m("Please upload your resume/CV before submitting."),b.toast.error("Please upload your resume/CV before submitting.");return}try{let n=a.name.split(".").pop(),i=`job-applications/${e}/${crypto.randomUUID?crypto.randomUUID():function(e,t,s){let r=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(w);if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((s=s||0)<0||s+16>t.length)throw RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[s+e]=r[e];return t}return function(e,t=0){return(k[e[t+0]]+k[e[t+1]]+k[e[t+2]]+k[e[t+3]]+"-"+k[e[t+4]]+k[e[t+5]]+"-"+k[e[t+6]]+k[e[t+7]]+"-"+k[e[t+8]]+k[e[t+9]]+"-"+k[e[t+10]]+k[e[t+11]]+k[e[t+12]]+k[e[t+13]]+k[e[t+14]]+k[e[t+15]]).toLowerCase()}(r)}(void 0,void 0,void 0)}.${n}`,{uploadUrl:l,publicUrl:c}=await T.mutateAsync({fileName:i,contentType:a.type||"application/octet-stream"});await fetch(l,{method:"PUT",headers:{"Content-Type":a.type||"application/octet-stream"},body:a});let d=s.portfolioUrl?`${s.motivation} 2 3Portfolio: ${s.portfolioUrl}`:s.motivation;await z.mutateAsync({jobId:e,firstName:s.firstName,lastName:s.lastName,email:s.email,heardAbout:s.heardAbout,motivation:d,linkedinUrl:s.linkedinUrl||"",githubUrl:s.githubUrl||"",resumeFileName:a.name,resumeFileUrl:c}),r?.capture("job_application_submitted",{jobId:e,...s}),b.toast.success("Application submitted successfully!"),o("success"),t?.()}catch(t){console.error(t);let e=t instanceof Error?t.message:"Failed to submit application. Please try again.";b.toast.error(e)}},M=I?.id==="full-stack-developer"||I?.id==="design-engineer";return(0,i.jsxs)(f.DialogContent,{className:"max-w-3xl overflow-hidden p-0",onOpenAutoFocus:e=>e.preventDefault(),size:"3xl",children:["apply"===n&&(0,i.jsxs)(f.DialogHeader,{children:[(0,i.jsxs)(f.DialogTitle,{children:["Apply for ",I?.title||"this role"]}),(0,i.jsx)(f.DialogDescription,{children:"Fill in your details and upload your resume/CV."})]}),"success"===n&&(0,i.jsxs)(f.DialogHeader,{children:[(0,i.jsx)(f.DialogTitle,{children:"Application Received"}),(0,i.jsx)(f.DialogDescription,{children:"Thank you for applying! We'll get back to you soon."})]}),(0,i.jsxs)("div",{className:"flex h-full flex-col justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:["apply"===n&&(0,i.jsx)(g.Form,{...L,children:(0,i.jsxs)("form",{className:"space-y-6 p-5",onSubmit:L.handleSubmit(A),children:[(0,i.jsxs)("div",{className:"flex gap-4",children:[(0,i.jsx)(g.FormField,{control:L.control,name:"firstName",render:({field:e})=>(0,i.jsxs)(g.FormItem,{className:"flex-1",children:[(0,i.jsx)(g.FormLabel,{children:"First Name"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{placeholder:"Firstname",...e})}),(0,i.jsx)(g.FormMessage,{})]})}),(0,i.jsx)(g.FormField,{control:L.control,name:"lastName",render:({field:e})=>(0,i.jsxs)(g.FormItem,{className:"flex-1",children:[(0,i.jsx)(g.FormLabel,{children:"Last Name"}
3),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{placeholder:"Lastname",...e})}),(0,i.jsx)(g.FormMessage,{})]})})]}),(0,i.jsx)(g.FormField,{control:L.control,name:"email",render:({field:e})=>(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"Email"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{placeholder:"[email protected]",type:"email",...e})}),(0,i.jsx)(g.FormMessage,{})]})}),(0,i.jsx)(g.FormField,{control:L.control,name:"heardAbout",render:({field:e})=>(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"How did you hear about us?"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{placeholder:"e.g. Twitter, LinkedIn, Friend, etc.",...e})}),(0,i.jsx)(g.FormMessage,{})]})}),(0,i.jsx)(g.FormField,{control:L.control,name:"motivation",render:({field:e})=>(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"Motivation"}),(0,i.jsx)(g.FormDescription,{children:"Tell us why you want to join Promptwatch, just a few sentences is fine."}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(v.Textarea,{className:"h-20",placeholder:"Tell us why you want to join Promptwatch",rows:4,...e})}),(0,i.jsx)(g.FormMessage,{})]})}),(0,i.jsxs)("div",{className:"flex gap-4",children:[(0,i.jsx)(g.FormField,{control:L.control,name:"linkedinUrl",render:({field:e})=>(0,i.jsxs)(g.FormItem,{className:"flex-1",children:[(0,i.jsx)(g.FormLabel,{children:"LinkedIn URL"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{placeholder:"https://linkedin.com/in/username",...e})}),(0,i.jsx)(g.FormMessage,{})]})}),M&&(0,i.jsx)(g.FormField,{control:L.control,name:"githubUrl",render:({field:e})=>(0,i.jsxs)(g.FormItem,{className:"flex-1",children:[(0,i.jsx)(g.FormLabel,{children:"GitHub URL"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{placeholder:"https://github.com/username",...e})}),(0,i.jsx)(g.FormMessage,{})]})})]}),(0,i.jsx)(g.FormField,{control:L.control,name:"portfolioUrl",render:({field:e})=>(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"Portfolio website (optional)"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{placeholder:"https://your-portfolio.com",...e})}),(0,i.jsx)(g.FormMessage,{})]})}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{className:"block font-medium text-sm",htmlFor:"resume-upload",children:"Your resume/CV (PDF preferred)"}),(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)(x.Button,{onClick:()=>document.getElementById("resume-upload")?.click(),theme:"landing",type:"button",variant:"outline",children:"Select File"}),a&&(0,i.jsx)("span",{className:"text-muted-foreground text-sm",children:a.name})]}),(0,i.jsx)("input",{accept:"application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",className:"hidden",id:"resume-upload",onChange:e=>{c(e.target.files?.[0]||null),m("")},type:"file"}),d&&(0,i.jsx)("p",{className:"text-red-600 text-sm",children:d})]})]})}),"success"===n&&(0,i.jsxs)("div",{className:"mt-10 mb-12 flex flex-col items-center space-y-4 p-5 text-center",children:[(0,i.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-green-100 p-3",children:(0,i.jsx)(p.CheckCircleIcon,{className:"h-8 w-8 text-green-600"})}),(0,i.jsx)("h3",{className:"font-semibold text-xl",children:"Thank you!"}),(0,i.jsx)("p",{className:"text-muted-foreground",children:"Your application has been received."})]})]}),"apply"===n&&(0,i.jsx)(f.DialogFooter,{className:"mt-auto flex w-full flex-row-reverse justify-end p-5",children:(0,i.jsxs)(x.Button,{className:"w-full",disabled:T.isPending||z.isPending,onClick:L.handleSubmit(A),theme:"landing",children:[(T.isPending||z.isPending)&&(0,i.jsx)(h.CircleNotchIcon,{className:"mr-2 h-4 w-4 animate-spin"}),T.isPending||z.isPending?"Submitting...":"Submit Application"]})})]})]})},videoDemo:function(){let e,t,s,r,n,o=(0,L.c)(8),a=(0,eF.useRouter)(),c=(0,N.usePostHog)();o[0]!==c||o[1]!==a?(e=()=>{c?.capture("get_started_button_clicked",{source:"video_demo_modal"}),eP(),a.push(ek.clientEnv.NEXT_PUBLIC_APP_URL)},o[0]=c,o[1]=a,o[2]=e):e=o[2];let d=e;return o[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsxs)("div",{className:"w-full",children:[(0,i.jsx)(ew.default,{async:!0,src:"https://fast.wistia.com/player.js",strategy:"afterInteractive"}),(0,i.jsx)(ew.default,{async:!0,src:"https://fast.wistia.com/embed/j4xrknvpc4.js",strategy:"afterInteractive",type:"module"}),(0,i.jsx)("style",{children:"wistia-player[media-id='j4xrknvpc4']:not(:defined) { background: center / contain no-repeat url('https://fast.wistia.com/embed/medias/j4xrknvpc4/swatch'); display: block; filter: blur(5px); padding-top:56.25%; }"}),(0,l.createElement)("wistia-player",{"media-id":"j4xrknvpc4",aspect:"1.7
3777777777777777",autoplay:"true",muted:"false"})]}),o[3]=t):t=o[3],o[4]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsxs)("div",{className:"text-left",children:[(0,i.jsx)("h3",{className:"mb-1 font-semibold text-lg text-white",children:"Start ranking in ChatGPT and any other AI search engine"}),(0,i.jsx)("p",{className:"max-w-2xl font-medium text-gray-50/90 text-sm",children:"See mentions and citations in realtime, track what matters and improve your rankings"})]}),o[4]=s):s=o[4],o[5]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)(eN.ArrowRightIcon,{className:"ml-2 size-4"}),o[5]=r):r=o[5],o[6]!==d?(n=(0,i.jsx)(f.DialogContent,{className:"max-w-5xl overflow-hidden rounded-sm border-0 bg-white p-1 shadow-[0_4px_12px_rgba(11,12,14,0.06)] md:rounded-sm [&>button:focus-visible]:ring-white/70 [&>button:hover]:bg-black/65 [&>button]:bg-black/50 [&>button]:text-white [&>button]:opacity-100",onOpenAutoFocus:eI,size:"4xl",children:(0,i.jsxs)("div",{className:"overflow-hidden rounded-sm",children:[t,(0,i.jsx)("div",{className:"relative overflow-hidden",children:(0,i.jsx)("div",{className:"relative p-6 shadow-gray-900/5 shadow-lg before:absolute before:inset-0 before:bg-gradient-to-b before:from-primary/90 before:to-blue-600/70 md:p-8",children:(0,i.jsxs)("div",{className:"relative z-10 flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[s,(0,i.jsxs)(x.Button,{className:"w-full bg-white px-8 text-black hover:bg-gray-50 md:w-auto",onClick:d,size:"md",theme:"landing",variant:"outline",children:["Start Free Trial ",r]})]})})})]})}),o[6]=d,o[7]=n):n=o[7],n},freeToolsSignup:({onSuccess:e,toolName:t="free tools"})=>{let s=(0,N.usePostHog)(),[r,n]=(0,l.useState)("signup"),[o,a]=(0,l.useState)(""),c=(0,P.useTRPC)(),d=(0,y.useMutation)(c.freeToolUsers.signup.mutationOptions({onSuccess:()=>{b.toast.success("Verification code sent to your email!"),n("verify")},onError:e=>{b.toast.error(e.message||"Failed to sign up. Please try again.")}})),m=(0,y.useMutation)(c.freeToolUsers.verifyEmail.mutationOptions({onSuccess:r=>{r.token&&(localStorage.setItem("free-tools-token",r.token),localStorage.setItem("free-tools-email",o),b.toast.success("Email verified successfully!"),n("success"),s?.capture("free_tools_signup_completed",{tool:t}),setTimeout(()=>{e?.({email:o})},1500))},onError:e=>{b.toast.error(e.message||"Invalid verification code. Please try again.")}})),h=(0,F.useForm)({resolver:(0,u.zodResolver)(eu),mode:"onTouched",defaultValues:{firstName:"",lastName:"",email:"",agreeToTerms:!1}}),v=(0,F.useForm)({resolver:(0,u.zodResolver)(ep),mode:"onChange",defaultValues:{code:""}}),w=async e=>{a(e.email),s?.capture("free_tools_signup_started",{tool:t}),d.mutate({firstName:e.firstName,lastName:e.lastName,email:e.email})},k=(0,l.useCallback)(async e=>{m.mutate({email:o,code:e.code})},[o,m]);return(0,l.useEffect)(()=>{let e=v.watch((e,{name:t})=>{"code"===t&&e.code&&6===e.code.length&&!v.formState.isSubmitting&&v.handleSubmit(k)()});return()=>e.unsubscribe()},[v.watch,v.handleSubmit,v.formState.isSubmitting,k]),(0,i.jsxs)(f.DialogContent,{className:"flex max-w-6xl flex-col overflow-hidden p-0 md:grid md:grid-cols-2",onOpenAutoFocus:e=>e.preventDefault(),size:"4xl",children:[(0,i.jsxs)("div",{className:"relative overflow-hidden px-6 py-5 md:hidden",style:{backgroundImage:em},children:[(0,i.jsx)(ec.default,{alt:"Promptwatch logo",className:"h-8 w-auto",height:90,priority:!0,src:"/text-logo-dark.svg",width:130}),(0,i.jsxs)("h3",{className:"mt-3 text-balance font-medium text-lg text-white",children:["Unlimited access to our free AI search tools ",(0,i.jsx)("span",{className:"text-white/80",children:"+ data insights"})]})]}),(0,i.jsx)("div",{className:"relative hidden flex-col overflow-hidden px-8 py-8 md:flex",style:{backgroundImage:em},children:(0,i.jsxs)("div",{className:"relative z-10 flex h-full flex-col gap-6",children:[(0,i.jsx)(ec.default,{alt:"Promptwatch logo",className:"h-8 w-auto self-start",height:90,priority:!0,src:"/text-logo-dark.svg",width:130}),(0,i.jsxs)("h3",{className:"text-balance font-medium text-2xl text-white leading-snug",children:["Unlimited access to our free AI search tools ",(0,i.jsx)("span",{className:"text-white/80",children:"+ data insights"})]}),(0,i.jsx)(ex,{})]})}),(0,i.jsxs)("div",{className:"flex flex-col bg-background md:h-full md:justify-between",children:["signup"===r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("div",{className:"px-6 pt-6 pb-4",children:[(0,i.jsx)("h2",{className:"font-medium text-lg",children:"Create your free account"}),(0,i.jsx)("p",{className:"mt-0.5 text-muted-foreground text-sm",children:"One account for every free AI search tool."})]}),(0,i.jsx)(g.Form,{...h,children:(0,i.jsxs)("form",{className:"space-y-4 px-6 pb-4",id:"signup-form",onSubmit:h.handleSubmit(w),children:[(0,i.jsxs)("div",{className:"flex gap-4",children:[(0,i.jsx)(g.FormField,{control:h.control,name:"firstName",render:({field:e})=>(0,i.jsxs)(g.FormItem,{className:"flex-1",children:[(0,i.jsx)(g.FormLabel,{children:"First Name"}
3),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{className:"h-10",placeholder:"First name",...e})}),(0,i.jsx)(g.FormMessage,{})]})}),(0,i.jsx)(g.FormField,{control:h.control,name:"lastName",render:({field:e})=>(0,i.jsxs)(g.FormItem,{className:"flex-1",children:[(0,i.jsx)(g.FormLabel,{children:"Last Name"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{className:"h-10",placeholder:"Last name",...e})}),(0,i.jsx)(g.FormMessage,{})]})})]}),(0,i.jsx)(g.FormField,{control:h.control,name:"email",render:({field:e})=>(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{children:"Work Email"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(j.Input,{className:"h-10",placeholder:"[email protected]",type:"email",...e})}),(0,i.jsx)(g.FormMessage,{})]})}),(0,i.jsx)(g.FormField,{control:h.control,name:"agreeToTerms",render:({field:e})=>(0,i.jsxs)(g.FormItem,{children:[(0,i.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,i.jsx)(g.FormControl,{children:(0,i.jsx)(ea,{checked:e.value,className:"mt-0.5",onCheckedChange:e.onChange})}),(0,i.jsxs)(g.FormLabel,{className:"inline-block font-normal text-muted-foreground text-xs leading-snug",children:["I agree to the"," ",(0,i.jsx)(ed.default,{className:"text-primary underline underline-offset-2",href:"/terms-and-conditions",target:"_blank",children:"terms and conditions"})," ","and"," ",(0,i.jsx)(ed.default,{className:"text-primary underline underline-offset-2",href:"/privacy-policy",target:"_blank",children:"privacy policy"})]})]}),(0,i.jsx)(g.FormMessage,{})]})})]})})]}),(0,i.jsx)(f.DialogFooter,{className:"mt-auto flex w-full flex-col gap-2 border-t-0 p-6 pt-2",children:(0,i.jsx)(x.Button,{className:"h-10 w-full",disabled:d.isPending,form:"signup-form",theme:"landing",type:"submit",children:d.isPending?"Creating account...":"Get Free Access"})})]}),"verify"===r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("div",{className:"px-6 pt-6 pb-3",children:[(0,i.jsx)("h2",{className:"font-medium text-xl",children:"Verify your email"}),(0,i.jsxs)("p",{className:"mt-1 text-muted-foreground text-sm",children:["We've sent a verification code to ",(0,i.jsx)("span",{className:"font-medium text-foreground",children:o})]})]}),(0,i.jsx)("div",{className:"px-6 py-4",children:(0,i.jsxs)(g.Form,{...v,children:[(0,i.jsx)("form",{className:"space-y-4",id:"verification-form",onSubmit:v.handleSubmit(k),children:(0,i.jsx)(g.FormField,{control:v.control,name:"code",render:({field:e})=>(0,i.jsxs)(g.FormItem,{children:[(0,i.jsx)(g.FormLabel,{className:"mb-4 block",children:"Enter 6-digit code"}),(0,i.jsx)(g.FormControl,{children:(0,i.jsx)("div",{className:"flex",children:(0,i.jsx)(ei.InputOTP,{inputMode:"numeric",maxLength:6,pattern:el.REGEXP_ONLY_DIGITS,...e,children:(0,i.jsxs)(ei.InputOTPGroup,{children:[(0,i.jsx)(ei.InputOTPSlot,{className:"h-12 w-12",index:0}),(0,i.jsx)(ei.InputOTPSlot,{className:"h-12 w-12",index:1}),(0,i.jsx)(ei.InputOTPSlot,{className:"h-12 w-12",index:2}),(0,i.jsx)(ei.InputOTPSlot,{className:"h-12 w-12",index:3}),(0,i.jsx)(ei.InputOTPSlot,{className:"h-12 w-12",index:4}),(0,i.jsx)(ei.InputOTPSlot,{className:"h-12 w-12",index:5})]})})})}),(0,i.jsx)(g.FormMessage,{})]})})}),(0,i.jsx)("p",{className:"pt-4 text-muted-foreground text-sm",children:"Check your inbox (and spam folder) for the code."})]})})]}),(0,i.jsx)(f.DialogFooter,{className:"mt-auto flex w-full flex-row-reverse justify-end p-6",children:(0,i.jsx)(x.Button,{className:"h-10 w-full",disabled:m.isPending,form:"verification-form",theme:"landing",type:"submit",children:m.isPending?"Verifying...":"Verify Email"})})]}),"success"===r&&(0,i.jsxs)("div",{className:"mt-10 flex flex-col items-center space-y-4 p-6 text-center",children:[(0,i.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-full bg-green-100 p-4",children:(0,i.jsx)(p.CheckCircleIcon,{className:"h-10 w-10 text-green-600"})}),(0,i.jsx)("h3",{className:"font-semibold text-2xl",children:"Welcome to Promptwatch!"}),(0,i.jsx)("p",{className:"max-w-sm text-muted-foreground",children:"Your free account has been created successfully. You can now use all our free AI search tools."})]})]})]})},leadList:e=>{let t,s,r,n,o,a,c,d=(0,L.c)(26),{listName:m,description:h,submitButtonText:j,onSuccess:v}=e,w=void 0===h?"Sign up for a notification.":h,k=void 0===j?"Request early access":j,I=(0,N.usePostHog)(),[C,S]=(0,l.useState)("signup"),T=(0,P.useTRPC)();if(d[0]!==m||d[1]!==v||d[2]!==I||d[3]!==T.leadList.signup){let e;d[5]!==m||d[6]!==v||d[7]!==I?(e=()=>{b.toast.success("Thanks for signing up!"),S("success"),I?.capture("lead_list_signup_completed",{listName:m}),v?.()},d[5]=m,d[6]=v,d[7]=I,d[8]=e):e=d[8],t=T.leadList.signup.mutationOptions({onSuccess:e,onError:eg}),d[0]=m,d[1]=v,d[2]=I,d[3]=T.leadList.signup,d[4]=t}else t=d[4];let z=(0,y.useMutation)(t);d[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,u.zodResolver)(ef),d[9]=s):s=d[9],d[10]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:s,mode:"onTouched",defaultValues:{firstName:"",lastName:"",email:""}},d[10]=r):r=d[10];let A=(0,F.useForm)(r);d[11]!==m||d[12]!==z?(n=async e=>{z.mutate({...e,listName:m})},d[11]=m,d[12]=z,d[13]=n):n=d[13];let M=n;return d[14]!==w||d[15]!==M||d[16]!==A||d[17]!==z||d[18]!==C||d[19]!==k?(o="signup"===C&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("div",{className:"px-6 pt-6 pb-3",children:[(0,i.jsx)(ec.default,{alt:"Promptwatch logo",className:"h-12",height:90,priority:!0,src:"/logo.svg",width:170}),(0,i.jsx)("p",{className:"mt-2 text-muted-foreground text-sm",children:w})]}),(0,i.jsx)(g.Form,{...A,children:(0,i.jsxs)("form",{className:"space-y-4 p-6 pt-2",id:"lead-list-form",onSubmit:A.handleSubmit(M),children:[(0,i.jsx)(g.FormField,{control:A.control,name:"firstName",render:eb}),(0,i.jsx)(g.FormField,{control:A.control,name:"lastName",render:ev}),(0,i.jsx)(g.FormField,{control:A.control,name:"email",render:ey})]})})]}),(0,i.jsx)(f.DialogFooter,{className:"mt-auto flex w-full flex-row-reverse justify-end p-6 pt-0",children:(0,i.jsx)(x.Button,{className:"w-full",disabled:z.isPending,form:"lead-list-form",theme:"landing",type:"submit",children:z.isPending?"Submitting...":k})})]}),d[14]=w,d[15]=M,d[16]=A,d[17]=z,d[18]=C,d[19]=k,d[20]=o):o=d[20],d[21]!==C?(a="success"===C&&(0,i.jsxs)("div",{className:"flex flex-col items-center space-y-4 p-8 text-center",children:[(0,i.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-full bg-green-100 p-4",children:(0,i.jsx)(p.CheckCircleIcon,{className:"h-10 w-10 text-green-600"})}),(0,i.jsx)("h3",{className:"font-semibold text-2xl",children:"You're on the list!"}),(0,i.jsx)("p",{className:"max-w-sm text-muted-foreground",children:"Thanks for signing up. We'll be in touch soon with early access details."})]}),d[21]=C,d[22]=a):a=d[22],d[23]!==o||d[24]!==a?(c=(0,i.jsx)(f.DialogContent,{className:"max-w-md overflow-hidden p-0",onOpenAutoFocus:ej,children:(0,i.jsxs)("div",{className:"flex flex-col bg-background",children:[o,a]})}),d[23]=o,d[24]=a,d[25]=c):c=d[25],c}},r=function(e){return!(!e.open&&e.closedAt)||Date.now()-e.closedAt<300},n={all:t=t||new Map,on:function(e,s){var r=t.get(e);r?r.push(s):t.set(e,[s])},off:function(e,s){var r=t.get(e);r&&(s?r.splice(r.indexOf(s)>>>0,1):t.set(e,[]))},emit:function(e,s){var r=t.get(e);r&&r.slice().map(function(e){e(s)}),(r=t.get("*"))&&r.slice().map(function(t){t(e,s)})}},{ModalProvider:function(){var e=(0,l.useState)([]),t=e[0],a=e[1];return(0,l.useEffect)(function(){var e;return t.some(function(e){return"number"==typeof e.closedAt})?e=setInterval(function(){a(function(e){return m([],e.filter(r),!0)})},100):clearInterval(e),function(){clearInterval(e)}},[t]),(0,l.useEffect)(function(){var e=function(e){var t=e.name,s=e.props;n.emit("change",{name:t,open:!0,props:s}),a(function(e){return m(m([],e,!0),[{key:Math.random().toString(),name:t,props:s,open:!0}],!1).filter(r)})},t=function(e){var t=e.name,s=e.props;a(function(e){var o=e.findLast(function(e){return e.open});return o&&n.emit("change",{name:o.name,open:!1,props:o.props}),n.emit("change",{name:t,open:!0,props:s}),m(m([],e.map(function(e){return e.key===(null==o?void 0:o.key)?d(d({},e),{open:!1,closedAt:Date.now()}):e}).filter(r),!0),[{key:Math.random().toString(),name:t,props:s,open:!0}],!1)})},s=function(e){var t=e.name;a(function(e){var s=void 0===t?e.length-1:e.findLastIndex(function(e){return e.name===t&&e.open}),r=e[s];return r&&n.emit("change",{name:r.name,open:!1,props:r.props}
3),e.map(function(e){return(null==r?void 0:r.key)!==e.key?e:d(d({},e),{open:!1,closedAt:Date.now()})})})},o=function(){a(function(e){return e.map(function(e){return d(d({},e),{open:!1,closedAt:Date.now()})})})};return n.on("push",e),n.on("replace",t),n.on("pop",s),n.on("popAll",o),function(){n.off("push",e),n.off("replace",t),n.off("pop",s),n.off("popAll",o)}},[t.length]),(0,i.jsx)(i.Fragment,{children:t.map(function(e){var t=s[e.name],r="Component"in t?t.Component:t,n="Wrapper"in t?t.Wrapper:c.Root;return(0,i.jsx)(n,{open:e.open,onOpenChange:function(t){t||o(e.name)},defaultOpen:!0,children:(0,i.jsx)(l.Suspense,{children:(0,i.jsx)(r,d({},e.props))})},e.key)})})},pushModal:function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];var r=t[0];return n.emit("push",{name:e,props:null!=r?r:{}})},popModal:o=function(e){return n.emit("pop",{name:e})},popAllModals:function(){return n.emit("popAll")},replaceWithModal:function(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];var r=t[0];n.emit("replace",{name:e,props:null!=r?r:{}})},onPushModal:a=function(e,t){var s=function(s){(s.name===e||"*"===e)&&t(s.open,s.props,s.name)};return n.on("change",s),function(){return n.off("change",s)}},useOnPushModal:function(e,t){(0,l.useEffect)(function(){return a(e,t)},[e,t])}})}]);
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.