1import{n as e}from"./BB3QmiEU.js";import{t}from"./Bm1LX1Jb.js";var n=e(`testsStore`,{state:()=>({tests:[],meta:{}}),getters:{getTestByName(e){return t=>e.tests.find(e=>e.name===t)},getTestById(e){return t=>e.tests.find(e=>e.id===t)}},actions:{updateTests(e){Array.isArray(e)&&(this.tests=e.map(e=>{let t={id:e.id,name:e.name,createdAt:e.created_at??null,updatedAt:e.updated_at??null,testKeys:(e.tests??[]).map(e=>e.key),status:{progress:{completed:e.status?.progress?.completed??null,count:e.status?.progress?.count??null,ratio:e.status?.progress?.ratio??null}},period:{startedAt:e.duration?.started_at??null,endedAt:e.duration?.ended_at??null,label:e.duration?.label??void 0}},n=Array.isArray(e.teams)?e.teams:[],r=n.filter(e=>e?.type===`group`).map(e=>({id:e.id,name:e.name,slug:e.slug,type:e.type,parent:e.parent?{id:e.parent.id,name:e.parent.name,slug:e.parent.slug,type:e.parent.type}:void 0,period:{label:e.duration?.label??void 0,startedAt:e.duration?.started_at??null,endedAt:e.duration?.ended_at??null},stats:{subjects:{count:e.stats?.subjects?.count??0,gender:{f:e.stats?.subjects?.gender?.f??0,m:e.stats?.subjects?.gender?.m??0}}}})),i=[];return r.length>0?r.forEach(function(e){e.parent&&(i.filter(t=>t?.id===e.parent?.id).length>0||i.push({id:e.parent.id,name:e.parent.name??``,type:e.parent.type??``,slug:e.parent.slug??``}))}):i=n.filter(e=>e?.type===`school`).map(e=>({id:e.id,name:e.name,slug:e.slug,type:e.type,stats:{subjects:{count:e.stats?.subjects?.count??0,gender:{f:e.stats?.subjects?.gender?.f??0,m:e.stats?.subjects?.gender?.m??0}}}})),r||=[],i||=[],{...t,groups:r,schools:i}}))},filtertestsOnOverlappingPeriod(e){let n=[];this.tests.forEach(r=>{r.period&&t().overlapsWith(e,r.period)&&n.push(r)}),this.tests=n},clearTests(){this.tests=[]},clear(){this.tests=[],this.meta={}},updateMeta(e){this.meta.currentPage=e.current_page,this.meta.lastPage=e.last_page,this.meta.perPage=e.per_page,this.meta.to=e.to,this.meta.from=e.from,this.meta.total=e.total}}});export{n as t};
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.