"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[16053,38434,65881],{38434:(e,t,a)=>{let s,r;a.d(t,{l$:()=>ee,Ay:()=>et,oR:()=>O});var i,l=a(12115);let o={data:""},n=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,d=/\/\*[^]*?\*\/|  +/g,c=/\n+/g,u=(e,t)=>{let a="",s="",r="";for(let i in e){let l=e[i];"@"==i[0]?"i"==i[1]?a=i+" "+l+";":s+="f"==i[1]?u(l,i):i+"{"+u(l,"k"==i[1]?"":t)+"}":"object"==typeof l?s+=u(l,t?t.replace(/([^,])+/g,e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):i):null!=l&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=u.p?u.p(i,l):i+":"+l+";")}return a+(t&&r?t+"{"+r+"}":r)+s},p={},m=e=>{if("object"==typeof e){let t="";for(let a in e)t+=a+m(e[a]);return t}return e};function f(e){let t,a,s=this||{},r=e.call?e(s.p):e;return((e,t,a,s,r)=>{var i;let l=m(e),o=p[l]||(p[l]=(e=>{let t=0,a=11;for(;t<e.length;)a=101*a+e.charCodeAt(t++)>>>0;return"go"+a})(l));if(!p[o]){let t=l!==e?e:(e=>{let t,a,s=[{}];for(;t=n.exec(e.replace(d,""));)t[4]?s.shift():t[3]?(a=t[3].replace(c," ").trim(),s.unshift(s[0][a]=s[0][a]||{})):s[0][t[1]]=t[2].replace(c," ").trim();return s[0]})(e);p[o]=u(r?{["@keyframes "+o]:t}:t,a?"":"."+o)}let f=a&&p.g?p.g:null;return a&&(p.g=p[o]),i=p[o],f?t.data=t.data.replace(f,i):-1===t.data.indexOf(i)&&(t.data=s?i+t.data:t.data+i),o})(r.unshift?r.raw?(t=[].slice.call(arguments,1),a=s.p,r.reduce((e,s,r)=>{let i=t[r];if(i&&i.call){let e=i(a),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":u(e,""):!1===e?"":e}return e+s+(null==i?"":i)},"")):r.reduce((e,t)=>Object.assign(e,t&&t.call?t(s.p):t),{}):r,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||o})(s.target),s.g,s.o,s.k)}f.bind({g:1});let h,b,g,x=f.bind({k:1});function y(e,t){let a=this||{};return function(){let s=arguments;function r(i,l){let o=Object.assign({},i),n=o.className||r.className;a.p=Object.assign({theme:b&&b()},o),a.o=/ *go\d+/.test(n),o.className=f.apply(a,s)+(n?" "+n:""),t&&(o.ref=l);let d=e;return e[0]&&(d=o.as||e,delete o.as),g&&d[0]&&g(o),h(d,o)}return t?t(r):r}}var v=(e,t)=>"function"==typeof e?e(t):e,j=(s=0,()=>(++s).toString()),C=()=>{if(void 0===r&&"u">typeof window){let e=matchMedia("(prefers-reduced-motion: reduce)");r=!e||e.matches}return r},w="default",N=(e,t)=>{let{toastLimit:a}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,a)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:s}=t;return N(e,{type:+!!e.toasts.find(e=>e.id===s.id),toast:s});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+i}))}}},E=[],L={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},$={},k=(e,t=w)=>{$[t]=N($[t]||L,e),E.forEach(([e,a])=>{e===t&&a($[t])})},D=e=>Object.keys($).forEach(t=>k(e,t)),P=(e=w)=>t=>{k(t,e)},A={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},I=e=>(t,a)=>{let s,r=((e,t="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...a,id:(null==a?void 0:a.id)||j()}))(t,e,a);return P(r.toasterId||(s=r.id,Object.keys($).find(e=>$[e].toasts.some(e=>e.id===s))))({type:2,toast:r}),r.id},O=(e,t)=>I("blank")(e,t);O.error=I("error"),O.success=I("success"),O.loading=I("loading"),O.custom=I("custom"),O.dismiss=(e,t)=>{let a={type:3,toastId:e};t?P(t)(a):D(a)},O.dismissAll=e=>O.dismiss(void 0,e),O.remove=(e,t)=>{let a={type:4,toastId:e};t?P(t)(a):D(a)},O.removeAll=e=>O.remove(void 0,e),O.promise=(e,t,a)=>{let s=O.loading(t.loading,{...a,...null==a?void 0:a.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let r=t.success?v(t.success,e):void 0;return r?O.success(r,{id:s,...a,...null==a?void 0:a.success}):O.dismiss(s),e}).catch(e=>{let r=t.error?v(t.error,e):void 0;r?O.error(r,{id:s,...a,...null==a?void 0:a.error}):O.dismiss(s)}),e};var S=1e3,_=x`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,z=x`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,F=x`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,M=y("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${_} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${z} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${e=>e.secondary||"#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${F} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,R=x`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,T=y("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${e=>e.secondary||"#e0e0e0"};
  border-right-color: ${e=>e.primary||"#616161"};
  animation: ${R} 1s linear infinite;
`,G=x`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,B=x`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,H=y("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${G} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${B} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${e=>e.secondary||"#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`,U=y("div")`
  position: absolute;
`,q=y("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,Q=x`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,V=y("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${Q} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,Y=({toast:e})=>{let{icon:t,type:a,iconTheme:s}=e;return void 0!==t?"string"==typeof t?l.createElement(V,null,t):t:"blank"===a?null:l.createElement(q,null,l.createElement(T,{...s}),"loading"!==a&&l.createElement(U,null,"error"===a?l.createElement(M,{...s}):l.createElement(H,{...s})))},Z=y("div")`
  display: flex;
  align-items: center;
  background: #fff;
  color: #363636;
  line-height: 1.3;
  will-change: transform;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  pointer-events: auto;
  padding: 8px 10px;
  border-radius: 8px;
`,J=y("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,K=l.memo(({toast:e,position:t,style:a,children:s})=>{let r=e.height?((e,t)=>{let a=e.includes("top")?1:-1,[s,r]=C()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[`
0% {transform: translate3d(0,${-200*a}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${-150*a}%,-1px) scale(.6); opacity:0;}
`];return{animation:t?`${x(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${x(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=l.createElement(Y,{toast:e}),o=l.createElement(J,{...e.ariaProps},v(e.message,e));return l.createElement(Z,{className:e.className,style:{...r,...a,...e.style}},"function"==typeof s?s({icon:i,message:o}):l.createElement(l.Fragment,null,i,o))});i=l.createElement,u.p=void 0,h=i,b=void 0,g=void 0;var W=({id:e,className:t,style:a,onHeightUpdate:s,children:r})=>{let i=l.useCallback(t=>{if(t){let a=()=>{s(e,t.getBoundingClientRect().height)};a(),new MutationObserver(a).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,s]);return l.createElement("div",{ref:i,className:t,style:a},r)},X=f`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,ee=({reverseOrder:e,position:t="top-center",toastOptions:a,gutter:s,children:r,toasterId:i,containerStyle:o,containerClassName:n})=>{let{toasts:d,handlers:c}=((e,t="default")=>{let{toasts:a,pausedAt:s}=((e={},t=w)=>{let[a,s]=(0,l.useState)($[t]||L),r=(0,l.useRef)($[t]);(0,l.useEffect)(()=>(r.current!==$[t]&&s($[t]),E.push([t,s]),()=>{let e=E.findIndex(([e])=>e===t);e>-1&&E.splice(e,1)}),[t]);let i=a.toasts.map(t=>{var a,s,r;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(a=e[t.type])?void 0:a.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(s=e[t.type])?void 0:s.duration)||(null==e?void 0:e.duration)||A[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}});return{...a,toasts:i}})(e,t),r=(0,l.useRef)(new Map).current,i=(0,l.useCallback)((e,t=S)=>{if(r.has(e))return;let a=setTimeout(()=>{r.delete(e),o({type:4,toastId:e})},t);r.set(e,a)},[]);(0,l.useEffect)(()=>{if(s)return;let e=Date.now(),r=a.map(a=>{if(a.duration===1/0)return;let s=(a.duration||0)+a.pauseDuration-(e-a.createdAt);if(s<0){a.visible&&O.dismiss(a.id);return}return setTimeout(()=>O.dismiss(a.id,t),s)});return()=>{r.forEach(e=>e&&clearTimeout(e))}},[a,s,t]);let o=(0,l.useCallback)(P(t),[t]),n=(0,l.useCallback)(()=>{o({type:5,time:Date.now()})},[o]),d=(0,l.useCallback)((e,t)=>{o({type:1,toast:{id:e,height:t}})},[o]),c=(0,l.useCallback)(()=>{s&&o({type:6,time:Date.now()})},[s,o]),u=(0,l.useCallback)((e,t)=>{let{reverseOrder:s=!1,gutter:r=8,defaultPosition:i}=t||{},l=a.filter(t=>(t.position||i)===(e.position||i)&&t.height),o=l.findIndex(t=>t.id===e.id),n=l.filter((e,t)=>t<o&&e.visible).length;return l.filter(e=>e.visible).slice(...s?[n+1]:[0,n]).reduce((e,t)=>e+(t.height||0)+r,0)},[a]);return(0,l.useEffect)(()=>{a.forEach(e=>{if(e.dismissed)i(e.id,e.removeDelay);else{let t=r.get(e.id);t&&(clearTimeout(t),r.delete(e.id))}})},[a,i]),{toasts:a,handlers:{updateHeight:d,startPause:n,endPause:c,calculateOffset:u}}})(a,i);return l.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...o},className:n,onMouseEnter:c.startPause,onMouseLeave:c.endPause},d.map(a=>{let i,o,n=a.position||t,d=c.calculateOffset(a,{reverseOrder:e,gutter:s,defaultPosition:t}),u=(i=n.includes("top"),o=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{},{left:0,right:0,display:"flex",position:"absolute",transition:C()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${d*(i?1:-1)}px)`,...i?{top:0}:{bottom:0},...o});return l.createElement(W,{id:a.id,key:a.id,onHeightUpdate:c.updateHeight,className:a.visible?X:"",style:u},"custom"===a.type?v(a.message,a):r?r(a):l.createElement(K,{toast:a,position:n}))}))},et=O},64788:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});var s=a(95155),r=a(12115),i=a(73321),l=a(80266),o=a(30313),n=a(66413),d=a(90927),c=a(2581);function u({title:e,children:t}){return(0,s.jsx)(o.cP,{title:e,children:t})}function p(){let e=(0,i.useParams)(),t="string"==typeof e?.userId?e.userId:"",[a,p]=(0,r.useState)(null),[m,f]=(0,r.useState)(!0);(0,r.useEffect)(()=>{if(!t)return;let e=!1;return(0,n.Du)(t).then(t=>{e||p(t)}).catch(t=>{e||(0,c.Qg)(t instanceof Error?t.message:"Failed to load student")}).finally(()=>{e||f(!1)}),()=>{e=!0}},[t]);let h=a?.user,b=a?.profile,g=a?.enrollment,x=g?.schoolClass?.displayName,y=(0,d.oG)(h?.profileImage),v=(h?.fullName||"?").split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()).join("");return(0,s.jsx)(l.V,{title:m?"Student details":h?.fullName||"Student details",description:x?`${x}${g?.rollNumber?` \xb7 Roll ${g.rollNumber}`:""}`:"Student profile",children:m?(0,s.jsxs)("div",{className:"space-y-4 animate-pulse",children:[(0,s.jsx)("div",{className:"h-28 rounded-lg bg-slate-100"}),(0,s.jsx)("div",{className:"h-40 rounded-lg bg-slate-100"})]}):a?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 rounded-lg border border-slate-100 bg-white p-5 shadow-sm sm:flex-row sm:items-center",children:[(0,s.jsx)("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary-50 text-lg font-semibold text-primary-800",children:h?.profileImage&&y?(0,s.jsx)("img",{src:y,alt:"",className:"h-full w-full object-cover"}):v}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xl font-semibold text-slate-900",children:h?.fullName}),(0,s.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:[x,h?.studentCode?`ID ${h.studentCode}`:null,g?.rollNumber?`Roll ${g.rollNumber}`:null].filter(Boolean).join(" \xb7 ")||h?.email})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsxs)(u,{title:"Account",children:[(0,s.jsx)(o.CL,{label:"Full name",value:h?.fullName}),(0,s.jsx)(o.CL,{label:"Email",value:h?.email}),(0,s.jsx)(o.CL,{label:"Phone",value:h?.phone}),(0,s.jsx)(o.CL,{label:"Student code",value:h?.studentCode})]}),(0,s.jsxs)(u,{title:"Class & admission",children:[(0,s.jsx)(o.CL,{label:"Class",value:x}),(0,s.jsx)(o.CL,{label:"Roll number",value:g?.rollNumber}),(0,s.jsx)(o.CL,{label:"Admission number",value:b?.admissionNumber}),(0,s.jsx)(o.CL,{label:"Admission date",value:b?.admissionDate}),(0,s.jsx)(o.CL,{label:"Category",value:b?.category?.name}),(0,s.jsx)(o.CL,{label:"Group",value:b?.group?.name}),(0,s.jsx)(o.CL,{label:"Previous school",value:b?.previousSchool})]}),(0,s.jsxs)(u,{title:"Personal",children:[(0,s.jsx)(o.CL,{label:"Date of birth",value:b?.dateOfBirth}),(0,s.jsx)(o.CL,{label:"Gender",value:b?.gender}),(0,s.jsx)(o.CL,{label:"Blood group",value:b?.bloodGroup}),(0,s.jsx)(o.CL,{label:"Address",value:b?.address}),(0,s.jsx)(o.CL,{label:"City",value:b?.city}),(0,s.jsx)(o.CL,{label:"District",value:b?.district}),(0,s.jsx)(o.CL,{label:"Country",value:b?.country})]}),(0,s.jsxs)(u,{title:"Parents & guardian",children:[(0,s.jsx)(o.CL,{label:"Father",value:b?.fatherName}),(0,s.jsx)(o.CL,{label:"Father phone",value:b?.fatherPhone}),(0,s.jsx)(o.CL,{label:"Father email",value:b?.fatherEmail}),(0,s.jsx)(o.CL,{label:"Mother",value:b?.motherName}),(0,s.jsx)(o.CL,{label:"Mother phone",value:b?.motherPhone}),(0,s.jsx)(o.CL,{label:"Mother email",value:b?.motherEmail}),(0,s.jsx)(o.CL,{label:"Guardian",value:b?.guardianName}),(0,s.jsx)(o.CL,{label:"Guardian relation",value:b?.guardianRelation?`${b.guardianRelation}${b.guardianPhone?` \xb7 ${b.guardianPhone}`:""}`:b?.guardianPhone})]})]})]}):(0,s.jsx)(o.i0,{title:"Student not found",description:"This student may not be in your assigned class."})})}}}]);