1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[802],{93162:function(e,s,t){var i,o;void 0!==(i="function"==typeof(o=function(){"use strict";function s(e,s,t){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){l(i.response,s,t)},i.onerror=function(){console.error("could not download file")},i.send()}function i(e){var s=new XMLHttpRequest;s.open("HEAD",e,!1);try{s.send()}catch(e){}return 200<=s.status&&299>=s.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){var s=document.createEvent("MouseEvents");s.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(s)}}var n="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof t.g&&t.g.global===t.g?t.g:void 0,r=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=n.saveAs||("object"!=typeof window||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(e,t,r){var l=n.URL||n.webkitURL,a=document.createElement("a");t=t||e.name||"download",a.download=t,a.rel="noopener","string"==typeof e?(a.href=e,a.origin===location.origin?o(a):i(a.href)?s(e,t,r):o(a,a.target="_blank")):(a.href=l.createObjectURL(e),setTimeout(function(){l.revokeObjectURL(a.href)},4e4),setTimeout(function(){o(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download","string"!=typeof e){var r;navigator.msSaveOrOpenBlob((void 0===(r=n)?r={autoBom:!1}:"object"!=typeof r&&(console.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e),t)}else if(i(e))s(e,t,n);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){o(l)})}}:function(e,t,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return s(e,t,i);var l="application/octet-stream"===e.type,a=/constructor/i.test(n.HTMLElement)||n.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||l&&a||r)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=d?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},c.readAsDataURL(e)}else{var u=n.URL||n.webkitURL,x=u.createObjectURL(e);o?o.location=x:location.href=x,o=null,setTimeout(function(){u.revokeObjectURL(x)},4e4)}});n.saveAs=l.saveAs=l,e.exports=l})?o.apply(s,[]):o)&&(e.exports=i)},28254:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/student/my-courses/[id]",function(){return t(70089)}])},70089:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return Z}});var i=t(85893),o=t(68029),n=t(67294),r=t(6459),l=t(31046),a=t(8186),d=t(3712),c=t(74032),u=t(73636),x=t(12553),p=t(90092),m=t(88329),b=t(90608),g=t(12095),h=t(38488),f=t(34302),j=t(73289),w=t(5920),v=t(55451),y=t(59876),S=t(52091),z=t(35282),k=t(69957),R=t(98029),C=t(11163),T=t(71054);let L=e=>{let{courseName:s,overallProgress:t,description:n,id:L}=e,F=(0,r.p)(),A=(0,k.HQ)(),E=(0,C.useRouter)(),D=(0,l.ff)("white","gray.700"),_=(0,R.D)({mutationFn:async()=>{let e=await A.get("/student-statistics/".concat(L,"/course-report"),{responseType:"blob"});return e.data},onSuccess:e=>{let s=window.URL.createObjectURL(new Blob([e])),t=document.createElement("a");t.href=s,t.setAttribute("download","LessonReport.pdf"),document.body.appendChild(t),t.click(),t.remove(),F({title:"Success",description:"Report downloaded successfully!",status:"success",position:"top",duration:3e3,isClosable:!0})},onError:e=>{var s,t;let i=(null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.message)||"Failed to download report.";F({title:"Error",description:i,status:"error",position:"top",duration:3e3,isClosable:!0})}}),U=(0,R.D)({mutationFn:async()=>{let e=await A.get("/student-statistics/".concat(L,"/course-report/xls"),{responseType:"blob"});return e.data},onSuccess:e=>{let s=window.URL.createObjectURL(new Blob([e])),t=document.createElement("a");t.href=s,t.setAttribute("download","LessonReport.xlsx"),document.body.appendChild(t),t.click(),t.remove(),F({title:"Success",description:"Report downloaded successfully!",status:"success",position:"top",duration:3e3,isClosable:!0})},onError:e=>{var s,t;let i=(null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.message)||"Failed to download report.";F({title:"Error",description:i,status:"error",position:"top",duration:3e3,isClosable:!0})}});return(0,i.jsx)(o.x,{p:{base:0,md:6}
1,w:"full",children:(0,i.jsx)(o.x,{w:"full",bg:D,boxShadow:"lg",borderRadius:"15px",p:{base:4,md:6},pb:{base:6,md:8},children:(0,i.jsxs)(a.g,{align:"stretch",spacing:{base:3,md:4},w:"full",children:[(0,i.jsx)(d.K,{direction:{base:"column",sm:"row"},justify:"space-between",align:{base:"flex-start",sm:"center"},w:"full",spacing:{base:2,sm:3},wrap:"wrap",children:(0,i.jsx)(c.C,{bg:"transparent",borderRadius:"8px",textTransform:"none",p:0,children:(0,i.jsxs)(u.U,{spacing:2,align:"center",children:[(0,i.jsx)(x.J,{as:v.DP0,fontSize:{base:"lg",md:"xl"}}),(0,i.jsx)(p.x,{fontSize:{base:"lg",md:"xl"},fontWeight:"semibold",children:s})]})})}),void 0!==t&&(0,i.jsxs)(o.x,{textAlign:"right",children:[(0,i.jsx)(p.x,{fontSize:{base:"xs",md:"sm"},fontWeight:"medium",children:"Overall Progress"}),(0,i.jsxs)(p.x,{fontSize:{base:"xl",md:"2xl"},fontWeight:"bold",color:"blue.500",children:[t,"%"]})]}),(0,i.jsxs)(m.k,{w:"full",maxW:"960px",mx:"auto",justify:"center",align:"center",gap:{base:3,md:4},flexWrap:{base:"wrap",md:"nowrap"},children:[(0,i.jsxs)(b.v,{placement:"bottom",children:[(0,i.jsx)(g.j,{as:h.z,h:12,px:5,w:{base:"full",md:"auto"},borderRadius:"xl",variant:"solid",bgGradient:"linear(to-r, navy.700, navy.600)",color:"white",boxShadow:"sm",transition:"all .2s ease",_hover:{transform:"translateY(-1px)",boxShadow:"md",bgGradient:"linear(to-r, navy.600, navy.500)"},_active:{transform:"translateY(0)",boxShadow:"sm"},"aria-label":"Download My Schedule",children:(0,i.jsxs)(m.k,{align:"center",gap:2,children:[(0,i.jsx)(x.J,{as:y._8,boxSize:5}),(0,i.jsx)(p.x,{fontWeight:"semibold",children:"Download My Schedule"})]})}),(0,i.jsxs)(f.q,{borderRadius:"lg",boxShadow:"lg",p:1,borderColor:"blackAlpha.200",bg:"white",children:[(0,i.jsx)(j.s,{icon:(0,i.jsx)(x.J,{as:z.Bmg,boxSize:5}),borderRadius:"md",_hover:{bg:"blackAlpha.50"},onClick:()=>_.mutate(),children:"PDF"}),(0,i.jsx)(j.s,{icon:(0,i.jsx)(x.J,{as:S.ugd,boxSize:5}),borderRadius:"md",_hover:{bg:"blackAlpha.50"},onClick:()=>U.mutate(),children:"Excel"})]})]}),(0,i.jsx)(h.z,{h:12,px:5,w:{base:"full",md:"auto"},borderRadius:"xl",variant:"solid",color:"white",bgGradient:"linear(to-r, purple.600, purple.500)",leftIcon:(0,i.jsx)(T.fi_,{}),boxShadow:"sm",transition:"all .2s ease",_hover:{transform:"translateY(-1px)",boxShadow:"md",bgGradient:"linear(to-r, purple.500, purple.400)"},_active:{transform:"translateY(0)",boxShadow:"sm"},onClick:()=>E.push("/student/my-courses/course-report/".concat(L)),children:(0,i.jsx)(p.x,{fontWeight:"semibold",children:"My Report"})})]}),n&&(0,i.jsx)(c.C,{bg:"transparent",textTransform:"none",p:0,w:"full",children:(0,i.jsx)(p.x,{fontSize:{base:"sm",md:"md"},fontWeight:"medium",color:"gray.700",children:n})}),void 0!==t&&(0,i.jsxs)(u.U,{align:"center",spacing:3,children:[(0,i.jsx)(w.E,{value:t,size:"sm",colorScheme:"blue",w:"full",boxShadow:"sm",bgColor:"gray.200",borderRadius:"sm"}),t>0&&(0,i.jsxs)(p.x,{fontSize:{base:"xs",md:"sm"},fontWeight:"medium",children:[t,"%"]})]})]})})})};var F=t(12519),A=t(43321),E=t(61914),D=t(58896),_=t(40156),U=t(18318),J=t(6454),W=t(8704),I=t(2777),O=t(87771),M=t(45341),P=t(93162);let B=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB"),G=e=>{let s=new Date(e);return s.toLocaleDateString()},H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",s=e.match(/\.(\w+)$/);return s?s[1].toLowerCase():""},N=e=>"pdf"===e?O.ih9:["xls","xlsx","csv"].includes(e)?O.BXA:["ppt","pptx"].includes(e)?M.ufu:["jpg","jpeg","png","gif"].includes(e)?O.ofX:["doc","docx"].includes(e)?O.YPP:["txt","md"].includes(e)?O.wEQ:O.efz,X=e=>{switch(e){case"pdf":return"red.600";case"jpg":case"jpeg":case"png":return"purple.500";case"doc":case"docx":return"blue.500";case"ppt":case"pptx":return"pink.500";case"xls":case"xlsx":case"csv":return"green.500";default:return"gray.500"}},q=e=>e.replace(/\.[^/.]+$/,""),Q=e=>{let{resources:s,title:t="Unit Resources"}
1=e,d=(0,l.ff)("#e3f2fd","gray.700"),[c,u]=(0,n.useState)(!1),b=(0,r.p)(),[g,f]=(0,n.useState)({}),j=(0,k.HQ)(),w=(0,R.D)({mutationFn:async e=>{let s=await j.get("/unit-resources/".concat(e,"/download"),{responseType:"blob"}),t=s.headers["content-disposition"],i=null==t?void 0:t.match(/filename="(.+)"/),o=(null==i?void 0:i[1])||"download.pdf";return{blob:s.data,filename:o}},onSuccess:e=>{let{blob:s,filename:t}=e;(0,P.saveAs)(s,t),b({title:"Download started",description:"".concat(t," is downloaded."),status:"success",duration:3e3,isClosable:!0})},onError:()=>{b({title:"Download failed",description:"Something went wrong while downloading the file.",status:"error",duration:3e3,isClosable:!0})}});return(0,i.jsxs)(o.x,{borderRadius:"md",overflow:"hidden",boxShadow:"md",children:[(0,i.jsxs)(m.k,{align:"center",justify:"space-between",px:{base:0,md:6},py:3,bg:d,cursor:"pointer",onClick:()=>u(!c),children:[(0,i.jsxs)(m.k,{align:"center",gap:2,children:[(0,i.jsx)(x.J,{as:I.QoU,ml:{base:3,md:0},color:"blue.600",boxSize:{base:4,md:5}}),(0,i.jsx)(p.x,{fontWeight:"bold",fontSize:{base:"sm",md:"md"},children:t}),(0,i.jsx)(o.x,{ml:1,minW:"25px",h:"25px",px:2,borderRadius:"full",bg:"blue.100",color:"blue.700",fontSize:"sm",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",children:s.length})]}),(0,i.jsx)(o.x,{ml:"auto",children:(0,i.jsx)(F.h,{"aria-label":"toggle",icon:c?(0,i.jsx)(y.v4,{}):(0,i.jsx)(y.XC,{}),size:"sm",fontSize:"20px",variant:"ghost",_hover:{bg:"blue.50"}})})]}),(0,i.jsx)(E.U,{in:c,animateOpacity:!0,children:(0,i.jsx)(o.x,{p:3,bg:"white",children:(0,i.jsx)(a.g,{spacing:3,align:"stretch",children:s.map(e=>{let s=H(e.name),t=N(s),n=q(e.name),r=X(s),l=g[e.id]||!1;return(0,i.jsxs)(m.k,{justify:"space-between",align:"center",bg:"white",p:3,borderRadius:"md",border:"1px solid",borderColor:"gray.200",children:[(0,i.jsxs)(m.k,{align:"center",gap:3,children:[(0,i.jsx)(x.J,{as:t,fontSize:"30px",color:r}),(0,i.jsxs)(o.x,{children:[(0,i.jsx)(p.x,{fontWeight:"semibold",children:n}),(0,i.jsxs)(p.x,{fontSize:"xs",color:"gray.500",children:[s.toUpperCase()||"Unknown"," â¢"," ",B(e.size)," ⢠Added"," ",e.createdAt?G(e.createdAt):"N/A"]})]})]}),(0,i.jsx)(h.z,{size:"sm",variant:"outline",colorScheme:"blue",isLoading:l,onClick:async()=>{f(s=>({...s,[e.id]:!0})),await w.mutateAsync(e.id),f(s=>({...s,[e.id]:!1}))},leftIcon:(0,i.jsx)(I._hL,{}),children:"Download"})]},e.id)})})})})]})},Y=e=>{let{unit:s}=e,t=(0,D.CGy)(e=>{var s;return null===(s=e.studentCourses)||void 0===s?void 0:s.selectedUnit}),n=(0,D.TL5)(),r=t===s.id,d=(0,l.ff)("#F7F7F9","gray.700"),c=()=>{r?n(D.qt0.setSelectedUnit(null)):n(D.qt0.setSelectedUnit(s.id))},b=s.lessons.length,g=s.lessons.filter(e=>"submitted"===e.status).length,h=s.lessons.filter(e=>"in progress"===e.status).length,f=s.lessons.filter(e=>"pending"===e.status).length;return(0,i.jsx)(o.x,{p:{base:0,md:5},boxSize:"100%",children:(0,i.jsxs)(o.x,{bg:d,w:"100%",mt:6,boxShadow:"md",borderRadius:"15px",p:2,pb:{base:2,md:8},children:[(0,i.jsxs)(o.x,{flex:"1",m:5,textAlign:"left",children:[(0,i.jsxs)(a.g,{align:"start",w:"100%",children:[(0,i.jsxs)(u.U,{justify:"space-between",w:"full",children:[(0,i.jsxs)(m.k,{alignItems:"center",gap:5,children:[(0,i.jsx)(F.h,{onClick:c,icon:r?(0,i.jsx)(y.v4,{boxSize:8}):(0,i.jsx)(y.XC,{boxSize:8}),bg:"blue.500",color:"white",borderRadius:"md",_hover:{bg:"blue.600"},size:"md","aria-label":"Toggle unit"}),(0,i.jsx)(p.x,{fontWeight:"bold",fontSize:"xl",children:s.title})]}),r&&(0,i.jsxs)(m.k,{align:"center",gap:2,children:[(0,i.jsx)(x.J,{as:S.NMh,boxSize:4,color:"blue.600"}),(0,i.jsxs)(p.x,{fontSize:"lg",fontWeight:"medium",color:"blue.600",children:[s.progress,"%"]})]})]}),(0,i.jsxs)(A.M,{columns:{base:2,sm:2,md:4},spacingX:2,spacingY:2,children:[(0,i.jsxs)(m.k,{align:"center",gap:2,children:[(0,i.jsx)(x.J,{as:U.tUd}),(0,i.jsxs)(p.x,{fontSize:"sm",children:[b," Lessons"]})]}),(0,i.jsxs)(m.k,{align:"center",gap:2,children:[(0,i.jsx)(x.J,{as:W.eys}),(0,i.jsxs)(p.x,{fontSize:"sm",children:[f," Pending"]})]}),(0,i.jsxs)(m.k,{align:"center",gap:2,children:[(0,i.jsx)(x.J,{as:J.IHf}),(0,i.jsxs)(p.x,{fontSize:"sm",children:[h," In-progress"]})]}),(0,i.jsxs)(m.k,{align:"center",gap:2,children:[(0,i.jsx)(x.J,{as:J.c$U}),(0,i.jsxs)(p.x,{fontSize:"sm",children:[g," Submitted"]})]})]}),s.description&&(0,i.jsx)(p.x,{fontSize:"md",fontWeight:"600",color:"gray.500",children:s.description})]}),!r&&(0,i.jsxs)(o.x,{display:"flex",alignItems:"center",w:"100%",children:[(0,i.jsx)(w.E,{value:s.progress,size:"sm",colorScheme:"blue",borderRadius:"md",bg:"gray.200",flex:"1"}),(0,i.jsxs)(p.x,{fontSize:"sm",ml:2,color:"blue.600",children:[s.progress,"%"]})]})]}),(0,i.jsx)(E.U,{in:r,animateOpacity:!0,children:(0,i.jsx)(o.x,{pt:4,px:{base:0,md:6},children:s.lessons&&s.lessons.length>0&&(0,i.jsxs)(a.g,{spacing:4,align:"stretch",children:[s.unitResources&&(0,i.jsx)(Q,{resources:s.unitResources}),s.lessons.slice().sort((e,s)=>e.order-s.order).map(e=>(0,i.jsx)(_.Z,{lesson:e},e.id))]})})})]})})},$=e=>{let{course:s}=e,t=s.id,{title:o,description:n,units:r,progress:l}=s,a=(null==r?void 0:r.slice().sort((e,s)=>e.order-s.order))||[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(L,{id:t,courseName:o,overallProgress:l,description:n}),a.length>0?a.map(e=>(0,i.jsx)(Y,{unit:e},e.id)):(0,i.jsx)(i.Fragment,{})]})},V=()=>{let e=(0,D.CGy)(e=>e.studentCourses.data),s=(0,C.useRouter)(),{id:t}=s.query,o=e?e.results.map(e=>({id:e.course.id,title:e.course.title,progress:e.course.progress,description:e.course.description,units:e.course.units.map(e=>
1({id:e.id,order:e.order,title:e.title,description:e.description,progress:e.progress,lessons:e.lessons.map(e=>({id:e.id,order:e.order,title:e.title,skill:e.skill,status:e.status,evaluationStatus:e.evaluationStatus,isResultShow:e.isResultShow,showGradePoints:e.showGradePoints,material:e.material,lessonType:e.lessonType,timeLimit:e.timeLimit,availabilityFrom:e.availabilityFrom,availabilityTo:e.availabilityTo,startTime:e.startTime})),unitResources:e.unitResources.map(e=>({id:e._id,url:e.url,name:e.name,size:e.size,createdAt:e.createdAt}))}))})):[],n=o.find(e=>e.id===t);return(0,i.jsx)(i.Fragment,{children:n&&(0,i.jsx)($,{course:n})})},K=()=>{let e=(0,D.TL5)(),s=(0,k.HQ)(),{user:t}=(0,k.aC)();return(0,n.useEffect)(()=>{var i;e((0,D.CT1)({axios:s,filter:{class:null==t?void 0:null===(i=t.studentInfo)||void 0===i?void 0:i.class,limit:30}}))},[]),(0,i.jsx)(o.x,{p:{base:3,md:8},children:(0,i.jsx)(V,{})})};var Z=K},40156:function(e,s,t){"use strict";var i=t(85893);t(67294);var o=t(12553),n=t(38488),r=t(68029),l=t(90092),a=t(97873),d=t(11163),c=t(58896),u=t(72560),x=t(69957),p=t(41189),m=t(52091),b=t(7696),g=t(2777),h=t(36977),f=t(19151);let j=e=>{let{lesson:s}=e,t=(0,d.useRouter)(),j=(0,c.TL5)(),w=(0,x.HQ)(),v="regular"===s.lessonType,y="submitted"===s.status,S="in progress"===s.status,z=(()=>{if("regular"===s.lessonType||!s.availabilityTo)return!1;let e=new Date;e.setHours(0,0,0,0);let t=new Date(s.availabilityTo);return t.setHours(0,0,0,0),t<e})(),k="regular"!==s.lessonType&&!!s.availabilityFrom&&new Date(s.availabilityFrom)>new Date,R=(()=>
1{if(!s.startTime||void 0===s.timeLimit)return null;let e=new Date(s.startTime).getTime(),t=Date.now();return s.timeLimit-(t-e)/6e4})(),C="quiz"===s.lessonType&&"in progress"===s.status&&null!==R&&R<=0,T=async()=>{let e=await j((0,u.a)({axios:w,lessonId:s.id}));"fulfilled"===e.meta.requestStatus&&(j(p.P.toggleCollapsedSidebar(!0)),t.push("/student/lesson/".concat(s.id)))},L=()=>{j(p.P.toggleCollapsedSidebar(!0)),t.push("/student/lesson/".concat(s.id))};return(0,i.jsxs)(r.x,{bg:"white",boxShadow:"sm",borderRadius:"12px",p:1,w:"100%",maxW:"100%",display:"flex",flexDirection:"column",border:"1px solid",borderColor:"gray.200",gap:3,children:[(0,i.jsxs)(r.x,{display:"flex",alignItems:"center",gap:3,children:[s.skill&&(0,i.jsx)(r.x,{w:{base:7,md:10},h:{base:7,md:10},rounded:"xl",bg:{writing:"purple.100",speaking:"purple.100",grammar:"blue.100",reading:"green.100",listening:"orange.100",vocabulary:"#E0E7FF"}[s.skill]||"blue.100",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:(e=>{let s={writing:(0,i.jsx)(o.J,{as:m.fmQ,boxSize:{base:3,md:4},color:"purple.600"}),speaking:(0,i.jsx)(o.J,{as:b.GSb,boxSize:{base:3,md:4},color:"purple.600"}),grammar:(0,i.jsx)(o.J,{as:g.hbr,boxSize:{base:3,md:4},color:"blue.600"}),reading:(0,i.jsx)(o.J,{as:m.Mp$,boxSize:{base:3,md:4},color:"green.600"}),listening:(0,i.jsx)(o.J,{as:h.oAx,boxSize:{base:3,md:4},color:"orange.600"}),vocabulary:(0,i.jsx)(o.J,{as:f.O$p,boxSize:{base:3,md:4},color:"#4F46E5"})};return s[e]||(0,i.jsx)(o.J,{as:m.NMh,boxSize:{base:3,md:4},color:"blue.600"})})(s.skill)}),(0,i.jsxs)(r.x,{flex:"1",children:[(0,i.jsx)(l.x,{fontWeight:"medium",fontSize:{base:"14px",md:"md"},color:"gray.800",children:s.title}),s.skill&&(0,i.jsxs)(l.x,{fontSize:{base:"12px",md:"sm"},mt:.5,color:"gray.500",children:[s.skill," lesson"]}),s.description&&(0,i.jsx)(l.x,{fontSize:{base:"10px",md:"sm"},mt:.5,color:"gray.600",children:s.description})]}),(0,i.jsx)(r.x,{display:"flex",justifyContent:"flex-end",children:(()=>{let e={fontSize:{base:"13px",md:"sm"},px:{base:2,md:4},h:{base:"25px",md:"36px"},borderRadius:"lg",color:"white"};if(!v&&(C||z))return(0,i.jsx)(n.z,{...e,bg:"red.500",isDisabled:!0,leftIcon:(0,i.jsx)(m.kUi,{size:10}),_hover:{bg:"red.600"},children:"Overdue"});if(y){var t,o;let r="speaking"===s.skill||"writing"===s.skill,l="speaking"===s.skill,a="completed"===s.evaluationStatus||"auto marked"===s.evaluationStatus||"marked"===s.evaluationStatus,d=null===(t=s.isResultShow)||void 0===t||t,c=null===(o=s.showGradePoints)||void 0===o||o,u=l&&!d,x=l&&a&&d&&!c;return(0,i.jsx)(n.z,{...e,bg:u?"gray.600":x?"purple.500":"#4CAF50",disabled:!(!r||a||l&&!d),leftIcon:u?(0,i.jsx)(g.hbr,{size:12}):x?(0,i.jsx)(m.ajU,{size:12}):(0,i.jsx)(m.l_A,{size:10}),onClick:L,_hover:{bg:u?"gray.700":x?"purple.600":"#45a049"},children:u?"View Submitted Lesson":x?"Show Feedback":r&&!a?"Submitted":"Show Result"})}return!v&&k?(0,i.jsx)(n.z,{...e,bg:"gray.400",isDisabled:!0,leftIcon:(0,i.jsx)(m.kUi,{size:12}),_hover:{bg:"gray.500"},children:"Not Available Yet"}):(0,i.jsx)(n.z,{...e,bg:S?"#5C6BC0":"#2196F3",_hover:{bg:S?"#3F51B5":"#1976D2"},onClick:T,rightIcon:S?void 0:(0,i.jsx)(m.Z1Y,{size:12}),leftIcon:S?(0,i.jsx)(m.fSQ,{size:12}):void 0,children:S?"In Progress":"Start"})})()})]}),(0,i.jsxs)(r.x,{display:"flex",flexWrap:"wrap",justifyContent:{base:"center",md:"flex-start"},gap:{base:1,md:2},children:["regular"!==s.lessonType&&(0,i.jsxs)(i.Fragment,{children:[s.availabilityFrom&&(0,i.jsxs)(a.Vp,{px:2,borderRadius:"full",variant:"outline",size:"sm",fontSize:{base:"12px",md:"sm"},colorScheme:"green",children:[(0,i.jsx)(a.AD,{as:m.IiJ,boxSize:3}),"From ",new Date(s.availabilityFrom).toLocaleDateString()]}),s.availabilityTo&&(0,i.jsxs)(a.Vp,{px:2,borderRadius:"full",variant:"outline",size:"sm",fontSize:{base:"12px",md:"sm"},colorScheme:z?"red":"purple",children:[(0,i.jsx)(a.AD,{as:m.IiJ,boxSize:3}),"To ",new Date(s.availabilityTo).toLocaleDateString()]})]}),"quiz"===s.lessonType&&s.timeLimit&&(0,i.jsxs)(a.Vp,{px:2,borderRadius:"full",size:"sm",fontSize:{base:"12px",md:"sm"},colorScheme:"orange",children:[(0,i.jsx)(a.AD,{as:m.qyc,boxSize:{base:2,md:3}}),s.timeLimit," min"]})]})]},s.id)};s.Z=j},43321:function(e,s,t){"use strict";t.d(s,{M:function(){return d}});var i=t(85893),o=t(81975),n=t(16610),r=t(37984),l=t(70052),a=t(49381);let d=(0,a.G)(function(e,s){let{columns:t,spacingX:a,spacingY:d,spacing:c,minChildWidth:u,...x}=e,p=(0,r.F)(),m=u?(0,o.XQ)(u,e=>{let s=(0,l.LP)("sizes",e,"number"==typeof e?`${e}px`:e)(p);return null===e?null:`repeat(auto-fit, minmax(${s}, 1fr))`}):(0,o.XQ)(t,e=>null===e?null:`repeat(${e}, minmax(0, 1fr))`);return(0,i.jsx)(n.r,{ref:s,gap:c,columnGap:a,rowGap:d,templateColumns:m,...x})});d.displayName="SimpleGrid"}},function(e){e.O(0,[3768,7473,9774,2888,179],function(){return e(e.s=28254)}),_N_E=e.O()}]);
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.