(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3901],{23875:(e,s,a)=>{"use strict";a.d(s,{Bs:()=>t,DT:()=>r,Oj:()=>l});let t=e=>{let s=!1,a=!!parseInt(e);return""!==e&&(a&&""!==e?s=!!(8===e.length&&/^\d+\.?\d*$/.test(e)):""!==e&&(s=!!e.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),s)},l=e=>/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*])(?=.*[a-zA-Z]).{8,}$/g.test(e),r=e=>e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},28394:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>l});var t=a(37876);a(14232);let l=function(){return(0,t.jsx)("div",{style:{display:"flex",height:"100vh",justifyContent:"center",alignItems:"center",marginTop:"10px"},children:(0,t.jsx)("h3",{className:"text-xl",children:"Coming Soon..!"})})}},47434:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>g});var t=a(37876),l=a(14232),r=a(3945),n=a(89099),i=a(31777),d=a(99186),o=a(23875),u=a(1785),c=a(48230),h=a.n(c);let g=()=>{let{user:e}=(0,i.d4)(e=>e.auth),s=(0,i.wA)();(0,n.useRouter)();let[a,c]=(0,l.useState)({username:"",password:""}),[g,p]=(0,l.useState)(2),[m,w]=(0,l.useState)(!1),[f,x]=(0,l.useState)(""),j=async e=>{let s=e.target.value;c({...a,username:s}),await v(null==s?void 0:s.trim())},v=(0,l.useCallback)(async e=>{var a;if(!e.length)return p(2);if(!(0,o.Bs)(e))return p(0);w(!0);let t=await s((0,d.Lx)({username:e}));w(!1),p(null==t||null==(a=t.payload)?void 0:a.success)},[p,s]),y=async e=>{e.preventDefault(),await (0,u.R_)(s((0,d.Lx)({username:a.username,password:a.password})),"logging in...","Logged in")};return(0,t.jsx)("div",{className:"login-wrapper sidespace",children:(0,t.jsxs)("div",{className:"login-outer",children:[(0,t.jsxs)("div",{className:"login-inner",children:[(0,t.jsx)("div",{className:"login-logo",children:(0,t.jsx)("img",{src:"/images/new-theme/lokmanya-new-png-logo.webp",height:"100",width:"100px"})}),(0,t.jsxs)("form",{className:"input-fields",onSubmit:y,children:[(0,t.jsx)(r.FO,{id:"email",type:"text",label:"Login via Email Id",value:a.username,onChange:e=>j(e),valid:g,loading:m,placeholder:"Type your email..",required:!0}),1===g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.FO,{type:"password",id:"password",label:"Login Password",value:a.password,onChange:e=>{let s=e.target.value;c({...a,password:s})},error:f,onFocus:()=>x(null),icon:!1,isPass:!0,placeholder:"Type your password",required:!0}),(0,t.jsx)(r.jn,{type:"submit",children:"Sign in"})]})]}),(0,t.jsx)("div",{className:"forget-pass",children:(0,t.jsx)(h(),{href:"/forgot",children:"Forgot Password"})})]}),(0,t.jsx)("div",{className:"copyright",children:(0,t.jsxs)("span",{children:["\xa9 ",new Date().getFullYear()," Lokmanya Hospital. All Right Reserved. Powered by ",(0,t.jsx)("a",{href:"https://www.hatsoffdigital.com/",target:"blank",children:" Hats-Off"})]})})]})})}},58021:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>o});var t=a(37876),l=a(14232),r=a(31777),n=a(28394),i=a(47434),d=a(99186);let o=()=>{let e=(0,r.wA)(),{user:s,accessToken:a}=(0,r.d4)(e=>e.auth);(0,l.useEffect)(()=>{a&&e((0,d.bs)())},[]);let[o,u]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{s?u(!0):u(!1)},[s]),(0,t.jsx)(t.Fragment,{children:o?(0,t.jsx)(n.default,{}):(0,t.jsx)(i.default,{})})}},74621:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/adminpanel",function(){return a(58021)}])}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(74621)),_N_E=e.O()}]);
//# sourceMappingURL=adminpanel-c19c02a6f3d404fe.js.map