1import{j as s}from"./vendor-puck-lPnaRYA0.js";import{u as b,a as w,b as C,c as v,aE as y,A as I,g as D,q as L,aF as B,a1 as H,aB as P}from"./index-2-63E-ZJ.js";import{u as R}from"./useCourseData-c3bQrO3K.js";import{e as T,u as S}from"./vendor-react-TOOSQ9Q-.js";import{G as k}from"./GlightBox-j_PEn8qO.js";import{_ as A,s as M}from"./index-vX5vMykW.js";import{L as F}from"./LoadingCourseDetails-jV2P_CL9.js";import{C as _}from"./CourseProgressBar-CLUf23Pj.js";import{u}from"./vendor-i18n-eTj0Pfmx.js";import{R as z,C as E,c as n}from"./vendor-bootstrap-0BqwUoKC.js";import"./vendor-luxon-2n2xc3QM.js";import"./vendor-calendar-WlMSM93F.js";import"./vendor-motion-BX6prKAE.js";const G=({host:o,lessonsCount:a,categoryToShow:t})=>{const{t:e}=u();return s.jsxs("div",{className:"d-flex flex-wrap gap-3",children:[s.jsxs("div",{className:"d-inline-flex align-items-center gap-2 ",children:[s.jsx("span",{className:"fw-medium",children:e("Hosted by {{host}}",{host:o})}),s.jsx(B,{size:5})]}),s.jsx("div",{className:"d-inline-flex align-items-center gap-2",children:s.jsxs("span",{className:"fw-medium",children:[" ",a===1?e("1 lesson"):e("{{lessons}} lessons",{lessons:a,count:a})]})}),t&&s.jsx("div",{className:"d-inline-flex align-items-center",children:s.jsx(H,{badgeColor:"info",children:s.jsx("strong",{children:t})})})]})},O=({description:o,overviewHtml:a})=>{const{t}=u(),e="coursehome-desc";return s.jsxs("div",{className:"mt-4 mb-4 border-0 px-4",children:[s.jsxs("div",{children:[o&&s.jsxs("div",{className:"py-4","aria-describedby":e,children:[s.jsx("h3",{className:"mb-2 fw-bolder",children:t("Course Description")}),s.jsx("p",{className:"mb-0",children:s.jsx(P,{children:o})})]}),a&&s.jsxs("div",{className:"py-4","aria-describedby":e,children:[s.jsx("h3",{className:"mb-2 fw-bolder",children:t("Course Overview")}),s.jsx("p",{className:"mb-0 course-lesson-contents",children:s.jsx(A,{allowedAttributes:{a:["href","title","target","rel"],img:["src","alt","title","width","height","style"],iframe:["src","width","height","allow","frameborder","allowfullscreen","style"]},allowedTags:M.defaults.allowedTags.concat(["a","img","video","iframe"]),html:a})})]})]}),s.jsx("hr",{className:"my-4"})]})},U=o=>{const{t:a}=u(),t=S(),{getRoutePath:e}=C(),{isSmDown:r}=v(),{id:i,title:l,summary:c,host:d,description:h,lessonsCount:p,progressPercent:j,imageUrl:m,startLessonId:g,overviewHtml:f,categoryToShow:N}=o,x=Math.max(0,Math.min(100,Math.round(j)));return s.jsx(z,{className:"g-4 align-items-stretch",children:s.jsxs(E,{xs:12,children:[s.jsx(n,{className:"shadow border-0",children:s.jsxs(n.Body,{className:"d-flex flex-column",children:[m&&s.jsx("div",{className:"flex-shrink-0 border-3",children:s.jsx(k,{image:m,"data-width":"80%",children:s.jsx(y,{aspectRatio:r?4/3:800/300,className:"rounded-3 mb-4",style:{width:"100%"},alt:a("Course image for {{title}}",{title:l}),src:m})})}),s.jsx(n.Title,{as:"h2",className:"fw-bolder",id:"coursehome-title",children:l}),s.jsx("div",{className:"d-flex flex-row my-4",children:s.jsx("div",{children:s.jsx(G,{host:d,lessonsCount:p,categoryToShow:N})})}),c&&s.jsx(n.Subtitle,{as:"p",className:"mb-4",id:"coursehome-desc",children:c})]})}),s.jsx(O,{description:h,overviewHtml:f}),s.jsx("div",{className:" border-0 mb-4 px-4",children:s.jsxs("div",{children:[s.jsx(_,{clampedProgress:x}),s.jsx("div",{className:r?"w-100":"text-end",children:s.jsx(I,{variant:"primary",classNames:`mt-3 btn btn-primary ${r?"w-100":""}`,onClick:()=>t(e(D.course_lesson,{courseId:i,lessonId:g})),label:a(x===0?"Start Course":"Continue Course"),children:s.jsx(L,{name:"arrow-right",size:16,className:"ms-2"})})})]})})]})})},os=()=>{const o=T(),{business:a}=b(),{getCourseSmallImage:t}=w(),e=R(Number(o.courseId));if(!e?.courseData)return s.jsx("div",{children:s.jsx(F,{})});const r=e.courseData?.Course,i=e.courseData.Lessons.find(d=>!d.IsComplete),l=i?i.Id:e.courseData.Lessons[0]?.Id,c=e.courseData.Course.GroupName??e.courseData.Course.Business.Name;return s.jsx(U,{id:r.Id,description:r.FullDescription,overviewHtml:r.OverviewText,host:e.courseData.Host?.FullName,lessonsCount:e.courseData.Lessons.length,progressPercent:e.courseData?.Completeness,imageUrl:t(a,r,600,540),summary:r?.SummaryText,title:r?.Title,startLessonId:l,categoryToShow:c})};export{os as default};
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.