1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7119],{5147:()=>{},16501:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(28705),s=a(95155);let i=(0,l.A)((0,s.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth")},24783:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(95155),s=a(19749);function i(e){let t,a,i,r,n,c=(0,s.c)(9);c[0]!==e?({size:a,strokeWidth:i,...t}=e,c[0]=e,c[1]=t,c[2]=a,c[3]=i):(t=c[1],a=c[2],i=c[3]);let o=void 0===a?16:a,d=void 0===i?2:i;return c[4]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)("path",{d:"m9 18 6-6-6-6"}),c[4]=r):r=c[4],c[5]!==t||c[6]!==o||c[7]!==d?(n=(0,l.jsx)("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:d,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:r}),c[5]=t,c[6]=o,c[7]=d,c[8]=n):n=c[8],n}let r=function(e){let t,a,r,n=(0,s.c)(8),{items:c}=e;n[0]!==c?(t=void 0===c?[]:c,n[0]=c,n[1]=t):t=n[1];let o=t;if(!o.length)return null;if(n[2]!==o){let e;n[4]!==o.length?(e=(e,t)=>{let a=t===o.length-1;return(0,l.jsxs)("div",{className:"vx-breadcrumb-item",children:[(0,l.jsx)("span",{className:"vx-breadcrumb-pill ".concat(a?"is-current":""),children:e.label}),a?null:(0,l.jsx)(i,{size:16,strokeWidth:2.4,className:"vx-breadcrumb-separator","aria-hidden":"true"})]},"".concat(e.label,"-").concat(t))},n[4]=o.length,n[5]=e):e=n[5],a=o.map(e),n[2]=o,n[3]=a}else a=n[3];return n[6]!==a?(r=(0,l.jsx)("nav",{className:"vx-breadcrumbs","aria-label":"Breadcrumb",children:a}),n[6]=a,n[7]=r):r=n[7],r}},40671:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(28705),s=a(95155);let i=(0,l.A)((0,s.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft")},43264:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>eQ});var l=a(95155),s=a(19749),i=a(12115),r=a(28705);let n=(0,r.A)((0,l.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m2 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"}),"Assignment"),c=(0,r.A)((0,l.jsx)("path",{d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"}),"BarChart");var o=a(16501);let d=(0,r.A)((0,l.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline"),u=(0,r.A)((0,l.jsx)("path",{fillRule:"evenodd",d:"M3 3v8h8V3zm6 6H5V5h4zm-6 4v8h8v-8zm6 6H5v-4h4zm4-16v8h8V3zm6 6h-4V5h4zm-6 4v8h8v-8zm6 6h-4v-4h4z"}),"GridView"),m=(0,r.A)((0,l.jsx)("path",{d:"M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2m-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69z"}),"LocalActivity"),h=(0,r.A)((0,l.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),p=(0,r.A)((0,l.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");var v=a(40671),y=a(58880),b=a(68278),x=a(5589);let g=(0,r.A)([(0,l.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,l.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),j=(0,r.A)([(0,l.jsx)("path",{d:"m12 2-5.5 9h11z"},"0"),(0,l.jsx)("circle",{cx:"17.5",cy:"17.5",r:"4.5"},"1"),(0,l.jsx)("path",{d:"M3 13.5h8v8H3z"},"2")],"Category"),f=(0,r.A)((0,l.jsx)("path",{d:"M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2M5 8V7h2v3.82C5.84 10.4 5 9.3 5 8m14 0c0 1.3-.84 2.4-2 2.82V7h2z"}),"EmojiEvents"),N=(0,r.A)((0,l.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),k=(0,r.A)((0,l.jsx)("path",{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91M4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29M20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3"}),"Groups"),A=(0,r.A)((0,l.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),M=(0,r.A)((0,l.jsx)("path",{d:"M7 9H2V7h5zm0 3H2v2h5zm13.59 7-3.83-3.83c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L22 17.59zM17 11c0-1.65-1.35-3-3-3s-3 1.35-3 3 1.35 3 3 3 3-1.35 3-3M2 19h10v-2H2z"}),"ManageSearch"),S=(0,r.A)((0,l.jsx)("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"}),"NorthEast"),C=(0,r.A)([(0,l.jsx)("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),(0,l.jsx)("path",{d:"M13 3C9.25 3 6.2 5.94 6.02 9.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v3h7v-4.68c2.36-1.12 4-3.53 4-6.32 0-3.87-3.13-7-7-7m3 7c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")],"Psychology"),w=(0,r.A)((0,l.jsx)("path",{d:"M19.8 18.4 14 10.67V6.5l1.35-1.69c.26-.33.03-.81-.39-.81H9.04c-.42 0-.65.48-.39.81L10 6.5v4.17L4.2 18.4c-.49.66-.02 1.6.8 1.6h14c.82 0 1.29-.94.8-1.6"}),"Science"),L=(0,r.A)((0,l.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified"),T=(0,r.A)((0,l.jsx)("path",{d:"M1 11h4v11H1zm15-7.75C16.65 2.49 17.66 2 18.7 2 20.55 2 22 3.45 22 5.3c0 2.27-2.91 4.9-6 7.7-3.09-2.81-6-5.44-6-7.7C10 3.45 11.45 2 13.3 2c1.04 0 2.05.49 2.7 1.25M20 17h-7l-2.09-.73.33-.94L13 16h2.82c.65 0 1.18-.53 1.18-1.18 0-.49-.31-.93-.77-1.11L8.97 11H7v9.02L14 22l8.01-3c-.01-1.1-.9-2-2.01-2"}),"VolunteerActivism");var I=a(24783);let z=[{id:"upper-limb-landmark",name:"Upper Limb Landmark Identification",skillType:"Image",competency:"Anatomy",year:"First Year",sgt:"SGT A",students:24,completedAttempts:[{id:"attempt-1"}]},{id:"blood-group-determination",name:"Blood Group Determination Station",skillType:"OSCE",competency:"Physiology",year:"First Year",sgt:"SGT B",
1students:28,completedAttempts:[]},{id:"artificial-respiration",name:"Artificial Respiration Interpretation",skillType:"Interpretation",competency:"Emergency Care",year:"Second Year",sgt:"SGT C",students:22,completedAttempts:[{id:"attempt-1"}]},{id:"wbc-count-checklist",name:"WBC Count Checklist Station",skillType:"OSPE",competency:"Pathology",year:"Second Year",sgt:"SGT D",students:26,completedAttempts:[{id:"attempt-1"},{id:"attempt-2"}]}];a(5147);let P=e=>t=>{let{size:a=16,strokeWidth:s,sx:i,...r}=t;return(0,l.jsx)(e,{sx:{fontSize:a,...i},...r})};P(S),P(L);let R=P(C);P(n),P(g);let V=P(A),_=P(M),D=P(N);P(w);let E=P(T),H=P(p),O=P(j),B=P(f);P(k);let W=["Remember","Understand","Apply","Analyze","Evaluate","Create"],F=["Receive","Respond","Value","Organize","Characterize"],Y=["Perception","Set","Guided Response","Mechanism","Adaptation","Origination"],G={cognitive:W.map(e=>({label:e,value:0,totalMarks:0})),affective:F.map(e=>({label:e,value:0,totalMarks:0})),psychomotor:Y.map(e=>({label:e,value:0,totalMarks:0})),criticality:[{label:"Critical",value:0,color:"#ef6b5a"},{label:"Normal",value:0,color:"#1fba8a"}]},X=e=>String(null!=e?e:"").trim(),K=e=>X(e).toLowerCase(),q=(e,t)=>X(e)===X(t),U=e=>{let t=K(e);return!t||t.includes("awaiting")?"":"completed"===t||"c"===t||t.includes("completed")?"completed":"repeat"===t||"r"===t?"repeat":"remedial"===t||"re"===t?"remedial":""},Z=e=>{let t=K(e);return t&&"-"!==t&&"not matched"!==t&&"no threshold"!==t?t.includes("exceed")?"Exceeds":t.includes("meet")||t.includes("pass")||t.includes("complete")?"Meets":t.includes("below")||t.includes("repeat")||t.includes("remedial")||t.includes("borderline")?"Below":"":""},J=e=>{let t=K(e);return"absent"===t?"is-absent":"completed"===t?"is-good":"repeat"===t||"remedial"===t?"is-warn":"exceeds"===t?"is-good":"meets"===t?"is-soft":"below"===t||"pending"===t?"is-warn":"is-soft"},Q=e=>{let t=K(e);
1return t&&"not applicable"!==t},$=(e,t)=>{let a=Number(t)||0;return a<=0?0:(Number(e)||0)/a*100},ee=e=>Math.min(Math.max(Math.round(Number(e)||0),0),100),et=function(e,t,a){let l=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(l)return"â";let s=Number(e),i=Number(t);if(Number.isFinite(s)&&Number.isFinite(i)&&i>0)return"".concat(s," / ").concat(i);let r=Number(a);return Number.isFinite(r)&&r>0?"".concat(ee(r),"%"):"â"},ea=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return"â";let a=Number(e);return!Number.isFinite(a)||a<=0?"â":"".concat(ee(a),"%")},el=function(){var e,t,a,l,s,i;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null!=(e=r.awaitingResults)?e:r.awaiting_results)||K(null!=(a=null!=(t=r.rowStatus)?t:r.row_status)?a:"").includes("awaiting"))return!0;let n=null!=(l=r.resultsPublished)?l:r.results_published,c=!!String(null!=(i=null!=(s=r.resultStatus)?s:r.decisionTitle)?i:"").trim();return!1===n&&c},es=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,l=new Map;return t.forEach(e=>{var t;let a="".concat(e.activityId,"-").concat(null!=(t=e.attemptNumber)?t:1);l.set(a,e)}),e.map(e=>{var s,i,r,n,c,o,d,u,m,h,p,v,y;let b=null!=(s=e.activityId)?s:e.id,x=Number(null!=(i=e.attemptNumber)?i:1)||1,g="".concat(b,"-").concat(x),j=null!=(r=l.get(g))?r:t.find(e=>{var t;return String(e.activityId)===String(b)&&(Number(null!=(t=e.attemptNumber)?t:1)||1)===x}),f="Completed"===e.status||!!e.completed,N=!j&&f?t.find(e=>String(e.activityId)===String(b)):null,k=null!=j?j:N;if(k)return{...eo(k,a),assignmentStatus:null!=(n=e.status)?n:"",completed:!!e.completed};let A=null!=(c=e.status)?c:"Assigned",M="Completed"===A||!!e.completed,S=!!e.resultsPublished,C="";return M&&S?C="Completed":M&&!S&&(C="Awaiting Results"),{id:"card-".concat(null!=(o=e.assignmentRowId)?o:b,"-").concat(x),activityId:b,activityName:null!=(u=null!=(d=e.title)?d:e.activityName)?u:"Activity",activityType:null!=(h=null!=(m=e.type)?m:e.activityType)?h:"Activity",year:null!=(p=e.yearLabel)?p:"â",sgt:null!=(v=e.sectionLabel)?v:"â",attemptNumber:x,registerId:null!=(y=e.studentRegisterId)?y:"â",resultStatus:C,resultsPublished:S,awaitingResults:M&&!S,assignmentStatus:A,completed:!!e.completed,totalObtainedMarks:null,totalMarks:null,totalPercentage:null}})},ei=function(e){var t,a,l,s,i,r;let{isEmpty:n=!1,studentView:c=!1,isAwaiting:o=!1,isPending:d=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=e.resultStatus||e.decisionTitle||e.result||"",m=e.totalObtainedMarks,h=e.totalMarks,p=null!=(t=e.totalPercentage)?t:e.score,v=null!=(a=e.resultsPublished)?a:e.results_published,y=!!(null!=(l=e.studentMarkedAbsent)?l:e.student_marked_absent),b=!!(null!=(s=e.completed)?s:"Completed"===e.assignmentStatus),x=U(u)||(v&&b?"completed":""),g="repeat"===x||"remedial"===x,j="completed"===x,f=!!o||K(u).includes("awaiting"),N=g?x:j?"completed":(f,"pending"),k=f||"pending"===N&&!j||(j||g)&&!1===v&&!y,A=e.attemptNumber?"Attempt ".concat(e.attemptNumber):"â",M=(e=>{let t=U(e);return"completed"===t?"Completed":"repeat"===t?"Repeat":"remedial"===t?"Remedial":K(e).includes("awaiting")?"Awaiting":"absent"===K(e)?"Absent":""})(u)||(f?"Awaiting":""),S=y&&!k?0:m,C=y&&!k?0:p;return{id:null!=(i=e.id)?i:"".concat(e.activityId,"-").concat(e.studentId),activityId:e.activityId,activityName:e.activityName,activityType:e.activityType,primaryLabel:c?e.activityName||"Activity":e.studentName,secondaryLabel:c?d||n?A:e.registerId||"â":"".concat(e.registerId||"â"," / ").concat(e.activityName||"Activity"),year:e.year||"â",sgt:e.sgt||"â",attemptLabel:A,attemptNumber:Number(null!=(r=e.attemptNumber)?r:1)||1,scoreMarks:et(S,h,C,k),scorePercent:ea(C,k),thresholdLabel:k?"â":Z(e.thresholdLabel||"Not Matched")||"-",resultLabel:n&&"pending"===N?"â":M||(y?"Absent":Z(u)||"-"),result:u,studentMarkedAbsent:y,statusLabel:"pending"===N?f?"Awaiting results":"Pending":"Evaluated",isEmpty:n,isAwaiting:f,isPending:d,outcomeKind:N,canViewResults:(j||g)&&!f&&!!e.activityId&&!!v}},er=(e,t,a)=>{let l=W[(t+e.name.length)%W.length],s=F[(t+e.competency.length)%F.length],i=Y[(t+e.skillType.length)%Y.length];return{id:"".concat(e.id,"-").concat(a,"-").concat(t+1),text:"".concat(e.name," ").concat(a," point ").concat(t+1),questionText:"".concat(e.name," ").concat(a," point ").concat(t+1),marks:t%2==0?2:1,isCritical:t%3==0,cognitive:l,affective:s,psych
1omotor:i}};function en(e){let t,a,r,n,c,o,d,u,m=(0,s.c)(21),{label:h,value:p,placeholder:v,options:y,onChange:b}=e,[x,g]=(0,i.useState)(!1),j=p||v,f="dashboard-summary-toolbar-field dashboard-summary-filter ".concat(x?"is-open":"");return m[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{e.currentTarget.contains(e.relatedTarget)||g(!1)},m[0]=t):t=m[0],m[1]!==h?(a=(0,l.jsx)("span",{children:h}),m[1]=h,m[2]=a):a=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(r=()=>g(ec),m[3]=r):r=m[3],m[4]!==j?(n=(0,l.jsx)("span",{children:j}),m[4]=j,m[5]=n):n=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,l.jsx)(V,{size:16,strokeWidth:2.2}),m[6]=c):c=m[6],m[7]!==x||m[8]!==n?(o=(0,l.jsxs)("button",{type:"button",className:"dashboard-summary-filter-trigger","aria-haspopup":"listbox","aria-expanded":x,onClick:r,children:[n,c]}),m[7]=x,m[8]=n,m[9]=o):o=m[9],m[10]!==x||m[11]!==b||m[12]!==y||m[13]!==v||m[14]!==p?(d=x?(0,l.jsxs)("div",{className:"dashboard-summary-filter-menu",role:"listbox",children:[(0,l.jsx)("button",{type:"button",role:"option","aria-selected":!p,className:p?"":"is-selected",onClick:()=>{b(""),g(!1)},children:v}),y.map(e=>(0,l.jsx)("button",{type:"button",role:"option","aria-selected":p===e,className:p===e?"is-selected":"",onClick:()=>{b(e),g(!1)},children:e},e))]}):null,m[10]=x,m[11]=b,m[12]=y,m[13]=v,m[14]=p,m[15]=d):d=m[15],m[16]!==f||m[17]!==a||m[18]!==o||m[19]!==d?(u=(0,l.jsxs)("div",{className:f,onBlur:t,children:[a,o,d]}),m[16]=f,m[17]=a,m[18]=o,m[19]=d,m[20]=u):u=m[20],u}function ec(e){return!e}let eo=(e,t)=>{var a,l,s,i,r,n,c,o,d,u,m,h,p,v,y,b,x;let g=null!=(a=t.get(e.activityId))?a:{};return{...e,activityName:null!=(s=null!=(l=e.activityName)?l:g.activityName)?s:"Activity",activityType:null!=(r=null!=(i=e.activityType)?i:g.activityType)?r:"Activity",year:null!=(c=null!=(n=e.year)?n:g.year)?c:"Not set",sgt:null!=(d=null!=(o=e.sgt)?o:g.sgt)?d:"Not set",result:null!=(h=null!=(m=null!=(u=e.resultStatus)?u:e.decisionTitle)?m:e.evaluationStatus)?h:"-",attemptNumber:Number(null!=(v=null!=(p=e.attemptNumber)?p:e.attemptCount)?v:1)||1,totalPercentage:Number(e.totalPercentage)||0,totalObtainedMarks:Number(e.totalObtainedMarks)||0,totalMarks:Number(e.totalMarks)||0,critical:Number(e.overallCriticalMarks)||0,resultsPublished:null!=(x=null!=(b=null!=(y=e.resultsPublished)?y:e.results_published)?b:g.resultsPublished)?x:g.results_published}},ed=function(){var e,t;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[a.activityId,null==(e=a.activityRecord)?void 0:e.id,null==(t=a.assignment)?void 0:t.id]},eu=(e,t)=>{var a,l,s,i;return!!e&&!!t&&(!!ed(e).some(e=>q(e,t.id))||q(e.activityName,t.activityName)&&q(e.activityType,t.activityType)&&q(null!=(s=e.year)?s:null==(a=e.activityRecord)?void 0:a.year,t.year)&&q(null!=(i=e.sgt)?i:null==(l=e.activityRecord)?void 0:l.sgt,t.sgt))},em=function(){var e,t,a;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=[];return Q(null!=(e=l.cognitive)?e:"Cognitive"===l.domain?l.domain:"")&&s.push("cognitive"),Q(null!=(t=l.affective)?t:"Affective"===l.domain?l.domain:"")&&s.push("affective"),Q(null!=(a=l.psychomotor)?a:"Psychomotor"===l.domain?l.domain:"")&&s.push("psychomotor"),[...new Set(s)]},eh=e=>{let t=K(e);
1return t&&"not applicable"!==t?t.split(/\s+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""};function ep(e){let t,a,i,r,n,c,o,d,u,m,h,p,v,y,b=(0,s.c)(31),{data:x}=e;b[0]===Symbol.for("react.memo_cache_sentinel")?(t=[25,50,75,100],b[0]=t):t=b[0];let g=t;if(b[1]!==x){var j,f;let e;b[13]!==x.length?(e=(e,t)=>{let a=-Math.PI/2+t/x.length*Math.PI*2,l=112*(ee(e.value)/100);return{...e,value:ee(e.value),x:170+Math.cos(a)*l,y:170+Math.sin(a)*l,axisX:170+112*Math.cos(a),axisY:170+112*Math.sin(a),labelX:170+146*Math.cos(a),labelY:170+142*Math.sin(a)}},b[13]=x.length,b[14]=e):e=b[14];let t=x.map(e),s=t.map(ex).join(" ");r="dashboard-cognitive-radar-card",n="dashboard-cognitive-radar-chart",c="0 0 340 340",o="img",d="Cognitive domain radar chart",u=g.map(e=>{let t=x.map((t,a)=>{let l=-Math.PI/2+a/x.length*Math.PI*2,s=e/100*112;return"".concat(170+Math.cos(l)*s,",").concat(170+Math.sin(l)*s)}).join(" ");return(0,l.jsx)("polygon",{points:t,className:"dashboard-cognitive-radar-grid"},e)}),m=t.map(eb),h=(0,l.jsx)("polygon",{points:s,className:"dashboard-cognitive-radar-fill"});let v="".concat(s," ").concat(null==(j=t[0])?void 0:j.x,",").concat(null==(f=t[0])?void 0:f.y);b[15]!==v?(p=(0,l.jsx)("polyline",{points:v,className:"dashboard-cognitive-radar-line"}),b[15]=v,b[16]=p):p=b[16],a=t.map(ey),i=t.map(ev),b[1]=x,b[2]=a,b[3]=i,b[4]=r,b[5]=n,b[6]=c,b[7]=o,b[8]=d,b[9]=u,b[10]=m,b[11]=h,b[12]=p}else a=b[2],i=b[3],r=b[4],n=b[5],c=b[6],o=b[7],d=b[8],u=b[9],m=b[10],h=b[11],p=b[12];return b[17]!==a||b[18]!==i||b[19]!==n||b[20]!==c||b[21]!==o||b[22]!==d||b[23]!==u||b[24]!==m||b[25]!==h||b[26]!==p?(v=(0,l.jsxs)("svg",{className:n,viewBox:c,role:o,"aria-label":d,children:[u,m,h,p,a,i]}),b[17]=a,b[18]=i,b[19]=n,b[20]=c,b[21]=o,b[22]=d,b[23]=u,b[24]=m,b[25]=h,b[26]=p,b[27]=v):v=b[27],b[28]!==r||b[29]!==v?(y=(0,l.jsx)("div",{className:r,children:v}),b[28]=r,b[29]=v,b[30]=y):y=b[30],y}function ev(e){return(0,l.jsxs)("g",{children:[(0,l.jsxs)("text",{x:e.labelX,y:e.labelY-6,textAnchor:e.labelX<160?"end":e.labelX>180?"start":"middle",className:"dashboard-cognitive-radar-value",children:[e.value,"%"]}),(0,l.jsx)("text",{x:e.labelX,y:e.labelY+10,textAnchor:e.labelX<160?"end":e.labelX>180?"start":"middle",className:"dashboard-cognitive-radar-label",children:e.label})]},"label-".concat(e.label))}function ey(e){return(0,l.jsxs)("g",{className:"dashboard-radar-point-group",children:[(0,l.jsx)("circle",{cx:e.x,cy:e.y,r:"13",className:"dashboard-cognitive-radar-hotspot"}),(0,l.jsx)("circle",{cx:e.x,cy:e.y,r:"4.8",className:"dashboard-cognitive-radar-dot"}),(0,l.jsxs)("g",{className:"dashboard-radar-tooltip-card",children:[(0,l.jsx)("rect",{x:e.x-48,y:e.y-56,width:"96",height:"44",rx:"10"}),(0,l.jsx)("text",{x:e.x,y:e.y-38,textAnchor:"middle",className:"dashboard-tooltip-title",children:e.label}),(0,l.jsxs)("text",{x:e.x,y:e.y-23,textAnchor:"middle",className:"dashboard-tooltip-value",children:[e.value,"%"]})]})]},"dot-".concat(e.label))}function eb(e){return(0,l.jsx)("line",{x1:170,y1:170,x2:e.axisX,y2:e.axisY,className:"dashboard-cognitive-radar-axis"},"axis-".concat(e.label))}function ex(e){return"".concat(e.x,",").concat(e.y)}function eg(e){let t,a,i,r,n,c,o,d,u,m,h,p,v,y,b,x,g,j=(0,s.c)(44),{data:f}=e;j[0]===Symbol.for("react.memo_cache_sentinel")?(t={top:30,right:92,bottom:48,left:64},j[0]=t):t=j[0];let N=t;j[1]!==f?(a=Math.max(100,...f.map(ek)),j[1]=f,j[2]=a):a=j[2];let k=a;if(j[3]!==f||j[4]!==k){var A,M,S;let e,t,a;j[18]!==f.length||j[19]!==k?(e=(e,t)=>{let a=N.left+t/Math.max(f.length-1,1)*(920-N.left-N.right),l=N.top+(1-ee(e.value)/k)*(310-N.top-N.bottom);return{...e,x:a,y:l,value:ee(e.value)}},j[18]=f.length,j[19]=k,j[20]=e):e=j[20];let s=f.map(e),x=s.map(eN).join(" "),g="".concat(x," L ").concat(null!=(M=null==(A=s.at(-1))?void 0:A.x)?M:N.left," ").concat(310-N.bottom," L ").concat(N.left," ").concat(310-N.bottom," Z"),C=s.reduce(ef,null!=(S=s[0])?S:{x:0,y:0,value:0,label:""});j[21]===Symbol.for("react.memo_cache_sentinel")?(t=[0,25,50,75,100],j[21]=t):t=j[21];let w=t;o="dashboard-affective-line-card",j[22]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.jsx)("span",{children:"Engagement Trend"}),j[22]=a):a=j[22],d=(0,l.jsxs)("div",{className:"dashboard-affective-line-top",children:[a,(0,l.jsxs)("strong",{children:[C.value,"% peak"]})]}),u="dashboard-affective-line-chart",m="0 0 920 310",h="img",p="Affective domain trend chart",j[23]===Symbol.for("react.memo_cache_sentinel")?(v=(0,l.jsx)("defs",{children:(0,l.jsxs)("linearGradient",{id:"affectiveAreaGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,l.jsx)("stop",{offset:"0%",stopColor:"#14b8a6",stopOpacity:"0.28"}),(0,l.jsx)("stop",{offset:"100%",stopColor:"#14b8a6",stopOpacity:"0"})]})}),j[23]=v):v=j[23],j[24]!==k?(y=w.map(e=>{let t=N.top+(1-e/k)*(310-N.top-N.bottom);return(0,l.jsxs)("g",{children:[(0,l.jsx)("line",{x1:N.left,x2:920-N.right,y1:t,y2:t,className:"dashboard-affective-grid"}),(0,l.jsx)("text",{x:N.left-10,y:t+4,textAnchor:"end",className:"dashboard-affective-axis-text",children:e})]},e)}),j[24]=k,j[25]=y):y=j[25],j[26]!==g?(b=(0,l.jsx)("path",{d:g,className:"dashboard-affective-area"}
1),j[26]=g,j[27]=b):b=j[27],i=(0,l.jsx)("path",{d:x,className:"dashboard-affective-line"}),r=s.map(e=>(0,l.jsxs)("g",{className:"dashboard-affective-point-group",children:[(0,l.jsx)("circle",{cx:e.x,cy:e.y,r:"14",className:"dashboard-affective-hotspot"}),(0,l.jsx)("circle",{cx:e.x,cy:e.y,r:e.label===C.label?5.5:4.2,className:e.label===C.label?"dashboard-affective-point is-peak":"dashboard-affective-point"}),(0,l.jsxs)("g",{className:"dashboard-affective-tooltip-card",children:[(0,l.jsx)("rect",{x:e.x-58,y:e.y-66,width:"116",height:"52",rx:"12"}),(0,l.jsx)("text",{x:e.x,y:e.y-45,textAnchor:"middle",className:"dashboard-tooltip-title",children:e.label}),(0,l.jsxs)("text",{x:e.x,y:e.y-27,textAnchor:"middle",className:"dashboard-tooltip-value",children:[e.value,"%"]})]})]},e.label)),n=C.label?(0,l.jsxs)("g",{children:[(0,l.jsx)("line",{x1:C.x,x2:C.x,y1:C.y+8,y2:310-N.bottom,className:"dashboard-affective-marker-line"}),(0,l.jsx)("rect",{x:C.x-26,y:C.y-31,width:"52",height:"22",rx:"8",className:"dashboard-affective-marker-bg"}),(0,l.jsxs)("text",{x:C.x,y:C.y-16,textAnchor:"middle",className:"dashboard-affective-marker-text",children:[C.value,"%"]})]}):null,c=s.map(ej),j[3]=f,j[4]=k,j[5]=i,j[6]=r,j[7]=n,j[8]=c,j[9]=o,j[10]=d,j[11]=u,j[12]=m,j[13]=h,j[14]=p,j[15]=v,j[16]=y,j[17]=b}else i=j[5],r=j[6],n=j[7],c=j[8],o=j[9],d=j[10],u=j[11],m=j[12],h=j[13],p=j[14],v=j[15],y=j[16],b=j[17];return j[28]!==i||j[29]!==r||j[30]!==n||j[31]!==c||j[32]!==u||j[33]!==m||j[34]!==h||j[35]!==p||j[36]!==v||j[37]!==y||j[38]!==b?(x=(0,l.jsxs)("svg",{className:u,viewBox:m,role:h,"aria-label":p,children:[v,y,b,i,r,n,c]}),j[28]=i,j[29]=r,j[30]=n,j[31]=c,j[32]=u,j[33]=m,j[34]=h,j[35]=p,j[36]=v,j[37]=y,j[38]=b,j[39]=x):x=j[39],j[40]!==o||j[41]!==d||j[42]!==x?(g=(0,l.jsxs)("div",{className:o,children:[d,x]}),j[40]=o,j[41]=d,j[42]=x,j[43]=g):g=j[43],g}function ej(e){return(0,l.jsx)("text",{x:e.x,y:300,textAnchor:"middle",className:"dashboard-affective-axis-text",children:e.label},"label-".concat(e.label))}function ef(e,t){return t.value>e.value?t:e}function eN(e,t){return"".concat(0===t?"M":"L"," ").concat(e.x," ").concat(e.y)}function ek(e){return ee(e.value)}function eA(e){let t,a,i,r,n,c,o,d,u,m,h=(0,s.c)(21),{data:p}=e;if(h[0]!==p){var v;let e=p.map(eS),s=e.reduce(eM,null!=(v=e[0])?v:{value:0,label:""});o="dashboard-psy-income-card",n="dashboard-psy-income-body",h[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,l.jsxs)("div",{className:"dashboard-psy-income-axis","aria-hidden":"true",children:[(0,l.jsx)("span",{children:"100%"}),(0,l.jsx)("span",{children:"75%"}),(0,l.jsx)("span",{children:"50%"}),(0,l.jsx)("span",{children:"25%"}),(0,l.jsx)("span",{children:"0"})]}),h[8]=c):c=h[8],t="dashboard-psy-income-chart",a="img",i="Psychomotor percentage chart",r=e.map(e=>(0,l.jsxs)("article",{className:"dashboard-psy-income-group dashboard-chart-tooltip-wrap ".concat(e.label===s.label?"is-peak":""),tabIndex:0,style:{"--bar":"".concat(Math.max(8,1.28*e.value),"px")},children:[(0,l.jsx)("i",{"aria-hidden":"true"}),(0,l.jsx)("span",{children:e.label}),(0,l.jsxs)("span",{className:"dashboard-chart-tooltip",children:[e.label,": ",e.value,"%"]})]},e.label)),h[0]=p,h[1]=t,h[2]=a,h[3]=i,h[4]=r,h[5]=n,h[6]=c,h[7]=o}else t=h[1],a=h[2],i=h[3],r=h[4],n=h[5],c=h[6],o=h[7];return h[9]!==t||h[10]!==a||h[11]!==i||h[12]!==r?(d=(0,l.jsx)("div",{className:t,role:a,"aria-label":i,children:r}),h[9]=t,h[10]=a,h[11]=i,h[12]=r,h[13]=d):d=h[13],h[14]!==n||h[15]!==c||h[16]!==d?(u=(0,l.jsxs)("div",{className:n,children:[c,d]}),h[14]=n,h[15]=c,h[16]=d,h[17]=u):u=h[17],h[18]!==o||h[19]!==u?(m=(0,l.jsx)("div",{className:o,children:u}),h[18]=o,h[19]=u,h[20]=m):m=h[20],m}function eM(e,t){return t.value>e.value?t:e}function eS(e){return{label:e.label,value:ee(e.value)}}function eC(e){let{dashboardData:t,assignedActivities:a=[],evaluationRecords:s=[],completedEvaluationRows:r=[],serverDomainSeries:n=null,embedded:c=!1,dataLoading:o=!1,useSampleFallback:d=!0,alwaysShowPerformance:u=!1,studentView:m=!1,resultsPublished:h=!1,heading:p="Dashboard",description:v="Track activities, completed evaluations, domain coverage, criticality and student performance in one live view.",onViewResult:y}=e,[b,g]=(0,i.useState)(""),[j,f]=(0,i.useState)(""),[N,k]=(0,i.useState)(""),[A,M]=(0,i.useState)(""),[S,C]=(0,i.useState)(""),[w,L]=(0,i.useState)({pending:5,completed:5,repeat:5}),T=(0,i.useMemo)(()=>a.length||!d?a:z.map((e,t)=>{var a,l;return{id:"fallback-".concat(e.id),title:e.name,type:e.skillType,year:e.year,sgt:e.sgt,assignedTo:"".concat(e.year," ⢠").concat(e.sgt),studentCount:null!=(l=e.students)?l:10,status:t%2==0?"Assigned":"In Progress",action:"Start Activity",tone:t%2==0?"primary":"secondary",createdDate:"".concat(String(t+8).padStart(2,"0"),"/04/2026"),competency:e.competency,evaluationStatus:(null==(a=e.completedAttempts)?void 0:a.length)?"Completed Evaluation":"Pending Evaluation",examData:{modules:{checklist:Array.from({length:4},(t,a)=>er(e,a,"checklist")),form:Array.from({length:2},(t,a)=>({...er(e,a+4,"form"),responses:[{key:"".concat(e.id,"-form-").concat(a+1,"-yes"),label:"Completed"},{key:"".concat(e.id,"-form-").concat(a+1,"-no"),label:"Needs Review"}]})),questions:Array.from({length:3},(t,a)=>er(e,a+6,"question")),scaffolding:Array.from({length:2},(t,a)=>er(e,a+9,"scaffolding"))},thresholds:[{id:"".concat(e.id,"-pass"),label:"Pass",from:75,to:100},{id:"".concat(e.id,"-borderline"),label:"Borderline",from:55,to:74}]}}}),[a,d]);(0,i.useEffect)(()=>{L({pending:5,completed:5,repeat:5})},[T.length]);let P=(0,i.useMemo)(()=>s.length||!d?s:z.map(e=>{var t,a;
1return{id:"fallback-".concat(e.id),activityName:e.name,activityType:e.skillType,studentCount:null!=(a=e.students)?a:0,year:e.year,sgt:e.sgt,evaluationStatus:(null==(t=e.completedAttempts)?void 0:t.length)?"Completed Evaluation":"Pending Evaluation"}}),[s,d]),V=(0,i.useMemo)(()=>r.length||!d?r:(()=>{let e=[{id:"student-1",name:"Aarav Menon",registerId:"MC25101"},{id:"student-2",name:"Diya Krishnan",registerId:"MC25102"},{id:"student-3",name:"Kavin Raj",registerId:"MC25103"},{id:"student-4",name:"Megha Suresh",registerId:"MC25104"},{id:"student-5",name:"Nithin Paul",registerId:"MC25105"},{id:"student-6",name:"Riya Thomas",registerId:"MC25106"}];return z.filter(e=>{var t;return null==(t=e.completedAttempts)?void 0:t.length}).flatMap((t,a)=>e.slice(0,2+a%2).map((e,l)=>{let s=68+(7*a+5*l)%24,i=Number((10*s/100).toFixed(1));return{id:"sample-completed-".concat(t.id,"-").concat(e.id),activityId:"fallback-".concat(t.id),activityName:t.name,activityType:t.skillType,studentId:e.id,studentName:e.name,registerId:e.registerId,rowStatus:"Completed",resultStatus:s>=75?"Completed":"Repeat",decisionTitle:s>=75?"Completed":"Repeat",thresholdLabel:s>=75?"Pass":"Borderline",submittedAt:new Date(2026,3,9+a,9,12+6*l).toISOString(),totalMarks:10,totalObtainedMarks:i,totalPercentage:s,overallCriticalMarks:2+(a+l)%3,overallCriticalPercentage:Math.max(s-8,0),checklist:{itemCount:5,obtainedMarks:Math.min(i,5),criticalObtainedMarks:1+l%2,percentage:s,criticalPercentage:Math.max(s-10,0)},form:{itemCount:2,obtainedMarks:Math.min(i,2),criticalObtainedMarks:1,percentage:Math.max(s-4,0),criticalPercentage:Math.max(s-12,0)},question:{itemCount:3,obtainedMarks:Math.min(i,3),criticalObtainedMarks:1,percentage:Math.min(s+3,100),criticalPercentage:Math.max(s-6,0)}}}))})(),[r,d]),q=(0,i.useMemo)(()=>new Map(T.map(e=>[e.id,e])),[T]),U=(0,i.useMemo)(()=>[...new Set(P.map(e=>e.year).filter(Boolean))],[P]),Z=(0,i.useMemo)(()=>[...new Set(P.filter(e=>!b||e.year===b).map(e=>e.sgt).filter(Boolean))],[P,b]),Q=(0,i.useMemo)(()=>[...new Set(P.filter(e=>(!b||e.year===b)&&(!j||e.sgt===j)).map(e=>e.activityType).filter(Boolean))],[P,j,b]),et=(0,i.useMemo)(()=>[...new Set(P.filter(e=>(!b||e.year===b)&&(!j||e.sgt===j)&&(!N||e.activityType===N)).map(e=>e.activityName).filter(Boolean))],[P,N,j,b]);(0,i.useEffect)(()=>{j&&!Z.includes(j)&&f("")},[j,Z]),(0,i.useEffect)(()=>{N&&!Q.includes(N)&&k("")},[Q,N]),(0,i.useEffect)(()=>{A&&!et.includes(A)&&M("")},[et,A]);let ea=(0,i.useMemo)(()=>c?P:P.filter(e=>(!b||e.year===b)&&(!j||e.sgt===j)&&(!N||e.activityType===N)&&(!A||e.activityName===A)),[c,P,A,N,j,b]),ec=(0,i.useMemo)(()=>c?T:T.filter(e=>(!b||e.year===b)&&(!j||e.sgt===j)&&(!N||e.type===N)&&(!A||e.title===A)),[T,c,A,N,j,b]),ed=(0,i.useMemo)(()=>{let e=S.trim().toLowerCase();return c?V.filter(t=>{var a,l;return!e||(null==(a=t.studentName)?void 0:a.toLowerCase().includes(e))||(null==(l=t.registerId)?void 0:l.toLowerCase().includes(e))}):V.filter(t=>{var a,l;return ea.some(e=>eu(t,e))&&(!e||(null==(a=t.studentName)?void 0:a.toLowerCase().includes(e))||(null==(l=t.registerId)?void 0:l.toLowerCase().includes(e)))})},[V,c,ea,S]),ev=(0,i.useMemo)(()=>{if(c){if(P.length)return P;if(V.length){let e=V[0];return[{id:e.activityId,activityName:e.activityName,activityType:e.activityType,year:e.year,sgt:e.sgt,studentCount:1}]}if(T.length){var e,t,a,l,s,i,r,n,o;let c=T[0];return[{id:null!=(e=c.id)?e:c.activityId,activityName:null!=(a=null!=(t=c.title)?t:c.activityName)?a:"Activity",activityType:null!=(s=null!=(l=c.type)?l:c.activityType)?s:"Activity",year:null!=(r=null!=(i=c.yearLabel)?i:c.year)?r:"Not set",sgt:null!=(o=null!=(n=c.sectionLabel)?n:c.sgt)?o:"Not set",studentCount:1}]}return[]}if(!S.trim())return ea;let d=new Set(ed.map(e=>e.activityId));return ea.filter(e=>d.has(e.id))},[T,V,c,P,ea,ed,S]),ey=(0,i.useMemo)(()=>new Set(ev.map(e=>e.id)),[ev]),eb=(0,i.useMemo)(()=>ec.filter(e=>ey.has(e.id)),[ec,ey]),ex=(0,i.useMemo)(()=>ed.filter(e=>!el(e)).map(e=>eo(e,q)).sort((e,t)=>{var a,l;return(Date.parse(null!=(a=t.submittedAt)?a:"")||0)-(Date.parse(null!=(l=e.submittedAt)?l:"")||0)}),[q,ed]);(0,i.useMemo)(()=>{let e=ed.filter(e=>el(e)).map(e=>eo(e,q)),t=new Set(e.map(e=>{var t;return"".concat(e.activityId,"-").concat(null!=(t=e.attemptNumber)?t:1)}));return[...e,...T.filter(e=>{var a,l,s;let i="Completed"===e.status||e.completed,r=K(null!=(a=e.action)?a:"").includes("awaiting");if(!i||e.resultsPublished)return!1;let n="".concat(null!=(l=e.id)?l:e.activityId,"-").concat(null!=(s=e.attemptNumber)?s:1);return r&&!t.has(n)}).map(e=>{var t,a,l,s,i,r,n,c,o,d,u;return{id:"awaiting-".concat(null!=(t=e.assignmentRowId)?t:e.id,"-").concat(null!=(a=e.attemptNumber)?a:1),activityId:null!=(l=e.id)?l:e.activityId,activityName:null!=(i=null!=(s=e.title)?s:e.activityName)?i:"Activity",activityType:null!=(n=null!=(r=e.type)?r:e.activityType)?n:"Activity",year:null!=(c=e.yearLabel)?c:"â",sgt:null!=(o=e.sectionLabel)?o:"â",attemptNumber:null!=(d=e.attemptNumber)?d:1,registerId:null!=(u=e.studentRegisterId)?u:"â",resultStatus:"Awaiting Results",resultsPublished:!1,awaitingResults:!0}})].sort((e,t)=>
1{var a,l;return(null!=(a=t.attemptNumber)?a:0)-(null!=(l=e.attemptNumber)?l:0)})},[T,q,ed]);let ej=(0,i.useMemo)(()=>ev.flatMap(e=>((e,t)=>{var a,l,s,i,r,n;let c=(s=e,i=t,null!=(n=null!=(r=null==s?void 0:s.assignment)?r:i.get(null==s?void 0:s.id))?n:{id:null==s?void 0:s.id,title:null==s?void 0:s.activityName,type:null==s?void 0:s.activityType,year:null==s?void 0:s.year,sgt:null==s?void 0:s.sgt,examData:null==s?void 0:s.examData,activityData:null==s?void 0:s.activityData}),o=null!=(l=null==c||null==(a=c.examData)?void 0:a.modules)?l:{};return[{key:"checklist",type:"checklist"},{key:"form",type:"form"},{key:"questions",type:"question"},{key:"scaffolding",type:"scaffolding"}].flatMap(t=>{var a;return(null!=(a=null==o?void 0:o[t.key])?a:[]).map((a,l)=>{var s,i,r,n;return{id:null!=(s=a.id)?s:"".concat(e.id,"-").concat(t.type,"-").concat(l+1),activityId:e.id,activityName:e.activityName,activityType:e.activityType,year:e.year,sgt:e.sgt,sectionType:t.type,marks:Number(a.marks)||0,isCritical:!!a.isCritical,domains:em(a),cognitiveLevel:eh(null!=(i=a.cognitive)?i:"Cognitive"===a.domain?a.domain:""),affectiveLevel:eh(null!=(r=a.affective)?r:"Affective"===a.domain?a.domain:""),psychomotorLevel:eh(null!=(n=a.psychomotor)?n:"Psychomotor"===a.domain?a.domain:"")}})})})(e,q)),[q,ev]),ef=ej.length>0,eN=(0,i.useMemo)(()=>new Set(ex.map(e=>e.activityId)),[ex]);ev.length,eb.length,eN.size,ev.length,eN.size,(0,i.useMemo)(()=>[{itemCount:ej.filter(e=>e.domains.includes("cognitive")).length,criticalCount:ej.filter(e=>e.domains.includes("cognitive")&&e.isCritical).length},{itemCount:ej.filter(e=>e.domains.includes("affective")).length,criticalCount:ej.filter(e=>e.domains.includes("affective")&&e.isCritical).length},{itemCount:ej.filter(e=>e.domains.includes("psychomotor")).length,criticalCount:ej.filter(e=>e.domains.includes("psychomotor")&&e.isCritical).length}],[ej]);let ek=(0,i.useMemo)(()=>{let e=new Map;return ex.forEach(t=>{var a,l,s,i,r,n,c,o,d,u,m,h;let p=null!=(s=null!=(l=t.studentId)?l:t.registerId)?s:t.studentName;if(!p)return;let v=Number(null!=(c=null!=(n=null!=(r=null!=(i=null==(a=t.psychomotor)?void 0:a.percentage)?i:t.psychomotorPercentage)?r:t.psychomotorScore)?n:t.totalPercentage)?c:0),y=null!=(h=e.get(p))?h:{id:p,studentName:null!=(o=t.studentName)?o:"Student",registerId:null!=(d=t.registerId)?d:"Not set",activityName:null!=(u=t.activityName)?u:"Activity",activityType:null!=(m=t.activityType)?m:"Activity",scoreTotal:0,count:0};e.set(p,{...y,scoreTotal:y.scoreTotal+(Number.isNaN(v)?0:v),count:y.count+1})}),[...e.values()].map(e=>({...e,score:e.count?e.scoreTotal/e.count:0})).sort((e,t)=>t.score-e.score).slice(0,5)},[ex]),eM=(0,i.useMemo)(()=>{let e=new Map;return ex.forEach(t=>{var a,l,s,i;let r=t.activityId;if(!r)return;let n=Number(null!=(l=null!=(a=t.totalPercentage)?a:t.score)?l:0),c=String(r),o=e.get(c),d=Number.isFinite(n)?n:0;(!o||d>=o.score)&&e.set(c,{id:c,activityName:null!=(s=t.activityName)?s:"Activity",activityType:null!=(i=t.activityType)?i:"Activity",score:d})}),[...e.values()].sort((e,t)=>t.score-e.score).slice(0,5)},[ex]),eS=m?eM:ek,eC=(0,i.useMemo)(()=>{let e=n?(e=>{let t=null==e?void 0:e.cognitive;if(!Array.isArray(t)||!t.length)return null;let a=e=>(e||[]).map(e=>({...e,value:ee(Number(e.value)||0)})),l=(ej||[]).filter(e=>e.isCritical).length,s=Math.max((ej||[]).length,1);return{cognitive:a(e.cognitive),affective:a(e.affective),psychomotor:a(e.psychomotor),criticality:[{label:"Critical",value:ee($(l,s)),color:"#ef6b5a"},{label:"Normal",value:ee($(s-l,s)),color:"#1fba8a"}]}})(n):null;if(e)return e;if(!ev.length||!ef)return G;let t=(e,t)=>{let a=e.map(e=>{let a=ej.filter(a=>K(a["".concat(t,"Level")])===K(e)).reduce((e,t)=>e+(Number(t.marks)||0),0);return{label:e,totalMarks:a,value:0}}),l=a.reduce((e,t)=>e+t.totalMarks,0);return a.map((e,a)=>({...e,value:((e,t,a)=>{var l;let s=Number(e)||0;return s<=0?0:ee(Math.max(s*("psychomotor"===a?2.15:1.45),(null!=(l=({cognitive:46,affective:42,psychomotor:58})[a])?l:38)+("psychomotor"===a?11*t%24-2:9*t%22-6)))})($(e.totalMarks,l),a,t)}))};return{cognitive:t(W,"cognitive"),affective:t(F,"affective"),psychomotor:t(Y,"psychomotor"),criticality:[{label:"Critical",value:Math.max(34,$(ej.filter(e=>e.isCritical).length,ej.length)),color:"#ef6b5a"},{label:"Normal",value:Math.min(66,$(ej.filter(e=>!e.isCritical).length,ej.length)),color:"#1fba8a"}]}},[ej,ef,n,ev.length]),ew=(0,i.useMemo)(()=>{var e;let t=null!=(e=eC.psychomotor)?e:[];return t.length?Math.round(t.reduce((e,t)=>
1e+(Number(t.value)||0),0)/t.length):0},[eC.psychomotor]),eL=(0,i.useMemo)(()=>{var e;let t=null!=(e=eC.psychomotor)?e:[],a=t.reduce((e,t)=>(Number(t.value)||0)>(Number(null==e?void 0:e.value)||0)?t:e,t[0]);return(null==a?void 0:a.label)?"".concat(a.label," leads at ").concat(ee(a.value),"%"):"No psychomotor trend yet"},[eC.psychomotor]),eT=(0,i.useMemo)(()=>{var e;let t=null!=(e=eC.cognitive)?e:[],a=t.reduce((e,t)=>(Number(t.value)||0)>(Number(null==e?void 0:e.value)||0)?t:e,t[0]);return(null==a?void 0:a.label)?"".concat(a.label," is strongest at ").concat(ee(a.value),"%"):"No cognitive trend yet"},[eC.cognitive]),eI=(0,i.useMemo)(()=>{var e;let t=null!=(e=eC.affective)?e:[],a=t.reduce((e,t)=>(Number(t.value)||0)>(Number(null==e?void 0:e.value)||0)?t:e,t[0]);return(null==a?void 0:a.label)?"".concat(a.label," peaks at ").concat(ee(a.value),"%"):"No affective trend yet"},[eC.affective]),ez=(0,i.useMemo)(()=>ev.slice(0,6).map(e=>{let t=ex.filter(t=>eu(t,e)),a=t.length?t.reduce((e,t)=>e+(Number(t.totalPercentage)||0),0)/t.length:0,l=t.filter(e=>{var t;return"completed"===K(null!=(t=e.resultStatus)?t:e.decisionTitle)}).length,s=t.filter(e=>{var t;return"repeat"===K(null!=(t=e.resultStatus)?t:e.decisionTitle)}).length,i=t.filter(e=>{var t;return"remedial"===K(null!=(t=e.resultStatus)?t:e.decisionTitle)}).length,r=[...new Set(t.map(e=>X(e.thresholdLabel)).filter(Boolean))];return{id:e.id,activityName:e.activityName,activityType:e.activityType,year:e.year,sgt:e.sgt,submitted:t.length,score:a,completedCount:l,repeatCount:s,remedialCount:i,thresholdLabel:r[0]||"Not Matched",status:t.length?"Evaluated":"Pending"}}),[ex,ev]),eP=(0,i.useMemo)(()=>c&&m&&T.length?es(T,ex,q):null,[T,q,ex,c,m]),eR=(0,i.useMemo)(()=>{var e,t,a,l,s,i,r,n,o,d,u,h;return(null!=eP?eP:ex.length?ex:c&&1===T.length?[{id:"placeholder-".concat(null!=(e=T[0].id)?e:T[0].activityId),activityId:null!=(t=T[0].id)?t:T[0].activityId,studentName:null!=(a=T[0].studentName)?a:"Student",registerId:null!=(l=T[0].studentRegisterId)?l:"â",year:null!=(s=T[0].yearLabel)?s:"â",sgt:null!=(i=T[0].sectionLabel)?i:"â",activityName:null!=(n=null!=(r=T[0].title)?r:T[0].activityName)?n:"Activity",activityType:null!=(d=null!=(o=T[0].type)?o:T[0].activityType)?d:"Activity",totalPercentage:null,totalObtainedMarks:null,totalMarks:null,resultStatus:"",thresholdLabel:"",attemptNumber:null!=(u=T[0].attemptNumber)?u:1,assignmentStatus:null!=(h=T[0].status)?h:"",isPlaceholder:!0}]:[]).map(e=>{var t,a,l;let s=null!=(t=e.assignmentStatus)?t:"",i=el(e),r=["Live Activity","Assigned","Scheduled"].includes(s),n=!!String(null!=(l=null!=(a=e.resultStatus)?a:e.decisionTitle)?l:"").trim(),o=r&&!e.resultsPublished,d=!!e.isPlaceholder||!n&&!i&&!o;return ei(e,{isEmpty:d,isAwaiting:i,isPending:o,studentView:c&&m})})},[eP,T,ex,c,m]),eV=c&&m?5:c?12:6,e_=(0,i.useMemo)(()=>eR.filter(e=>"pending"===e.outcomeKind),[eR]),eD=(0,i.useMemo)(()=>eR.filter(e=>"completed"===e.outcomeKind),[eR]),eE=(0,i.useMemo)(()=>eR.filter(e=>["repeat","remedial"].includes(e.outcomeKind)),[eR]),eH=(0,i.useMemo)(()=>{let e=c&&m?eD:eR.filter(e=>"completed"===e.outcomeKind);return c&&m?e:e.slice(0,eV)},[eD,c,eV,eR,m]),eO=(0,i.useMemo)(()=>{let e=c&&m?eE:eR.filter(e=>["repeat","remedial"].includes(e.outcomeKind));return c&&m?e:e.slice(0,eV)},[c,eE,eV,eR,m]),eB=(0,i.useMemo)(()=>ez.filter(e=>"Pending"===e.status).slice(0,5).map(e=>({id:"pending-".concat(e.id),primaryLabel:e.activityName,secondaryLabel:"No student result yet",year:e.year,sgt:e.sgt,attemptLabel:"-",score:ee(e.score),thresholdLabel:"-",resultLabel:"-",statusLabel:"Pending"})),[ez]),eW=(0,i.useMemo)(()=>{let e=eH.length,t=eO.length,a=eO.filter(e=>"remedial"===K(e.result)).length,l=eH.length?eH.reduce((e,t)=>{var a;return e+(Number(String(null!=(a=t.scorePercent)?a:"").replace("%",""))||0)},0)/eH.length:0;return{totalEvaluations:eR.length,pendingCount:e_.length,completedRows:eH.length,completedCount:e,repeatCount:t,remedialCount:a,averageScore:l}},[eH,e_,eO,eR]),eF=!ev.length&&!ed.length,eY=eB.length>0||e_.length>0||eH.length>0||eO.length>0,eG=(0,i.useMemo)(()=>(c&&m?e_:[...eB,...e_]).slice(0,c&&m?w.pending:eV),[c,eB,e_,w.pending,eV,m]),eX=(0,i.useMemo)(()=>eH.slice(0,c&&m?w.completed:eV),[eH,c,w.completed,eV,m]),eK=(0,i.useMemo)(()=>eO.slice(0,c&&m?w.repeat:eV),[c,w.repeat,eO,eV,m]),eq=(e,t,a)=>t<=a?null:(0,l.jsx)("div",{className:"dashboard-performance-load-more-wrap",children:(0,l.jsxs)("button",{type:"button",className:"dashboard-performance-load-more-btn",onClick:()=>{L(t=>({...t,[e]:t[e]+5}))},children:["Load more (",Math.min(a+5,t)," of ",t,")"]})}),eU=!c||!!h,eZ=u||eY||c&&m,eJ=c&&m?"Activity":"Student / Activity",eQ=e=>{(null==e?void 0:e.canViewResults)&&y&&y({id:e.activityId,activityId:e.activityId,attemptNumber:e.attemptNumber,title:e.activityName,type:e.activityType,action:"View Results"})};return(0,l.jsx)("section",{className:"vx-content forms-page dashboard-summary-page".concat(c?" is-embedded-dashboard":""),children:(0,l.jsxs)("div",{className:"dashboard-summary-shell",children:[c?null:(0,l.jsx)(I.A,{items:[{label:"Evaluation"},{label:"Dashboard Summary"}]}),c?null:(0,l.jsx)("section",{className:"dashboard-summary-command",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"dashboard-summary-command-kicker",children:c?"Activity Analytics":"Skill Analytics"}),(0,l.jsx)("h1",{children:p}),(0,l.jsx)("p",{children:v})]})}),c?null:(0,l.jsxs)("section",{className:"vx-card dashboard-summary-toolbar dashboard-summary-toolbar-panel",children:[(0,l.jsx)("div",{className:"dashboard-summary-toolbar-head",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("span",{className:"dashboard-summary-toolbar-kicker",children:[(0,l.jsx)(D,{size:12,strokeWidth:2}),"Analytics Filters"]}),(0,l.jsx)("strong",{children:"Refine the dashboard data source"})]})}),(0,l.jsxs)("div",{className:"dashboard-summary-toolbar-grid",children:[c?null:(0,l.jsx)(en,{label:"Year",value:b,placeholder:"All years",options:U,onChange:g}),c?null:(0,l.jsx)(en,{label:"SGT",value:j,placeholder:"All groups",options:Z,onChange:f}),(0,l.jsx)(en,{label:"Activity Type",value:N,placeholder:"All types",options:Q,onChange:k}),(0,l.jsx)(en,{label:"Activity",value:A,placeholder:"All activities",options:et,onChange:M}),(0,l.jsxs)("label",{className:"dashboard-summary-toolbar-search",children:[(0,l.jsx)("span",{children:"Search Student"}),(0,l.jsxs)("span",{className:"dashboard-summary-toolbar-searchbox",children:[(0,l.jsx)(H,{size:16,strokeWidth:2}),(0,l.jsx)("input",{type:"search",value:S,onChange:e=>C(e.target.value),placeholder:"Search student name or register number"})]})]})]})]}),eF&&!c?(0,l.jsx)("section",{className:"eval-empty dashboard-summary-empty-note",children:(0,l.jsxs)("div",{className:"eval-empty-copy",children:[(0,l.jsx)(_,{size:18,strokeWidth:2}),(0,l.jsx)("strong",{children:"No real dashboard records yet."}),(0,l.jsx)("p",{children:"Showing sample graph data for preview. Assign activities and complete evaluations to replace this with real analytics."})]})}):null,c&&o?(0,l.jsxs)("section",{className:"dashboard-summary-page-loader",role:"status","aria-live":"polite",children:[(0,l.jsx)(x.A,{size:44,thickness:4,"aria-label":"Loading"}),(0,l.jsx)("strong",{children:"Loading analyticsâ¦"}),(0,l.jsx)("p",{children:"Fetching evaluation data for this activity."})]}):(0,l.jsxs)(l.Fragment,{children:[eU?(0,l.jsxs)("section",{className:"dashboard-summary-domain-grid",children:[(0,l.jsxs)("article",{className:"dashboard-summary-domain-card is-indigo",children:[(0,l.jsxs)("div",{className:"dashboard-summary-domain-head",children:[(0,l.jsx)("span",{className:"dashboard-summary-domain-icon","aria-hidden":"true",children:(0,l.jsx)(R,{size:16,strokeWidth:2})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"Cognitive Domain"}),(0,l.jsx)("span",{children:eT})]})]}),(0,l.jsx)(ep,{data:eC.cognitive})]}),(0,l.jsxs)("article",{className:"dashboard-summary-domain-card is-amber",children:[(0,l.jsxs)("div",{className:"dashboard-summary-domain-head",children:[(0,l.jsx)("span",{className:"dashboard-summary-domain-icon","aria-hidden":"true",children:(0,l.jsx)(E,{size:16,strokeWidth:2})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"Affective Domain"}),(0,l.jsx)("span",{children:eI}
1)]})]}),(0,l.jsx)(eg,{data:eC.affective})]}),(0,l.jsxs)("article",{className:"dashboard-summary-domain-card is-green",children:[(0,l.jsxs)("div",{className:"dashboard-summary-domain-head",children:[(0,l.jsx)("span",{className:"dashboard-summary-domain-icon","aria-hidden":"true",children:(0,l.jsx)(O,{size:16,strokeWidth:2})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"Psychomotor Domain"}),(0,l.jsx)("span",{children:eL})]}),(0,l.jsxs)("strong",{className:"dashboard-psy-average-pill",children:[ew,"% avg"]})]}),(0,l.jsx)(eA,{data:eC.psychomotor})]}),(0,l.jsxs)("article",{className:"dashboard-summary-domain-card dashboard-top-performer-card",children:[(0,l.jsxs)("div",{className:"dashboard-summary-domain-head",children:[(0,l.jsx)("span",{className:"dashboard-summary-domain-icon dashboard-top-performer-icon","aria-hidden":"true",children:(0,l.jsx)(B,{size:16,strokeWidth:2})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:m?"Top Activities":"Top 5 Performers"}),(0,l.jsx)("span",{children:m?"Ranked by your performance %":"Based on selected activity"})]})]}),(0,l.jsx)("div",{className:"dashboard-top-performer-list",children:eS.length?eS.map((e,t)=>{let a=m?X(e.activityName).split(/\s+/).map(e=>e.charAt(0)).join("").slice(0,2).toUpperCase():X(e.studentName).split(/\s+/).map(e=>e.charAt(0)).join("").slice(0,2).toUpperCase(),s=ee(e.score);return(0,l.jsxs)("article",{className:"dashboard-top-performer-row",children:[(0,l.jsx)("span",{className:"dashboard-top-performer-rank",children:String(t+1).padStart(2,"0")}),(0,l.jsx)("span",{className:"dashboard-top-performer-avatar",children:a||(m?"AC":"ST")}),(0,l.jsxs)("div",{className:"dashboard-top-performer-copy",children:[(0,l.jsx)("strong",{children:m?e.activityName:e.studentName}),(0,l.jsx)("span",{children:m?e.activityType:"".concat(e.registerId," / ").concat(e.activityType)})]}),(0,l.jsxs)("strong",{className:"dashboard-top-performer-score",children:[s,"%"]})]},e.id)}):(0,l.jsxs)("div",{className:"dashboard-top-performer-empty",children:[(0,l.jsx)("strong",{children:m?"No activities ranked yet":"No performers found"}),(0,l.jsx)("span",{children:m?"Complete evaluated activities to see your top scores.":"Complete evaluations or adjust filters to view rankings."})]})})]})]}):null,eZ?(0,l.jsx)("section",{className:"dashboard-performance-grid",children:(0,l.jsxs)("article",{className:"dashboard-performance-card dashboard-performance-card--combined",children:[(0,l.jsx)("div",{className:"dashboard-performance-head",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{children:"Evaluation Performance"}),(0,l.jsx)("strong",{children:"Track student evaluation status by activity"})]})}),(0,l.jsxs)("div",{className:"dashboard-performance-chipbar",children:[(0,l.jsxs)("article",{children:[(0,l.jsx)("small",{children:"Total"}),(0,l.jsx)("strong",{children:eW.totalEvaluations})]}),(0,l.jsxs)("article",{children:[(0,l.jsx)("small",{children:"Pending"}),(0,l.jsx)("strong",{children:eW.pendingCount})]}),(0,l.jsxs)("article",{children:[(0,l.jsx)("small",{children:"Completed"}),(0,l.jsx)("strong",{children:eW.completedCount})]}),(0,l.jsxs)("article",{children:[(0,l.jsx)("small",{children:"Repeat"}),(0,l.jsx)("strong",{children:eW.repeatCount+eW.remedialCount})]}),(0,l.jsxs)("article",{children:[(0,l.jsx)("small",{children:"Avg Score"}),(0,l.jsxs)("strong",{children:[ee(eW.averageScore),"%"]})]})]}),(0,l.jsxs)("div",{className:"dashboard-performance-board",children:[(0,l.jsxs)("section",{className:"dashboard-performance-group",children:[(0,l.jsx)("div",{className:"dashboard-performance-group-head",children:(0,l.jsxs)("div",{className:"dashboard-performance-group-title is-pending",children:[(0,l.jsx)("span",{children:"Pending Evaluation"}),(0,l.jsx)("strong",{children:e_.length})]})}),(0,l.jsxs)("div",{className:"dashboard-performance-table-head is-pending",children:[(0,l.jsx)("span",{children:eJ}),(0,l.jsxs)("div",{className:"dashboard-performance-meta-head",children:[(0,l.jsx)("span",{children:"Year / SGT"}),(0,l.jsx)("span",{children:"Attempt"}),(0,l.jsx)("span",{children:"Score"}),(0,l.jsx)("span",{children:"Threshold"}),(0,l.jsx)("span",{children:"Result"}),(0,l.jsx)("span",{children:"Status"})]})]}),(0,l.jsx)("div",{className:"dashboard-performance-list",children:eG.length?eG.map(e=>{var t,a;return(0,l.jsxs)("article",{className:"dashboard-performance-row dashboard-performance-row--board is-pending",children:[(0,l.jsx)("div",{className:"dashboard-performance-identity",children:(0,l.jsx)("strong",{children:e.primaryLabel})}),(0,l.jsxs)("div",{className:"dashboard-performance-meta-grid",children:[(0,l.jsxs)("div",{className:"dashboard-performance-cell",children:[(0,l.jsx)("strong",{children:e.year}),(0,l.jsx)("small",{children:e.sgt})]}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("strong",{children:e.attemptLabel})}),(0,l.jsx)("div",{className:"dashboard-performance-cell dashboard-performance-cell--score",children:(0,l.jsx)("strong",{children:null!=(a=null!=(t=e.scoreMarks)?t:e.scorePercent)?a:"â"})}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("span",{className:"dashboard-performance-pill ".concat(J(e.thresholdLabel)),children:e.thresholdLabel})}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("span",{className:"dashboard-performance-pill ".concat(J(e.resultLabel)),children:e.resultLabel})}),(0,l.jsx)("div",{className:"dashboard-performance-outcome",children:(0,l.jsx)("span",{className:"dashboard-performance-pill is-warn",children:e.statusLabel})})]})]},e.id)}):(0,l.jsxs)("div",{className:"dashboard-performance-empty",children:[(0,l.jsx)("strong",{children:"No pending evaluations"}),(0,l.jsx)("span",{children:"All visible activities already have evaluation records."})]})}),c&&m?eq("pending",e_.length,w.pending):null]}),(0,l.jsxs)("section",{className:"dashboard-performance-group",children:[(0,l.jsx)("div",{className:"dashboard-performance-group-head",children:(0,l.jsxs)("div",{className:"dashboard-performance-group-title is-completed",children:[(0,l.jsx)("span",{children:"Completed Evaluation"}),(0,l.jsx)("strong",{children:eH.length})]})}),(0,l.jsxs)("div",{className:"dashboard-performance-table-head",children:[(0,l.jsx)("span",{children:eJ}),(0,l.jsxs)("div",{className:"dashboard-performance-meta-head",children:[(0,l.jsx)("span",{children:"Year / SGT"}),(0,l.jsx)("span",{children:"Attempt"}),(0,l.jsx)("span",{children:"Score"}),(0,l.jsx)("span",{children:"Threshold"}),(0,l.jsx)("span",{children:"Result"}),(0,l.jsx)("span",{children:"Status"})]})]}),(0,l.jsx)("div",{className:"dashboard-performance-list",children:eX.length?eX.map(e=>(0,l.jsxs)("article",{className:"dashboard-performance-row dashboard-performance-row--board",children:[(0,l.jsx)("div",{className:"dashboard-performance-identity",children:(0,l.jsx)("strong",{children:e.primaryLabel})}),(0,l.jsxs)("div",{className:"dashboard-performance-meta-grid",children:[(0,l.jsxs)("div",{className:"dashboard-performance-cell",children:[(0,l.jsx)("strong",{children:e.year}),(0,l.jsx)("small",{children:e.sgt})]}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("strong",{children:e.attemptLabel})}),(0,l.jsxs)("div",{className:"dashboard-performance-cell dashboard-performance-cell--score",children:[(0,l.jsx)("strong",{children:e.scoreMarks}),(0,l.jsx)("small",{children:e.scorePercent})]}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("span",{className:"dashboard-performance-pill ".concat(J(e.thresholdLabel)),children:e.thresholdLabel})}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("span",{className:"dashboard-performance-pill ".concat(J(e.resultLabel)),children:e.resultLabel})}),(0,l.jsxs)("div",{className:"dashboard-performance-outcome",children:[(0,l.jsx)("span",{className:"dashboard-performance-pill is-good",children:e.statusLabel}),e.canViewResults&&y?(0,l.jsx)("button",{type:"button",className:"dashboard-performance-results-btn",onClick:()=>eQ(e),children:"View Results"}):null]})]})]},e.id)):(0,l.jsxs)("div",{className:"dashboard-performance-empty",children:[(0,l.jsx)("strong",{children:"No completed evaluations"}),(0,l.jsx)("span",{children:"Completed student rows will appear here."})]})}),c&&m?eq("completed",eH.length,w.completed):null]}),(0,l.jsxs)("section",{className:"dashboard-performance-group",children:[(0,l.jsx)("div",{className:"dashboard-performance-group-head",children:(0,l.jsxs)("div",{className:"dashboard-performance-group-title is-repeat",children:[(0,l.jsx)("span",{children:"Repeat / Remedial"}),(0,l.jsx)("strong",{children:eO.length})]})}),(0,l.jsxs)("div",{className:"dashboard-performance-table-head",children:[(0,l.jsx)("span",{children:eJ}),(0,l.jsxs)("div",{className:"dashboard-performance-meta-head",children:[(0,l.jsx)("span",{children:"Year / SGT"}),(0,l.jsx)("span",{children:"Attempt"}),(0,l.jsx)("span",{children:"Score"}),(0,l.jsx)("span",{children:"Threshold"}),(0,l.jsx)("span",{children:"Result"}),(0,l.jsx)("span",{children:"Status"})]})]}),(0,l.jsx)("div",{className:"dashboard-performance-list",children:eK.length?eK.map(e=>(0,l.jsxs)("article",{className:"dashboard-performance-row dashboard-performance-row--board",children:[(0,l.jsxs)("div",{className:"dashboard-performance-identity",children:[(0,l.jsx)("strong",{children:e.primaryLabel}),(0,l.jsx)("small",{children:e.secondaryLabel})]}),(0,l.jsxs)("div",{className:"dashboard-performance-meta-grid",children:[(0,l.jsxs)("div",{className:"dashboard-performance-cell",children:[(0,l.jsx)("strong",{children:e.year}),(0,l.jsx)("small",{children:e.sgt})]}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("strong",{children:e.attemptLabel})}),(0,l.jsxs)("div",{className:"dashboard-performance-cell dashboard-performance-cell--score",children:[(0,l.jsx)("strong",{children:e.scoreMarks}),(0,l.jsx)("small",{children:e.scorePercent})]}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("span",{className:"dashboard-performance-pill ".concat(J(e.thresholdLabel)),children:e.thresholdLabel})}),(0,l.jsx)("div",{className:"dashboard-performance-cell",children:(0,l.jsx)("span",{className:"dashboard-performance-pill ".concat(J(e.resultLabel)),children:e.resultLabel})}),(e=>{["repeat","remedial"].includes(K(e.result));let t=e.canViewResults&&y;return(0,l.jsxs)("div",{className:"dashboard-performance-outcome",children:[(0,l.jsx)("span",{className:"dashboard-performance-pill ".concat("meets"===K(e.resultLabel)?"is-soft":"is-warn"),children:e.statusLabel}),t?(0,l.jsx)("button",{type:"button",className:"dashboard-performance-results-btn",onClick:()=>eQ(e),children:"View Results"}):null]})})(e)]})]},e.id)):(0,l.jsxs)("div",{className:"dashboard-performance-empty",children:[(0,l.jsx)("strong",{children:"No repeat or remedial evaluations"}),(0,l.jsx)("span",{children:"Students needing follow-up will appear here."})]})}),c&&m?eq("repeat",eO.length,w.repeat):null]})]})]})}):null]}),null]})})}var ew=a(20274);a(83900),a(63258);let eL=["All","Assigned","Live Activity","Completed","Activity Results"],eT=e=>t=>{let{size:a=16,strokeWidth:s,sx:i,...r}=t;return(0,l.jsx)(e,{sx:{fontSize:a,...i},...r})},eI=eT(m),ez=eT(o.A),eP=eT(c),eR=eT(d),eV=eT(n),e_=eT(u),eD=eT(h),eE=eT(p),eH=eT(v.A),eO=eT(y.A),eB={Assigned:"Assigned","Live Activity":"Live Activity",Completed:"Completed","Activity Results":"Activity Results"},eW=e=>String(null!=e?e:"").trim(),eF=e=>eW(e).toLowerCase(),eY=e=>[null==e?void 0:e.id,null==e?void 0:e.title,null==e?void 0:e.type,null==e?void 0:e.studentId,null==e?void 0:e.studentName].map(eW).join("::"),eG=eT(b.A);function eX(e){let t,a,r,n,c,o,d,u,m=(0,s.c)(21),{label:h,value:p,placeholder:v,options:y,onChange:b}=e,[x,g]=(0,i.useState)(!1),j=p||v,f="dashboard-summary-toolbar-field dashboard-summary-filter ".concat(x?"is-open":"");return m[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{e.currentTarget.contains(e.relatedTarget)||g(!1)},m[0]=t):t=m[0],m[1]!==h?(a=(0,l.jsx)("span",{children:h}),m[1]=h,m[2]=a):a=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(r=()=>g(eU),m[3]=r):r=m[3],m[4]!==j?(n=(0,l.jsx)("span",{children:j}),m[4]=j,m[5]=n):n=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,l.jsx)(eG,{size:16}),m[6]=c):c=m[6],m[7]!==x||m[8]!==n?(o=(0,l.jsxs)("button",{type:"button",className:"dashboard-summary-filter-trigger","aria-haspopup":"listbox","aria-expanded":x,onClick:r,children:[n,c]}),m[7]=x,m[8]=n,m[9]=o):o=m[9],m[10]!==x||m[11]!==b||m[12]!==y||m[13]!==v||m[14]!==p?(d=x?(0,l.jsxs)("div",{className:"dashboard-summary-filter-menu",role:"listbox",children:[(0,l.jsx)("button",{type:"button",role:"option","aria-selected":!p,className:p?"":"is-selected",onMouseDown:eq,onClick:()=>{b(""),g(!1)},children:v}),y.map(e=>(0,l.jsx)("button",{type:"button",role:"option","aria-selected":p===e,className:p===e?"is-selected":"",onMouseDown:eK,onClick:()=>{b(e),g(!1)},children:e},e))]}):null,m[10]=x,m[11]=b,m[12]=y,m[13]=v,m[14]=p,m[15]=d):d=m[15],m[16]!==f||m[17]!==a||m[18]!==o||m[19]!==d?(u=(0,l.jsxs)("div",{className:f,onBlur:t,children:[a,o,d]}),m[16]=f,m[17]=a,m[18]=o,m[19]=d,m[20]=u):u=m[20],u}function eK(e){return e.preventDefault()}function eq(e){return e.preventDefault()}function eU(e){return!e}function eZ(e){var t,a,i,r,n,c,o,d,u;let m,h,p,v,y,b,x,g,j,f,N,k,A,M,S,C,w=(0,s.c)(57),{item:L,onStartActivity:T,onViewResult:I,onSelectAnalytics:z,isSelected:P,
1scheduleNow:R}=e,V=void 0===R?Date.now():R,_=eJ;if(w[0]!==L.attemptCount){let e=null!=(r=null==(i=L.attemptCount)||null==(a=i.split("/"))||null==(t=a[0])?void 0:t.trim())?r:"1";m=Number.parseInt(e,10)>0?e:"1",w[0]=L.attemptCount,w[1]=m}else m=w[1];let D=m,E="is-".concat(String(L.type).toLowerCase().replace(/\s+/g,"-")),H=String(null!=(n=L.action)?n:"").trim().toLowerCase(),O=!!L.resultsPublished&&("view results"===H||"Completed"===L.status),{openTs:B,isLocked:W}=(0,ew.yS)(L,V),F=B>0&&!W,Y=W?(0,ew.mv)(B,V):"";w[2]!==L.createdDate||w[3]!==L.scheduledDate?(h=_(L.scheduledDate)||_(L.createdDate),w[2]=L.createdDate,w[3]=L.scheduledDate,w[4]=h):h=w[4];let G=h;w[5]!==L.createdTime||w[6]!==L.scheduledTime?(p=_(L.scheduledTime)||_(L.createdTime),w[5]=L.createdTime,w[6]=L.scheduledTime,w[7]=p):p=w[7];let X=p,K=!!G,q=!!X,U="Completed"===L.status,Z=U&&!O,J=O||!U&&!W&&("primary"===L.tone||"start activity"===H||F),Q=W?Y?"Starts in ".concat(Y):q?"Opens at ".concat(X):null!=(c=L.action)?c:"Yet to Start":O?"View Results":Z?null!=(o=L.action)?o:"Awaiting results":J?"Start Activity":null!=(d=L.action)?d:"Yet to Start",$=W?"Scheduled":U?"Completed":"live activity"===String(L.status).toLowerCase()||"start activity"===H||F?"
1Live Activity":null!=(u=L.status)?u:"Assigned",ee="is-".concat(String($).toLowerCase().replace(/\s+/g,"-")),et="my-skills-activity-card".concat(void 0!==P&&P?" is-selected":"");w[8]!==O||w[9]!==L||w[10]!==z?(v=()=>("Completed"===L.status||O)&&(null==z?void 0:z(L)),w[8]=O,w[9]=L,w[10]=z,w[11]=v):v=w[11];let ea="my-skills-activity-type ".concat(E);w[12]!==L.type||w[13]!==ea?(y=(0,l.jsx)("span",{className:ea,children:L.type}),w[12]=L.type,w[13]=ea,w[14]=y):y=w[14];let el="my-skills-status-pill ".concat(ee);w[15]!==$||w[16]!==el?(b=(0,l.jsx)("span",{className:el,children:$}),w[15]=$,w[16]=el,w[17]=b):b=w[17],w[18]!==b||w[19]!==y?(x=(0,l.jsxs)("div",{className:"my-skills-activity-card-head",children:[y,b]}),w[18]=b,w[19]=y,w[20]=x):x=w[20],w[21]!==L.title?(g=(0,l.jsx)("strong",{className:"my-skills-activity-title",children:L.title}),w[21]=L.title,w[22]=g):g=w[22],w[23]!==D?(j=(0,l.jsxs)("span",{className:"my-skills-attempt-pill",children:["Attempt ",D]}),w[23]=D,w[24]=j):j=w[24],w[25]!==G||w[26]!==K?(f=K?(0,l.jsxs)("span",{className:"my-skills-date-pill",children:[(0,l.jsx)(ez,{size:12,strokeWidth:2}),G]}):null,w[25]=G,w[26]=K,w[27]=f):f=w[27],w[28]!==X||w[29]!==q?(N=q?(0,l.jsx)("span",{className:"my-skills-time-pill",children:X}):null,w[28]=X,w[29]=q,w[30]=N):N=w[30],w[31]!==j||w[32]!==f||w[33]!==N?(k=(0,l.jsxs)("div",{className:"my-skills-activity-info-row",children:[j,f,N]}),w[31]=j,w[32]=f,w[33]=N,w[34]=k):k=w[34];let es="tool-btn ".concat(O?"ghost":J?"green":"ghost"," my-skills-activity-cta ").concat(J?"":"is-muted");w[35]!==J||w[36]!==O||w[37]!==L||w[38]!==T||w[39]!==I?(A=e=>{e.stopPropagation(),J&&(O?null==I||I(L):null==T||T(L))},w[35]=J,w[36]=O,w[37]=L,w[38]=T,w[39]=I,w[40]=A):A=w[40];let ei=!J;return w[41]!==J||w[42]!==O?(M=J&&!O?(0,l.jsx)(eD,{size:12,strokeWidth:2.2}):null,w[41]=J,w[42]=O,w[43]=M):M=w[43],w[44]!==Q||w[45]!==es||w[46]!==A||w[47]!==ei||w[48]!==M?(S=(0,l.jsx)("div",{className:"my-skills-activity-foot",children:(0,l.jsxs)("button",{type:"button",className:es,onClick:A,disabled:ei,children:[M,Q]})}),w[44]=Q,w[45]=es,w[46]=A,w[47]=ei,w[48]=M,w[49]=S):S=w[49],w[50]!==x||w[51]!==g||w[52]!==k||w[53]!==S||w[54]!==et||w[55]!==v?(C=(0,l.jsxs)("article",{className:et,onClick:v,children:[x,g,k,S]}),w[50]=x,w[51]=g,w[52]=k,w[53]=S,w[54]=et,w[55]=v,w[56]=C):C=w[56],C}function eJ(e){let t=String(null!=e?e:"").trim();
1return t&&"not set"!==t.toLowerCase()?t:""}function eQ(e){var t,a,s,r,n,c,o,d,u;let{assignedActivities:m=[],evaluationRecords:h=[],completedEvaluationRows:p=[],domainSeriesByActivity:v={},skillBoardLoading:y=!1,onStartActivity:b,onViewResult:g}=e,[j,f]=(0,i.useState)("All"),[N,k]=(0,i.useState)("Overall Activity"),[A,M]=(0,i.useState)(""),[S,C]=(0,i.useState)(""),[w,L]=(0,i.useState)(""),[T,I]=(0,i.useState)(""),[z,P]=(0,i.useState)(0),[R,V]=(0,i.useState)(()=>Date.now()),_=(0,i.useRef)(null),D=(0,i.useRef)(null),E=(0,i.useMemo)(()=>m.map(e=>{var t,a,l,s,i,r;let n=String(null!=(l=e.action)?l:"").trim(),c=!!e.resultsPublished,o=c?"View Results":n||("Completed"===e.status?"Awaiting results":"Start Activity");return{...e,yearLabel:(0,ew.FE)(e.yearLabel,null!=(s=null==(t=e.learner)?void 0:t.year_name)?s:null==(a=e.learner)?void 0:a.yearName),action:o,tone:c?"secondary":null!=(i=e.tone)?i:"Completed"===e.status?"ghost":"primary",status:null!=(r=e.status)?r:"Assigned"}}),[m]);(0,i.useEffect)(()=>{if(!E.some(e=>(0,ew.yS)(e).isLocked))return;let e=window.setInterval(()=>V(Date.now()),1e3);return()=>window.clearInterval(e)},[E]);let H=function(e){var t,a;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R,s=(0,ew.yS)(e,l);if(s.isLocked)return"Scheduled";if("Completed"===e.status)return"Completed";let i=String(null!=(t=e.action)?t:"").trim().toLowerCase();return"Live Activity"===e.status||"start activity"===i||s.openTs>0&&!s.isLocked?"Live Activity":null!=(a=e.status)?a:"Assigned"},O=(0,i.useMemo)(()=>E.filter(e=>!!e.resultsPublished),[E]),B=(0,i.useMemo)(()=>[...new Set(E.map(e=>eW(e.type)).filter(Boolean))].sort((e,t)=>e.localeCompare(t)),[E]),W=(0,i.useMemo)(()=>[...new Set((S?E.filter(e=>eW(e.type)===S):E).map(e=>eW(e.title)).filter(Boolean))].sort((e,t)=>e.localeCompare(t)),[E,S]);(0,i.useEffect)(()=>{w&&(W.includes(w)||L(""))},[w,W]);let F=(0,i.useMemo)(()=>{let e=A.trim().toLowerCase();return E.filter(t=>{let a=H(t),l="All"===j||("Activity Results"===j?!!t.resultsPublished:"Assigned"===j?"Assigned"===a||"Scheduled"===a:"Live Activity"===j?"Live Activity"===a:t.status===j&&"Scheduled"!==a),s=!S||eW(t.type)===S,i=!w||eW(t.title)===w,r=!e||[t.title,t.type,a].some(t=>String(t).toLowerCase().includes(e));return l&&s&&i&&r})},[E,j,w,S,A,R]),Y=(0,i.useMemo)(()=>{var e,t,a;if(T){let e=E.find(e=>eY(e)===T);if(e)return e}if(O[0])return O[0];let l=p[0];if(l){let t=E.find(e=>{var t;return eW(null!=(t=e.id)?t:e.activityId)===eW(l.activityId)});return t||{id:l.activityId,activityId:l.activityId,title:l.activityName,type:l.activityType,studentName:l.studentName,studentRegisterId:l.registerId,yearLabel:l.year,sectionLabel:l.sgt,attemptNumber:null!=(e=l.attemptNumber)?e:1,status:"Completed"}}return null!=(a=null!=(t=E.find(e=>"Completed"===e.status))?t:E[0])?a:null},[E,p,T,O]);(0,i.useMemo)(()=>{if(!Y)return[];let e=eF(Y.title),t=eF(Y.type),a=eW(Y.id);return h.filter(l=>eW(l.id)===a||eF(l.activityName)===e&&eF(l.activityType)===t)},[h,Y]),(0,i.useMemo)(()=>{if(!Y)return[];let e=eW(Y.id),t=eF(Y.title),a=eF(Y.type),l=eF(Y.studentId),s=eF(Y.studentName),i=eF(Y.registerId);return p.filter(r=>(eW(r.activityId)===e||eF(r.activityName)===t&&eF(r.activityType)===a)&&(!l&&!s&&!i||eF(r.studentId)===l||eF(r.studentName)===s||eF(r.registerId)===i)).sort((e,t)=>{var a,l;let s=(Number(t.attemptNumber)||0)-(Number(e.attemptNumber)||0);return 0!==s?s:(Date.parse(null!=(a=t.submittedAt)?a:"")||0)-(Date.parse(null!=(l=e.submittedAt)?l:"")||0)})},[p,Y]),(0,i.useMemo)(()=>Y?[Y]:[],[Y]);let G=(0,i.useMemo)(()=>{var e,t,a;if(!Y)return null;let l=eW(null!=(e=Y.id)?e:Y.activityId);if(!l||!v||"object"!=typeof v)return null;let s=null!=(a=null!=(t=v[l])?t:v[String(l)])?a:null;return s&&(Y.resultsPublished||"completed"===eF(Y.status)||eF(Y.action).includes("view result"))?s:null},[v,Y]);(0,i.useEffect)(()=>{T&&_.current&&_.current.scrollIntoView({behavior:"smooth",block:"start"})},[T]);let X=(0,i.useMemo)(()=>[{label:"Assigned",value:E.filter(e=>"Assigned"===H(e)||"Scheduled"===H(e)).length,icon:eV,tone:"is-assigned"},{label:"Live Activity",value:E.filter(e=>"Live Activity"===H(e)).length,icon:eI,tone:"is-live",isLive:!0},{label:"Completed",value:E.filter(e=>"Completed"===e.status).length,icon:eR,tone:"is-completed"},{label:"Overall Activity",value:E.length,icon:e_,tone:"is-overall"},{label:"Activity Results",value:O.length,icon:eP,tone:"is-results"}],[E,R,O.length]),K=(0,i.useMemo)(()=>E.filter(e=>"Live Activity"===H(e)),[E,R]),q=null!=(a=null!=(t=K[z])?t:K[0])?a:null,U=(0,i.useMemo)(()=>{var e;return null!=(e=E.filter(e=>"Scheduled"===H(e))[0])?e:null},[E,R]),Z=null!=q?q:U,J=Z?(0,ew.yS)(Z,R):null,Q=(null==J?void 0:J.isLocked)?(0,ew.mv)(J.openTs,R):"",$=K.length>1;(0,i.useEffect)(()=>{z>=K.length&&P(0)},[z,K.length]);let ee=e=>{$&&P(t=>(t+e+K.length)%K.length)},et=e=>{null==b||b(e)},ea=e=>{null==g||g(e)},el=e=>{I(eY(e))};return(0,l.jsx)("section",{className:"vx-content ospe-page my-skills-page",children:(0,l.jsxs)("div",{className:"ospe-shell my-skills-shell",children:[(0,l.jsxs)("section",{className:"my-skills-overview",children:[(0,l.jsxs)("div",{className:"my-skills-overview-main",children:[(0,l.jsx)("span",{className:"ospe-kicker",children:"My Skills"}),(0,l.jsxs)("div",{className:"my-skills-overview-copy",children:[(0,l.jsx)("h1",{children:"My Skill Activity"}
1),(0,l.jsx)("p",{children:y?"Loading your skill activitiesâ¦":E.length?"".concat(E.length," activities linked to your profile."):"There is no activity assigned to you."})]}),(0,l.jsxs)("div",{className:"my-skills-overview-inline",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("strong",{children:E.length})," Overall"]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("strong",{children:X[1].value})," Live"]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("strong",{children:X[4].value})," Results"]})]})]}),(0,l.jsxs)("div",{className:"my-skills-live-card",children:[(0,l.jsxs)("div",{className:"my-skills-live-card-top",children:[(0,l.jsxs)("span",{className:"my-skills-live-indicator",children:[(0,l.jsx)("span",{className:"my-skills-live-indicator-dot","aria-hidden":"true"}),(null==J?void 0:J.isLocked)?"Scheduled activity":"Live activity"]}),(0,l.jsx)("span",{className:"my-skills-live-card-date",children:null!=(r=null!=(s=null==Z?void 0:Z.scheduledDate)?s:null==Z?void 0:Z.createdDate)?r:"No date"})]}),(0,l.jsxs)("div",{className:"my-skills-live-card-content",children:[(0,l.jsx)("strong",{className:"my-skills-live-card-title",title:null!=(n=null==Z?void 0:Z.title)?n:"No activity right now",children:null!=(c=null==Z?void 0:Z.title)?c:"No activity right now"}),(0,l.jsx)("p",{children:Z?(null==J?void 0:J.isLocked)?"Opens at ".concat(Z.scheduledTime||"scheduled time","."):"Activity is ready to start now.":"New active assignments will appear here when they are available."})]},null!=(d=null!=(o=null==Z?void 0:Z.id)?o:null==Z?void 0:Z.title)?d:"empty-live"),Z?(0,l.jsxs)("div",{className:"my-skills-live-card-actions",children:[(0,l.jsxs)("button",{type:"button",className:"tool-btn ".concat((null==J?void 0:J.isLocked)?"ghost":"green"," my-skills-live-card-cta"),disabled:!!(null==J?void 0:J.isLocked),onClick:()=>{null!=J&&J.isLocked||null==b||b(Z)},children:[(null==J?void 0:J.isLocked)?null:(0,l.jsx)(eD,{size:13,strokeWidth:2.2}),(null==J?void 0:J.isLocked)?Q?"Starts in ".concat(Q):null!=(u=null==Z?void 0:Z.action)?u:"Yet to Start":"Start Activity"]}),$?(0,l.jsxs)("div",{className:"my-skills-live-slider-controls","aria-label":"Live activity slider controls",children:[(0,l.jsx)("button",{type:"button",className:"my-skills-live-slider-btn",onClick:()=>ee(-1),"aria-label":"Previous live activity",children:(0,l.jsx)(eH,{size:16,strokeWidth:2.2})}),(0,l.jsxs)("span",{className:"my-skills-live-slider-count",children:[z+1,"/",K.length]}),(0,l.jsx)("button",{type:"button",className:"my-skills-live-slider-btn",onClick:()=>ee(1),"aria-label":"Next live activity",children:(0,l.jsx)(eO,{size:16,strokeWidth:2.2})})]}):null]}):null,$?(0,l.jsx)("div",{className:"my-skills-live-slider-dots","aria-label":"Live activities",children:K.map((e,t)=>{var a;return(0,l.jsx)("button",{type:"button",className:"my-skills-live-slider-dot ".concat(t===z?"is-active":""),onClick:()=>P(t),"aria-label":"Show live activity ".concat(t+1)},"".concat(null!=(a=e.id)?a:e.title,"-").concat(t))})}):null]})]}),y?(0,l.jsxs)("section",{className:"my-skills-metrics-loader dashboard-summary-page-loader",role:"status","aria-live":"polite",children:[(0,l.jsx)(x.A,{size:40,thickness:4,"aria-label":"Loading skill data"}),(0,l.jsx)("strong",{children:"Loading your skill dataâ¦"}),(0,l.jsx)("p",{children:"Fetching activities and dashboard analytics."})]}):(0,l.jsx)("div",{className:"my-skills-metrics-grid",role:"list","aria-label":"Activity metrics",children:X.map(e=>{let t=e.icon;return(0,l.jsxs)("button",{type:"button",className:"my-skills-metric-card ".concat(e.tone," ").concat(N===e.label?"is-active":""),role:"listitem",onClick:()=>{var t,a;k(t=e.label),f(null!=(a=eB[t])?a:"All"),window.requestAnimationFrame(()=>{var e;null==(e=D.current)||e.scrollIntoView({behavior:"smooth",block:"start"})})},children:[(0,l.jsxs)("span",{className:"my-skills-metric-card-icon",children:[(0,l.jsx)(t,{size:16,strokeWidth:2.1}),e.isLive?(0,l.jsx)("span",{className:"my-skills-metric-live-dot","aria-hidden":"true"}):null]}),(0,l.jsxs)("div",{className:"my-skills-metric-card-copy",children:[(0,l.jsx)("strong",{children:e.value}),(0,l.jsx)("span",{children:e.label})]})]},e.label)})}),!y&&E.length>0?(0,l.jsx)("section",{className:"vx-card dashboard-summary-toolbar dashboard-summary-toolbar-panel my-skills-activity-filters","aria-label":"Activity filters",children:(0,l.jsxs)("div",{className:"dashboard-summary-toolbar-grid",children:[(0,l.jsx)(eX,{label:"Activity Type",value:S,placeholder:"All types",options:B,onChange:e=>{C(e),L("")}}),(0,l.jsx)(eX,{label:"Activity",value:w,placeholder:"All activities",options:W,onChange:L}),(0,l.jsxs)("label",{className:"dashboard-summary-toolbar-search",children:[(0,l.jsx)("span",{children:"Search Activity"}),(0,l.jsxs)("span",{className:"dashboard-summary-toolbar-searchbox",children:[(0,l.jsx)(eE,{size:14,strokeWidth:2.2,"aria-hidden":"true"}),(0,l.jsx)("input",{type:"search",value:A,onChange:e=>M(e.target.value),placeholder:"Search activity name or type"})]})]})]})}):null,E.length>0?(0,l.jsx)("section",{ref:_,className:"my-skills-analytics-shell",children:(0,l.jsx)(eC,{embedded:!0,studentView:!0,alwaysShowPerformance:!0,dataLoading:y,useSampleFallback:!1,resultsPublished:!!(null==Y?void 0:Y.resultsPublished),heading:Y?"".concat(Y.title," Dashboard"):"My Activity Dashboard",description:Y?"Analytics for ".concat(Y.type," based on your activity record."):"Track your evaluation progress, completed attempts, and repeat or remedial outcomes.",assignedActivities:E,evaluationRecords:h,completedEvaluationRows:p,serverDomainSeries:G,onViewResult:g})}):null,(0,l.jsxs)("section",{ref:D,className:"my-skills-board-shell",children:[(0,l.jsx)("div",{className:"my-skills-toolbar",children:(0,l.jsx)("div",{className:"my-skills-filter-row",children:eL.map(e=>(0,l.jsx)("button",{type:"button",className:"my-skills-filter-chip ".concat(j===e?"is-active":""),onClick:()=>(e=>{if(f(e),"Activity Results"===e)return void k("Activity Results");k("All"===e?"Overall Activity":e)})(e),children:e},e))})}),(0,l.jsxs)("div",{className:"my-skills-board-head",children:[(0,l.jsx)("h3",{children:"Activity Board"}),(0,l.jsxs)("span",{className:"ospe-topic-pill",children:[F.length," Activities"]})]}),F.length?(0,l.jsx)("div",{className:"my-skills-activity-list",children:F.map(e=>{var t,a;return(0,l.jsx)(eZ,{item:e,onStartActivity:et,onViewResult:ea,onSelectAnalytics:el,isSelected:eY(e)===eY(Y),scheduleNow:R},"".concat(e.status,"-").concat(e.title,"-").concat(e.type,"-").concat(null!=(a=null!=(t=e.studentId)?t:e.id)?a:""))})}):(0,l.jsxs)("div",{className:"my-skills-empty-state",role:"status","aria-live":"polite",children:[(0,l.jsx)(e_,{size:24,strokeWidth:2,"aria-hidden":"true"}),(0,l.jsx)("strong",{children:E.length?"No activities found":"There is no activity assigned to you"}),(0,l.jsx)("p",{children:E.length?"Try changing the status filter or search term.":"Assigned activities will appear here once they are available."})]})]})]})})}},58880:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(28705),s=a(95155);let i=(0,l.A)((0,s.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight")},63258:()=>{},83900:()=>{},99908:(e,t,a)=>{"use strict";function l(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}a.d(t,{_:()=>l})}}]);
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.