1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[449],{60385:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/projects/read/[id]/course",function(){return i(76133)}])},46605:function(e,t,i){"use strict";i.d(t,{I8:function(){return f}});var n=i(85893),r=i(11163),s=i(67294),o=i(41779),l=i(58249);let u=(e,t)=>{let i=[...null!=e?e:[]].sort((e,t)=>e.position-t.position).flatMap(e=>[...e.lectures].sort((e,t)=>e.position-t.position)),n=i.findIndex(e=>e.id===t);return{previous:n>0?i[n-1]:void 0,next:n>=0&&n<i.length-1?i[n+1]:void 0}},d=e=>{var t;let i=new Set,n=e=>{if(!e||"object"!=typeof e)return;if(Array.isArray(e)){e.forEach(n);return}let{url:t,content_type:r}=e;"string"==typeof t&&"string"==typeof r&&r.startsWith("image/")&&i.add(t),Object.values(e).forEach(n)};return(null!==(t=null==e?void 0:e.lectureSegments)&&void 0!==t?t:[]).forEach(e=>{var t;let r=e.mediaSegment;(null==r?void 0:r.fileUrl)&&!(null===(t=r.contentType)||void 0===t?void 0:t.startsWith("video/"))&&i.add(r.fileUrl),n(e.block)}),Array.from(i)},a=e=>{d(e).forEach(e=>{let t=new window.Image;t.decoding="async",t.src=e})},c="inline-flex h-12 min-w-[132px] items-center justify-center gap-2 rounded-full border border-interactive-outlined-idle bg-white px-5 text-[15px] font-semibold text-text-default-primary transition-colors hover:border-interactive-primary-hover hover:bg-[#faf8ff] hover:text-interactive-primary-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-interactive-primary-focus disabled:cursor-not-allowed disabled:border-interactive-outlined-disabled disabled:bg-elevation-surface-2 disabled:text-text-default-tertiary t:min-w-[152px] t:text-[16px]",f=e=>{let{sections:t,lectureId:i,getHref:d,disabled:f=!1}=e,v=(0,r.useRouter)(),{previous:p,next:m}=u(t,i);return((0,s.useEffect)(()=>{a(p),a(m)},[m,p]),i&&(null==t?void 0:t.length))?(0,n.jsxs)("nav",{"aria-label":"Lecture navigation",className:"mt-10 flex items-center justify-between pt-6",children:[(0,n.jsxs)("button",{type:"button",disabled:f||!p,onClick:()=>p&&v.push(d(p.id)),onMouseEnter:()=>a(p),onFocus:()=>a(p),className:c,children:[(0,n.jsx)(o.w,{"aria-hidden":"true",className:"h-5 w-5 shrink-0"}),(0,n.jsx)("span",{children:"Previous"})]}),(0,n.jsxs)("button",{type:"button",disabled:f||!m,onClick:()=>m&&v.push(d(m.id)),onMouseEnter:()=>a(m),onFocus:()=>a(m),className:c,children:[(0,n.jsx)("span",{children:"Next"}),(0,n.jsx)(l.X,{"aria-hidden":"true",className:"h-5 w-5 shrink-0"})]})]}):null}},36993:function(e,t,i){"use strict";i.d(t,{i:function(){return p}});var n=i(85893),r=i(39332),s=i(11163),o=i(67294),l=i(46605),u=i(27179),d=i(34083);let a=e=>{let{title:t}=e;return(0,n.jsx)(d.T,{title:t,showLabel:!1})};var c=i(25631),f=i(71890),v=i(38665);let p=()=>{var e,t;let i=(0,s.useRouter)(),d="string"==typeof i.query.id?i.query.id:"",p=(0,r.useSearchParams)(),m=null!==(e=p.get("token"))&&void 0!==e?e:"",h=null!==(t=p.get("workspaceId"))&&void 0!==t?t:"",{data:x}=v.Mw.useGetReadonlyCourseContent(d,m,h,i.isReady&&!!d&&!!m&&!!h),g=p.get("lectureId"),[b,y]=(0,o.useState)();return((0,o.useEffect)(()=>{y(null==x?void 0:x.sections.map(e=>e.lectures.find(e=>e.id===g)).find(e=>void 0!==e))},[g,x]),p.get("lectureId"))?(0,n.jsxs)("section",{className:"space-y-5",children:[(0,n.jsx)(a,{title:null==b?void 0:b.title}),(0,n.jsx)("div",{className:"relative",children:(0,n.jsx)("div",{className:"relative",children:null==b?void 0:b.lectureSegments.sort((e,t)=>e.position-t.position).filter(e=>{var t,i,n,r;return!!e.block||!!((e.segmentType!==f.w.SegmentType.enum.TEXT||(null===(t=e.textSegment)||void 0===t?void 0:t.content.length)||(null===(i=e.textSegment)||void 0===i?void 0:i.title.length))&&(e.segmentType!==f.w.SegmentType.enum.QUESTION||(null===(n=e.questionSegment)||void 0===n?void 0:n.question.text.length)||(null===(r=e.questionSegment)||void 0===r?void 0:r.question.questionAnswerOptions.find(e=>e.text.length))))}).map(e=>(0,n.jsx)("div",{className:e.block?void 0:"my-5",children:e.segmentType&&(0,n.jsx)(c.X,{type:e.segmentType,lectureContent:b,segment:e})},e.id))})}),(0,n.jsx)(l.I8,{sections:null==x?void 0:x.sections,lectureId:g,getHref:e=>(0,u.U)({isAdmin:i.pathname.startsWith("/projectsAdmin"),projectId:d,mode:"course",lectureId:e,token:m,workspaceId:h,fromEditor:"true"===p.get("fromEditor")})})]}):null}},76133:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return u}});var n=i(85893),r=i(67421),s=i(95841),o=i(36993),l=i(76155);function u(){let{t:e}=(0,r.$G)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Y,{title:e("projects.head.title"),description:e("projects.head.description")}),(0,n.jsx)(l.e,{children:(0,n.jsx)(o.i,{})})]})}}},function(e){e.O(0,[5062,6911,1509,5033,1471,202,5586,2651,945,2888,9774,179],function(){return e(e.s=60385)}),_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.