@neuctra/authix 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3723,7 +3723,7 @@ const Ns = [
3723
3723
  const ne = "a_s_b", oe = "true", B = /* @__PURE__ */ new Date();
3724
3724
  B.setTime(B.getTime() + 3600 * 1e3), document.cookie = `${ne}=${oe}; path=/; expires=${B.toUTCString()}; SameSite=Lax`;
3725
3725
  }
3726
- A({ type: "success", text: `Welcome ${D.name}` }), d?.(D);
3726
+ A({ type: "success", text: `Welcome ${D.name}` }), d?.(D), typeof window < "u" && window.location.reload();
3727
3727
  } catch (S) {
3728
3728
  const D = S.message || "Login failed";
3729
3729
  A({ type: "error", text: D }), f?.(S);
@@ -209,7 +209,7 @@ React keys must be passed directly to JSX without using spread:
209
209
  from { transform: rotate(0deg); }
210
210
  to { transform: rotate(360deg); }
211
211
  }
212
- `})]})},Xn=({logoUrl:t,logoLinkUrl:e,title:n="Sign In to Your Account",subtitle:s="Welcome back! Please enter your details",primaryColor:i="#00C214",gradient:o="linear-gradient(135deg, #22c55e, #00C214)",darkMode:a=!0,signupUrl:c,onSuccess:d,onError:x})=>{const p=fe(),[y,k]=S.useState("login"),[T,u]=S.useState(1),[w,h]=S.useState(!1),[_,C]=S.useState(!1),[g,z]=S.useState(null),[D,b]=S.useState(""),[j,q]=S.useState(""),[I,X]=S.useState({email:"",otp:"",newPassword:""}),[W,P]=S.useState(!1),G=a?"#ffffff":"#111827",O=a?"#a1a1aa":"#6b7280",R=a?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)",M=a?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)";S.useEffect(()=>{if(typeof window<"u"){const m=()=>P(window.innerWidth<768);return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)}},[]);const K=async m=>{m.preventDefault(),C(!0),z(null);try{const E=await p.loginUser({email:D,password:j}),{user:U}=E;if(!U)throw new Error(E.message||"Login failed");if(typeof document<"u"){const ne="a_s_b",le="true",B=new Date;B.setTime(B.getTime()+3600*1e3),document.cookie=`${ne}=${le}; path=/; expires=${B.toUTCString()}; SameSite=Lax`}z({type:"success",text:`Welcome ${U.name}`}),d?.(U)}catch(E){const U=E.message||"Login failed";z({type:"error",text:U}),x?.(E)}finally{C(!1)}},H=m=>{X({...I,[m.target.name]:m.target.value})},L=async m=>{m.preventDefault(),C(!0),z(null);try{const E=await p.requestResetUserPasswordOTP({email:I.email});E.success?(u(2),z({type:"success",text:E.message||"OTP sent to your email"})):z({type:"error",text:E.message||"Failed to send OTP"})}catch(E){z({type:"error",text:E.message||"Something went wrong"})}finally{C(!1)}},J=async m=>{m.preventDefault(),C(!0),z(null);try{const E=await p.resetUserPassword({email:I.email,otp:I.otp,newPassword:I.newPassword});E.success?(z({type:"success",text:E.message||"Password reset successfully!"}),u(1),X({email:"",otp:"",newPassword:""}),k("login")):z({type:"error",text:E.message||"Reset failed"})}catch(E){z({type:"error",text:E.message||"Something went wrong"})}finally{C(!1)}},l={width:"100%",padding:W?"10px 14px 10px 44px":"10px 16px 10px 44px",backgroundColor:R,border:`1px solid ${M}`,borderRadius:"10px",color:G,fontSize:"15px",outline:"none",transition:"all 0.2s ease"};return r.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsxs("div",{style:{minWidth:W?"320px":"380px",maxWidth:W?"340px":"390px",width:"100%",display:"flex",flexDirection:"column",borderRadius:"10px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",backgroundColor:a?"#000000":"#ffffff",padding:W?"30px 24px":"18px 28px"},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"10px"},children:[t?r.jsx("a",{href:e||"/",target:"_self",rel:"noopener noreferrer",children:r.jsx("img",{src:t,alt:"Logo",style:{height:"50px",width:"50px",marginBottom:"10px"}})}):r.jsx(Se,{size:40,color:i,style:{marginBottom:"10px"}}),r.jsx("h2",{style:{fontSize:"24px",fontWeight:700,color:G,margin:0},children:y==="login"?n:T===1?"Forgot Password":"Reset Password"}),r.jsx("p",{style:{fontSize:"14px",color:O},children:y==="login"?s:"Follow the steps to reset your password"})]}),y==="login"&&r.jsxs("form",{onSubmit:K,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[r.jsx("label",{htmlFor:"login-email",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"Email Address"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(pe,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"login-email",type:"email",placeholder:"Enter your email",value:D,onChange:m=>b(m.target.value),style:l})]})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[r.jsx("label",{htmlFor:"login-password",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"Password"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"login-password",type:w?"text":"password",placeholder:"Enter your password",value:j,onChange:m=>q(m.target.value),style:l}),r.jsx("button",{type:"button",onClick:()=>h(!w),style:{position:"absolute",right:"14px",padding:"4px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:O,cursor:"pointer"},children:w?r.jsx(rt,{size:20}):r.jsx(nt,{size:20})})]})]}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:[c&&r.jsx("a",{href:c,style:{color:i,textDecoration:"none",fontWeight:500},children:"Create new account"}),r.jsx("button",{type:"button",onClick:()=>k("forgot"),style:{background:"none",border:"none",color:i,fontWeight:500,cursor:"pointer"},children:"Forgot password?"})]}),r.jsx("button",{type:"submit",disabled:_,style:{padding:"12px",background:o,color:"#fff",border:"none",borderRadius:"10px",fontSize:"14px",fontWeight:600},children:_?"Signing In...":"Sign In"})]}),y==="forgot"&&r.jsxs("form",{onSubmit:T===1?L:J,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[T===1?r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[r.jsx("label",{htmlFor:"forgot-email",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"Email Address"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(pe,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"forgot-email",type:"email",name:"email",placeholder:"Enter your email",value:I.email,onChange:H,style:l})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[r.jsx("label",{htmlFor:"otp",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"One-Time Password (OTP)"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(Qt,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"otp",type:"text",name:"otp",placeholder:"Enter OTP",value:I.otp,onChange:H,style:l})]})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[r.jsx("label",{htmlFor:"newPassword",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"New Password"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"newPassword",type:"password",name:"newPassword",placeholder:"Enter new password",value:I.newPassword,onChange:H,style:l})]})]})]}),r.jsx("button",{type:"submit",disabled:_,style:{padding:"12px",background:o,color:"#fff",border:"none",fontSize:"14px",borderRadius:"10px",fontWeight:600},children:_?"Please wait...":T===1?"Send Reset OTP":"Reset Password"}),r.jsx("button",{type:"button",onClick:()=>{k("login"),u(1)},style:{background:"none",border:"none",fontSize:"14px",color:O,marginTop:"6px",cursor:"pointer"},children:"Back to Login"})]}),g&&r.jsxs("div",{style:{marginTop:"16px",padding:"12px",borderRadius:"12px",fontSize:"14px",display:"flex",alignItems:"center",gap:"10px",backgroundColor:g.type==="success"?`${i}15`:"rgba(239,68,68,0.1)",border:g.type==="success"?`1px solid ${i}30`:"1px solid rgba(239,68,68,0.3)",color:g.type==="success"?i:"#ef4444"},children:[g.type==="success"?r.jsx(de,{size:20}):r.jsx(ie,{size:20}),r.jsx("span",{children:g.text})]}),r.jsxs("div",{style:{textAlign:"center",fontSize:"12px",color:O,marginTop:"16px",padding:"0 4px"},children:["Secure authentication powered by"," ",r.jsx("span",{style:{color:i,fontWeight:600},children:"Neuctra Authix"})]})]})})},Zn=({children:t,fallback:e=null})=>{const n=fe(),[s,i]=S.useState("loading");S.useEffect(()=>{(async()=>{if(!(document.cookie.split(";").map(p=>p.trim()).find(p=>p.startsWith("a_s_b="))?.split("=")[1]==="true")){i("unauthenticated");return}try{(await n.checkUserSession())?.user?.id?i("authenticated"):(document.cookie="a_s_b=false; path=/; max-age=0; SameSite=Lax",i("unauthenticated"))}catch(p){console.error("Session validation failed:",p),document.cookie="a_s_b=false; path=/; max-age=0; SameSite=Lax",i("unauthenticated")}})()},[n]);const o=a=>typeof a=="function"?a():a;return s==="loading"?null:s==="unauthenticated"?o(e)??null:r.jsx(r.Fragment,{children:t})},Qn=({children:t,fallback:e=null})=>{const[n,s]=S.useState(!1),[i,o]=S.useState(null);if(S.useEffect(()=>{s(!0);const d=document.cookie.split(";").map(x=>x.trim()).find(x=>x.startsWith("a_s_b="));o(d?.split("=")[1]!=="true")},[]),!n)return null;const a=c=>typeof c=="function"?c():c;return i===null?a(e)??null:i?r.jsx(r.Fragment,{children:t}):a(e)},es=({isOpen:t,onClose:e,onSuccess:n,onError:s,userId:i,colors:o})=>{const a=fe(),[c,d]=S.useState(!1),[x,p]=S.useState(""),[y,k]=S.useState("warning"),[T,u]=S.useState(!1);if(S.useEffect(()=>{if(typeof window>"u")return;const g=()=>{u(window.innerWidth<640)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),!t)return null;const w=async()=>{d(!0),k("processing");try{const g=await a.deleteUser({userId:i});g.success?(n(g.message||"Account deleted successfully"),k("success"),setTimeout(()=>{localStorage.removeItem("userInfo"),localStorage.removeItem("userToken"),window.location.href="/"},2e3)):(s(g.message||"Failed to delete account"),k("warning"))}catch(g){s(g.response?.data?.message||"Something went wrong"),k("warning")}finally{d(!1)}},h=x.toLowerCase()==="delete my account",_=g=>{g.target===g.currentTarget&&y!=="processing"&&y!=="success"&&e()},C=()=>{switch(y){case"warning":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",gap:"16px"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #ef4444, #dc2626)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(Me,{size:20})}),r.jsx("div",{children:r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Delete Account"})})]}),r.jsx("button",{onClick:e,"aria-label":"Close modal",style:{background:"transparent",border:"none",color:o.textTertiary,cursor:"pointer",padding:"8px",borderRadius:"8px",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.2s ease"},onMouseOver:g=>{g.currentTarget.style.backgroundColor=o.border,g.currentTarget.style.color=o.textPrimary},onMouseOut:g=>{g.currentTarget.style.backgroundColor="transparent",g.currentTarget.style.color=o.textTertiary},children:r.jsx(_e,{size:20})})]}),r.jsxs("div",{style:{display:"flex",gap:"16px",padding:"20px",background:`${o.error}15`,border:`1px solid ${o.error}30`,borderRadius:"12px",marginBottom:"20px"},children:[r.jsx("div",{style:{color:o.error,flexShrink:0,display:"flex",alignItems:"flex-start"},children:r.jsx(tr,{size:24})}),r.jsxs("div",{style:{flex:1},children:[r.jsx("h4",{style:{color:o.textPrimary,margin:"0 0 12px 0",fontSize:"16px",fontWeight:600},children:"Before you proceed..."}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[{icon:r.jsx(Dn,{size:16}),text:"All your data will be permanently deleted"},{icon:r.jsx(Jn,{size:16}),text:"This action cannot be reversed"},{icon:r.jsx(it,{size:16}),text:"You will lose access to all services"}].map((g,z)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px",color:o.textSecondary},children:[r.jsx("div",{style:{color:o.error,flexShrink:0},children:g.icon}),r.jsx("span",{children:g.text})]},z))})]})]}),r.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:T?"column-reverse":"row",justifyContent:"flex-end",alignItems:"stretch"},children:[r.jsx("button",{onClick:e,style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:T?"none":1,minWidth:T?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:g=>{g.currentTarget.style.backgroundColor=o.border,g.currentTarget.style.transform="translateY(-1px)"},onMouseOut:g=>{g.currentTarget.style.backgroundColor="transparent",g.currentTarget.style.transform="translateY(0)"},children:"Cancel"}),r.jsxs("button",{onClick:()=>k("confirmation"),style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:"pointer",flex:T?"none":1,minWidth:T?"100%":"140px",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:g=>{g.currentTarget.style.transform="translateY(-1px)",g.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)"},onMouseOut:g=>{g.currentTarget.style.transform="translateY(0)",g.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)"},children:[r.jsx(Me,{size:16}),"Continue to Delete"]})]})]});case"confirmation":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #f59e0b, #d97706)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(tr,{size:24})}),r.jsx("div",{style:{flex:1},children:r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Confirm Deletion"})})]}),r.jsxs("div",{style:{marginBottom:"24px"},children:[r.jsxs("p",{style:{color:o.textSecondary,marginBottom:"16px",fontSize:"14px",lineHeight:"1.5"},children:["Type"," ",r.jsx("strong",{style:{color:o.textPrimary},children:'"delete my account"'})," ","to confirm:"]}),r.jsx("input",{type:"text",value:x,onChange:g=>p(g.target.value),placeholder:"delete my account",style:{width:"100%",padding:"14px 16px",borderRadius:"10px",border:`2px solid ${h?o.success:o.error}`,backgroundColor:"transparent",color:o.textPrimary,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:g=>{g.target.style.boxShadow=`0 0 0 3px ${o.accent}20`},onBlur:g=>{g.target.style.boxShadow="none"},autoFocus:!0}),h&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"10px",color:o.success,fontSize:"14px",fontWeight:500},children:[r.jsx(tt,{size:16}),r.jsx("span",{children:"Confirmation accepted"})]})]}),r.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:"column-reverse",justifyContent:"flex-end",alignItems:"stretch"},children:[r.jsx("button",{onClick:()=>{k("warning"),p("")},style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:T?"none":1,minWidth:T?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:g=>{g.currentTarget.style.backgroundColor=o.border,g.currentTarget.style.transform="translateY(-1px)"},onMouseOut:g=>{g.currentTarget.style.backgroundColor="transparent",g.currentTarget.style.transform="translateY(0)"},children:"Go Back"}),r.jsxs("button",{onClick:w,disabled:!h||c,style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:!h||c?"not-allowed":"pointer",flex:T?"none":1,minWidth:T?"100%":"140px",opacity:!h||c?.6:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:!h||c?"none":"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:g=>{h&&!c&&(g.currentTarget.style.transform="translateY(-1px)",g.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)")},onMouseOut:g=>{h&&!c&&(g.currentTarget.style.transform="translateY(0)",g.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)")},children:[r.jsx(Me,{size:16}),"Yes, Delete My Account"]})]})]});case"processing":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #6b7280, #4b5563)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(oe,{size:20,style:{animation:"spin 1s linear infinite"}})}),r.jsxs("div",{style:{flex:1},children:[r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Deleting Account"}),r.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Please wait while we process your request"})]})]}),r.jsx("div",{style:{marginBottom:"20px"},children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[{text:"Removing your data",active:!0},{text:"Closing active sessions",active:!1},{text:"Finalizing deletion",active:!1}].map((g,z)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",borderRadius:"8px",transition:"all 0.2s ease",backgroundColor:g.active?`${o.accent}10`:"transparent"},children:[r.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:g.active?o.accent:o.textTertiary,transition:"all 0.3s ease",boxShadow:g.active?`0 0 0 4px ${o.accent}20`:"none"}}),r.jsx("span",{style:{fontSize:"14px",color:g.active?o.textPrimary:o.textSecondary,fontWeight:g.active?500:400},children:g.text})]},z))})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary},children:[r.jsx(er,{size:18,style:{color:o.accent,flexShrink:0}}),r.jsx("span",{children:"You will be redirected to the login page shortly"})]})]});case"success":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #10b981, #059669)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(tt,{size:20})}),r.jsxs("div",{style:{flex:1},children:[r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Account Deleted"}),r.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Your account has been successfully deleted"})]})]}),r.jsxs("div",{style:{textAlign:"center",padding:"20px",background:`${o.success}10`,border:`1px solid ${o.success}20`,borderRadius:"12px",marginBottom:"24px"},children:[r.jsx(tt,{size:48,style:{color:o.success,marginBottom:"12px",display:"block",margin:"0 auto 12px auto"}}),r.jsx("p",{style:{color:o.textPrimary,fontSize:"16px",fontWeight:600,margin:"0 0 8px 0"},children:"Goodbye!"}),r.jsx("p",{style:{color:o.textSecondary,fontSize:"14px",margin:0,lineHeight:"1.5"},children:"Your account and all associated data have been permanently removed from our systems."})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary,justifyContent:"center"},children:[r.jsx(oe,{size:16,style:{animation:"spin 1s linear infinite",color:o.accent}}),r.jsx("span",{children:"Redirecting to login page..."})]})]})}};return r.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.8)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:1e4,animation:"fadeIn 0.3s ease-out"},onClick:_,children:[r.jsx("div",{style:{backgroundColor:o.surface,border:`1px solid ${o.border}`,borderRadius:"20px",width:"100%",maxWidth:"480px",padding:"24px",boxShadow:"0 32px 64px rgba(0,0,0,0.4)",animation:"scaleIn 0.3s ease-out"},className:"delete-modal-container",children:C()}),r.jsx("style",{children:`
212
+ `})]})},Xn=({logoUrl:t,logoLinkUrl:e,title:n="Sign In to Your Account",subtitle:s="Welcome back! Please enter your details",primaryColor:i="#00C214",gradient:o="linear-gradient(135deg, #22c55e, #00C214)",darkMode:a=!0,signupUrl:c,onSuccess:d,onError:x})=>{const p=fe(),[y,k]=S.useState("login"),[T,u]=S.useState(1),[w,h]=S.useState(!1),[_,C]=S.useState(!1),[g,z]=S.useState(null),[D,b]=S.useState(""),[j,q]=S.useState(""),[I,X]=S.useState({email:"",otp:"",newPassword:""}),[W,P]=S.useState(!1),G=a?"#ffffff":"#111827",O=a?"#a1a1aa":"#6b7280",R=a?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)",M=a?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)";S.useEffect(()=>{if(typeof window<"u"){const m=()=>P(window.innerWidth<768);return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)}},[]);const K=async m=>{m.preventDefault(),C(!0),z(null);try{const E=await p.loginUser({email:D,password:j}),{user:U}=E;if(!U)throw new Error(E.message||"Login failed");if(typeof document<"u"){const ne="a_s_b",le="true",B=new Date;B.setTime(B.getTime()+3600*1e3),document.cookie=`${ne}=${le}; path=/; expires=${B.toUTCString()}; SameSite=Lax`}z({type:"success",text:`Welcome ${U.name}`}),d?.(U),typeof window<"u"&&window.location.reload()}catch(E){const U=E.message||"Login failed";z({type:"error",text:U}),x?.(E)}finally{C(!1)}},H=m=>{X({...I,[m.target.name]:m.target.value})},L=async m=>{m.preventDefault(),C(!0),z(null);try{const E=await p.requestResetUserPasswordOTP({email:I.email});E.success?(u(2),z({type:"success",text:E.message||"OTP sent to your email"})):z({type:"error",text:E.message||"Failed to send OTP"})}catch(E){z({type:"error",text:E.message||"Something went wrong"})}finally{C(!1)}},J=async m=>{m.preventDefault(),C(!0),z(null);try{const E=await p.resetUserPassword({email:I.email,otp:I.otp,newPassword:I.newPassword});E.success?(z({type:"success",text:E.message||"Password reset successfully!"}),u(1),X({email:"",otp:"",newPassword:""}),k("login")):z({type:"error",text:E.message||"Reset failed"})}catch(E){z({type:"error",text:E.message||"Something went wrong"})}finally{C(!1)}},l={width:"100%",padding:W?"10px 14px 10px 44px":"10px 16px 10px 44px",backgroundColor:R,border:`1px solid ${M}`,borderRadius:"10px",color:G,fontSize:"15px",outline:"none",transition:"all 0.2s ease"};return r.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsxs("div",{style:{minWidth:W?"320px":"380px",maxWidth:W?"340px":"390px",width:"100%",display:"flex",flexDirection:"column",borderRadius:"10px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",backgroundColor:a?"#000000":"#ffffff",padding:W?"30px 24px":"18px 28px"},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"10px"},children:[t?r.jsx("a",{href:e||"/",target:"_self",rel:"noopener noreferrer",children:r.jsx("img",{src:t,alt:"Logo",style:{height:"50px",width:"50px",marginBottom:"10px"}})}):r.jsx(Se,{size:40,color:i,style:{marginBottom:"10px"}}),r.jsx("h2",{style:{fontSize:"24px",fontWeight:700,color:G,margin:0},children:y==="login"?n:T===1?"Forgot Password":"Reset Password"}),r.jsx("p",{style:{fontSize:"14px",color:O},children:y==="login"?s:"Follow the steps to reset your password"})]}),y==="login"&&r.jsxs("form",{onSubmit:K,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[r.jsx("label",{htmlFor:"login-email",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"Email Address"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(pe,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"login-email",type:"email",placeholder:"Enter your email",value:D,onChange:m=>b(m.target.value),style:l})]})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[r.jsx("label",{htmlFor:"login-password",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"Password"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"login-password",type:w?"text":"password",placeholder:"Enter your password",value:j,onChange:m=>q(m.target.value),style:l}),r.jsx("button",{type:"button",onClick:()=>h(!w),style:{position:"absolute",right:"14px",padding:"4px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:O,cursor:"pointer"},children:w?r.jsx(rt,{size:20}):r.jsx(nt,{size:20})})]})]}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:[c&&r.jsx("a",{href:c,style:{color:i,textDecoration:"none",fontWeight:500},children:"Create new account"}),r.jsx("button",{type:"button",onClick:()=>k("forgot"),style:{background:"none",border:"none",color:i,fontWeight:500,cursor:"pointer"},children:"Forgot password?"})]}),r.jsx("button",{type:"submit",disabled:_,style:{padding:"12px",background:o,color:"#fff",border:"none",borderRadius:"10px",fontSize:"14px",fontWeight:600},children:_?"Signing In...":"Sign In"})]}),y==="forgot"&&r.jsxs("form",{onSubmit:T===1?L:J,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[T===1?r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[r.jsx("label",{htmlFor:"forgot-email",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"Email Address"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(pe,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"forgot-email",type:"email",name:"email",placeholder:"Enter your email",value:I.email,onChange:H,style:l})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[r.jsx("label",{htmlFor:"otp",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"One-Time Password (OTP)"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(Qt,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"otp",type:"text",name:"otp",placeholder:"Enter OTP",value:I.otp,onChange:H,style:l})]})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[r.jsx("label",{htmlFor:"newPassword",style:{fontSize:"14px",fontWeight:500,color:a?"#ffffff":"#000000"},children:"New Password"}),r.jsxs("div",{style:{position:"relative"},children:[r.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:O}}),r.jsx("input",{id:"newPassword",type:"password",name:"newPassword",placeholder:"Enter new password",value:I.newPassword,onChange:H,style:l})]})]})]}),r.jsx("button",{type:"submit",disabled:_,style:{padding:"12px",background:o,color:"#fff",border:"none",fontSize:"14px",borderRadius:"10px",fontWeight:600},children:_?"Please wait...":T===1?"Send Reset OTP":"Reset Password"}),r.jsx("button",{type:"button",onClick:()=>{k("login"),u(1)},style:{background:"none",border:"none",fontSize:"14px",color:O,marginTop:"6px",cursor:"pointer"},children:"Back to Login"})]}),g&&r.jsxs("div",{style:{marginTop:"16px",padding:"12px",borderRadius:"12px",fontSize:"14px",display:"flex",alignItems:"center",gap:"10px",backgroundColor:g.type==="success"?`${i}15`:"rgba(239,68,68,0.1)",border:g.type==="success"?`1px solid ${i}30`:"1px solid rgba(239,68,68,0.3)",color:g.type==="success"?i:"#ef4444"},children:[g.type==="success"?r.jsx(de,{size:20}):r.jsx(ie,{size:20}),r.jsx("span",{children:g.text})]}),r.jsxs("div",{style:{textAlign:"center",fontSize:"12px",color:O,marginTop:"16px",padding:"0 4px"},children:["Secure authentication powered by"," ",r.jsx("span",{style:{color:i,fontWeight:600},children:"Neuctra Authix"})]})]})})},Zn=({children:t,fallback:e=null})=>{const n=fe(),[s,i]=S.useState("loading");S.useEffect(()=>{(async()=>{if(!(document.cookie.split(";").map(p=>p.trim()).find(p=>p.startsWith("a_s_b="))?.split("=")[1]==="true")){i("unauthenticated");return}try{(await n.checkUserSession())?.user?.id?i("authenticated"):(document.cookie="a_s_b=false; path=/; max-age=0; SameSite=Lax",i("unauthenticated"))}catch(p){console.error("Session validation failed:",p),document.cookie="a_s_b=false; path=/; max-age=0; SameSite=Lax",i("unauthenticated")}})()},[n]);const o=a=>typeof a=="function"?a():a;return s==="loading"?null:s==="unauthenticated"?o(e)??null:r.jsx(r.Fragment,{children:t})},Qn=({children:t,fallback:e=null})=>{const[n,s]=S.useState(!1),[i,o]=S.useState(null);if(S.useEffect(()=>{s(!0);const d=document.cookie.split(";").map(x=>x.trim()).find(x=>x.startsWith("a_s_b="));o(d?.split("=")[1]!=="true")},[]),!n)return null;const a=c=>typeof c=="function"?c():c;return i===null?a(e)??null:i?r.jsx(r.Fragment,{children:t}):a(e)},es=({isOpen:t,onClose:e,onSuccess:n,onError:s,userId:i,colors:o})=>{const a=fe(),[c,d]=S.useState(!1),[x,p]=S.useState(""),[y,k]=S.useState("warning"),[T,u]=S.useState(!1);if(S.useEffect(()=>{if(typeof window>"u")return;const g=()=>{u(window.innerWidth<640)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),!t)return null;const w=async()=>{d(!0),k("processing");try{const g=await a.deleteUser({userId:i});g.success?(n(g.message||"Account deleted successfully"),k("success"),setTimeout(()=>{localStorage.removeItem("userInfo"),localStorage.removeItem("userToken"),window.location.href="/"},2e3)):(s(g.message||"Failed to delete account"),k("warning"))}catch(g){s(g.response?.data?.message||"Something went wrong"),k("warning")}finally{d(!1)}},h=x.toLowerCase()==="delete my account",_=g=>{g.target===g.currentTarget&&y!=="processing"&&y!=="success"&&e()},C=()=>{switch(y){case"warning":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",gap:"16px"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #ef4444, #dc2626)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(Me,{size:20})}),r.jsx("div",{children:r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Delete Account"})})]}),r.jsx("button",{onClick:e,"aria-label":"Close modal",style:{background:"transparent",border:"none",color:o.textTertiary,cursor:"pointer",padding:"8px",borderRadius:"8px",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.2s ease"},onMouseOver:g=>{g.currentTarget.style.backgroundColor=o.border,g.currentTarget.style.color=o.textPrimary},onMouseOut:g=>{g.currentTarget.style.backgroundColor="transparent",g.currentTarget.style.color=o.textTertiary},children:r.jsx(_e,{size:20})})]}),r.jsxs("div",{style:{display:"flex",gap:"16px",padding:"20px",background:`${o.error}15`,border:`1px solid ${o.error}30`,borderRadius:"12px",marginBottom:"20px"},children:[r.jsx("div",{style:{color:o.error,flexShrink:0,display:"flex",alignItems:"flex-start"},children:r.jsx(tr,{size:24})}),r.jsxs("div",{style:{flex:1},children:[r.jsx("h4",{style:{color:o.textPrimary,margin:"0 0 12px 0",fontSize:"16px",fontWeight:600},children:"Before you proceed..."}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[{icon:r.jsx(Dn,{size:16}),text:"All your data will be permanently deleted"},{icon:r.jsx(Jn,{size:16}),text:"This action cannot be reversed"},{icon:r.jsx(it,{size:16}),text:"You will lose access to all services"}].map((g,z)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px",color:o.textSecondary},children:[r.jsx("div",{style:{color:o.error,flexShrink:0},children:g.icon}),r.jsx("span",{children:g.text})]},z))})]})]}),r.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:T?"column-reverse":"row",justifyContent:"flex-end",alignItems:"stretch"},children:[r.jsx("button",{onClick:e,style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:T?"none":1,minWidth:T?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:g=>{g.currentTarget.style.backgroundColor=o.border,g.currentTarget.style.transform="translateY(-1px)"},onMouseOut:g=>{g.currentTarget.style.backgroundColor="transparent",g.currentTarget.style.transform="translateY(0)"},children:"Cancel"}),r.jsxs("button",{onClick:()=>k("confirmation"),style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:"pointer",flex:T?"none":1,minWidth:T?"100%":"140px",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:g=>{g.currentTarget.style.transform="translateY(-1px)",g.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)"},onMouseOut:g=>{g.currentTarget.style.transform="translateY(0)",g.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)"},children:[r.jsx(Me,{size:16}),"Continue to Delete"]})]})]});case"confirmation":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #f59e0b, #d97706)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(tr,{size:24})}),r.jsx("div",{style:{flex:1},children:r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Confirm Deletion"})})]}),r.jsxs("div",{style:{marginBottom:"24px"},children:[r.jsxs("p",{style:{color:o.textSecondary,marginBottom:"16px",fontSize:"14px",lineHeight:"1.5"},children:["Type"," ",r.jsx("strong",{style:{color:o.textPrimary},children:'"delete my account"'})," ","to confirm:"]}),r.jsx("input",{type:"text",value:x,onChange:g=>p(g.target.value),placeholder:"delete my account",style:{width:"100%",padding:"14px 16px",borderRadius:"10px",border:`2px solid ${h?o.success:o.error}`,backgroundColor:"transparent",color:o.textPrimary,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:g=>{g.target.style.boxShadow=`0 0 0 3px ${o.accent}20`},onBlur:g=>{g.target.style.boxShadow="none"},autoFocus:!0}),h&&r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"10px",color:o.success,fontSize:"14px",fontWeight:500},children:[r.jsx(tt,{size:16}),r.jsx("span",{children:"Confirmation accepted"})]})]}),r.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:"column-reverse",justifyContent:"flex-end",alignItems:"stretch"},children:[r.jsx("button",{onClick:()=>{k("warning"),p("")},style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${o.border}`,background:"transparent",color:o.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:T?"none":1,minWidth:T?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:g=>{g.currentTarget.style.backgroundColor=o.border,g.currentTarget.style.transform="translateY(-1px)"},onMouseOut:g=>{g.currentTarget.style.backgroundColor="transparent",g.currentTarget.style.transform="translateY(0)"},children:"Go Back"}),r.jsxs("button",{onClick:w,disabled:!h||c,style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:!h||c?"not-allowed":"pointer",flex:T?"none":1,minWidth:T?"100%":"140px",opacity:!h||c?.6:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:!h||c?"none":"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:g=>{h&&!c&&(g.currentTarget.style.transform="translateY(-1px)",g.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)")},onMouseOut:g=>{h&&!c&&(g.currentTarget.style.transform="translateY(0)",g.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)")},children:[r.jsx(Me,{size:16}),"Yes, Delete My Account"]})]})]});case"processing":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #6b7280, #4b5563)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(oe,{size:20,style:{animation:"spin 1s linear infinite"}})}),r.jsxs("div",{style:{flex:1},children:[r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Deleting Account"}),r.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Please wait while we process your request"})]})]}),r.jsx("div",{style:{marginBottom:"20px"},children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[{text:"Removing your data",active:!0},{text:"Closing active sessions",active:!1},{text:"Finalizing deletion",active:!1}].map((g,z)=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",borderRadius:"8px",transition:"all 0.2s ease",backgroundColor:g.active?`${o.accent}10`:"transparent"},children:[r.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:g.active?o.accent:o.textTertiary,transition:"all 0.3s ease",boxShadow:g.active?`0 0 0 4px ${o.accent}20`:"none"}}),r.jsx("span",{style:{fontSize:"14px",color:g.active?o.textPrimary:o.textSecondary,fontWeight:g.active?500:400},children:g.text})]},z))})}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary},children:[r.jsx(er,{size:18,style:{color:o.accent,flexShrink:0}}),r.jsx("span",{children:"You will be redirected to the login page shortly"})]})]});case"success":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[r.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #10b981, #059669)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:r.jsx(tt,{size:20})}),r.jsxs("div",{style:{flex:1},children:[r.jsx("h3",{style:{color:o.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Account Deleted"}),r.jsx("p",{style:{color:o.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Your account has been successfully deleted"})]})]}),r.jsxs("div",{style:{textAlign:"center",padding:"20px",background:`${o.success}10`,border:`1px solid ${o.success}20`,borderRadius:"12px",marginBottom:"24px"},children:[r.jsx(tt,{size:48,style:{color:o.success,marginBottom:"12px",display:"block",margin:"0 auto 12px auto"}}),r.jsx("p",{style:{color:o.textPrimary,fontSize:"16px",fontWeight:600,margin:"0 0 8px 0"},children:"Goodbye!"}),r.jsx("p",{style:{color:o.textSecondary,fontSize:"14px",margin:0,lineHeight:"1.5"},children:"Your account and all associated data have been permanently removed from our systems."})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${o.accent}10`,borderRadius:"10px",fontSize:"14px",color:o.textSecondary,justifyContent:"center"},children:[r.jsx(oe,{size:16,style:{animation:"spin 1s linear infinite",color:o.accent}}),r.jsx("span",{children:"Redirecting to login page..."})]})]})}};return r.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.8)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:1e4,animation:"fadeIn 0.3s ease-out"},onClick:_,children:[r.jsx("div",{style:{backgroundColor:o.surface,border:`1px solid ${o.border}`,borderRadius:"20px",width:"100%",maxWidth:"480px",padding:"24px",boxShadow:"0 32px 64px rgba(0,0,0,0.4)",animation:"scaleIn 0.3s ease-out"},className:"delete-modal-container",children:C()}),r.jsx("style",{children:`
213
213
  @keyframes fadeIn {
214
214
  from { opacity: 0; }
215
215
  to { opacity: 1; }
@@ -1 +1 @@
1
- {"version":3,"file":"UserLogin.d.ts","sourceRoot":"","sources":["../../src/react/UserLogin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqmBlD,CAAC"}
1
+ {"version":3,"file":"UserLogin.d.ts","sourceRoot":"","sources":["../../src/react/UserLogin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAymBlD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuctra/authix",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Universal authentication SDK and UI components for React (v16–v19) with TailwindCSS.",
5
5
  "author": "Taha Asif",
6
6
  "license": "MIT",