1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7616],{98588:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/signup",function(){return n(11211)}])},17799:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var l=n(85893),a=n(67294),s=n(34224),r=n(94693),o=n(13150),i=n(11553),c=n(25675),u=n.n(c),d=n(45697),m=n.n(d),p=function(e){return"object"==typeof e&&null!==e},f=function(e){var t=e.value,n=void 0===t?"":t,l=e.numInputs,s=void 0===l?4:l,r=e.onChange,o=e.renderInput,i=e.shouldAutoFocus,c=void 0!==i&&i,u=e.inputType,d=void 0===u?"text":u,m=e.renderSeparator,f=e.placeholder,x=e.containerStyle,h=e.inputStyle,g=a.useState(0),v=g[0],y=g[1],j=a.useRef([]),b=function(){return n?n.toString().split(""):[]},w="number"===d||"tel"===d;a.useEffect(function(){j.current=j.current.slice(0,s)},[s]),a.useEffect(function(){var e;c&&(null===(e=j.current[0])||void 0===e||e.focus())},[c]);var N=function(){if("string"==typeof f){if(f.length===s)return f;f.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}},S=function(e){return(w?!isNaN(Number(e)):"string"==typeof e)&&1===e.trim().length},C=function(e){var t=e.target.value;if(S(t))E(t),D(v+1);else{var n=e.nativeEvent;null===n.data&&"deleteContentBackward"===n.inputType&&(e.preventDefault(),E(""),D(v-1))}},k=function(){y(v-1)},I=function(e){var t=b();[e.code,e.key].includes("Backspace")?(e.preventDefault(),E(""),D(v-1)):"Delete"===e.code?(e.preventDefault(),E("")):"ArrowLeft"===e.code?(e.preventDefault(),D(v-1)):"ArrowRight"===e.code?(e.preventDefault(),D(v+1)):e.key===t[v]?(e.preventDefault(),D(v+1)):"Spacebar"===e.code||"Space"===e.code||"ArrowUp"===e.code||"ArrowDown"===e.code?e.preventDefault():w&&!S(e.key)&&e.preventDefault()},D=function(e){var t,n,l=Math.max(Math.min(s-1,e),0);j.current[l]&&(null===(t=j.current[l])||void 0===t||t.focus(),null===(n=j.current[l])||void 0===n||n.select(),y(l))},E=function(e){var t=b();t[v]=e[0],A(t)},A=function(e){r(e.join(""))},P=function(e){e.preventDefault();var t,n=b(),l=v,a=e.clipboardData.getData("text/plain").slice(0,s-v).split("");if(!(w&&a.some(function(e){return isNaN(Number(e))}))){for(var r=0;r<s;++r)r>=v&&a.length>0&&(n[r]=null!==(t=a.shift())&&void 0!==t?t:"",l++);D(l),A(n)}};return a.createElement("div",{style:Object.assign({display:"flex",alignItems:"center"},p(x)&&x),className:"string"==typeof x?x:void 0},Array.from({length:s},function(e,t){return t}).map(function(e){var t,n,l;return a.createElement(a.Fragment,{key:e},o({value:null!==(t=b()[e])&&void 0!==t?t:"",placeholder:null!==(l=null===(n=N())||void 0===n?void 0:n[e])&&void 0!==l?l:void 0,ref:function(t){return j.current[e]=t},onChange:C,onFocus:function(t){y(e),t.target.select()},onBlur:k,onKeyDown:I,onPaste:P,autoComplete:"off",maxLength:1,"aria-label":"Please enter OTP character ".concat(e+1),style:Object.assign({width:"1em",textAlign:"center"},p(h)&&h),className:"string"==typeof h?h:void 0,type:d},e),e<s-1&&("function"==typeof m?m(e):m))}))},x=n(90072),h=n(85198),g=n(11163),v=n(91159),y=n(64712);let j={gmail:{domain:"gmail",image:"/onboarding/gmailIcon.svg"},outlook:{domain:"outlook",image:"/onboarding/outlookIcon.svg"},others:{domain:"others",image:""}},b=e=>{let{formData:t,uniqueID:n}=e,c=(0,g.useRouter)(),[,d]=(0,a.useState)({}),[,m]=(0,a.useContext)(o.s),[p,b]=(0,a.useState)(""),[w,N]=(0,a.useState)(h.JV),[S,C]=(0,a.useState)(!1),[k,I]=(0,a.useState)(!1),[D,E]=(0,a.useState)({}),{email:A,password:P}=t,T=(0,a.useCallback)((e,t,n)=>{let l={gmail:"https://mail.google.com/mail/u/?authuser=".concat(t,"#search/").concat(n),outlook:"https://outlook.live.com/owa/?email=".concat(t,"/search?q=").concat(n)};if(!l[e]){y.A.error("Email domain not supported");return}window.open(l[e],"_blank")},[]),O=(0,a.useCallback)(()=>setInterval(()=>{N(e=>e-1)},1e3),[]),L=(0,a.useCallback)(e=>{e.preventDefault(),e.returnValue="Are you sure you want to leave?"},[]);(0,a.useEffect)(()=>(window.addEventListener("beforeunload",L),()=>{window.removeEventListener("beforeunload",L)}),[]),(0,a.useEffect)(()=>{A&&(0,r.ZP)(A,E)},[A]),(0,a.useEffect)(()=>{E(e=>j[e.domain]||j.others)},[D]),(0,a.useEffect)(()=>{let e=O();return 0===w&&clearInterval(e),()=>clearInterval(e)},[w,O]),(0,a.useEffect)(()=>{S||4!==p.length||(0,r.ZZ)(t||null,n||null,p,C,I,m,d,c)}
1,[p]),(0,a.useEffect)(()=>{if(k){let e=setTimeout(()=>{I(!1)},3e3);return()=>clearTimeout(e)}},[k]);let _=(e,t)=>(0,a.createElement)("input",{...e,key:t,className:"border rounded-lg !w-[52px] !h-[52px] text-center text-black ".concat(k?"border-red":"border-[#AFC6DA]"),disabled:S}),R=(0,a.useCallback)(()=>{N(h.JV),(0,r.jt)(A,N)},[A]);return(0,l.jsxs)("div",{className:"flex flex-col items-center gap-10 mt-10",children:[(0,l.jsxs)("section",{className:"flex flex-col w-full",children:[(0,l.jsxs)("p",{className:"text-xl font-semibold",children:["Enter the OTP sent to ",(0,l.jsx)("br",{}),(0,l.jsx)("span",{children:A})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 mt-10 mb-5 lg:flex-row lg:items-center",children:[(0,l.jsx)(f,{value:p,onChange:b,numInputs:4,renderSeparator:(0,l.jsx)("span",{className:"mr-4"}),renderInput:_,isDisabled:S}),(0,l.jsxs)("div",{className:"items-center justify-center my-5 xxs:h-8 lg:flex lg:my-0",children:[S&&(0,l.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,l.jsx)("div",{className:"absolute flex items-center justify-center w-20 h-20 lg:-left-6 -left-8",children:(0,l.jsx)(v.Z,{animationData:x,loop:!0,play:!0})}),(0,l.jsx)("span",{className:"absolute lg:left-10 left-8",children:"Verifying"})]}),k&&!S&&(0,l.jsxs)("div",{className:"flex items-center lg:justify-center",children:[(0,l.jsx)(u(),{src:"/onboarding/wrong.svg",alt:"Wrong OTP",width:30,height:30}),(0,l.jsx)("span",{className:"text-red",children:"Wrong OTP"})]})]})]}),w>0?(0,l.jsxs)("p",{className:"cursor-not-allowed text-deepGray",children:["Resend OTP in ",(0,l.jsx)("span",{className:"font-bold",children:w})]}):(0,l.jsx)("p",{className:"cursor-pointer text-primary",onClick:R,children:"Resend OTP"})]}),(0,l.jsx)("hr",{className:"text-grayLight"}),(0,l.jsxs)("section",{className:"flex flex-col items-center justify-center w-full gap-2 lg:gap-7",children:[(0,l.jsx)(s.zx,{prefixIcon:null==D?void 0:D.image,title:(null==D?void 0:D.domain)==="outlook"?"Open Outlook":(null==D?void 0:D.domain)==="gmail"?"Open Gmail":"Open Mail",suffixIcon:"/common/share.svg",onClick:()=>T(null==D?void 0:D.domain,A,"OpeninApp OTP Verification"),className:"w-full",disabled:S}),(0,l.jsx)("span",{className:"text-deepGray",children:"Or"}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-between w-full gap-5",children:[(0,l.jsx)("span",{className:"font-semibold",children:"Search"}),(0,l.jsxs)("button",{onClick:()=>(0,i.vQ)("OpeninApp OTP Verification"),className:"flex w-full gap-2 items-center justify-between border-dashed border-[1px] border-primary p-3 rounded-lg",children:[(0,l.jsx)("p",{className:"truncate",children:"OpeninApp OTP Verification"}),(0,l.jsx)(u(),{src:"/common/./copy-agency.svg",alt:"Copy",width:15,height:15})]}),(0,l.jsx)("span",{className:"font-semibold",children:"In your Inbox"})]})]})]})};b.propTypes={email:m().string};var w=b},11211:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var l=n(85893),a=n(70024),s=n(41664),r=n.n(s),o=n(11163),i=n(67294),c=n(94693),u=n(85198),d=n(34224),m=n(13150),p=n(11553),f=n(64712),x=n(17799);let h=e=>{let{active:t,completed:n,stepNo:a,step:s,lastStep:r,onClick:o}=e;return(0,l.jsxs)("div",{onClick:()=>n&&o(a),className:"flex items-center justify-center ".concat((n||t)&&"cursor-pointer"),children:[(0,l.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,l.jsx)("span",{className:"".concat(t||n?"bg-primary":"bg-deepGray"," rounded-full px-3 py-1 text-white"),children:a}),(0,l.jsx)("span",{className:"".concat(!(t||n)&&"text-deepGray"),children:s})]}),a!==r&&(0,l.jsx)("span",{className:"lg:block hidden text-deepGray mx-4",children:">"})]})};function g(e){let{stepsData:t,active:n,onClick:a}=e;return(0,l.jsx)("div",{className:"flex lg:flex-row flex-col lg:gap-0 gap-2 lg:items-center items-start my-5",children:null==t?void 0:t.map((e,s)=>(0,l.jsx)(h,{stepNo:s+1,active:n===s+1,completed:n>s+1,step:e,onClick:a,lastStep:t.length},s))})}function v(e){let{formData:t,handleFormDataChange:n,currentStep:a,setCurrentStep:s,loading:r,signupLoading:o,handleSubmit:u,industries:m,STEPS_DATA:x,isGoogleLogin:h}=e,[v,y]=(0,i.useState)({name:"India",dial_code:"+91",code:"IN",emoji:"\uD83C\uDDEE\uD83C\uDDF3"}),j=async e=>{var n;if(e.preventDefault(),null===(n=t.email)||void 0===n?void 0:n.toLowerCase().includes("@gmail.com")){f.A.error("Please enter your company email ID");return}if(!h){let e=(0,p.uo)(t.password);if(e.length>0){f.A.error(e);return}let n=await (0,c.oP)(t.email);if(n){f.A.error("Email Already Exists");return}}s(a+1)};return(0,i.useEffect)(()=>{n("countryCode",v.dial_code)},[v]),(0,l.jsxs)("div",{children:[(0,l.jsx)(g,{stepsData:x,active:a,onClick:e=>s(e)}),1===a&&(0,l.jsxs)("form",{onSubmit:j,className:"flex flex-col gap-5",children:[(0,l.jsx)(d.II,{label:"Enter Name*",placeholder:"Jhon Doe",value:t.name,required:!0,onChange:e=>n("name",e.target.value)}),(0,l.jsx)(d.II,{label:"Please Enter Your Work Email*",placeholder:"[email protected]",type:"email",required:!0,value:t.email,onChange:e=>n("email",e.target.value)}),(0,l.jsx)("div",{children:!h&&(0,l.jsx)(d.II,{label:"Enter Password*",placeholder:"*********",type:"password",required:!0,showTooltip:!1,message:(0,l.jsxs)("p",{children:["At least 8 characters. ",(0,l.jsx)("br",{}),"At least 1 number. ",(0,l.jsx)("br",{}),(0,l.jsxs)("span",{className:"whitespace-nowrap",children:["At least 1 special character. ",(0,l.jsx)("br",{})]}),(0,l.jsx)("span",{className:"whitespace-nowrap",children:"Upper and Lower
1case letters"})]}),toolTipLeft:"left-[-60px]",toolTipTop:"-top-[100px]",value:t.password,isShowPassword:!0,onChange:e=>n("password",e.target.value)})}),a<x.length&&(0,l.jsx)(d.zx,{className:"bg-primary !text-white mt-5 w-full",title:"Continue",type:"submit"})]}),2===a&&(0,l.jsxs)("form",{onSubmit:u,className:"flex flex-col gap-5",children:[(0,l.jsx)(d.II,{label:"Website (URL)*",placeholder:"www.example.com",value:t.companyWebsite,required:!0,onChange:e=>n("companyWebsite",e.target.value)}),(0,l.jsx)(d.II,{label:"Phone Number*",placeholder:"9123456780",type:"number",maxLength:10,isCountry:!0,countryCode:v,setCountryCode:y,value:t.phoneNumber,required:!0,onChange:e=>{n("phoneNumber",e.target.value)}}),(0,l.jsx)(d.Lt,{title:"Select Industry*",placeholder:"Select Industry*",options:m,identifier:"name",emptyStateTitle:"No industry found",required:!0,isTypable:!0,value:t.selectedIndustry,onClick:e=>n("selectedIndustry",e),setValue:e=>{n("selectedIndustry",e)}}),a===x.length&&(0,l.jsx)(d.zx,{title:"Signup",type:"submit",className:"bg-primary !text-white w-full",loading:r||o})]})]})}var y=n(83354);let j=["Basic Details","Company Details"];function b(){var e;let t=(0,o.useRouter)(),[n,s]=(0,i.useContext)(m.s),[,h]=(0,i.useState)(null),[g,b]=(0,i.useState)({name:"",companyWebsite:"",email:"",password:"",selectedIndustry:"",countryCode:"+91"}),[w,N]=(0,i.useState)(!1),[S,C]=(0,i.useState)(1),[k,I]=(0,i.useState)([]),[D,E]=(0,i.useState)(!1),[A,P]=(0,i.useState)(),[,T]=(0,i.useState)(!1),[O,L]=(0,i.useState)(null),[_,R]=(0,a.KO)(y.uS),[q,G]=(0,i.useState)(!1),[W,V]=(0,i.useState)(!1),[F,U]=(0,i.useState)(null),Z=()=>{var e;let t=(null==window?void 0:null===(e=window.location)||void 0===e?void 0:e.origin)+"/signup",n="https://accounts.google.com/o/oauth2/v2/auth?client_id=".concat(u.wL,"&redirect_uri=").concat(encodeURIComponent(t),"&response_type=").concat(u.ux,"&scope=").concat(encodeURIComponent(u.TP));window.location.href=n};(0,i.useEffect)(()=>{(null==n?void 0:n.isLogin)&&t.push("/dashboard")},[n,t]);let z=(e,t)=>{b({...g,[e]:t})},B=e=>{if(e.preventDefault(),!(0,p.zJ)(null==g?void 0:g.companyWebsite)){f.A.error("Please enter a valid URL");return}S===j.length&&(q?(0,c.nR)(g,s,h,t,V,F||(null==_?void 0:_.token)):(0,c.PK)(null==g?void 0:g.email,null==g?void 0:g.password,P,N,E))};return(0,i.useEffect)(()=>{(0,c.$G)(I)},[]),(0,i.useEffect)(()=>{if((null==_?void 0:_.name)&&(null==_?void 0:_.email)){var e;if(null==_?void 0:null===(e=_.email)||void 0===e?void 0:e.toLowerCase().includes("@gmail.com")){f.A.error("Please enter your company email ID"),b({...g,name:null==_?void 0:_.name});return}b({...g,name:null==_?void 0:_.name,email:null==_?void 0:_.email}),U(null==_?void 0:_.token),G(!0),R(y.uS);return}let n=t.asPath.split("#access_token=")[1],l=null==n?void 0:n.split("&")[0];l&&(U(l),(0,c.ci)("signup",l,L,null,t,b,C,G))},[]),(0,i.useEffect)(()=>{O&&(0,c.u9)(O,T,s,h,t)},[O]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"xl:px-20",children:D?(0,l.jsx)(x.Z,{formData:g,uniqueID:A}):(0,l.jsxs)("div",{className:"w-full mt-20",children:[(0,l.jsx)("p",{className:"mb-10 text-2xl font-semibold",children:"Signup"}),(0,l.jsx)(v,{formData:g,handleFormDataChange:z,currentStep:S,setCurrentStep:C,loading:w,signupLoading:W,handleSubmit:B,industries:k,STEPS_DATA:j,isGoogleLogin:q}),1===S&&(null==g?void 0:null===(e=g.email)||void 0===e?void 0:e.length)===0?(0,l.jsx)(d.zx,{prefixIcon:"/onboarding/googleLogo.svg",title:"Signup with Google Workspace",className:"mt-5 w-full",onClick:Z}):(0,l.jsx)("div",{className:"h-4 p-3"}),(0,l.jsxs)("div",{className:"flex items-center justify-center w-full gap-1 my-10 lg:mt-10 lg:my-0",children:[(0,l.jsx)("span",{children:"Already have an account? "}),(0,l.jsx)(r(),{href:"/login",className:"text-primary",children:"Login"})]})]})})})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=98588)}),_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.