1import{bW as _,b5 as S,m as g,a6 as s}from"./BTYw87Qv.js";import{c as v}from"./CoVtYypi.js";function M(r){return typeof r=="string"}function m(r){return typeof r=="number"&&!Number.isNaN(r)}function L(r){return typeof r>"u"}function O(r){return r===null}function V(r){return L(r)||O(r)}function N(r){return!V(r)}const y=v({key:r=>r,name:"countries",url:()=>"/api/countries",transform:r=>r.map(e=>({...e,flag:e.flag,link:_(S("countries",String(e.id).toLowerCase()))})),extend:r=>{const e=g(()=>s(r.data)?.length?b(s(r.data)):[]),f=g(()=>s(c).map(({id:n})=>n)),c=g(()=>[...s(r.data),...s(e).map(({id:n,name:o})=>({id:n,name:o}))]);function E(n){return!s(e).some(({id:o})=>String(o)===String(n))}function u(n){if(n)return s(c).find(o=>o.id===n)?.name}const i=g(()=>[...new Set(s(r.data).flatMap(n=>n.regions))].sort()),l=g(()=>s(i).filter(n=>n.includes("OECD")));function t(n){const o=s(r.data).find(p=>p.id===n);if(o)return s(l).find(p=>o.regions.includes(p))}return{findName:u,regions:i,statuses:l,items:c,codes:f,aliases:e,shouldShowInTooltip:E,findStatus:t}}});function b(r){return[a("OECD_AVG","OECD Average",r.filter(e=>e.regions.includes("OECD")),"M0,-10L10,10L-10,10Z"),a("APAC_AVG","Asia-Pacific",r.filter(e=>e.regions.includes("APAC"))),a("EU27_AVG","European Union",r.filter(e=>e.regions.includes("EU27"))),a("Eurasia_AVG","Eurasia",r.filter(e=>e.regions.includes("Eurasia"))),a("LAC_AVG","Latin America and the Caribbean",r.filter(e=>e.regions.includes("LAC"))),a("MEA_AVG","Middle East and Africa",r.filter(e=>e.regions.includes("MEA"))),a("SE_Europe_AVG","Southeast Europe",r.filter(e=>e.regions.includes("SE Europe"))),{id:"BEST",name:"Best Performing",marker:"M0,0L5,10L-5,10Z",showInTooltip:!1,transformEntries(e,f){const c=f.reduce((u,i)=>((u[i.year]??=[]).push(i),u),{}),E=Object.entries(c).map(([u,i])=>{const l=i?.map(n=>n.value).filter(m),t=i?.map(n=>n.points).filter(m);return{id:e.id,country:"BEST",year:u,value:Math.max(...l),points:Math.max(...t),selected:void 0,comment:void 0}});f.push(...E)}},a("ALL_AVG","All Countries",r),a("OECD_ACC_AVG","OECD accession",r.filter(e=>e.regions.includes("OECD accession"))),a("OECD_PARTNER_AVG","OECD partner countries",r.filter(e=>e.regions.includes("OECD partner countries")))]}function a(r,e,f,c){return{id:r,name:e,marker:c,showInTooltip:!0,transformEntries(E,u){try{const i=u.filter(t=>f.some(n=>n.id===t.country)).reduce((t,n)=>((t[n.year]??=[]).push(n),t),{}),l=Object.entries(i).map(([t,n])=>{const o=n?.map(d=>d.value).filter(m),p=n?.map(d=>d.points).filter(m);return{id:E.id,country:r,year:t,value:o?Math.round(o.reduce((d,A,C,h)=>d+A/h.length,0)*100)/100:void 0,points:p?Math.round(p.reduce((d,A,C,h)=>d+A/h.length,0)*100)/100:void 0,selected:void 0,comment:void 0}}).filter(t=>m(t.value)||m(t.points));u.push(...l)}catch(i){console.error(`Error transforming entries for ${r}:`,i)}}}}export{L as a,N as b,V as c,m as d,M as i,y as u};
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.