(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[800],{4501:function(e,r,s){Promise.resolve().then(s.bind(s,4264))},4264:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return Y}});var t=s(4350),a=s(7667),n=s(3469),l=s(8766),i=s(7135),o=s(5910),c=s(9982),d=s(8083);let u=(0,s(5908).j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),m=i.forwardRef((e,r)=>{let{className:s,...a}=e;return(0,t.jsx)(d.f,{ref:r,className:(0,c.cn)(u(),s),...a})});m.displayName=d.f.displayName;let f=a.RV,x=i.createContext({}),p=e=>{let{...r}=e;return(0,t.jsx)(x.Provider,{value:{name:r.name},children:(0,t.jsx)(a.Qr,{...r})})},h=()=>{let e=i.useContext(x),r=i.useContext(g),{getFieldState:s,formState:t}=(0,a.Gc)(),n=s(e.name,t);if(!e)throw Error("useFormField should be used within <FormField>");let{id:l}=r;return{id:l,name:e.name,formItemId:"".concat(l,"-form-item"),formDescriptionId:"".concat(l,"-form-item-description"),formMessageId:"".concat(l,"-form-item-message"),...n}},g=i.createContext({}),j=i.forwardRef((e,r)=>{let{className:s,...a}=e,n=i.useId();return(0,t.jsx)(g.Provider,{value:{id:n},children:(0,t.jsx)("div",{ref:r,className:(0,c.cn)("space-y-2",s),...a})})});j.displayName="FormItem";let b=i.forwardRef((e,r)=>{let{className:s,...a}=e,{error:n,formItemId:l}=h();return(0,t.jsx)(m,{ref:r,className:(0,c.cn)(n&&"text-destructive",s),htmlFor:l,...a})});b.displayName="FormLabel";let y=i.forwardRef((e,r)=>{let{...s}=e,{error:a,formItemId:n,formDescriptionId:l,formMessageId:i}=h();return(0,t.jsx)(o.g7,{ref:r,id:n,"aria-describedby":a?"".concat(l," ").concat(i):"".concat(l),"aria-invalid":!!a,...s})});y.displayName="FormControl";let v=i.forwardRef((e,r)=>{let{className:s,...a}=e,{formDescriptionId:n}=h();return(0,t.jsx)("p",{ref:r,id:n,className:(0,c.cn)("text-sm text-muted-foreground",s),...a})});v.displayName="FormDescription";let N=i.forwardRef((e,r)=>{let{className:s,children:a,...n}=e,{error:l,formMessageId:i}=h(),o=l?String(null==l?void 0:l.message):a;return o?(0,t.jsx)("p",{ref:r,id:i,className:(0,c.cn)("text-sm font-medium text-destructive",s),...n,children:o}):null});N.displayName="FormMessage";let w=i.forwardRef((e,r)=>{let{className:s,type:a,...n}=e;return(0,t.jsx)("input",{type:a,className:(0,c.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:r,...n})});w.displayName="Input";var k=s(4165);let I=i.forwardRef((e,r)=>{let{className:s,...a}=e;return(0,t.jsx)("textarea",{className:(0,c.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:r,...a})});I.displayName="Textarea";var z=s(5741),R=s(4249),C=s(9592),O=s(5226);let P=z.fC;z.ZA;let T=z.B4,A=i.forwardRef((e,r)=>{let{className:s,children:a,...n}=e;return(0,t.jsxs)(z.xz,{ref:r,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...n,children:[a,(0,t.jsx)(z.JO,{asChild:!0,children:(0,t.jsx)(R.Z,{className:"h-4 w-4 opacity-50"})})]})});A.displayName=z.xz.displayName;let E=i.forwardRef((e,r)=>{let{className:s,...a}=e;return(0,t.jsx)(z.u_,{ref:r,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...a,children:(0,t.jsx)(C.Z,{className:"h-4 w-4"})})});E.displayName=z.u_.displayName;let F=i.forwardRef((e,r)=>{let{className:s,...a}=e;return(0,t.jsx)(z.$G,{ref:r,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...a,children:(0,t.jsx)(R.Z,{className:"h-4 w-4"})})});F.displayName=z.$G.displayName;let _=i.forwardRef((e,r)=>{let{className:s,children:a,position:n="popper",...l}=e;return(0,t.jsx)(z.h_,{children:(0,t.jsxs)(z.VY,{ref:r,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:n,...l,children:[(0,t.jsx)(E,{}),(0,t.jsx)(z.l_,{className:(0,c.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),(0,t.jsx)(F,{})]})})});_.displayName=z.VY.displayName,i.forwardRef((e,r)=>{let{className:s,...a}=e;return(0,t.jsx)(z.__,{ref:r,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...a})}).displayName=z.__.displayName;let V=i.forwardRef((e,r)=>{let{className:s,children:a,...n}=e;return(0,t.jsxs)(z.ck,{ref:r,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...n,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(z.wU,{children:(0,t.jsx)(O.Z,{className:"h-4 w-4"})})}),(0,t.jsx)(z.eT,{children:a})]})});V.displayName=z.ck.displayName,i.forwardRef((e,r)=>{let{className:s,...a}=e;return(0,t.jsx)(z.Z0,{ref:r,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",s),...a})}).displayName=z.Z0.displayName;var Z=s(5384),D=s(7380),S=s(8195),q=s(9516);let L=l.z.enum(["twitter","discord","telegram","linkedin","email"]),M=l.z.enum(["Twitter","Telegram","KOL","AMA","Offline events","Others"]),B=l.z.enum(["general","demo-request","auditing-request","product-pricing","partnership"]),G=e=>{switch(e){case"general":return"General Inquiry";case"demo-request":return"Request for a Product Demo";case"auditing-request":return"Project Auditing";case"partnership":return"Partnership / Collaboration";case"product-pricing":return"Product Pricing"}},K=l.z.object({name:l.z.string().min(2,"Name must be at least 2 characters long."),socialAccountType:L,source:M,category:B.optional().default("general"),sourceInfo:l.z.string().optional(),socialAccountId:l.z.string().min(1,"Contact Information is required").max(200,"Social media ID cannot be longer than 200 characters"),project:l.z.string().max(200,"Project name cannot be longer than 200 characters").optional(),message:l.z.string().max(4096,"Message cannot be longer than 4096 characters.").optional()}),W={telegram:"Telegram",twitter:"Twitter",email:"Email",discord:"Discord",linkedin:"LinkedIn"};function Y(e){let{onFormSubmit:r,onFormSubmitSuccess:s,onFormSubmitError:l}=e,o=(0,q.useSearchParams)().get("category"),c=(0,a.cI)({defaultValues:{name:"",socialAccountType:"telegram",socialAccountId:"",category:Object.keys(B.Enum).includes(o)?o:"general",project:"",message:""},resolver:(0,n.F)(K)}),d=c.watch("source"),[u,m]=(0,i.useState)("IDLE"),[x,h]=(0,i.useTransition)();return"IDLE"===u?(0,t.jsx)(f,{...c,children:(0,t.jsxs)("form",{onSubmit:c.handleSubmit(e=>{if("Others"===e.source&&!e.sourceInfo){c.setError("sourceInfo",{message:"Please tell us where do you find us."}),c.setFocus("sourceInfo");return}r&&h(async()=>r(e).then(e=>{e?(m("OK"),s&&s()):(m("ERROR"),l&&l())}))}),className:"grid gap-10 md:grid-cols-5",children:[(0,t.jsxs)("div",{className:"space-y-6 self-start md:col-span-2",children:[(0,t.jsx)(p,{control:c.control,name:"name",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{children:[(0,t.jsxs)(b,{children:["Your Name ",(0,t.jsx)("span",{className:"text-primary",children:"*"})]}),(0,t.jsx)(y,{children:(0,t.jsx)(w,{...r})}),(0,t.jsx)(N,{})]})}}),(0,t.jsxs)("div",{className:"grid grid-cols-5 gap-2",children:[(0,t.jsx)(p,{control:c.control,name:"socialAccountType",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{className:"col-span-2",children:[(0,t.jsxs)(b,{className:"text-nowrap",children:["Contact Information"," ",(0,t.jsx)("span",{className:"text-primary",children:"*"})]}),(0,t.jsxs)(P,{onValueChange:r.onChange,defaultValue:r.value,children:[(0,t.jsx)(y,{children:(0,t.jsx)(A,{children:(0,t.jsx)(T,{placeholder:""})})}),(0,t.jsx)(_,{children:Object.entries(W).map(e=>{let[r,s]=e;return(0,t.jsx)(V,{value:r,children:s},r)})})]}),(0,t.jsx)(N,{})]})}}),(0,t.jsx)(p,{control:c.control,name:"socialAccountId",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{className:"relative col-span-3 self-end",children:[(0,t.jsx)(y,{children:(0,t.jsx)(w,{...r})}),(0,t.jsx)(N,{className:"absolute top-9"})]})}})]}),(0,t.jsx)(p,{control:c.control,name:"project",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{children:[(0,t.jsx)(b,{children:"Project Name"}),(0,t.jsx)(y,{children:(0,t.jsx)(w,{...r})}),(0,t.jsx)(v,{children:"If you are contacting us about a specific project, please enter the project name here."}),(0,t.jsx)(N,{})]})}}),(0,t.jsx)(p,{control:c.control,name:"category",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{children:[(0,t.jsx)(b,{children:"Category"}),(0,t.jsxs)(P,{onValueChange:r.onChange,defaultValue:r.value,children:[(0,t.jsx)(y,{children:(0,t.jsx)(A,{children:(0,t.jsx)(T,{placeholder:""})})}),(0,t.jsx)(_,{children:Object.entries(B.Enum).map(e=>{let[r,s]=e;return(0,t.jsx)(V,{value:r,children:G(r)},r)})})]}),(0,t.jsx)(N,{})]})}})]}),(0,t.jsxs)("div",{className:"space-y-6 self-stretch md:col-span-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p,{control:c.control,name:"source",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{children:[(0,t.jsxs)(b,{children:["Where do you find us"," ",(0,t.jsx)("span",{className:"text-primary",children:"*"})]}),(0,t.jsxs)(P,{onValueChange:r.onChange,defaultValue:r.value,children:[(0,t.jsx)(y,{children:(0,t.jsx)(A,{children:(0,t.jsx)(T,{placeholder:""})})}),(0,t.jsx)(_,{children:Object.entries(M.Enum).map(e=>{let[r,s]=e;return(0,t.jsx)(V,{value:r,children:s},r)})})]}),(0,t.jsx)(N,{})]})}}),"Others"===d&&(0,t.jsx)(p,{control:c.control,name:"sourceInfo",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{children:[(0,t.jsx)(y,{children:(0,t.jsx)(I,{className:"h-20",placeholder:"please tell us",...r})}),(0,t.jsx)(N,{})]})}})]}),(0,t.jsx)(p,{control:c.control,name:"message",render:e=>{let{field:r}=e;return(0,t.jsxs)(j,{children:[(0,t.jsx)(b,{children:"Message"}),(0,t.jsx)(y,{children:(0,t.jsx)(I,{className:"h-80",...r})}),(0,t.jsx)(N,{})]})}})]}),(0,t.jsx)(k.z,{type:"submit",className:"md:col-start-5",disabled:x,children:x?"Submitting":"Submit"})]})}):"OK"===u?(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"mx-auto flex w-fit items-center gap-6 py-6",children:[(0,t.jsx)(D.Z,{className:"size-12 text-success"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-lg font-bold",children:"Thank you for your submission."}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"We will get back to you as soon as possible."})]})]}),(0,t.jsx)("div",{className:"mx-auto w-fit",children:(0,t.jsx)(Z.default,{href:"/",children:(0,t.jsx)(k.z,{children:"Back to Home"})})})]}):(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"mx-auto flex w-fit items-center gap-6 py-6",children:[(0,t.jsx)(S.Z,{className:"size-12 text-destructive"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-lg font-bold",children:"There is an error while submitting the message."}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Please try again."})]})]}),(0,t.jsxs)("div",{className:"mx-auto flex w-fit gap-4",children:[(0,t.jsx)(Z.default,{href:"/",children:(0,t.jsx)(k.z,{variant:"outline",children:"Back to Home"})}),(0,t.jsx)(k.z,{onClick:()=>m("IDLE"),children:"Try Again"})]})]})}},4165:function(e,r,s){"use strict";s.d(r,{z:function(){return c}});var t=s(4350),a=s(7135),n=s(5910),l=s(5908),i=s(9982);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",gradient:"bg-gradient-to-br text-primary-foreground from-primary to-destructive brightness-125 dark:brightness-150 hover:from-primary/90 hover:to-destructive/90"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=a.forwardRef((e,r)=>{let{className:s,variant:a,size:l,asChild:c=!1,...d}=e,u=c?n.g7:"button";return(0,t.jsx)(u,{className:(0,i.cn)(o({variant:a,size:l,className:s})),ref:r,...d})});c.displayName="Button"},9982:function(e,r,s){"use strict";s.d(r,{cn:function(){return n}});var t=s(2834),a=s(1002);function n(){for(var e=arguments.length,r=Array(e),s=0;s<e;s++)r[s]=arguments[s];return(0,a.m6)((0,t.W)(r))}}}]);