PageSourceSearch

https://prajasakti.com/_next/static/chunks/app/%5Blang%5D/(blank-l…/(auth)/register/page-98a320fbb85d2870.js

js prajasakti.com collected 2026-10-02 07:23:23 UTC 7,665 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3048],{74434:function(e,r,a){Promise.resolve().then(a.bind(a,73956))},15109:function(e,r,a){"use strict";a.d(r,{j:function(){return t}});var l=a(57437);let t=e=>{let{label:r,placeHolder:a,type:t="text",onChange:s,disabled:i=!1,error:o,helperText:n,id:d,value:c}=e;return(0,l.jsxs)("div",{children:[r&&(0,l.jsx)("label",{htmlFor:d,className:"mb-[0.3rem] "+(o?"text-red-500":""),children:r}),(0,l.jsx)("input",{type:t,placeholder:a||"",onChange:s,disabled:i,id:d,className:"bg-white dark:bg-transparent dark:text-white rounded-md w-full h-[55px] outline-none text-[15px] px-[15px] placeholder:text-[#5a5a5a] border "+(o?"border-red-500":"border-[#dedede]"),value:c}),o&&n&&(0,l.jsx)("span",{className:"mt-2 text-sm text-red-500",children:n})]})}},98104:function(e,r,a){"use strict";a.d(r,{bW:function(){return t},g0:function(){return i},uB:function(){return s}});let l="authToken";function t(){try{return localStorage.getItem(l)}catch(e){return null}}function s(e){try{e?localStorage.setItem(l,e):localStorage.removeItem(l)}catch(e){}}function i(){let e=t();return e?{Authorization:"Bearer ".concat(e)}:{}}},73956:function(e,r,a){"use strict";a.d(r,{default:function(){return E}});var l=a(57437),t=a(27648),s=a(77314),i=a(34422),o=a(2265),n=a(99376),d=a(20437),c=a(15109),u=a(25137),m=a(99671),h=a(10720),x=a(60415),p=a(75414),N=a(80426),f=a(81609),v=a(65443),g=a(89693),b=a(24062);function E(){let[e,r]=(0,o.useState)(""),{showMessage:a}=(0,p.U)(),{darkMode:E}=(0,x.F)(),j=(0,n.useRouter)(),T=(0,n.useSearchParams)().get("r"),_=(0,n.usePathname)(),w=(0,g.mS)(_)||"te-IN",S=(0,g.Af)(_),A=(null==w?void 0:w.split("-")[0])||"en",{user:I}=(0,N.E)();(0,o.useEffect)(()=>{if(I){if(T){let e=T.replace(/^\/(en-IN|te-IN)(?=\/|$)/i,"")||T,r=e.startsWith("/")?e:"/".concat(e);j.replace("".concat(S).concat(r))}else j.replace(S||"/")}},[I,S,T,j]);let R=i.Ry({fullName:i.Z_().trim().required((0,v.id)(A,"REQUIRED")),email:i.Z_().email((0,v.id)(A,"VALID_EMAIL")).trim().required((0,v.id)(A,"REQUIRED")),phoneNumber:i.Z_().matches(/^[0-9]{10}$/,(0,v.id)(A,"VALID_PHONE_10")).required((0,v.id)(A,"REQUIRED")),password:i.Z_().min(8,(0,v.id)(A,"MIN_8_CHARS")).required((0,v.id)(A,"REQUIRED")),confirmPassword:i.Z_().oneOf([i.iH("password")],(0,v.id)(A,"PASSWORD_MUST_MATCH")).required((0,v.id)(A,"REQUIRED"))}),C=(0,s.TA)({initialValues:{fullName:"",email:"",phoneNumber:"",password:"",confirmPassword:""},validationSchema:R,onSubmit:async(e,l)=>{let{resetForm:t}=l;r("");try{var s,i,o,n,d,c;let l=null==e?void 0:null===(i=e.fullName)||void 0===i?void 0:null===(s=i.trim())||void 0===s?void 0:s.split(" "),u=await fetch("".concat(m.Z.publicServerUrl,"/api/users/reader-user"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fullName:null==e?void 0:e.fullName,firstName:l[0],lastName:l[1]||"",email:e.email,phoneNumber:e.phoneNumber,password:e.password}),credentials:"include"});if(!u.ok){let e=(0,v.id)(A,"INVALID_CREDENTIALS");try{let r=await u.json();e=(null==r?void 0:null===(n=r.data)||void 0===n?void 0:null===(o=n[0])||void 0===o?void 0:o.message)||(null==r?void 0:null===(c=r.errors)||void 0===c?void 0:null===(d=c[0])||void 0===d?void 0:d.message)||(null==r?void 0:r.message)||e}catch(r){e=404===u.status?(0,v.id)(A,"REGISTRATION_SERVICE_UNAVAILABLE"):(0,v.id)(A,"REGISTRATION_FAILED")}r((0,b.f)(e,A));return}a("success",(0,v.id)(A,"REGISTRATION_SUCCESSFUL")),t(),T?j.push("".concat(S||"","/login?r=").concat(T)):j.push("".concat(S||"","/login"))}catch(e){r((0,b.f)(null==e?void 0:e.message,A)||(0,v.id)(A,"TRY_AGAIN"))}}});return I?null:(0,l.jsxs)("div",{className:"h-full",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center justify-between gap-4 py-6 md:flex-row",children:[(0,l.jsx)(t.default,{href:"/","aria-label":"Go to home page",children:(0,l.jsx)("img",{className:"h-[30px] lg:h-[35px] object-cover",alt:f.fC,src:f.S_})}),(0,l.jsxs)("span",{className:"text-[15px] dark:text-secondaryText",children:[(0,v.id)(A,"HAVE_ACCOUNT")," ",(0,l.jsx)(t.default,{href:T?"/".concat(w,"/login?r=").concat(T):"/".concat(w,"/login"),
1className:"text-primaryColor font-medium","aria-label":"Go to sign in",children:(0,v.id)(A,"SIGN_IN")})]})]}),(0,l.jsx)("div",{className:"flex lg:items-center lg:justify-center min-h-[75vh] pt-8",children:(0,l.jsxs)("div",{className:"w-full max-w-[400px] mx-auto",children:[(0,l.jsxs)(u.Z,{variant:"h4",className:"text-center",children:[(0,v.id)(A,"GET_STARTED_WITH")," ",f.fC]}),(0,l.jsx)("span",{className:"block text-center text-[#7E7E7E] text-[15px] mt-1 dark:text-secondaryText",children:(0,v.id)(A,"GETTING_STARTED_EASY")}),(0,l.jsxs)("div",{className:"mt-6",children:[(0,l.jsx)("div",{className:"flex flex-col items-center justify-center gap-4 md:flex-row",children:(0,l.jsx)("a",{href:"".concat(m.Z.publicServerUrl,"/oauth2/authorize"),className:"block w-full md:w-auto","aria-label":"Register via google",children:(0,l.jsxs)("button",{className:"bg-white border border-[#DEDEDE] flex items-center gap-2 justify-center text-sm w-full md:w-[140px] h-[40px] rounded-md","aria-label":"Google",children:[(0,l.jsx)("img",{src:"/images/google.svg",alt:"google",className:"w-[20px] h-[20px] object-cover",loading:"lazy"}),"Google"]})})}),(0,l.jsxs)("div",{className:"flex items-center gap-3 mt-4",children:[(0,l.jsx)("span",{className:"block h-[1px] bg-[#DBDBDB] flex-1"}),(0,l.jsx)("span",{className:"block text-center text-[15px] dark:text-secondaryText",children:(0,v.id)(A,"OR_CONTINUE_WITH")}),(0,l.jsx)("span",{className:"block h-[1px] bg-[#DBDBDB] flex-1"})]})]}),(0,l.jsxs)("form",{className:"mt-6 login-form",onSubmit:C.handleSubmit,children:[(0,l.jsx)("div",{children:(0,l.jsx)(c.j,{placeHolder:(0,v.id)(A,"FULL_NAME"),id:"fullName",value:C.values.fullName,onChange:C.handleChange,error:C.touched.fullName&&!!C.errors.fullName,helperText:C.touched.fullName?C.errors.fullName:void 0})}),(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)(c.j,{placeHolder:(0,v.id)(A,"ENTER_EMAIL"),id:"email",value:C.values.email,onChange:C.handleChange,error:C.touched.email&&!!C.errors.email,helperText:C.touched.email?C.errors.email:void 0})}),(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)(c.j,{type:"number",placeHolder:(0,v.id)(A,"ENTER_PHONE"),id:"phoneNumber",value:C.values.phoneNumber,onChange:C.handleChange,error:C.touched.phoneNumber&&!!C.errors.phoneNumber,helperText:C.touched.phoneNumber?C.errors.phoneNumber:void 0})}),(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)(d.E,{placeHolder:(0,v.id)(A,"PASSWORD"),id:"password",value:C.values.password,onChange:C.handleChange,error:C.touched.password&&!!C.errors.password,helperText:C.touched.password?C.errors.password:void 0})}),(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)(d.E,{placeHolder:(0,v.id)(A,"CONFIRM_PASSWORD"),id:"confirmPassword",value:C.values.confirmPassword,onChange:C.handleChange,error:C.touched.confirmPassword&&!!C.errors.confirmPassword,helperText:C.touched.confirmPassword?C.errors.confirmPassword:void 0})}),e&&(0,l.jsx)("div",{"aria-live":"polite",className:"mt-4",children:(0,l.jsx)("span",{className:"block text-sm text-red-500",children:e})}),(0,l.jsx)("button",{className:"mt-6 login-btn",disabled:C.isSubmitting,"aria-label":"Create Account",children:C.isSubmitting?(0,l.jsx)(h.Z,{}):(0,v.id)(A,"CREATE_ACCOUNT")})]}),(0,l.jsx)("span",{className:"block text-[#5A5A5A] text-center text-[15px] mt-8 dark:text-secondaryText",children:(0,v.id)(A,"TERMS_AGREE")})]})})]})}}},function(e){e.O(0,[6962,7259,7699,7648,1546,2125,426,7263,2971,6763,1744],function(){return e(e.s=74434)}),_N_E=e.O()}]);
2//# sourceMappingURL=page-98a320fbb85d2870.js.map

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.