PageSourceSearch

https://dragonjar.education/_nuxt/DR3YDFWt.js

js dragonjar.education collected 2026-10-05 00:59:24 UTC 3,690 bytes, 1 lines download raw bytes

1import{u as R}from"./DUHz7PzY.js";import{D as q}from"./BqEWBDsN.js";import{D as z}from"./C-h6fpT0.js";import{T as J}from"./BxoCBpbn.js";import{c as G}from"./CK22aDlg.js";import{d as S,e as N,o,a as c,n as K,i as e,h as m,q as d,b as p,t as f,c as h,j as $,g,F as T,r as D,x as P,V as A,J as Q,u as U,m as W,y as X,C as w,k as _}from"./CNB_PrB2.js";import{p as Y,x as I,I as Z,y as O,m as ee}from"./CCxPXGjd.js";import{u as se}from"./B_lje4Ed.js";import{E as te}from"./DguxY_Xs.js";import"./ya-p5Fo5.js";import"./CHS0fPHa.js";import"./CxIZtCgj.js";const oe={class:"header"},ne=["onClick"],ae=["onClick"],B=S({__name:"LibraryBox",props:{box:{}},setup(u){const k=N().$i18n.t,v=R(),s=a=>{G(a)},i=P(!1);return(a,b)=>(o(),c("div",{class:K(["header-block glass list",{active:e(i)}])},[m(e(ee),null,{default:d(()=>[p("div",oe,[p("h3",{onClick:b[0]||(b[0]=n=>i.value=!e(i))},f(u.box.title),1),m(q,{class:"arrow",onClick:b[1]||(b[1]=n=>i.value=!e(i))}),m(e(Y),{class:"tab-list flex items-center ml-auto"},{default:d(()=>[u.box.files.length?(o(),h(e(I),{key:0},{default:d(()=>[$(f(e(k)("[library] Resources")),1)]),_:1})):g("",!0),u.box.links.length?(o(),h(e(I),{key:1},{default:d(()=>[$(f(e(k)("[library] Links")),1)]),_:1})):g("",!0)]),_:1})]),m(e(Z),{class:"header-body"},{default:d(()=>[u.box.files.length?(o(),h(e(O),{key:0,as:"ul",class:"list"},{default:d(()=>[(o(!0),c(T,null,D(u.box.files,n=>(o(),c("li",{onClick:L=>e(v).downloadFile(n.media_id,n.title)},[m(z,{class:"w-6 h-6"}),p("span",null,f(n.title),1)],8,ne))),256))]),_:1})):g("",!0),u.box.links.length?(o(),h(e(O),{key:1,as:"ul",class:"list"},{default:d(()=>[(o(!0),c(T,null,D(u.box.links,n=>(o(),c("li",{onClick:L=>s(n.url)},[m(J,{class:"w-6 h-6"}),p("span",null,f(n.title),1)],8,ae))),256))]),_:1})):g("",!0)]),_:1})]),_:1})],2))}}),le={key:0,class:"library"},re={key:1,class:"header-block glass empty"},ie={class:"header-body !mt-[15px]"},ue={class:"text-center"},Le=S({__name:"library",setup(u){const k=N().$i18n.t;A();const{setIsLoading:v}=A(),s=R(),{curriculum:i,courseLibrary:a,isLoadingLibrary:b}=Q(s),n=U(),L=_(()=>{var t;return k("[meta] Resource Library")+" | "+i.value.title+" | "+((t=n==null?void 0:n.generalSettings)==null?void 0:t.school_name)});W({title:L});const M=se(i),E=_(()=>{var t,r,l,x,y,C;return((r=(t=a.value)==null?void 0:t.modules)==null?void 0:r.length)>0||((x=(l=a.value)==null?void 0:l.courses)==null?void 0:x.files.length)>0||((C=(y=a.value)==null?void 0:y.courses)==null?void 0:C.links.length)>0}),F=_(()=>{var t,r;return((t=a.value.courses)==null?void 0:t.files.length)>0||((r=a.value.courses)==null?void 0:r.links.length)>0}),j=_(()=>({title:i.value.title,files:a.value.courses.files,links:a.value.courses.links}));return X(async()=>{const t=w.get("course_id"),r=w.get("module_id"),l=w.get("lesson_id");if(Object.keys(s.curriculum).length>0&&s.lastCurriculumLoadedTime&&s.curriculum.id===t){const x=new Date,y=new Date(s.lastCurriculumLoadedTime);(x.getTime()-y.getTime())/(1e3*3600)>1?s.getCurriculum(t).then(()=>{s.setOpenModule(r),s.setOpenLesson(l,!1),s.setLastCurriculumLoadedTime()}):(s.setOpenModule(r),await s.setOpenLesson(l,!1))}else M.value||s.getCurriculum(t).then(()=>{s.setOpenModule(r),s.setOpenLesson(l,!1),s.setLastCurriculumLoadedTime()});await s.getCourseLibrary(t),v(!1)}),(t,r)=>e(E)?(o(),c("div",le,[e(F)?(o(),h(e(B),{key:0,box:e(j)},null,8,["box"])):g("",!0),(o(!0),c(T,null,D(e(a).modules,l=>(o(),h(e(B),{key:l.module_id,box:{title:l.title,files:l.resources.files,links:l.resources.links}},null,8,["box"]))),128))])):(o(),c("div",re,[p("div",ie,[m(te,{class:"w-6 h-6"}),p("span",ue,f(e(k)("[library] This course does not have any resources!")),1)])]))}});export{Le 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.