PageSourceSearch

https://codelearn.io/_next/static/chunks/7809-99ee53a385b06b40.js

js codelearn.io collected 2026-10-02 14:52:16 UTC 22,376 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7809],{27809:function(e,l,t){"use strict";t.d(l,{Q:function(){return g}});var i=t(85893),s=t(31927),a=t(3941),n=t(3968),o=t(65716),r=t(63301),d=t(92132),c=t(77694),u=t(11163),x=t(2335),m=t(3798),v=t(34065),p=t(81e3);l.Z=e=>{var l,t,r;let{data:u,refreshData:f,isCourseManager:b,rating:j}=e,{t:w}=(0,d.$G)(),y=Math.ceil((null==u?void 0:u.progress)||0),N=(0,v.a)("(max-width: 1440px)");return(0,i.jsx)("div",{className:"bg-gradient-to-l from-[#11498d] to-[#0E2643]  text-white !rounded-lg mt-6",children:(0,i.jsx)(n.W2,{size:"xl",children:(0,i.jsxs)("div",{className:"lg:px-2 py-[52px] grid lg:grid-cols-[1fr_440px] gap-y-8 gap-x-10",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("h1",{className:"font-semibold break-words overflow-hidden text-2xl lg:text-3.5xl min-h-[50px] lg:!leading-[50px] my-0",children:null==u?void 0:u.title}),(0,i.jsx)(s.Q,{"data-tooltip-id":"global-tooltip","data-tooltip-place":"top","data-tooltip-content":null==u?void 0:u.summary,className:"w-fit",line:3,children:null==u?void 0:u.summary})]}),(0,i.jsx)(g,{data:null==u?void 0:u.tags}),N&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(m.t,{data:u}),(0,i.jsx)(c.Z,{refreshData:f,data:u,isCourseManager:b,rating:j})]}),(0,i.jsx)(h,{rating:j,data:u})]}),u&&(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-[auto_auto_140px] gap-2 items-start md:items-center text-[#8899A8]",children:[(0,i.jsxs)("div",{className:"flex gap-1",children:[(0,i.jsx)("span",{children:w("Owner")}),(0,i.jsx)(o.Z,{className:"text-inherit w-fit max-w-150 truncate !text-[#7289F3] hover:underline",target:"_blank",href:"#",title:null==u?void 0:null===(l=u.owner)||void 0===l?void 0:l.userName,children:null==u?void 0:null===(t=u.owner)||void 0===t?void 0:t.userName})]}),(0,i.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,i.jsx)(p.Z,{size:16}),null==u?void 0:u.totalStudent,(0,i.jsx)("span",{className:"pr-8",children:w("Learner")})]}),j&&(0,i.jsxs)("div",{className:"flex gap-1",children:[(0,i.jsx)(x.Z,{rating:(null==j?void 0:j.averageRating)||0}),(0,i.jsx)("div",{className:"font-semibold",children:null===(r=(null==j?void 0:j.averageRating)||0)||void 0===r?void 0:r.toFixed(1)})]})]})]}),(0,i.jsxs)("div",{className:"order-first lg:order-2 flex flex-col gap-6",children:[(null==u?void 0:u.thumbnail)&&(0,i.jsx)("div",{className:"relative",children:(0,i.jsx)("img",{alt:null==u?void 0:u.title,className:"rounded-[12px] object-cover aspect-[336/220] max-w-[426px] max-h-[250px] w-full h-auto shadow-lg",src:null==u?void 0:u.thumbnail})}),(null==u?void 0:u.isEnroll)&&(0,i.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(a.E,{size:"sm",color:"green",classNames:{bar:"bg-[#13C296]",root:"bg-[#19395E] mt-1"},value:y})}),(0,i.jsxs)("div",{className:"text-white text-xs ",children:[y,"%"]})]})]})]})})})};let h=e=>{var l,t,s;let{data:a,rating:n}=e,{t:o}=(0,d.$G)(),c=(null==a?void 0:null===(s=a.courseSchedule)||void 0===s?void 0:null===(t=s.courseScheduleList)||void 0===t?void 0:null===(l=t.flatMap(e=>{var l;return null===(l=e.sections)||void 0===l?void 0:l.flatMap(e=>null==e?void 0:e.activities)}))||void 0===l?void 0:l.length)||0,u=[{id:"duration",label:"".concat((null==a?void 0:a.duration)||0," ").concat(o((null==a?void 0:a.duration)>1?"hours":"hour")),icon:(0,i.jsx)("img",{src:"/images/learning/watch-circle-time.png",width:14,height:14,alt:"watch-circle-time"})},{id:"lecture",label:"".concat(c," ").concat(o(c>1?"lectures":"lecture")),icon:(0,i.jsx)("img",{src:"/images/learning/bullet-list--points.png",width:14,height:14,alt:"bullet-list--points"}),hidden:null==a?void 0:a.isCombo},{id:"student",label:"".concat(r.DL.formatNumber((null==a?void 0:a.totalStudent)||0)," ").concat(o((null==a?void 0:a.totalStudent)>1?"students":"student")),icon:(0,i.jsx)("img",{src:"/images/learning/user-multiple-group.png",width:14,height:14,alt:"user-multiple-group"})},{id:"certificate",label:o("Certificate"),icon:(0,i.jsx)("img",{src:"/images/learning/receipt-check.png",width:14,height:14,alt:"receipt-check"})},{id:"review",label:"".concat(((null==n?void 0:n.averageRating)||0).toFixed(1)," (").concat(r.DL.formatNumber((null==n?void 0:n.rowCount)||0)," ").concat(o((null==n?void 0:n.rowCount)>1?"reviews":"review"),")"),icon:(0,i.jsx)("img",{src:"/images/learning/star-1.png",width:14,height:14,alt:"star-1"})}].filter(e=>!e.hidden);return(0,i.jsx)("div",{className:"min-h-[68px] max-w-[440px] flex flex-wrap gap-2",children:u.map((e,l)=>(0,i.jsxs)("div",{className:"min-w-[92px] h-[30px] py-1 px-3 rounded-[4px] bg-[#19395E] flex gap-2 items-center text-sm",children:[e.icon,e.label]},l))})},g=e=>{let{data:l}=e,t=(0,u.useRouter)().locale;return!l||l.length<=0?null:(0,i.jsx)("div",{className:"flex flex-col gap-6 text-sm",children:(0,i.jsx)("div",{className:"flex flex-wrap gap-3",children:null==l?void 0:l.map((e,l)=>(0,i.jsx)("div",{className:"bg-[#19395E] px-3 py-1 min-h-[38px] flex items-center rounded-lg text-[#8899A8]",children:e},e+t+l))})})}},77694:function(e,l,t){"use strict";t.d(l,{Z:function(){return Q}});var i=t(85893),s=t(47375),a=t(67841),n=t(58541),o=t(6226),r=t(63301),d=t(19353),c=t(69511),u=t(84704),x=t(22143),m=t(86010),v=t(65716),p=t(30381),h=t.n(p),g=t(92132),f=t(11163),b=t(6
17294),j=t(2664),w=t(83738),y=t(28589),N=t(30139),C=t(47533),k=t(94491),z=t(28855),S=t(80061),E=t(67288),Z=t(18397),D=t(15275),_=t(81088),T=t(8546),I=t(96486),F=t.n(I),M=t(87536),A=e=>{let{data:l,onSuccess:t,onClose:s}=e,{t:n}=(0,g.$G)(),d=(0,j.I0)(),{profile:u}=(0,o.E)(),[m,v]=(0,b.useState)(!1),{register:p,handleSubmit:h,watch:f,control:w,formState:{errors:y}}=(0,M.cI)({resolver:(0,C.X)(T.Z.object().shape({code:T.Z.string().nullable().test("code1",n("{{name}} must not be blank",{name:n("Voucher")}),(e,l)=>"2"===l.parent.type||!F().isEmpty(null==e?void 0:e.trim())),description:T.Z.string().nullable().test("description1",n("{{name}} must not be blank",{name:n("Content")}),(e,l)=>"1"===l.parent.type||!F().isEmpty(null==e?void 0:e.trim()))})),defaultValues:{code:"",description:"",type:"1",contextId:null==l?void 0:l.id,contextType:c.y.Course}}),N=async e=>{var l;v(!0);let i=await _.te.applyVoucher({contextType:e.contextType,contextId:e.contextId,code:e.code.trim()});v(!1),(null==i?void 0:null===(l=i.data)||void 0===l?void 0:l.success)&&(Z.gU.success(n("Enroll this course successfully!")),t())},I=async e=>{var l,i;if(u&&u.userName&&(0,r.rV)(u.userName)){d((0,x.Bw)(!0));return}v(!0);let s=await D.im.enrollCourse({courseId:e.contextId,description:e.description,isRequestEnroll:!0});v(!1),(null==s?void 0:null===(l=s.data)||void 0===l?void 0:l.message)?Z.gU.error(n(s.data.message)):(null==s?void 0:null===(i=s.data)||void 0===i?void 0:i.success)&&(Z.gU.success(n("Request submitted successfully!")),t())};return(0,i.jsxs)(k.u,{opened:!0,size:"843px",onClose:s,classNames:{content:"relative overflow-hidden text-white h-[606px] rounded-xl bg-cover bg-[#4261F0] bg-[url('/images/courses/bg-activation.png')]",header:"h-0 p-0",close:"absolute right-4 top-4 text-white z-10 hover:bg-transparent"},children:[(0,i.jsx)("div",{style:{textShadow:"2px 0 #073b87, -2px 0 #073b87, 0 2px #073b87, 0 -2px #073b87, 1px 1px #073b87, -1px -1px #073b87, 1px -1px #073b87, -1px 1px #073b87"},className:"md:block hidden uppercase text-[#F7E834] font-cherish text-[40px] absolute top-[40px] md:left-[50px]",children:n("Course")}),(0,i.jsx)("div",{className:"uppercase font-[800] absolute top-[220px] left-[124px]",children:n("Knowledge is power")}),(0,i.jsxs)("div",{className:"md:w-[376px] w-[320px] absolute top-[102px] md:right-[35px] right-1/2 md:translate-x-0 translate-x-1/2 flex flex-col gap-8",children:[(0,i.jsxs)("div",{className:"bg-white text-ink-primary rounded-[12px] p-8 flex flex-col gap-8",children:[(0,i.jsx)("div",{className:"text-center font-semibold text-[24px]",children:n("Activation form")}),(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(M.Qr,{name:"type",control:w,render:e=>{let{field:l}=e;return(0,i.jsx)(z.Ph,{...l,data:[{label:n("Activation code"),value:"1"},{label:n("Request free access"),value:"2"}],size:"md"})}}),"1"===f("type")&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(M.Qr,{name:"code",control:w,render:e=>{var l;let{field:t}=e;return(0,i.jsx)(S.o,{...t,size:"md",placeholder:n("Enter Code"),error:null===(l=y[t.name])||void 0===l?void 0:l.message})}})}),"2"===f("type")&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(M.Qr,{name:"description",control:w,render:e=>{var l;let{field:t}=e;return(0,i.jsx)(E.g,{...t,minRows:3,size:"md",placeholder:n("Content"),error:null===(l=y[t.name])||void 0===l?void 0:l.message})}})})]}),(0,i.jsx)(a.z,{loading:m,onClick:()=>{"1"===f("type")?h(N)():h(I)()},className:"max-w-[276px] w-full mx-auto",radius:"md",size:"lg",children:n("Active")})]}),(0,i.jsx)("div",{className:"text-center text-sm md:block hidden",children:n("Learning programming helps students develop logical thinking, creativity, problem solving and mastery of the future.")})]})]})},B=t(80971),L=t(19236),Y=t(21017),G=t(22870),P=t(56183),R=t(25669),V=t(47238),U=e=>{let{data:l,priceAfterDiscount:t,onClose:s,onBuyNow:r,onAddedToCart:d,isBuyCode:u}=e,{t:x}=(0,g.$G)(),v=(0,R.Z)(),{authorized:p}=(0,o.E)(),[h,f]=(0,b.useState)(p?u?2:1:2),j=(null==l?void 0:l.isEnroll)&&(null==l?void 0:l.enrollStatus)===n.B0.Active&&(null==l?void 0:l.learnDuration),w=async(e,i)=>{let s={contextId:l.id,thumbnail:l.thumbnail,title:l.title,contextType:c.y.Course,link:"/learning/".concat(l.permalink),count:1,price:l.price,discount:l.price-t};2===h&&(s.count=null!=e?e:1,s.data={...i,isVoucher:!0}),await v(s)&&d()};return(0,i.jsx)(k.u,{opened:!0,size:"xl",onClose:s,radius:12,withCloseButton:!1,children:(0,i.jsxs)("div",{className:"relative space-y-6 px-6 -mt-4",children:[(0,i.jsx)(B.P,{onClick:s,className:"absolute -top-1 -right-1"}),(0,i.jsx)(L.D,{size:24,className:"text-center ",children:x("Transaction information")}),(0,i.jsx)("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-6",children:(0,i.jsx)("div",{className:"w-full text-center space-y-6",children:(0,i.jsxs)("div",{className:(0,m.Z)("relative flex flex-col justify-center items-center cursor-pointer rounded-2xl",{"border-[#506CF0] border-2":2===h}),onClick:()=>f(2),children:[(0,i.jsx)(Y.Z,{radius:16,className:"w-full flex justify-center items-center h-[172px] curs
1or-pointer",bg:"#EDF0FD",children:(0,i.jsx)(Y.Z.Section,{children:(0,i.jsx)(G.E,{src:"/images/payment/buy-code.png",alt:"buy-code",width:150,fit:"cover",withPlaceholder:!0})})}),(0,i.jsx)(a.z,{variant:"outline",className:(0,m.Z)("absolute -bottom-5 z-10 bg-white hover:bg-slate-50 pointer-events-none",{"bg-[#506CF0] text-white":2===h}),radius:100,children:x("Buy activation code")}),(0,i.jsx)(P.n,{className:(0,m.Z)("w-8 h-8 absolute top-2 right-2 text-white bg-green-600 rounded-full p-2",{hidden:1===h})})]})})}),2===h&&(0,i.jsx)(V.Z,{courseId:null==l?void 0:l.id,handleAddToCart:w,duration:j?null==l?void 0:l.learnDuration:null})]})})},$=t(91916),Q=e=>{var l,t,p,C,k,z,S,E,Z,D;let{data:_,isSmall:T,refreshData:I,rating:F}=e,{allowPreviewCourseList:M}=(0,b.useContext)(y.Dj),{t:B}=(0,g.$G)(),L=(0,f.useRouter)(),{locale:Y}=L,{permalink:G}=L.query,{profile:P}=(0,o.E)(),R=(0,j.I0)(),[Q,q]=(0,b.useState)(!1),[O,K]=(0,b.useState)(!1),H=(null==_?void 0:_.enrollStatus)==4,W=null==_?void 0:_.isEnroll,X=(null==_?void 0:_.price)>0&&(null==_?void 0:_.discount)!==100,J=(null==_?void 0:_.enrollStatus)==0,ee=(null==_?void 0:_.price)?_.price*(100-(_.discount||0))*.01:0,el=(()=>{let e=h()(h()().format("YYYY-MM-DD")),l=(null==_?void 0:_.startTime)?h()(h()(_.startTime).format("YYYY-MM-DD")):e,t=(null==_?void 0:_.endTime)?h()(h()(_.endTime).format("YYYY-MM-DD")):h()(864e13);return l<=e&&e<=t})(),[et,ei]=(0,b.useState)(!1),[es,ea]=(0,b.useState)(!1),[en,eo]=(0,b.useState)(!1),er=null==_?void 0:null===(z=_.courseSchedule)||void 0===z?void 0:null===(k=z.courseScheduleList)||void 0===k?void 0:null===(C=k[0])||void 0===C?void 0:null===(p=C.sections)||void 0===p?void 0:null===(t=p[0])||void 0===t?void 0:null===(l=t.activities)||void 0===l?void 0:l[0],ed=((null==_?void 0:null===(E=_.courseSchedule)||void 0===E?void 0:null===(S=E.courseScheduleList)||void 0===S?void 0:S.flatMap(e=>e.sections||[]))||[]).flatMap(e=>e.activities||[]).filter(e=>e.activityStatus!==n.Om.COMPLETED),ec=(null==ed?void 0:ed[0])||er,eu="/learning/".concat(G,"?activityId=").concat(null==ec?void 0:ec.activityId,"&activityType=").concat(null==ec?void 0:ec.activityType),ex=null==_?void 0:null===(Z=_.subCourses)||void 0===Z?void 0:Z[0];if((null==_?void 0:_.isCombo)&&ex){let e=(0,d.Gd)(ex,Y);eu="/learning/".concat((null==e?void 0:e.permalink)||(null==ex?void 0:ex.permalink))}let em=()=>{if(P&&P.userName&&(0,r.rV)(P.userName)){R((0,x.Bw)(!0));return}ev()},ev=()=>{ei(!0);let e={courseId:_.id};u.i.enrollCourse(e).then(e=>{var l,t,i,a;if(e.data&&(null===(l=e.data)||void 0===l?void 0:l.success)){let l=e.data.data.orderId;l?L.push("/payment/orders/checkout?orderId=".concat(l,"&contextType=").concat(c.y.Course)):s.gU.success(B("Enroll this course successfully!"))}else(null===(t=e.data)||void 0===t?void 0:t.message)&&(null===(i=e.data)||void 0===i?void 0:i.message)!=""?s.gU.error(B(null===(a=e.data)||void 0===a?void 0:a.message)):s.gU.error(B("Enroll failed!"));I(),ei(!1)})},ep=async()=>{var e,l,t;let i;let s={courseId:_.id,isTrial:!0};(null==_?void 0:_.enrollStatus)!==n.B0.Trial&&P&&(i=await u.i.enrollCourse(s)),((null==i?void 0:null===(e=i.data)||void 0===e?void 0:e.success)||(null==_?void 0:_.enrollStatus)===n.B0.Trial||!P)&&L.push("/learning/".concat(G,"?activityType=").concat(null===(l=M[0])||void 0===l?void 0:l.activityType,"&activityId=").concat(null===(t=M[0])||void 0===t?void 0:t.activityId))},eh=async()=>{let e={email:(null==P?void 0:P.email)||"",number:1,type:V._.ForMe,courseId:_.id,fullName:"",message:"",timeSend:new Date,validDateTo:h()().add(3,"months").endOf("day")};try{var l,t,i,a;ei(!0);let n=await $.E.courseBuyVoucher(e),o=null==n?void 0:null===(t=n.data)||void 0===t?void 0:null===(l=t.data)||void 0===l?void 0:l.orderId;if(o){let e="orderId=".concat(o,"&contextType=").concat(c.y.Course);L.push("/payment/orders/checkout?".concat(e))}else(null==n?void 0:null===(i=n.data)||void 0===i?void 0:i.message)&&s.gU.error(B(null==n?void 0:null===(a=n.data)||void 0===a?void 0:a.message))}catch(e){console.error(e)}finally{ei(!1)}};return _?(0,i.jsxs)(i.Fragment,{children:[es&&(0,i.jsx)(U,{data:_,priceAfterDiscount:ee,onClose:()=>{ea(!1),K(!1)},onBuyNow:()=>{ea(!1),K(!1),ev()},onAddedToCart:()=>{ea(!1),K(!1),q(!0)},isBuyCode:!0}),en&&(0,i.jsx)(A,{data:_,onClose:()=>eo(!1),onSuccess:()=>{I(),eo(!1)}}),Q&&(0,i.jsx)(N.Z,{onClose:()=>q(!1),thumbnail:null==_?void 0:_.thumbnail,title:null==_?void 0:_.title,owner:null==_?void 0:null===(D=_.owner)||void 0===D?void 0:D.userName,rating:F,duration:null==_?void 0:_.duration,totalStudent:null==_?void 0:_.totalStudent,price:null==_?void 0:_.price,discount:null==_?void 0:_.discount,actualPrice:null==_?void 0:_.priceAfterDiscount}),!P&&(0,i.jsxs)("div",{className:"flex flex-row gap-4",children:[M.length>0&&(0,i.jsx)(a.z,{size:"lg",classNames:{root:(0,m.Z)("shadow-md px-4 bg-navy-primary text-base font-semibold text-white w-full max-w-[400px]",{"w-fit":!T})}
1,color:"blue",disabled:et,radius:"md",onClick:ep,children:B("Try it out")}),X?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(a.z,{size:"lg",classNames:{root:(0,m.Z)("shadow-md px-4 bg-[#F56060] hover:bg-[#f05b5b] text-base font-semibold text-white w-full max-w-[400px]",{"w-fit":!T})},color:"blue",disabled:et,radius:"md",onClick:eh,children:B("Buy now")})}):(0,i.jsx)(a.z,{onClick:()=>{R((0,x.oi)(!0))},radius:"md",size:"lg",className:"shadow-md bg-yellow-300 hover:bg-yellow-500 w-full max-w-[400px]",children:(0,i.jsx)("div",{className:"text-ink-primary text-center",children:(0,i.jsxs)("span",{className:"text-base font-semibold",children:[" ",B("Please login to continue")]})})})]}),!!P&&(0,i.jsxs)(i.Fragment,{children:[W&&J&&(0,i.jsx)(a.z,{radius:"md",size:"lg",className:"bg-gray-500 w-full max-w-[400px] pointer-events-none px-2",color:"gray",children:(0,i.jsx)("div",{className:"text-center",children:(0,i.jsx)("span",{className:"text-base font-semibold",children:B("Awaiting approval")})})}),W&&!J&&(0,i.jsxs)("div",{className:(0,m.Z)("flex gap-2.5",{"flex-col":T}),children:[(0,i.jsx)(v.Z,{href:eu,children:(0,i.jsx)(a.z,{radius:"md",size:"lg",rightIcon:(0,i.jsx)(w.Z,{}),className:"bg-navy-primary px-4 w-full",color:"blue",children:(0,i.jsx)("div",{className:"text-center",children:(0,i.jsx)("span",{className:"text-base font-semibold",children:B("Study now")})})})}),H&&(0,i.jsx)(a.z,{size:"lg",classNames:{root:(0,m.Z)("shadow-md px-4 bg-[#F56060] hover:bg-[#F56060] text-base font-semibold text-white w-full",{"text-sm":M.length>0})},color:"green",disabled:et,radius:"md",onClick:()=>eo(!0),children:B("Active")}),X&&(0,i.jsx)(a.z,{size:"lg",disabled:!el||et,classNames:{root:(0,m.Z)("shadow-md px-4 bg-[#13C296] text-white hover:bg-[#16b78c]"),label:"flex flex-col items-center justify-center"},color:"green",radius:"md",onClick:eh,children:(0,i.jsx)("div",{className:"text-base font-semibold",children:B("Buy activation code")})})]}),(!W||J)&&X&&(0,i.jsxs)("div",{className:(0,m.Z)("flex gap-2.5",{"w-fit":!T}),children:[(0,i.jsx)(a.z,{size:"lg",classNames:{root:(0,m.Z)("shadow-md px-4 bg-[#F56060] hover:bg-[#f05b5b] text-base font-semibold text-white w-full",{"text-sm":M.length>0})},color:"blue",disabled:et,radius:"md",onClick:eh,children:B("Buy now")}),(0,i.jsx)(a.z,{size:"lg",classNames:{root:(0,m.Z)("shadow-md px-4 bg-green-secondary hover:bg-[#16b78c] text-base font-semibold text-white w-full",{"text-sm":M.length>0})},color:"green",disabled:et,radius:"md",onClick:()=>eo(!0),children:B("Active")}),M.length>0&&(0,i.jsx)(a.z,{size:"lg",classNames:{root:(0,m.Z)("shadow-md px-4 bg-navy-primary text-sm font-semibold text-white w-full max-w-[400px]")},color:"blue",disabled:et,radius:"md",onClick:ep,children:B("Try it out")})]}),!W&&!X&&(0,i.jsx)(a.z,{size:"lg",disabled:!el||et,classNames:{root:(0,m.Z)("shadow-md px-4 bg-green-secondary hover:bg-[#16b78c] text-base font-semibold text-white hover:bg-[#16b78c]",{"w-fit":!T})},color:"green",radius:"md",onClick:()=>em(),children:B("Enroll for Free")})]})]}):(0,i.jsx)("div",{className:"h-[50px]"})}},3798:function(e,l,t){"use strict";t.d(l,{t:function(){return u}});var i=t(85893),s=t(11939),a=t(63301),n=t(92132),o=t(77694),r=t(60786),d=t.n(r),c=t(86584);l.Z=e=>{var l,t,r;let{data:x,isCourseManager:m,refreshData:v,positionLeft:p,isFetchingGetCourseDetail:h}=e,{t:g}=(0,n.$G)(),f=(null==x?void 0:null===(t=x.courseSchedule)||void 0===t?void 0:null===(l=t.courseScheduleList)||void 0===l?void 0:l.flatMap(e=>{var l;return null===(l=e.sections)||void 0===l?void 0:l.flatMap(e=>e.activities)}))||[],b=(0,s.KV)(f,g),j=[{label:g("Course roadmap",{number:null==x?void 0:null===(r=x.subCourses)||void 0===r?void 0:r.length}),icon:(0,i.jsx)(c.Z,{size:14}),hidden:!(null==x?void 0:x.isCombo)},{label:g("course_sticky.learning_hours",{count:null==x?void 0:x.duration}),icon:(0,i.jsx)(c.Z,{size:14})},...b.map(e=>({label:e.label,icon:e.icon})),{label:(null==x?void 0:x.isEnroll)?(null==x?void 0:x.enrollDeadlineTime)?"".concat(g("Expired date"),": ").concat(a.DL.formatDateGMT({dateString:null==x?void 0:x.enrollDeadlineTime,checkHour:!1})):g("course_sticky.lifetime_access"):(null==x?void 0:x.learnDuration)?g("course_sticky.day_access",{day:null==x?void 0:x.learnDuration}):g("course_sticky.lifetime_access"),icon:(0,i.jsx)("img",{src:"/images/learning/lifetime_access.png",width:14,height:14,alt:"lifetime_access"})},{label:g("course_sticky.certificate_completion",{percentage:(null==x?void 0:x.percentageToComplete)||90}),icon:(0,i.jsx)("img",{src:"/images/learning/certificate_completion.png",width:14,height:14,alt:"certificate_completion"})}].filter(e=>!(null==e?void 0:e.hidden));return(0,i.jsx)("div",{className:"fixed mt-6 hidden custom:block",style:{left:p},children:x&&(0,i.jsxs)("div",{className:"p-5 bg-[#0d315d] text-white flex flex-col gap-5 !rounded-lg",children:[(0,i.jsx)(u,{data:x}),(0,i.jsxs)("div",{className:"border-y-[1px] border-[#374151] py-4",children:[(0,i.jsx)("h4",{className:"my-0 text-[24px] font-semibold",children:g("About this Course")}),(0,i.jsx)("ul",{className:d().listItem,children:j.map((e,l)=>(0,i.jsxs)("li",{className:"list-none flex flex-row gap-[10px] items-center text-sm",children:[e.icon,(0,i.jsx)("text",{children:e.label})]},l))})]}),!h&&(0,i.jsx)("div",{className:"flex flex-col gap-4",children:(0,i.jsx)(o.Z,{isSmall:!0,data:x,refreshData:v,isCourseManager:m})})]})})};let u=e=>{let{data:l}=e,{t}=(0,n.$G)();return l?(null==l?void 0:l.price)<=0?(0,i.jsx)("div",{className:"text-[28px] font-semibold flex items-center gap-1 leading-[30px]",children:t("Free")}):(0,i.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,i.jsxs)("div",{className:"text-[28px] font-semibold flex flex-col items-start gap-1 leading-[30px]",children:[(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{children:a.DL.formatNumber((null==l?void 0:l.discount)>0?null==l?void 0:l.priceAfterDiscount:null==l?void 0:l.price)}),(0,i.jsx)("span",{children:"đ"})]}),(null==l?void 0:l.discount)>0&&(0,i.jsxs)("div",{className:"flex items-center text-base gap-1 ",children:[(0,i.jsx)("span",{className:"line-through font-normal",children:a.DL.formatNumber(l.price)}),(0,i.jsx)("span",{children:"đ"})]})]}),(null==l?void 0:l.discount)>0&&(0,i.jsxs)("div",{className:"rounded-[4px] font-semibold w-[36px] h-[24px] flex items-center justify-center text-xs text-[#F56060] bg-[#FEEBEB] mt-[2px]",children:["-",null==l?void 0:l.discount,"%"]})]}):null}},28589:function(e,l,t){"use strict";t.d(l,{Dj:function(){return a},Lg:function(){return n}});var i=t(85893),s=t(67294);let a=s.createContext({allowPreviewCourseList:[],setAllowPreviewCourseList:()=>{}});
1function n(e){let[l,t]=(0,s.useState)([]);return(0,i.jsx)(a.Provider,{value:{allowPreviewCourseList:l,setAllowPreviewCourseList:t},children:e.children})}},60786:function(e){e.exports={root:"BoxSticky_root__e9AvC",listItem:"BoxSticky_listItem__3mEDh"}}}]);

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.