Files
adnexus/assets/BookDemo-DxEkx9US.js
2026-09-20 08:53:09 -07:00

2 lines
7.5 KiB
JavaScript

import{r as i,j as e}from"./ui-SA1K2VdO.js";import{B as n}from"./index-BBRaFEzF.js";import{I as N}from"./input-jTrHrzjY.js";import{S as x,a as h,b as u,c as p,d as b}from"./select-CLfuir-h.js";import{s as k}from"./client-Cs5qpnPJ.js";import{a1 as v,A as f,Z as C,w as T}from"./utils-BOogt4zp.js";import"./vendor-khT4bKqW.js";const $=({calLink:t="adnexus/15min",email:r,name:a,meetingDate:c,height:o="600px",className:d=""})=>{const g=i.useRef(null),j=()=>{const l=new URLSearchParams;r&&l.append("email",r),a&&l.append("name",a),c&&l.append("date",c),l.append("embed","true");const m=l.toString();return`https://cal.com/${t}${m?`?${m}`:""}`};return i.useEffect(()=>{const l=document.createElement("script");return l.src="https://app.cal.com/embed/embed.js",l.async=!0,document.body.appendChild(l),()=>{document.body.contains(l)&&document.body.removeChild(l)}},[]),e.jsx("div",{className:`cal-embed-container ${d}`,children:e.jsx("iframe",{ref:g,src:j(),width:"100%",height:o,frameBorder:"0",allow:"camera; microphone; autoplay; encrypted-media;",style:{border:"none",borderRadius:"8px",overflow:"hidden"},"data-cal-link":t,"data-cal-config":'{"layout":"month_view"}'})})};function D(){const[t,r]=i.useState(1),[a,c]=i.useState({email:"",name:"",userType:"",companySize:"",industry:"",budget:""}),[o,d]=i.useState(!1),g=async()=>{if(a.budget){d(!0);try{const{error:s}=await k.from("contacts").insert({name:a.name,email:a.email,company:a.industry,company_size:a.companySize,interest_area:a.userType.toLowerCase(),message:`Budget: ${a.budget} | Type: ${a.userType}`});s&&console.error("Error saving:",s),r(5)}catch(s){console.error("Error:",s),r(5)}finally{d(!1)}}},j=["Advertiser","Agency","Brand"],l=["1-10 employees","11-50 employees","51-200 employees","201-500 employees","501+ employees"],m=["Ecommerce","Apps & Gaming","B2B/SaaS","Finance","Healthcare","Automotive","Education","Entertainment","Retail","Other"],w=["$25-$100/day","$100-$500/day","$500-$1K/day","$1K-$5K/day","$5K-$10K/day","$10K+/day"],S=["Microsoft","Google","NVIDIA","Damon Motorcycles","Bellabeat","Triller","Unikrn","Cover.Build","Casper Labs","Myle"];return e.jsxs("div",{className:"min-h-screen grid md:grid-cols-2",children:[e.jsx("div",{className:"bg-white text-black p-12 flex flex-col justify-center",children:e.jsxs("div",{className:"max-w-md mx-auto w-full",children:[e.jsx("div",{className:"mb-8",children:e.jsx("img",{src:"/logo.png",alt:"Adnexus",className:"h-8"})}),t===1&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold mb-6 text-black",children:"Enter your work email"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(N,{type:"email",placeholder:"What's your work email?",value:a.email,onChange:s=>c({...a,email:s.target.value}),className:"pr-12 h-14 text-lg border-gray-300",required:!0}),e.jsx(v,{className:"absolute right-4 top-4 h-6 w-6 text-red-500"})]}),e.jsx(n,{onClick:()=>r(2),disabled:!a.email,className:"w-full h-12 bg-blue-600 hover:bg-blue-700 text-white",size:"lg",children:"Submit"})]})]}),t===2&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold mb-6 text-black",children:"Tell us about yourself"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(N,{type:"text",placeholder:"Your Name",value:a.name,onChange:s=>c({...a,name:s.target.value}),className:"h-12 border-gray-300 !bg-white !text-black"}),e.jsxs(x,{value:a.userType,onValueChange:s=>c({...a,userType:s}),children:[e.jsx(h,{className:"h-12 border-gray-300 !bg-white !text-black",children:e.jsx(u,{placeholder:"I am a/an..."})}),e.jsx(p,{children:j.map(s=>e.jsx(b,{value:s,children:s},s))})]}),e.jsxs(n,{onClick:()=>r(3),disabled:!a.name||!a.userType,className:"w-full h-12 bg-blue-600 hover:bg-blue-700 text-white",children:["Continue ",e.jsx(f,{className:"ml-2"})]})]})]}),t===3&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold mb-6 text-black",children:"About your company"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(x,{value:a.companySize,onValueChange:s=>c({...a,companySize:s}),children:[e.jsx(h,{className:"h-12 border-gray-300 !bg-white !text-black",children:e.jsx(u,{placeholder:"Company size"})}),e.jsx(p,{children:l.map(s=>e.jsx(b,{value:s,children:s},s))})]}),e.jsxs(x,{value:a.industry,onValueChange:s=>c({...a,industry:s}),children:[e.jsx(h,{className:"h-12 border-gray-300 !bg-white !text-black",children:e.jsx(u,{placeholder:"Industry"})}),e.jsx(p,{children:m.map(s=>e.jsx(b,{value:s,children:s},s))})]}),e.jsxs(n,{onClick:()=>r(4),disabled:!a.companySize||!a.industry,className:"w-full h-12 bg-blue-600 hover:bg-blue-700 text-white",children:["Continue ",e.jsx(f,{className:"ml-2"})]})]})]}),t===4&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-4xl font-bold mb-6 text-black",children:"What's your budget?"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(x,{value:a.budget,onValueChange:s=>c({...a,budget:s}),children:[e.jsx(h,{className:"h-12 border-gray-300",children:e.jsx(u,{placeholder:"Select monthly budget"})}),e.jsx(p,{children:w.map(s=>e.jsx(b,{value:s,children:s},s))})]}),e.jsxs(n,{onClick:g,disabled:!a.budget||o,className:"w-full h-12 bg-blue-600 hover:bg-blue-700 text-white",children:[o?"Saving...":"Continue"," ",e.jsx(f,{className:"ml-2"})]})]})]}),t===5&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold mb-4 text-black",children:"Choose Your Path"}),e.jsx("p",{className:"text-gray-600 mb-8",children:"How would you like to get started?"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(n,{onClick:()=>window.location.href="https://dsp.ad.nexus/signup",className:"w-full h-auto py-6 bg-blue-600 hover:bg-blue-700 text-white text-left flex flex-col items-start",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(C,{className:"h-5 w-5"}),e.jsx("span",{className:"text-lg font-bold",children:"Self-Service"})]}),e.jsx("span",{className:"text-sm text-white/90",children:"Launch your campaign now. Like Facebook Ads for TV."})]}),e.jsxs(n,{onClick:()=>r(6),variant:"outline",className:"w-full h-auto py-6 border-2 border-gray-300 hover:border-gray-400 hover:bg-gray-50 text-left flex flex-col items-start",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(v,{className:"h-5 w-5"}),e.jsx("span",{className:"text-lg font-bold text-black",children:"Talk to Sales"})]}),e.jsx("span",{className:"text-sm text-gray-600",children:"Get expert help. Schedule a 15-minute consultation."})]})]})]}),t===6&&e.jsx("div",{className:"h-full",children:e.jsx($,{calLink:"adnexus/15min",email:a.email,name:a.name,height:"700px"})})]})}),e.jsx("div",{className:"bg-black text-white p-12 flex flex-col justify-center",children:e.jsxs("div",{className:"max-w-xl mx-auto",children:[e.jsx("h1",{className:"text-5xl font-bold mb-6 leading-tight",children:"Book a demo and launch your TV ads in 5 minutes."}),e.jsx("p",{className:"text-xl text-white/70 mb-12",children:"Schedule a demo with our TV ad experts to learn how Adnexus can help you grow your business."}),e.jsxs("div",{className:"mb-12",children:[e.jsx("p",{className:"text-sm text-white/40 uppercase tracking-wider mb-6",children:"TRUSTED BY OVER 100 BRANDS"}),e.jsx("div",{className:"grid grid-cols-2 gap-6",children:S.map((s,y)=>e.jsx("div",{className:"text-white/60 font-semibold text-sm",children:s},y))})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex",children:[...Array(5)].map((s,y)=>e.jsx(T,{className:"h-5 w-5 fill-orange-500 text-orange-500"},y))}),e.jsx("span",{className:"text-white/70",children:"Rated 4.9 out of 5 on Trust Pilot"})]})]})})]})}export{D as default};