1import{j as e}from"./vendor-ui-core.DP8knyZn.js";import{k as r,r as t}from"./vendor-react.BBoGJFYM.js";import{j as o,s as a,S as n,H as l,w as s,x as i,y as c,u as d}from"./index.CdjOtu-m.js";import{p as u}from"./purify.es.COJDRNUs.js";import{L as p,h as g,ak as m,e as b,P as h,aN as x,m as f,k as y}from"./vendor-icons.BjAWwE8z.js";import"./vendor-supabase.DS-aP8MZ.js";import"./vendor-ui-forms.CjLBxE3d.js";import"./vendor-utils.BlEnRQrd.js";import"./vendor-ui-display.BT2Z6Vpo.js";import"./vendor-query.CfjDb5WU.js";import"./vendor-media.DY6E_qVO.js";import"./vendor-charts.RWeJ_I16.js";import"./vendor-motion.DCvbjL6b.js";const j=[{value:"",label:"Select inquiry typeâ¦"},{value:"job_seeker",label:"Job Seeker"},{value:"college",label:"College"},{value:"corporate",label:"Corporate"},{value:"other",label:"Any Other"}],v={dark:{pageGradient:"linear-gradient(to bottom, #15002B, #3B0A57, #2A044C)",gridLine:"rgba(255,255,255,0.025)",headlineColor:"#ffffff",bodyText:"rgba(255,255,255,0.65)",mutedText:"rgba(255,255,255,0.40)",labelText:"rgba(255,255,255,0.40)",dimText:"rgba(255,255,255,0.30)",cardBg:"rgba(255,255,255,0.055)",cardBgHover:"rgba(255,255,255,0.11)",cardBorder:"rgba(255,255,255,0.10)",dividerBorder:"rgba(255,255,255,0.08)",ghostBorder:"rgba(255,255,255,0.20)",iconBg:"rgba(99,102,241,0.20)",iconColor:"#a5b4fc",linkColor:"#a5b4fc",inputBg:"rgba(255,255,255,0.06)",inputBorder:"rgba(255,255,255,0.14)",inputBorderFocus:"rgba(165,180,252,0.70)",inputText:"#ffffff",inputPlaceholder:"rgba(255,255,255,0.30)",errorColor:"#f87171",charCountNormal:"rgba(255,255,255,0.25)",charCountHigh:"#fbbf24",ctaBg:"linear-gradient(to right, #7c3aed, #6366f1)",ctaBgHover:"linear-gradient(to right, #6d28d9, #4f46e5)",successIconBg:"rgba(16,185,129,0.15)",successIconColor:"#34d399",successMuted:"rgba(255,255,255,0.55)",pulseColor:"#34d399"},light:{pageGradient:"linear-gradient(to bottom, #2D0550, #5B1280, #3D0A6E)",gridLine:"rgba(255,255,255,0.045)",headlineColor:"#ffffff",bodyText:"rgba(255,255,255,0.80)",mutedText:"rgba(255,255,255,0.60)",labelText:"rgba(255,255,255,0.55)",dimText:"rgba(255,255,255,0.45)",cardBg:"rgba(255,255,255,0.09)",cardBgHover:"rgba(255,255,255,0.16)",cardBorder:"rgba(255,255,255,0.16)",dividerBorder:"rgba(255,255,255,0.15)",ghostBorder:"rgba(255,255,255,0.30)",iconBg:"rgba(165,180,252,0.18)",iconColor:"#c4b5fd",linkColor:"#c4b5fd",inputBg:"rgba(255,255,255,0.10)",inputBorder:"rgba(255,255,255,0.22)",inputBorderFocus:"rgba(196,181,253,0.80)",inputText:"#ffffff",inputPlaceholder:"rgba(255,255,255,0.40)",errorColor:"#fca5a5",charCountNormal:"rgba(255,255,255,0.35)",charCountHigh:"#fcd34d",ctaBg:"linear-gradient(to right, #7c3aed, #6366f1)",ctaBgHover:"linear-gradient(to right, #6d28d9, #4f46e5)",successIconBg:"rgba(52,211,153,0.15)",successIconColor:"#34d399",successMuted:"rgba(255,255,255,0.65)",pulseColor:"#34d399"},collegeDark:{pageGradient:"linear-gradient(to bottom, #0f1428 0%, #141a35 40%, #111827 70%, #0a0d16 100%)",gridLine:"rgba(255,255,255,0.045)",headlineColor:"#ffffff",bodyText:"rgba(255,255,255,0.70)",mutedText:"rgba(255,255,255,0.50)",labelText:"rgba(255,255,255,0.55)",dimText:"rgba(255,255,255,0.35)",cardBg:"rgba(255,255,255,0.05)",cardBgHover:"rgba(255,255,255,0.10)",cardBorder:"rgba(255,255,255,0.10)",dividerBorder:"rgba(255,255,255,0.08)",ghostBorder:"rgba(255,255,255,0.22)",iconBg:"rgba(99,102,241,0.20)",iconColor:"#a5b4fc",linkColor:"#a5b4fc",inputBg:"rgba(255,255,255,0.06)",inputBorder:"rgba(255,255,255,0.14)",inputBorderFocus:"rgba(129,140,248,0.75)",inputText:"#ffffff",inputPlaceholder:"rgba(255,255,255,0.35)",errorColor:"#f87171",charCountNormal:"rgba(255,255,255,0.30)",charCountHigh:"#fbbf24",ctaBg:"linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%)",ctaBgHover:"linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6366f1 100%)",successIconBg:"rgba(16,185,129,0.15)",successIconColor:"#34d399",successMuted:"rgba(255,255,255,0.60)",pulseColor:"#34d399"},collegeLight:{pageGradient:"linear-gradient(to bottom, #f0f4ff, #fafbff, #eef2fb)",gridLine:"rgba(99,102,241,0.08)",headlineColor:"#0f172a",bodyText:"rgba(15,23,42,0.75)",mutedText:"rgba(15,23,42,0.55)",labelText:"rgba(15,23,42,0.65)",dimText:"rgba(15,23,42,0.40)",cardBg:"rgba(224,231,255,0.55)",cardBgHover:"rgba(224,231,255,0.75)",cardBorder:"rgba(99,102,241,0.28)",dividerBorder:"rgba(15,23,42,0.10)",ghostBorder:"rgba(99,102,241,0.30)",iconBg:"rgba(99,102,241,0.14)",iconColor:"#4f46e5",linkColor:"#4f46e5",inputBg:"rgba(255,255,255,0.85)",inputBorder:"rgba(99,102,241,0.22)",inputBorderFocus:"rgba(79,70,229,0.65)",inputText:"#0f172a",inputPlaceholder:"rgba(15,23,42,0.40)",errorColor:"#dc2626",charCountNormal:"rgba(15,23,42,0.40)",charCountHigh:"#d97706",ctaBg:"linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%)",ctaBgHover:"linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6366f1 100%)",successIconBg:"rgba(16,185,129,0.15)",successIconColor:"#059669",successMuted:"rgba(15,23,42,0.60)",pulseColor:"#10b981"}},B=2e3,C=[{icon:b,label:"Email",value:"[email protected]",href:"mailto:[email protected]"},{icon:h,label:"Phone",value:"+91 9620353338",href:"tel:+919620353338"},{icon:x,label:"Company",value:"Elevera Tech Labs, India",href:null}
1],N={email:"",phone_number:"",inquiry_type:"",subject:"",description:""},T=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function w(e){const r={};if(e.email.trim()?T.test(e.email.trim())||(r.email="Enter a valid email address."):r.email="Email is required.",e.phone_number.trim()){const t=i(e.phone_number),o=c(t.number,t.countryCode);o.valid||(r.phone_number=o.error||"Enter a valid phone number.")}else r.phone_number="Phone number is required.";return e.inquiry_type||(r.inquiry_type="Please select an inquiry type."),e.subject.trim()?e.subject.trim().length<5&&(r.subject="At least 5 characters required."):r.subject="Subject is required.",e.description.trim()?e.description.trim().length<10&&(r.description="At least 10 characters required."):r.description="Message is required.",r}const k=({p:r,hasError:t,style:o,onFocus:a,onBlur:n,...l})=>e.jsx("input",{...l,className:"w-full rounded-lg px-3 h-9 text-sm outline-none transition-all duration-150",style:{background:r.inputBg,border:`1px solid ${t?r.errorColor:r.inputBorder}`,color:r.inputText,...o},onFocus:e=>{e.currentTarget.style.borderColor=t?r.errorColor:r.inputBorderFocus,e.currentTarget.style.boxShadow=`0 0 0 2px ${t?r.errorColor:r.inputBorderFocus}33`,null==a||a(e)},onBlur:e=>{e.currentTarget.style.borderColor=t?r.errorColor:r.inputBorder,e.currentTarget.style.boxShadow="none",null==n||n(e)}}),_=({p:r,hasError:t,onFocus:o,onBlur:a,...n})=>e.jsx("textarea",{...n,className:"w-full rounded-lg px-3 py-2 text-sm outline-none transition-all duration-150 resize-none",style:{background:r.inputBg,border:`1px solid ${t?r.errorColor:r.inputBorder}`,color:r.inputText},onFocus:e=>{e.currentTarget.style.borderColor=t?r.errorColor:r.inputBorderFocus,e.currentTarget.style.boxShadow=`0 0 0 2px ${t?r.errorColor:r.inputBorderFocus}33`,null==o||o(e)},onBlur:e=>{e.currentTarget.style.borderColor=t?r.errorColor:r.inputBorder,e.currentTarget.style.boxShadow="none",null==a||a(e)}}),q=({id:r,label:t,error:o,touched:a,children:n,charCount:l,p:s})=>e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{htmlFor:r,className:"text-[11px] font-semibold uppercase tracking-widest select-none",style:{color:a&&o?s.errorColor:s.labelText},children:t}),l&&e.jsxs("span",{className:"text-[10px] tabular-nums",style:{color:l.current>.9*l.max?s.charCountHigh:s.charCountNormal},children:[l.current,"/",l.max]})]}),n,a&&o&&e.jsxs("p",{className:"flex items-center gap-1 text-[11px] mt-0.5",style:{color:s.errorColor},children:[e.jsx(f,{className:"h-3 w-3 shrink-0"}),o]})]}),S=({onReset:r,p:t})=>e.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-10 text-center animate-in fade-in-0 zoom-in-95 duration-300",children:[e.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full",style:{background:t.successIconBg},children:e.jsx(y,{className:"h-8 w-8",style:{color:t.successIconColor}})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-base font-semibold",style:{color:t.headlineColor},children:"Message sent!"}),e.jsx("p",{className:"text-sm",style:{color:t.successMuted},children:"We'll respond within 24â48 business hours."})]}),e.jsx("button",{onClick:r,className:"mt-2 text-xs px-4 py-2 rounded-lg border transition-colors duration-150",style:{borderColor:t.ghostBorder,color:t.bodyText,background:"transparent"},onMouseEnter:e=>{e.currentTarget.style.background=t.cardBgHover},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:"Send another message"})]});function F(){const{resolvedTheme:i}=o(),[c]=r(),b=c.get("type"),h="college"===b,x=h?"light"===i?v.collegeLight:v.collegeDark:"light"===i?v.light:v.dark,f="corporate"===b?"corporate":"college"===b?"college":"",[y,T]=t.useState(null),[F,E]=t.useState(!0),[M,H]=t.useState(!1),[I,L]=t.useState(!1),[P,$]=t.useState({...N,inquiry_type:f}),[z,G]=t.useState({}),[A,O]=t.useState({});t.useEffect(()=>{let e=!1;return(async()=>{try{const{data:r,error:t}=await a.from("policy_documents").select("*").eq("document_type","contact-us").eq("published",!0).order("version",{ascending:!1}).limit(1).single();e||t||!r||T(r)}catch(r){}finally{e||E(!1)}})(),()=>{e=!0}},[]),t.useEffect(()=>{Object.keys(A).length>0&&G(w(P))},[P,A]);const R=t.useCallback((e,r)=>{$(t=>({...t,[e]:r}))},[]),D=t.useCallback(e=>{O(r=>({...r,[e]:!0}))},[]);return F?e.jsx("div",{className:"min-h-screen flex items-center justify-center transition-[background] duration-300",style:{background:x.pageGradient},children:e.jsx(p,{className:"h-8 w-8 animate-spin",style:{color:x.iconColor}})}):e.jsxs("div",{id:"contact-us-page",className:"min-h-screen flex flex-col transition-[background] duration-300",style:{background:x.pageGradient},children:[e.jsx(n,{title:"Contact Us - SmartMentor.ai",description:"Get in touch with SmartMentor.ai. We're here to help with your interview preparation journey.",keywords:"contact smartmentor, support, help, customer service",canonicalUrl:"https://smartmentor.ai/contact"}),e.jsx(l,{}),e.jsx("div",{"aria-hidden":"true",className:"fixed inset-0 pointer-events-none z-0",style:{backgroundImage:[`linear-gradient(${x.gridLine} 1px, transparent 1px)`,`linear-gradient(90deg, ${x.gridLine} 1px, transparent 1px)`].join(", "),backgroundSize:"40px 40px"}}),h&&e.jsxs(e.Fragment,{children:[e.jsx("div",{"aria-hidden":"true",className:"fixed top-0 left-0 w-[420px] h-[320px] rounded-full pointer-events-none z-0",style:{background:`radial-gradient(ellipse, ${"light"===i?"rgba(99,102,241,0.18)":"rgba(99,102,241,0.22)"}
1 0%, transparent 70%)`,filter:"blur(60px)"}}),e.jsx("div",{"aria-hidden":"true",className:"fixed bottom-0 right-0 w-[420px] h-[320px] rounded-full pointer-events-none z-0",style:{background:`radial-gradient(ellipse, ${"light"===i?"rgba(129,140,248,0.14)":"rgba(129,140,248,0.16)"} 0%, transparent 70%)`,filter:"blur(60px)"}})]}),e.jsxs("main",{className:"relative z-10 flex-1 w-full max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-10",style:{paddingTop:96,paddingBottom:56},children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsxs("h1",{className:"text-3xl sm:text-4xl font-bold tracking-tight",style:{fontFamily:"'Roboto Slab', serif",color:x.headlineColor},children:["Get in"," ",e.jsx("span",{className:"bg-clip-text text-transparent bg-gradient-to-r from-indigo-300 via-pink-300 to-fuchsia-400",children:"Touch"})]}),e.jsx("p",{className:"mt-3 text-base max-w-xl mx-auto leading-relaxed",style:{color:x.bodyText},children:"Send us a message and we'll respond within 24â48 hours."})]}),e.jsxs("div",{className:"flex flex-col gap-6 w-full",children:[e.jsxs("div",{className:"w-full rounded-xl border p-5 sm:p-6",style:{background:x.cardBg,borderColor:x.cardBorder},children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h2",{className:"text-lg font-semibold",style:{fontFamily:"'Roboto Slab', serif",color:x.headlineColor},children:"Send a Message"}),e.jsx("p",{className:"text-sm mt-1",style:{color:x.mutedText},children:"Fill in the fields below and we'll get back to you."})]}),I?e.jsx(S,{onReset:()=>{$(N),G({}),O({}),L(!1)},p:x}):e.jsxs("form",{onSubmit:async e=>{var r;e.preventDefault();const t=Object.fromEntries(Object.keys(N).map(e=>[e,!0]));O(t);const o=w(P);if(G(o),Object.keys(o).length>0)null==(r=document.getElementById(Object.keys(o)[0]))||r.focus();else{H(!0);try{const{error:e}=await a.functions.invoke("submit-contact-form",{body:{email:P.email.trim(),phone_number:P.phone_number.trim(),inquiry_type:P.inquiry_type,subject:P.subject.trim(),description:P.description.trim()}});if(e)throw e;L(!0),d.success("Message sent! We'll get back to you soon.")}catch(n){d.error(n instanceof Error?n.message:"Failed to send message. Please try again.")}finally{H(!1)}}},noValidate:!0,"aria-label":"Contact form",className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 items-end",children:[e.jsx(q,{id:"email",label:"Email *",error:z.email,touched:!!A.email,p:x,children:e.jsx(k,{id:"email",type:"email",autoComplete:"email",placeholder:"[email protected]",value:P.email,onChange:e=>R("email",e.target.value),onBlur:()=>D("email"),"aria-invalid":!!A.email&&!!z.email,p:x,hasError:!!A.email&&!!z.email})}),e.jsx(q,{id:"phone_number",label:"Mobile Number *",error:z.phone_number,touched:!!A.phone_number,p:x,children:e.jsx(s,{id:"phone_number",value:P.phone_number,onChange:e=>{R("phone_number",e),A.phone_number||D("phone_number")},showValidation:!!A.phone_number,height:"h-9",themeStyles:{inputBg:x.inputBg,inputBorder:x.inputBorder,inputBorderFocus:x.inputBorderFocus,inputText:x.inputText,inputPlaceholder:x.inputPlaceholder,errorColor:x.errorColor}})})]}),e.jsx(q,{id:"inquiry_type",label:"I am a *",error:z.inquiry_type,touched:!!A.inquiry_type,p:x,children:e.jsxs("div",{className:"relative",children:[e.jsx("select",{id:"inquiry_type",value:P.inquiry_type,onChange:e=>R("inquiry_type",e.target.value),onBlur:()=>D("inquiry_type"),"aria-invalid":!!A.inquiry_type&&!!z.inquiry_type,className:"w-full rounded-lg px-3 h-9 text-sm outline-none transition-all duration-150 appearance-none pr-8",style:{background:x.inputBg,border:`1px solid ${A.inquiry_type&&z.inquiry_type?x.errorColor:x.inputBorder}`,color:P.inquiry_type?x.inputText:x.inputPlaceholder},onFocus:e=>{e.currentTarget.style.borderColor=A.inquiry_type&&z.inquiry_type?x.errorColor:x.inputBorderFocus,e.currentTarget.style.boxShadow=`0 0 0 2px ${A.inquiry_type&&z.inquiry_type?x.errorColor:x.inputBorderFocus}33`},onBlurCapture:e=>{e.currentTarget.style.borderColor=A.inquiry_type&&z.inquiry_type?x.errorColor:x.inputBorder,e.currentTarget.style.boxShadow="none"},children:j.map(r=>e.jsx("option",{value:r.value,style:{background:"#1a0235",color:r.value?"#fff":x.inputPlaceholder},children:r.label},r.value))}),e.jsx(g,{className:"absolute right-2.5 top-1/2 -translate-y-1/2 h-4 w-4 pointer-events-none",style:{color:x.mutedText}})]})}),e.jsx(q,{id:"subject",label:"Subject *",error:z.subject,touched:!!A.subject,charCount:{current:P.subject.length,max:200},p:x,children:e.jsx(k,{id:"subject",type:"text",placeholder:"How can we help?",value:P.subject,onChange:e=>R("subject",e.target.value.slice(0,200)),onBlur:()=>D("subject"),maxLength:200,"aria-invalid":!!A.subject&&!!z.subject,p:x,hasError:!!A.subject&&!!z.subject})}),e.jsx(q,{id:"description",label:"Message *",error:z.description,touched:!!A.description,charCount:{current:P.description.length,max:B},p:x,children:e.jsx(_,{id:"description",placeholder:"Tell us more about your inquiryâ¦",rows:5,value:P.description,onChange:e=>R("description",e.target.value.slice(0,B)),onBlur:()=>D("description"),maxLength:B,"aria-invalid":!!A.description&&!!z.description,p:x,hasError:!!A.description&&!!z.description})}),e.jsx("button",{type:"submit",disabled:M,className:"w-full h-10 rounded-xl text-sm font-semibold text-white flex items-center justify-center gap-2\n transition-all duration-150 hover:scale-[1.01] active:scale-[0.99]\n disabled:opacity-60 disabled:cursor-not-allowed\n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40",style:{background:x.ctaBg},onMouseEnter:e=>{M||(e.currentTarget.style.background=x.ctaBgHover)},onMouseLeave:e=>{e.currentTarget.style.background=x.ctaBg},children:M?e.jsxs(e.Fragment,{children:[e.jsx(p,{className:"h-4 w-4 animate-spin"}),"Sendingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{className:"h-4 w-4"}),"Send Message"]})}),e.jsx("p",{className:"text-center text-[11px]",style:{color:x.dimText},children:"We respect your privacy. Your info is never shared with third parties."})]})]}),e.jsxs("div",{className:"w-full rounded-xl border p-5 sm:p-6 flex flex-col gap-4",style:{background:x.cardBg,borderColor:x.c
1ardBorder},children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",style:{fontFamily:"'Roboto Slab', serif",color:x.headlineColor},children:"Contact Information"}),e.jsx("p",{className:"text-sm mt-1",style:{color:x.mutedText},children:"Reach us through any channel"})]}),(null==y?void 0:y.content)?e.jsx("div",{className:"prose prose-sm max-w-none",style:{color:x.bodyText},dangerouslySetInnerHTML:{__html:u.sanitize(y.content)}}):e.jsx("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-4 sm:gap-8",children:C.map(({icon:r,label:t,value:o,href:a})=>e.jsxs("div",{className:"flex items-start gap-3.5",children:[e.jsx("div",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-lg",style:{background:x.iconBg},children:e.jsx(r,{className:"h-4 w-4",style:{color:x.iconColor}})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-widest mb-0.5",style:{color:x.labelText},children:t}),a?e.jsx("a",{href:a,className:"text-sm font-medium hover:underline break-all transition-opacity hover:opacity-80",style:{color:x.linkColor},children:o}):e.jsx("p",{className:"text-sm font-medium",style:{color:x.bodyText},children:o})]})]},t))}),e.jsx("div",{className:"pt-3 mt-auto",style:{borderTop:`1px solid ${x.dividerBorder}`},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"inline-flex h-2 w-2 rounded-full animate-pulse shrink-0",style:{backgroundColor:x.pulseColor}}),e.jsxs("p",{className:"text-xs",style:{color:x.mutedText},children:["Typically responds within ",e.jsx("strong",{style:{color:x.bodyText},children:"24â48 hours"})," on business days."]})]})})]})]})]}),e.jsx("style",{children:`\n #contact-us-page input::placeholder,\n #contact-us-page textarea::placeholder,\n #phone_number::placeholder {\n color: ${x.inputPlaceholder} !important;\n }\n #contact-us-page select option[value=""] {\n color: ${x.inputPlaceholder} !important;\n }\n `})]})}export{F 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.