1(function(){"use strict";var oe=document.documentElement.lang==="en",ye=window.ComparisonStore.max,L=document.getElementById("jamfor-search"),T=document.getElementById("jamfor-results"),C=document.getElementById("jamfor-chips"),K=document.getElementById("jamfor-selection-status"),j=document.getElementById("jamfor-table-container"),N=document.getElementById("jamfor-print-footnote"),je=document.getElementById("jamfor-actions"),F=document.getElementById("jamfor-share"),J=document.getElementById("jamfor-print"),z=document.getElementById("jamfor-empty-state"),k=[],Se=[],Ne=new Map,Xe={},Oe={},B={},$e={},p=[],G=!1,Q=new Map,le=null,Pe="",Re=!1,Ot="/data/schools-evidence.json",Pt="/data/schools-compare-text.json",Rt="/data/betygsfordelning.json",Mt=2,It="https://images.skolkoll.se/isochrones/v2-transit",ne=null,se=null,W="idle";function Ft(e){var t=typeof window.schoolSlug=="function"?window.schoolSlug(e):"",n=t;if(!n){var i=window.slugify(e&&(e.verksamhetsnamn||e.skolenhetNamn)||"skola"),a=String(e&&e.skolenhetskod||"").trim();n=a?i+"-"+a:i}var l=oe?"/en/school/":"/skola/";return l+n+"/"}function X(e){return e&&(e.verksamhetsnamn||e.skolenhetNamn||e.n)||""}function Kt(e){var t=Ne.get(e)||window._kommunSlugMap&&window._kommunSlugMap.get(e)||window.slugify(e),n=oe?"/en/municipality/":"/kommun/";return n+t+"/"}function Me(e){return String(e||"").toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu,"")}var Bt={FORSK:window._L("Förskola","Preschool"),GR:window._L("Grundskola","Compulsory school"),GY:window._L("Gymnasieskola","Upper secondary"),FKLASS:window._L("Förskoleklass","Preschool class"),FTH:window._L("Fritidshem","After-school care"),FRI:window._L("Fritidshem","After-school care"),GRAN:window._L("Anpassad grundskola","Adapted compulsory school"),GRSÃR:window._L("Anpassad grundskola","Adapted compulsory school"),GYAN:window._L("Anpassad gymnasieskola","Adapted upper secondary"),GYSÃR:window._L("Anpassad gymnasieskola","Adapted upper secondary"),KOMVUX:window._L("Komvux","Adult education"),OPPFTH:window._L("Ãppen fritidsverksamhet","Open leisure activities"),SAM:window._L("Sameskola","Sami school"),SARVUX:window._L("Särvux","Adapted adult ed."),SFI:window._L("SFI","Swedish for immigrants"),SP:window._L("Specialskola","Special school"),VUX:window._L("Vuxenutbildning","Adult education")};function Ie(e){return Bt[e]||e}function $(e){var t=Array.isArray(e&&e.schoolTypes)?e.schoolTypes:[];return t.indexOf("FORSK")!==-1&&t.indexOf("GR")===-1&&t.indexOf("GY")===-1}function _e(e){return!$(e)}function Gt(e){var t=Array.isArray(e&&e.schoolTypes)?e.schoolTypes:[],n=[];return t.indexOf("FORSK")!==-1&&n.push({key:"FORSK",label:window._L("förskola","preschool")}),t.some(function(i){return["GR","FKLASS","GRAN","SP","SAM"].indexOf(i)!==-1})&&n.push({key:"GR",label:window._L("grundskola","compulsory school")}),t.some(function(i){return["GY","GYAN"].indexOf(i)!==-1})&&n.push({key:"GY",label:window._L("gymnasium","upper secondary")}),!n.length&&t.length&&n.push({key:"OTHER",label:window._L("annan skolform","other school type")}),n}function qt(e){var t={};return e.forEach(function(n){Gt(n).forEach(function(i){t[i.key]=i.label})}),Object.keys(t).map(function(n){return{key:n,label:t[n]}})}function Dt(e,t,n){var i=qt(t);if(!(i.length<2)){var a=document.createElement("div");a.className="compare-version-warning compare-form-warning",a.setAttribute("role","note");var l=document.createElement("span");l.className="compare-version-warning__icon",l.setAttribute("aria-hidden","true"),l.textContent="!";var u=document.createElement("span");u.textContent=window._L("Du jämför olika skolformer ("+i.map(function(d){return d.label}).join(", ")+"). Jämför helst skolor inom samma skolform; vissa mÃ¥tt kan saknas eller inte vara jämförbara.","You are comparing different school types ("+i.map(function(d){return d.label}).join(", ")+"). Compare schools within the same school type when possible; some metrics may be missing or not comparable."),a.appendChild(l),a.appendChild(u),e.insertBefore(a,n&&n.parentNode===e?n:null)}}function Ut(e){if(!e)return"";var t=String(e).toLowerCase();return t==="skolverket"?"Skolverket":t==="salsa"?"SALSA":t==="kolada"?"Kolada":t==="bolagsverket"?"Bolagsverket":t==="skolinspektionen"?window._L("Skolinspektionen","Swedish Schools Ins
1pectorate"):String(e)}function Ht(e,t){var n=e.evidenceMetric||e.qualityMetric||null,i=[];n&&t.forEach(function(d){if(!(typeof e.appliesTo=="function"&&!e.appliesTo(d))){var c=d&&d._evidence&&d._evidence[n];c&&i.push(c)}});var a=[];if(i.forEach(function(d){var c=Ut(d.source);c&&a.indexOf(c)===-1&&a.push(c)}),!a.length&&e.sourceLabel&&a.push(e.sourceLabel),!a.length)return"";var l=[];i.forEach(function(d){d.period&&l.indexOf(d.period)===-1&&l.push(d.period)});var u=window._L("Källa: ","Source: ")+a.join(", ");return l.length===1?u+=" · "+l[0]:l.length>1&&(u+=" · "+window._L("perioder: ","periods: ")+l.join(", ")),u}var re="â";function q(e){return e==null?re:oe?String(e):String(e).replace(".",",")}function ue(e,t){if(typeof t!="string"||t.indexOf(re)!==0){e.textContent=t;return}e.textContent="";var n=document.createElement("span");n.setAttribute("aria-hidden","true"),n.textContent=t;var i=document.createElement("span");i.className="sr-only",i.textContent=window._L("Uppgift saknas","No data")+t.slice(re.length),e.appendChild(n),e.appendChild(i)}function zt(e,t){var n=Array.isArray(e)?e:e==null?[]:[e];return n.map(function(i){return t[i]||i})}function Vt(e){var t=Array.isArray(e.schoolTypes)?e.schoolTypes:[];return t.length===1&&(t[0]==="FRI"||t[0]==="FTH"||t[0]==="OPPFTH")}var Ze={complete:{icon:"â",label:window._L("Komplett underlag","Complete data"),tooltip:window._L("Alla centrala jämförelsedata finns.","All key comparison data is available.")},partial_missing:{icon:"â",label:window._L("Delvis bortfall","Partial missingness"),tooltip:window._L("Vissa centrala jämförelsedata saknas.","S
1ome key comparison data is missing.")},secret_limited:{icon:"ð",label:window._L("Sekretess (Skolverket)","Confidential (Skolverket)"),tooltip:window._L("Skolverket undanhÃ¥ller värden för grupper med färre än 10 elever.","Skolverket withholds values for groups with fewer than 10 students.")},small_numbers:{icon:"â ",label:window._L("SmÃ¥ tal","Small numbers"),tooltip:window._L("Underlaget är litet och bör tolkas försiktigt.","The sample is small and should be interpreted with caution.")},manually_mapped:{icon:"â",label:window._L("Manuellt mappat","Manually mapped"),tooltip:window._L("Datapunkten är manuellt eller heuristiskt kopplad.","This data point is manually or heuristically linked.")},model_computed:{icon:"â¿",label:window._L("Modellberäknat","Model computed"),tooltip:window._L("Värdet bygger pÃ¥ en statistisk modell, till exempel SALSA.","The value is derived from a statistical model, such as SALSA.")},time_delayed:{icon:"â±",label:window._L("Tidsfördröjt","Time delayed"),tooltip:window._L("Datakällan är äldre än väntat för denna metrik.","The source is older than expected for this metric.")},limited_history:{icon:"â",label:window._L("Begränsad historik","Limited history"),tooltip:window._L("Historiken är kortare än önskat för trygg trendtolkning.","The history is shorter than desired for robust trend interpretation.")},unknown:{icon:"?",label:window._L("Okänt underlag","Quality unavailable"),tooltip:window._L("Datakvalitetsprofil saknas för denna skola i jämförelseunderlaget.","The compare dataset does not include a quality profile for this school.")}};function Fe(e){return Array.isArray(e.schoolTypes)&&(e.schoolTypes.indexOf("GR")!==-1||e.schoolTypes.indexOf("GRAN")!==-1||e.schoolTypes.indexOf("FKLASS")!==-1||e.schoolTypes.indexOf("SP")!==-1||e.schoolTypes.indexOf("SAM")!==-1)}function Yt(e){return Fe(e)&&Array.isArray(e.gradeRange)&&e.gradeRange.indexOf("9")!==-1}function Ke(e){return Array.isArray(e.schoolTypes)&&(e.schoolTypes.indexOf("GY")!==-1||e.schoolTypes.indexOf("GYAN")!==-1)}function et(e){return e==="secret"?"secret_limited":e==="small_sample"?"small_numbers":e==="model_based"?"model_computed":e}function g(e){if(e==null||e==="")return null;var t=Number(e);return Number.isFinite(t)?t:null}function R(e,t){return e&&e._compareQuality&&e._compareQuality.metricStatuses?et(e._compareQuality.metricStatuses[t]||null):null}function tt(e){return e&&e._compareQuality&&e._compareQuality.overall?et(e._compareQuality.overall):"unknown"}function nt(e){return Ze[e]||Ze.unknown}function rt(e,t){var n=nt(e),i=document.createElement("span");return i.className="jfr-quality-badge jfr-quality-badge--"+e+(t?" jfr-quality-badge--"+t:""),i.textContent=n.icon,i.title=n.label+". "+n.tooltip,i.setAttribute("aria-label",n.label+". "+n.tooltip),i}function Jt(e,t){return!e||e==="complete"?!1:e==="secret_limited"||e==="partial_missing"||e==="model_computed"||e==="time_delayed"||e==="small_numbers"||e==="limited_history"||e==="manually_mapped"?!0:t==null}function Z(e){if(!Yt(e))return null;var t=R(e,"meritRating9");return t&&t!=="complete"?t:"partial_missing"}function it(e){if(!Ke(e))return null;var t=R(e,"gradePoints");return t&&t!=="complete"?t:"partial_missing"}function Qt(e,t,n){if(typeof e.appliesTo=="function"&&!e.appliesTo(t))return null;if(typeof e.qualityStatus=="function")return e.qualityStatus(t,n);if(e.qualityMetric){var i=R(t,e.qualityMetric);if(i)return i}if(e.text){if(typeof e.appliesTo=="function"&&!e.appliesTo(t))return null;var a=n==null||Array.isArray(n)&&n.length===0;return a?"partial_missing":"complete"}return null}var at=[{profil:"Montessori",re:/montessori/i},{profil:"Reggio Emilia",re:/reggio\s*emilia/i},{profil:"Waldorf",re:/waldorf/i},{profil:"Utepedagogik",re:/utepedagogik|utomhuspedagogik|i\s+ur\s+och\s+skur|naturf[öo]rskola|friluftsprofil/i},{profil:"Rörelse",re:/r[öo]relseprofil|r[öo]relseped|idrottsprofil/i},{profil:"Musik",re:/musikprofil|musikpedagogik|musikinriktning/i},{profil:"SprÃ¥k",re:/spr[Ã¥a]kprofil|spr[Ã¥a]kinriktning|tv[Ã¥a]spr[Ã¥a]kig/i},{profil:"IB",re:/\bIB\b|international\s*baccalaureate/i},{profil:"Kunskapsskolan",re:/kunskapsskolan|kunskapsporten/i},{profil:"Teknik",re:/teknikprofil|teknikinriktning/i},{profil:"Kulturskola",re:/kulturprofil|kulturskola|estetisk\s*profil/i},{profil:"Konfessionell",re:/\bkonfessionell\b|\bkristen\b|\bkristna\b|islamisk|judisk|katolsk|muslimsk/i}],ot=/\bicke[-\s]?konfessionell\b/gi;function Wt(e){if(!e)return[];for(var t=[],n=0;n<at.length;n++){var i=at[n];if(i.re.test(e)){if(i.profil==="Konfessionell"&&ot.test(e)){var a=e.replace(ot," ");
1if(!i.re.test(a))continue}t.push(i.profil)}}return t}function Xt(e){var t=e.besoksadress;if(t&&typeof t=="object"&&(t.adress||t.ort)){var n=[];if(t.adress&&String(t.adress).trim()&&n.push(t.adress),t.ort&&String(t.ort).trim()&&n.push(t.ort),n.length)return n.join(", ")}var i=e.enrichment;if(i){if(typeof i.besoksadress=="string"&&i.besoksadress.trim()){var a=[i.besoksadress];return i.postort&&String(i.postort).trim()&&a.push(i.postort),a.join(", ")}if(i.postadress){var l=i.postadress,u=[];if(l.utdelningsadress&&String(l.utdelningsadress).trim()&&u.push(l.utdelningsadress),l.postort&&String(l.postort).trim()&&u.push(l.postort),u.length)return u.join(", ")}}return null}function lt(e){var t=e.enrichment||null;if(!e.verksamhetsbeskrivning&&t&&t.verksamhetsbeskrivning){var n=String(t.verksamhetsbeskrivning).replace(/\s+/g," ").trim();n&&(e.verksamhetsbeskrivning=n)}if((!e.pedagogiskProfil||!e.pedagogiskProfil.length)&&e.verksamhetsbeskrivning){var i=Wt(e.verksamhetsbeskrivning);i.length&&(e.pedagogiskProfil=i)}if(!e.registreringsAr&&t&&t.registreringsdatum){var a=String(t.registreringsdatum).match(/(\d{4})/);a&&(e.registreringsAr=a[1])}if(!e.besoksadressFormatted){var l=Xt(e);l&&(e.besoksadressFormatted=l)}!e.webbadress&&e.url&&(e.webbadress=e.url),!e.epost&&e.email&&(e.epost=e.email),!e.telefon&&e.phoneNumber&&(e.telefon=e.phoneNumber)}function st(){return fetch("/data/schools.json").then(function(e){if(!e.ok)throw new Error("schools.json HTTP "+e.status);return e.json()})}function $t(){return fetch("/data/schools-client.json").then(function(e){return e.ok?e.json():st()}).catch(function(){return st()})}function Be(e){return fetch(e).then(function(t){return t.ok?t.json():{}}).catch(function(){return{}})}function ut(e){return String(e||"").replace(/\/+$/,"")}function Zt(){var e="";try{e=window.SKOLKOLL_TRANSIT_ISOCHRONE_BASE_URL||window.SKOLKOLL_ISOCHRONE_BASE_URL||""}catch{e=""}return ut(e||It)}function en(e,t,n){return ut(e)+"/"+encodeURIComponent(String(t||""))+"/"+String(n||"").replace(/^\/+/,"")}function tn(e){var t=e&&e.scenarios;return!t||typeof t!="object"?[]:Object.keys(t).map(function(n){var i=t[n]||{};return{id:String(i.scenario_id||n),version:i.version==null?"":String(i.version)}}).filter(function(n){return!!n.version}).sort(function(n,i){return n.id.localeCompare(i.id,"sv")})}function nn(e){var t=tn(e);if(!t.length)return e&&e.version?String(e.version):"";var n={};t.forEach(function(a){n[a.id]=a});var i=e&&e.default_scenario_id&&n[e.default_scenario_id]?String(e.default_scenario_id):t[0].id;return n[i].version}function dt(e){return fetch(e,{credentials:"omit"}).then(function(t){if(!t.ok)throw new Error("transit manifest HTTP "+t.status);return t.json()})}function rn(){if(ne)return Promise.resolve(ne);if(se)return se;var e=Zt();return W="loading",se=dt(e+"/current.json").then(function(t){var n=nn(t);if(!n)throw new Error("transit current.json saknar version");return dt(en(e,n,"manifest.json"))}).then(function(t){if(!t||Number(t.schema_version)!==Mt)throw new Error("transit manifest har fel schema_version");return ne=t,W="ready",O(),t}).catch(function(t){throw se=null,W="error",O(),W="idle",t}),se}function ft(e){return e&&e.schools&&typeof e.schools=="object"?e.schools:{}}function Ge(e){return String(e&&(e.k||e.skolenhetskod)||"").trim()}function D(e,t,n){if(!(!e||typeof e!="object"))return e[t]!==void 0?e[t]:e[n]}function ct(e){return e==null||e===""}function V(e,t,n){n!=null&&n!==""&&ct(e[t])&&(e[t]=n)}function an(e,t){var n=t[Ge(e)];if(!(!n||typeof n!="object")){if(!e._evidence||typeof e._evidence!="object"){e._evidence=n;return}for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e._evidence[i]===void 0&&(e._evidence[
1i]=n[i])}}function on(e,t){var n=t[Ge(e)];if(!(!n||typeof n!="object")){V(e,"verksamhetsbeskrivning",D(n,"vb","verksamhetsbeskrivning"));var i=D(n,"vt","verksamhetsbeskrivningLazy");i!==void 0&&ct(e.verksamhetsbeskrivningLazy)&&(e.verksamhetsbeskrivningLazy=!!i),V(e,"pedagogiskProfil",D(n,"pp","pedagogiskProfil")),V(e,"programCodes",D(n,"pc","programCodes")),V(e,"registreringsAr",D(n,"ry","registreringsAr")),V(e,"besoksadressFormatted",D(n,"ba","besoksadressFormatted")),V(e,"webbadress",D(n,"wb","webbadress")),V(e,"epost",D(n,"ep","epost")),V(e,"telefon",D(n,"tf","telefon"))}}var Y="idle",qe;function mt(){var e=window.ComparisonStore.getCodes();return Y==="loading"?qe:Y!=="idle"||!e.some(function(t){return!k.some(function(n){return n.skolenhetskod===t})})?Promise.resolve():(Y="loading",qe=fetch("/data/schools-inactive.json").then(function(t){if(!t.ok)throw new Error("Inactive school inventory unavailable");return t.json()}).then(function(t){if(!Array.isArray(t.schools))throw new Error("Invalid inactive school inventory");var n=new Set(k.map(function(i){return i.skolenhetskod}));t.schools.forEach(function(i){i&&typeof i.skolenhetskod=="string"&&!n.has(i.skolenhetskod)&&(lt(i),k.push(i),n.add(i.skolenhetskod))}),Y="ready"}).catch(function(){Y="failed"}),qe)}function ln(){return Promise.all([$t(),Be(Ot),Be(Pt),fetch("/data/salsa.json").then(function(e){return e.json()}).catch(function(){return{schools:{}}}),fetch("/data/kolada.json").then(function(e){return e.json()}).catch(function(){return{}}),fetch("/data/compare-quality.json").then(function(e){return e.ok?e.json():{}}).catch(function(){return{}}),Be(Rt),fetch("/data/tillsyn.json").then(function(e){return e.ok?e.json():{schools:{}}}).catch(function(){return{schools:{}}})]).then(function(e){var t=e[0],n=ft(e[1]),i=ft(e[2]),a=e[3],l=e[4],u=e[5],d=e[6],c=e[7],w=t.schools||[];if(t._km&&w.length>0&&w[0].k!==void 0)for(var x={1:"GR",2:"GY",3:"FORSK",4:"FKLASS",5:"FTH",6:"VUX",7:"SAM",8:"SP",9:"GRAN",10:"GYAN",11:"OPPFTH"},b={1:"AKTIV",2:"VILANDE",3:"UPPHORT",4:"PLANERAD"},P=t._km,_=t._hm||{},U=0;U<w.length;U++){var f=w[U];f.skolenhetskod=f.k,f.skolenhetNamn=f.n,f.vn&&(f.verksamhetsnamn=f.vn),f.schoolTypes=zt(f.t,x),f.skolenhetsstatus=b[f.s]||f.s,f.huvudmanNamn=Object.hasOwn(f,"h")?f.h:_[f.ho]||f.ho||"",f.huvudmanOrgNr=f.ho||"",f.municipalityCode=f.mc||"",f.municipalityName=P[f.mc]||"",f.lat=f.la,f.lng=f.lo,f.gr&&(f.gradeRange=f.gr),f._ev&&(f._evidence=f._ev),f.ot&&(f.organizerType=f.ot),f.enrichment=f.e||{},f.statistics=f.st||{},f.vb&&(f.verksamhetsbeskrivning=f.vb),f.vt&&(f.verksamhetsbeskrivningLazy=!0),f.pp&&(f.pedagogiskProfil=f.pp),f.pc&&(f.programCodes=f.pc),f.ry&&(f.registreringsAr=f.ry),f.ba&&(f.besoksadressFormatted=f.ba),f.wb&&(f.webbadress=f.wb),f.ep&&(f.epost=f.ep),f.tf&&(f.telefon=f.tf),an(f,n),on(f,i);var s=f.st;s&&(s.tp!==void 0&&(s.totalPupils=g(s.tp)),s.ct!==void 0&&(s.certifiedTeachersPercent=g(s.ct)),s.spt!==void 0&&(s.studentsPerTeacher=g(s.spt)),s.mr!==void 0&&(s.meritRating9=g(s.mr)),s.ey!==void 0&&(s.eligibleYR9=g(s.ey)),s.gp!==void 0&&(s.gradePoints=g(s.gp)),s.ex!==void 0&&(s.examWithin3Years=g(s.ex)),s.eh!==void 0&&(s.eligibleHigherEd=g(s.eh)),s.ph!==void 0&&(s.pedHigherEdPercent=g(s.ph)),s.fpl!==void 0&&(s.forskolaPersonalLegitimationPct=g(s.fpl)),s.fpe!==void 0&&(s.forskolaPersonalForskollararexamenPct=g(s.fpe)),s.fph!==void 0&&(s.forskolaPersonalHogskolePct=g(s.fph)),s.fpg!==void 0&&(s.forskolaPersonalGymnasialPct=g(s.fpg)),s.fpv!==void 0&&(s.forskolaPersonalVissPct=g(s.fpv)),s.fpo!==void 0&&(s.forskolaPersonalOvrigPct=g(s.fpo)),s.ap!==void 0&&(s.allSubjectsPassed9=g(s.ap)),s.ns!==void 0&&(s.npSVE9=g(s.ns)),s.nm!==void 0&&(s.npMA9=g(s.nm)),s.ne!==void 0&&(s.npENG9=g(s.ne)),s.sq!==void 0&&(s.specialEducatorsQuota=g(s.sq)),s.sr!==void 0&&(s.salsaResidual=g(s.sr)),s.n9!==void 0&&(s.year9Cohort=g(s.n9)),s.s6!==void 0&&s.svaStatusAk6===void 0&&(s.svaStatusAk6=s.s6),s.s9!==void 0&&s.svaStatusAk9===void 0&&(s.svaStatusAk9=s.s9));var r=f.e;r&&(r.l!==void 0&&(r.lan=r.l),r.k!==void 0&&(r.koncern=r.k),r.ko!==void 0&&(r.koncernOrgNr=r.ko),r.j!==void 0&&(r.juridiskForm=r.j),r.ot!==void 0&&(r.organizerType=r.ot))}k=w.filter(function(H){return H.skolenhetsstatus==="AKTIV"});for(var o=0;o<k.length;o++)lt(k[o]);for(var v=0;v<k.length;v++){var h=u[k[v].skolenhetskod];h&&(k[v]._compareQuality=h)}Xe=a.schools||{},Oe=l.kommuner||{},B=d&&d.schools||{},$e=c&&c.schools||{},Ne=typeof window.kommunSlugMapFromSchools=="function"?window.kommunSlugMapFromSchools(k):new Map;for(var m={},E=0;E<k.length;E++){var M=k[E];if(M.municipalityCode&&M.municipalityName&&!m[M.municipalityCode]){var he=Ne.get(M.municipalityName)||window.slugify(M.municipalityName);m[M.municipalityCode]={name:M.municipalityName,code:M.municipalityCode,slug:he}}}var I=[];for(var ve in m)m.hasOwnProperty(ve)&&I.push(m[ve]);return I.sort(function(H,ge){return H.name<ge.name?-1:H.name>ge.name?1:0}),Se=I,mt()})}function Le(){return p.map(function(e){return k.find(function(t){return t.skolenhetskod===e})}
1).filter(Boolean)}function pt(e){return Number.isFinite(Number(e&&e.lat))&&Number.isFinite(Number(e&&e.lng))}function sn(e){if(!pt(e))return null;var t=Ge(e),n=ne&&ne.schools&&ne.schools[t];if(!n)return null;var i=Number(n.p85_minutes);return Number.isFinite(i)?i:null}function un(e,t){return e!=null?window._L("â"+Math.max(1,Math.ceil(e))+" min","~"+Math.max(1,Math.ceil(e))+" min"):pt(t)?W==="idle"||W==="loading"?window._L("Hämtar restidâ¦","Loading travel timeâ¦"):window._L("Pendlingsunderlag saknas","Commute data unavailable"):window._L("Skolan saknar GPS-koordinater","School lacks GPS coordinates")}function ht(){return p.join("�")}function vt(e){return"/data/school-text/"+encodeURIComponent(String(e||""))+".json"}function gt(e,t){return!e||!t||(typeof t.verksamhetsbeskrivning=="string"&&t.verksamhetsbeskrivning.trim()&&(e.verksamhetsbeskrivning=t.verksamhetsbeskrivning.replace(/\s+/g," ").trim(),e.verksamhetsbeskrivningLazy=!1),Array.isArray(t.tillsynsbeslut)&&(e.tillsynsbeslut=t.tillsynsbeslut),Array.isArray(t.programs)&&(e.programDetails=t.programs)),e}function wt(e){var t=e&&e.skolenhetskod;if(!t||!e.verksamhetsbeskrivningLazy)return Promise.resolve(e);if(Q.has(t))return Q.get(t);var n=fetch(vt(t)).then(function(i){if(!i.ok)throw new Error("School text fetch failed: "+i.status);return i.json()}).then(function(i){return gt(e,i)}).catch(function(i){throw Q.delete(t),i});return Q.set(t,n),n}function dn(){return Promise.all(Le().map(function(e){return wt(e).catch(function(){return e})}))}function fn(e){var t=e&&e.skolenhetskod;if(!t||!e.verksamhetsbeskrivningLazy||typeof XMLHttpRequest>"u")return e;try{var n=new XMLHttpRequest;if(n.open("GET",vt(t),!1),n.send(null),n.status<200||n.status>=300)return Q.delete(t),e;gt(e,JSON.parse(n.responseText||"null")),Q.set(t,Promise.resolve(e))}catch{Q.delete(t)}return e}function cn(){Le().forEach(fn)}function Ce(e,t){var n=e.municipalityCode;if(!n||!Oe[n])return null;var i=Oe[n][t];return i?i.value:null}function De(){p=window.ComparisonStore.getCodes(),G=!window.ComparisonStore.temporary&&p.length>0}function xe(){window.ComparisonStore.setCodes(p),window.ComparisonStore.syncUrl("skolor")}var kt=null;function mn(){clearTimeout(kt),kt=setTimeout(pn,200)}function pn(){var e=Me(L.value.trim());if(e.length<2){de();return}for(var t=e.split(/\s+/).filter(Boolean),n=[],i=0;i<Se.length&&n.length<3;i++){for(var a=Se[i],l=Me(a.name),u=!0,d=0;d<t.length;d++)if(l.indexOf(t[d])===-1){u=!1;break}u&&n.push(a)}for(var c=[],w=8-n.length,x=0;x<k.length&&c.length<w;x++){var b=k[x];if(b.skolenhetsstatus==="AKTIV"&&p.indexOf(b.skolenhetskod)===-1&&!Vt(b)){for(var P=Me([X(b),b.skolenhetNamn,b.municipalityName,(b.schoolTypes||[]).map(Ie).join(" ")].join(" ")),_=!0,U=0;U<t.length;U++)if(P.indexOf(t[U])===-1){_=!1;break}_&&c.push(b)}}hn(c,n)}function hn(e,t){for(;T.firstChild;)T.removeChild(T.firstChild);if(t=t||[],e.length===0&&t.length===0){var n=document.createElement("li");n.className="jamfor-dropdown-empty",n.textContent=window._L("Inga träffar","No matches"),T.appendChild(n),bt();return}t.forEach(function(i){var a=document.createElement("li");a.setAttribute("role","option"),a.dataset.kommun=i.slug,a.style.cssText="background: #f0f7f4;";var l=document.createElement("strong");l.textContent=i.name;var u=document.createElement("span");u.className="jamfor-dropdown-meta",u.textContent=window._L("Kommun â jämför kommundata","Municipality â compare municipal data"),a.appendChild(l),a.appendChild(u),T.appendChild(a)}),e.forEach(function(i){var a=document.createElement("li");a.setAttribute("role","option"),a.dataset.code=i.skolenhetskod;var l=document.createElement("strong");l.textContent=X(i);var u=document.createElement("span");u.className="jamfor-dropdown-meta",u.textContent=(i.municipalityName||"")+" · "+i.schoolTypes.map(Ie).join(", "),a.appendChild(l),a.appendChild(u),T.appendChild(a)}),bt()}function bt(){T.hidden=!1,L.setAttribute("aria-expanded","true")}function de(){T.hidden=!0,L.setAttribute("aria-expanded","false")}function vn(e){var t=e.target.closest("li[data-kommun]");if(t){var n=t.dataset.kommun;if(L.value="",de(),typeof window.__addKommunSlug=="function"){L.focus();var i=Se.find(function(u){return u.slug===n});window.__addKommunSlug(n,i?i.name:"")}else window.location.href="?kommuner="+n;return}var a=e.target.closest("li[data-code]");if(a){var l=a.dataset.code;if(L.value="",de(),L.focus(),ee){gn(l);return}yt(l)}}function gn(e){var t=typeof window.__leaveKommunMode=="function"?window.__leaveKommunMode():null,n;t?n=t.kommunSlugs||[]:(n=(new URLSearchParams(location.search).get("kommuner")||"").split(",").filter(
1Boolean),history.replaceState(null,"",location.pathname),t=window.__jamforShowSchoolMode(""));var i=window._L("Sidan jämför nu skolor i stället för kommuner. ","The page now compares schools instead of municipalities. ")+(t.announcement?t.announcement+" ":""),a=function(d){wn(d,n)},l=ce(e),u;if(ae!=="ready")u=i.trim();else if(p.indexOf(e)!==-1)u=i+window._L(l+" finns redan i jämförelsen. ",l+" is already in the comparison. ")+ie();else if(p.length>=ye)u=i+window._L(l+" lades inte till, eftersom jämförelsen redan har "+ye+" skolor. ",l+" was not added, because the comparison already has "+ye+" schools. ")+ie();else{yt(e,i,a);return}window.announceStatus(K,u),a(u),t.renderTable()}function wn(e,t){fe();var n=document.createElement("div");n.className="jamfor-mode-notice";var i=document.createElement("p");if(i.className="jamfor-mode-notice__text",i.textContent=e,n.appendChild(i),t.length>0){var a=document.createElement("a");a.className="jamfor-mode-notice__back",a.href=location.pathname+"?kommuner="+t.map(encodeURIComponent).join(","),a.textContent=window._L("Tillbaka till kommunjämförelsen","Back to the municipality comparison"),n.appendChild(a)}var l=document.createElement("button");l.type="button",l.className="jamfor-mode-notice__close",l.textContent="Ã",l.setAttribute("aria-label",window._L("Stäng meddelandet om bytet till skolor","Close the message about switching to schools")),l.addEventListener("click",function(){fe(),L.focus()}),n.appendChild(l),C.parentNode.insertBefore(n,C)}function fe(){var e=C.parentNode.querySelector(".jamfor-mode-notice");e&&e.parentNode.removeChild(e)}function ce(e){var t=k.find(function(n){return n.skolenhetskod===e});return t?X(t):e}function ie(){var e=p.length;return e===0?window._L("Inga skolor valda.","No schools selected."):e===1?window._L("1 skola vald.","1 school selected."):e+window._L(" skolor valda."," schools selected.")}function yt(e,t,n){if(p.indexOf(e)===-1&&!(p.length>=ye)){fe(),p.push(e),G=!1,xe(),Ee();var i=ce(e),a=(t||"")+window._L(i+" tillagd i jämförelsen. ",i+" added to the comparison. ")+ie();window.announceStatus(K,a),n&&n(a),O(),typeof gtag=="function"&>ag("event","compare_school_added",{skolenhetskod:e,totalCount:p.length})}}function kn(e){var t=p.indexOf(e),n=ce(e);fe(),p=p.filter(function(a){return a!==e}),G=!1,xe(),Ee();var i=C.querySelectorAll("button[data-remove]");(i[Math.min(t,i.length-1)]||L).focus(),window.announceStatus(K,window._L(n+" borttagen ur jämförelsen. ",n+" removed from the comparison. ")+ie()),O()}function bn(){fe(),p=[],G=!1,xe(),Ee(),L&&L.focus(),window.announceStatus(K,window._L("Din förra jämförelse är rensad. ","Your last comparison has been cleared. ")+ie()),O()}function Ue(){return window._L("Din förra jämförelse: ","Your last comparison: ")+p.map(ce).join(", ")+"."}function Ee(e){for(;C.firstChild;)C.removeChild(C.firstChild);var t=document.createElement("div");if(t.className="comparison-selection-controls",window.renderComparisonControls(t,function(l){De(),window.ComparisonStore.syncUrl("skolor"),pe(),O(),L.focus(),window.announceStatus(K,l+" "+ie())}),t.hidden||C.appendChild(t),z&&(z.hidden=p.length>0&&!G),G&&p.length>0){var n=document.createElement("div");n.className="jamfor-restore-pill";var i=document.createElement("span");i.className="jamfor-restore-pill__label",i.textContent=window._L("Din förra jämförelse","Your last comparison"),n.appendChild(i);var a=document.createElement("button");a.type="button",a.className="jamfor-restore-pill__clear",a.textContent=window._L("Rensa","Clear"),a.setAttribute("aria-label",window._L("Rensa din förra jämförelse","Clear your last comparison")),a.addEventListener("click",bn),n.appendChild(a),C.appendChild(n),e!==!1&&window.announceStatus(K,Ue())}p.forEach(function(l){var u=ce(l),d=document.createElement("span");d.className="jamfor-chip",d.appendChild(document.createTextNode(u+" "));var c=document.createElement("button");c.type="button",c.setAttribute("aria-label",window._L("Ta bort "+u+" ur jämförelsen","Remove "+u+" from the comparison")),c.dataset.remove=l,c.textContent="Ã",d.appendChild(c),C.appendChild(d)})}function St(e){var t=e.target.closest("button[data-remove]");!t||e.detail>1||kn(t.dataset.remove)}function He(){if(N){for(;N.firstChild;)N.removeChild(N.firstChild);N.hidden=!0}}var Ae=140;function ze(e,t){var n=document.createElement("span");n.className="jfr-chiplist",t.forEach(function(i){var a=document.createElement("span");a.className="jfr-text-chip",a.textContent=i,n.appendChild(a)}),e.appendChild(n)}function _t(e,t,n,i,a){a=a||{};var l=i||e,u=String(t||"").trim(),d=a.lazyCode||"";if(!d&&u.length<=Ae){l.appendChild(document.createTextNode(u));return}var c=u;if(!d){var w=Ae,x=u.lastIndexOf(" ",Ae);x>Ae*.6&&(w=x),c=u.slice(0,w).replace(/[\s,.;:ââ-]+$/,"")+"â¦"}var b=document.createElement("span");b.className="jfr-text-collapsed",b.textContent=c+" ";var P=document.createElement("span");P.className="jfr-text-full",P.textContent=u+" ",d&&P.setAttribute("data-school-text-full",d);var _=document.createElement("button");_.type="button",_.className="jfr-text-toggle",_.setAttribute("aria-expanded","fal
1se"),_.textContent=window._L("Läs mer","Read more"),d&&(_.setAttribute("data-school-text-code",d),_.setAttribute("data-school-text-loaded","false")),n&&_.setAttribute("aria-label",window._L("Läs mer om "+n,"Read more about "+n)),l.appendChild(b),l.appendChild(P),e.appendChild(_)}function yn(e,t){if(!t||!t.count){ue(e,re);return}var n=t.latest,i;t.red>0?i=window._L("Föreläggande","Injunction"):t.yellow>0?i=window._L("Anmärkning","Remark"):i=window._L("Inga brister","No deficiencies");var a=t.red>0?"jfr-tillsyn--red":t.yellow>0?"jfr-tillsyn--yellow":"jfr-tillsyn--green",l=document.createElement("span");if(l.className="jfr-tillsyn-pill "+a,l.textContent=i,e.appendChild(l),n){var u=document.createElement("span");u.className="jfr-tillsyn-date",u.textContent=" ("+String(n).slice(0,10)+")",e.appendChild(u)}}function Te(e){var t=e&&$e[e.skolenhetskod];return!t||typeof t.count=="number"&&t.count<=0?null:t}function Sn(e){var t=Te(e);return t?(t.red||0)+(t.yellow||0):null}function _n(e){var t=e&&e.gradeRange;if(!Array.isArray(t)||!t.length)return null;var n=t.indexOf("F")!==-1||t.indexOf("FK")!==-1,i=t.map(function(u){return parseInt(u,10)}).filter(function(u){return!isNaN(u)}).sort(function(u,d){return u-d});if(!i.length)return n?"F":null;var a=n?"F":String(i[0]),l=String(i[i.length-1]);return a===l?a:a+"â"+l}function Lt(e){return e==="yes"?window._L("Ja","Yes"):e==="few"?window._L("FÃ¥ elever (sekretess)","Few pupils (privacy)"):null}function Ln(e){var t=e.statistics||{},n=Lt(t.svaStatusAk6||t.s6),i=Lt(t.svaStatusAk9||t.s9);if(n&&i&&n===i)return n;var a=[];return n&&a.push(window._L("Ã¥k 6: ","Yr 6: ")+n),i&&a.push(window._L("Ã¥k 9: ","Yr 9: ")+i),a.length?a.join(", "):null}function Cn(e){var t=e.enrichment,n=t&&(t.organizerType||t.ot)||e.organizerType;if(!n)return null;var i=oe?{KOMMUN:"Municipal",ENSKILD:"Independent",REGION:"Region",KOMMFORB:"Municipal association",STATLIG:"State"}:{KOMMUN:"Kommunal",ENSKILD:"Friskola",REGION:"Region",KOMMFORB:"Kommunalförbund",STATLIG:"Statlig"};if(i[n])return i[n];var a=e.enrichment&&e.enrichment.juridiskForm;return a||n}function xn(e){if(!e)return null;var t=String(e).trim();if(!t)return null;if(!/^https?:\/\//i.test(t)){if(/^[a-z][a-z0-9+.-]*:/i.test(t))return null;t="https://"+t}try{var n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?null:n.href}catch{return null}}function En(e){return e&&e.alwaysShow===!0}function An(e,t){if(e.sourceLabel)return e.sourceLabel;var n=((e.label||"")+" "+(t||"")).toLowerCase();return n.indexOf("salsa")!==-1||n.indexOf("eget bidrag")!==-1?"SALSA":n.indexOf("bolagsverket")!==-1||n.indexOf("verksamhetsbeskrivning")!==-1||n.indexOf("activity description")!==-1||n.indexOf("etableringsÃ¥r")!==-1||n.indexOf("year established")!==-1||n.indexOf("pedagogisk profil")!==-1||n.indexOf("pedagogical profile")!==-1?"Bolagsverket":n.indexOf("tillsyn")!==-1||n.indexOf("inspection")!==-1||n.indexOf("brister")!==-1||n.indexOf("deficiencies")!==-1?window._L("Skolinspektionen","Swedish Schools Inspectorate"):(n.indexOf("elevhälsa")!==-1||n.indexOf("pupil health")!==-1||n.indexOf("special support")!==-1)&&n.indexOf("specialped")===-1&&n.indexOf("special ed.")===-1?"Kolada":"Skolverket"}function Tn(e){e.forEach(function(t){t.rows.forEach(function(n){n.sourceLabel||(n.sourceLabel=An(n,t.label))})})}var S=null;function Ve(e){var t=[];e.forEach(function(l){var u=l._evidence||{},d=u.meritRating9||u.totalPupils||u.certifiedTeachersPercent||{};d.period&&t.push(d.period)});var n=t.filter(function(l,u){return t.indexOf(l)===u}).sort(),i=n.length>1?n.join(" vs "):"";if(!(S&&S.parentNode===j&&S.dataset.periods===i)&&(S&&S.parentNode&&S.parentNode.removeChild(S),S=null,!!i)){S=document.createElement("div"),S.className="compare-version-warning",S.setAttribute("role","alert"),S.dataset.periods=i;var a=document.createElement("span");a.className="compare-version-warning__icon",a.setAttribute("aria-hidden","true"),a.textContent="â ",S.appendChild(a),S.appendChild(document.createTextNode(" "+window._L("Data frÃ¥n olika perioder jämförs ("+i+")","Data from different periods is being compared ("+i+")"))),j.appendChild(S)}}function O(){for(var e=j.firstChild,t;e;e=t)t=e.nextSibling,e!==S&&j.removeChild(e);if(p.length<2){if(Ve([]),He(),p.length===1){var n=document.createElement("p");n.className="muted",n.style.cssText="text-align:center;padding:2rem 0;",n.textContent=window._L("Lägg till minst en skola till för att jämföra.","Add at least one more school to compare."),j.appendChild(n)}je.hidden=!0,F&&(F.disabled=!0),J&&(J.disabled=!0);return}je.hidden=!1,F&&(F.disabled=!1),J&&(J.disabled=!1);var i=Le();if(i.length<2){Ve([]),He(),je.hidden=!0,F&&(F.disabled=!0),J&&(J.disabled=!0);return}Dt(j,i,S),W==="idle"&&rn().catch(function(){}),Ve(i);var a=[{label:window._L("Info","Info"),rows:[{label:window._L("Kommun","Municipality"),get:function(r){return r.municipalityName},link:function(r){return r.municipalityName?Kt(r.municipalityName):null}},{label:window._L("Huvudman","Organizer"),get:function(r){return Ct(r)}},{label:window._L("Skolform","School type"),get:function(r){return r.schoolTypes.map(Ie).join(", ")}}]},{label:window._L("Resultat","Results"),rows:[{label:window._L("Meritvärde Ã¥k 9","Merit score year 9"),get:function(r){return r.statistics&&r.statistics.meritRating9}
1,numeric:!0,qualityMetric:"meritRating9"},{label:window._L("Skolans eget bidrag","SALSA score"),get:function(r){var o=Xe[r.skolenhetskod];return o?o.mr:null},numeric:!0,format:jn,qualityStatus:function(r,o){return o!=null?"model_computed":Z(r)}},{label:window._L("Behörighet gymnasium","Upper secondary eligibility"),get:function(r){return r.statistics&&r.statistics.eligibleYR9},numeric:!0,suffix:"%",qualityMetric:"eligibleYR9"},{label:window._L("Godkända alla ämnen","Passed all subjects"),get:function(r){return r.statistics&&r.statistics.allSubjectsPassed9},numeric:!0,suffix:"%",qualityMetric:"allSubjectsPassed9"}]},{label:window._L("Lärare & resurser","Teachers & resources"),rows:[{label:window._L("Behöriga lärare","Certified teachers"),get:function(r){return _e(r)&&r.statistics?r.statistics.certifiedTeachersPercent:null},appliesTo:_e,numeric:!0,suffix:"%",qualityMetric:"certifiedTeachersPercent"},{label:window._L("Elev/lärare","Students/teacher"),get:function(r){return _e(r)&&r.statistics?r.statistics.studentsPerTeacher:null},appliesTo:_e,numeric:!0,lowerIsBetter:!0,qualityMetric:"studentsPerTeacher"},{label:window._L("Antal elever","Number of pupils"),get:function(r){return r.statistics&&r.statistics.totalPupils},numeric:!0,qualityMetric:"totalPupils"}]},{label:window._L("Nationella prov åk 9","National tests year 9"),rows:[{label:window._L("Svenska","Swedish"),get:function(r){return r.statistics&&r.statistics.npSVE9},numeric:!0,suffix:window._L(" poäng"," points"),qualityMetric:"npSwedish"},{label:window._L("Matematik","Mathematics"),get:function(r){return r.statistics&&r.statistics.npMA9},numeric:!0,suffix:window._L(" poäng"," points"),qualityMetric:"npMath"},{label:window._L("Engelska","English"),get:function(r){return r.statistics&&r.statistics.npENG9},numeric:!0,suffix:window._L(" poäng"," points"),qualityMetric:"npEnglish"}]},{label:window._L("Gymnasium","Upper secondary"),rows:[{label:window._L("Betygspoäng","Grade points"),get:function(r){return r.statistics&&r.statistics.gradePoints},numeric:!0,qualityMetric:"gradePoints"},{label:window._L("Examensgrad","Graduation rate"),get:function(r){return r.statistics&&r.statistics.examWithin3Years},numeric:!0,suffix:"%",qualityMetric:"examWithin3Years"},{label:window._L("Behörighet högskola","Higher education eligibility"),get:function(r){return r.statistics&&r.statistics.eligibleHigherEd},numeric:!0,suffix:"%",qualityMetric:"eligibleHigherEd"},{label:window._L("Betyg A % (gym)","Grade A % (upper sec.)"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gy?o.gy.A:null},numeric:!0,suffix:"%",qualityStatus:function(r,o){return o!=null?R(r,"gradePoints"):it(r)}},{label:window._L("Betyg F % (gym)","Grade F % (upper sec.)"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gy?o.gy.F:null},numeric:!0,suffix:"%",lowerIsBetter:!0,qualityStatus:function(r,o){return o!=null?R(r,"gradePoints"):it(r)}}]},{label:window._L("Betygsfördelning åk 9","Grade distribution year 9"),rows:[{label:window._L("Betyg A %","Grade A %"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gr9?o.gr9.A:null},numeric:!0,suffix:"%",qualityStatus:function(r,o){return o!=null?R(r,"meritRating9"):Z(r)}},{label:window._L("Betyg B %","Grade B %"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gr9?o.gr9.B:null},numeric:!0,suffix:"%",qualityStatus:function(r,o){return o!=null?R(r,"meritRating9"):Z(r)}},{label:window._L("Betyg C %","Grade C %"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gr9?o.gr9.C:null},numeric:!0,suffix:"%",qualityStatus:function(r,o){return o!=null?R(r,"meritRating9"):Z(r)}},{label:window._L("Betyg D %","Grade D %"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gr9?o.gr9.D:null},numeric:!0,suffix:"%",qualityStatus:function(r,o){return o!=null?R(r,"meritRating9"):Z(r)}},{label:window._L("Betyg E %","Grade E %"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gr9?o.gr9.E:null},numeric:!0,suffix:"%",qualityStatus:function(r,o){return o!=null?R(r,"meritRating9"):Z(r)}},{label:window._L("Betyg F %","Grade F %"),get:function(r){var o=B[r.skolenhetskod];return o&&o.gr9?o.gr9.F:null},numeric:!0,suffix:"%",lowerIsBetter:!0,qualityStatus:function(r,o){return o!=null?R(r,"meritRating9"):Z(r)}}]},{label:window._L("Elevhälsa & stöd (faktaunderlag)","Pupil health & support (factual evidence)"),rows:[{label:window._L("Tolkning","Interpretation"),text:!0,alwaysShow:!0,get:function(){return window._L("Jämför som källor, dataluckor och frågor att ställa. Värdena påverkar inte score eller bästmarkering.","Compare as sources, data gaps and questions to ask. Values do not affect score or best-value highlighting.")}},{label:window._L("Specialped./speciallärare","Special ed. teachers"),text:!0,get:function(r){var o=r.statistics&&r.statistics.specialEducatorsQuota;
1return o==null?null:q(o)}},{label:window._L("Särskilt stöd (Ã¥tgärdsprogram)","Special support (action plans)"),text:!0,get:function(r){var o=Ce(r,"sarskiltStodGrund");return o==null?null:q(o)+"%"}},{label:window._L("Elevhälsa kr/elev (kommun)","Pupil health SEK/pupil (mun.)"),text:!0,get:function(r){var o=Ce(r,"kostnadElevhalsa");return o==null?null:q(o)}},{label:window._L("Elevhälsa Ã¥k 5 (kommun)","Pupil health year 5 (mun.)"),text:!0,get:function(r){var o=Ce(r,"elevhalsaTillgangAk5");return o==null?null:q(o)+"%"}},{label:window._L("Elevhälsa Ã¥k 8 (kommun)","Pupil health year 8 (mun.)"),text:!0,get:function(r){var o=Ce(r,"elevhalsaTillgangAk8");return o==null?null:q(o)+"%"}}]},{label:window._L("Förskola","Preschool"),rows:[{label:window._L("Inskrivna barn","Enrolled children"),get:function(r){return $(r)&&r.statistics?r.statistics.totalPupils:null},numeric:!0},{label:window._L("Barn/Ã¥rsarbetare","Children/staff FTE"),get:function(r){return $(r)&&r.statistics?r.statistics.studentsPerTeacher:null},numeric:!0,lowerIsBetter:!0},{label:window._L("Andel förskollärare","Preschool teacher share"),get:function(r){return $(r)&&r.statistics?r.statistics.forskolaPersonalForskollararexamenPct:null},numeric:!0,suffix:"%"},{label:window._L("Andel med förskollärarlegitimation","Share with a preschool-teacher licence"),get:function(r){return $(r)&&r.statistics?r.statistics.forskolaPersonalLegitimationPct:null},numeric:!0,suffix:"%"},{label:window._L("Andel med pedagogisk högskoleutbildning","Share with pedagogical higher education"),get:function(r){return $(r)&&r.statistics?r.statistics.certifiedTeachersPercent:null},numeric:!0,suffix:"%"},{label:window._L("Huvudmantyp","Organiser type"),get:function(r){return $(r)?Ct(r):null}}]},{label:window._L("Profil & inriktning","Profile & focus"),rows:[{label:window._L("Pedagogisk profil","Pedagogical profile"),text:!0,get:function(r){var o=r.pedagogiskProfil;return o&&o.length?o:null},renderText:function(r,o){ze(r,o)},qualityMetric:"pedagogiskProfil"},{label:window._L("Verksamhetsbeskrivning (Bolagsverket)","Activity description (Bolagsverket)"),text:!0,alwaysShow:!0,onlySwedish:!0,get:function(r){return r.verksamhetsbeskrivning||null},renderText:function(r,o,v){var h=X(v)||"";if(oe){var m=document.createElement("span");m.className="jfr-only-sv",m.title="verksamhetsbeskrivning is only available in Swedish",m.textContent="(Swedish only) ",r.appendChild(m);var E=document.createElement("span");E.lang="sv",r.appendChild(E),_t(r,o,h,E,{lazyCode:v.verksamhetsbeskrivningLazy?v.skolenhetskod:""});return}_t(r,o,h,null,{lazyCode:v.verksamhetsbeskrivningLazy?v.skolenhetskod:""})},qualityMetric:"verksamhetsbeskrivning"},{label:window._L("Gymnasieprogram","Upper-secondary programs"),text:!0,appliesTo:Ke,get:function(r){if(!Ke(r))return null;var o=r.programCodes;return o&&o.length?o:null},renderText:function(r,o){ze(r,o)},qualityMetric:"programCodes"},{label:window._L("Ã
rskursintervall","Grade range"),text:!0,get:function(r){return _n(r)},qualityMetric:"gradeRange"},{label:window._L("SVA-tillgång (åk 6/9)","SVA availability (yr 6/9)"),text:!0,appliesTo:Fe,get:function(r){return Fe(r)?Ln(r):null},qualityMetric:"svaStatus"}]},{label:window._L("Tillsyn & kvalitet","Inspection & quality"),rows:[{label:window._L("Senaste tillsynsbeslut","Latest inspection decision"),text:!0,alwaysShow:!0,get:function(r){return Te(r)||null},renderText:function(r,o){yn(r,o)},qualityStatus:function(r){return Te(r)?"complete":"partial_missing"}},{label:window._L("Antal öppna brister","Open deficiencies"),numeric:!0,lowerIsBetter:!0,get:function(r){return Sn(r)},qualityStatus:function(r){return Te(r)?"complete":"partial_missing"}}]},{label:window._L("Praktiskt & kontakt","Practical & contact"),rows:[{label:window._L("Restid kollektivtrafik (p85)","Transit travel time (p85)"),numeric:!0,lowerIsBetter:!0,alwaysShow:!0,get:sn,format:un,sourceLabel:window._L("p85-restid, Trafiklab GTFS Sweden 3 + OSM (uppskattning)","p85 travel time, Trafiklab GTFS Sweden 3 + OSM (estimate)")},{label:window._L("Driftsform","Operating form"),text:!0,get:function(r){return Cn(r)},qualityMetric:"organizerType"},{label:window._L("Etableringsår","Year established"),text:!0,get:function(r){return r.registreringsAr||null},qualityMetric:"registreringsAr"},{label:window._L("Webbplats","Website"),text:!0,get:function(r){return r.webbadress||null},renderText:function(r,o){var v=xn(o);if(v){var h=document.createElement("a");h.href=v,h.target="_blank",h.rel="noopener noreferrer";var m;try{m=new URL(v).hostname.replace(/^www\./,"")}catch{m=String(o)}h.textContent=m,h.setAttribute("aria-label",m+window._L(" (öppnas
1i ny flik)"," (opens in new tab)"));var E=document.createElement("span");E.className="jfr-external-icon",E.setAttribute("aria-hidden","true"),E.textContent=" â",h.appendChild(E),r.appendChild(h)}else r.appendChild(document.createTextNode(o))},qualityMetric:"webbadress"},{label:window._L("Besöksadress","Visiting address"),text:!0,get:function(r){return r.besoksadressFormatted||null},qualityMetric:"besoksadress"},{label:window._L("Telefon","Phone"),text:!0,get:function(r){return r.telefon||null},qualityMetric:"telefon"},{label:window._L("E-post","Email"),text:!0,get:function(r){return r.epost||null},qualityMetric:"epost"}]}];Tn(a),a=a.map(function(r){return r.rows=r.rows.filter(function(o){return En(o)?!0:i.some(function(v){var h=o.get(v);return h==null?!1:Array.isArray(h)?h.length>0:!0})}),r}).filter(function(r){return r.rows.length>0});var l=i.length+1,u=document.createElement("div");u.className="panel jamfor-table-panel";var d=document.createElement("div");d.className="jamfor-table-wrap",d.tabIndex=0,d.setAttribute("role","region"),d.setAttribute("aria-label",window._L("Jämförelsetabell, rulla i sidled för fler skolor","Comparison table, scroll horizontally for more schools"));var c=document.createElement("table");c.className="jamfor-table",c.style.setProperty("--comparison-columns",String(l));var w=document.createElement("caption");w.className="sr-only",w.textContent=window._L("Jämförelse av "+i.length+" skolor","Comparison of "+i.length+" schools"),c.appendChild(w);var x=document.createElement("thead"),b=document.createElement("tr"),P=document.createElement("th");P.setAttribute("scope","col");var _=document.createElement("span");_.className="sr-only",_.textContent=window._L("MÃ¥tt","Metric"),P.appendChild(_),b.appendChild(P),i.forEach(function(r){var o=document.createElement("th");o.setAttribute("scope","col");var v=document.createElement("span");v.className="jfr-school-heading";var h=document.createElement("a");h.href=Ft(r),h.textContent=X(r),v.appendChild(h),v.appendChild(rt(tt(r),"header")),o.appendChild(v),b.appendChild(o)}),x.appendChild(b),c.appendChild(x);var U=0;a.forEach(function(r){var o=document.createElement("tbody"),v=document.createElement("tr");v.className="jfr-group-header";var h=document.createElement("th");h.setAttribute("scope","rowgroup"),h.setAttribute("colspan",String(l)),h.textContent=r.label,v.appendChild(h),o.appendChild(v),r.rows.forEach(function(m){var E=i.map(function(te){return m.get(te)}),M=m.numeric&&!m.text?Nn(E,m.lowerIsBetter):-1,he=document.createElement("tr"),I=document.createElement("th");I.className="jfr-label",I.setAttribute("scope","row");var ve=U++,H=document.createElement("span");H.id="jfr-metric-"+ve,H.textContent=m.label,I.appendChild(H),I.setAttribute("aria-labelledby",H.id);var ge=Ht(m,i);if(ge){var we=document.createElement("span");we.className="jfr-source-label",we.id="jfr-source-"+ve,we.textContent=ge,I.appendChild(we),I.setAttribute("aria-describedby",we.id)}
1he.appendChild(I),i.forEach(function(te,jt){var A=E[jt],Gn=jt===M,ke=Qt(m,te,A),y=document.createElement("td");m.text&&y.classList.add("jfr-cell--text"),Gn&&y.classList.add("jfr-best");var Ye=A==null||Array.isArray(A)&&A.length===0,be=typeof m.appliesTo=="function"&&!m.appliesTo(te);if(!be&&(ke==="secret_limited"||ke==="partial_missing")&&Ye?y.classList.add("jfr-cell--missing"):ke==="small_numbers"&&y.classList.add("jfr-cell--warning"),be&&y.classList.add("jfr-cell--na"),m.text)if(be){var Je=document.createElement("span");Je.className="muted",Je.textContent=window._L("ej tillämpligt","not applicable"),y.appendChild(Je)}else Ye?ue(y,re):typeof m.renderText=="function"?m.renderText(y,A,te):Array.isArray(A)?ze(y,A):y.appendChild(document.createTextNode(String(A)));else if(be){var Qe=document.createElement("span");Qe.className="muted",Qe.textContent=window._L("ej tillämpligt","not applicable"),y.appendChild(Qe)}else if(m.format)ue(y,m.format(A,te));else if(m.link){var Nt=m.link(te);if(Nt&&A!=null){var We=document.createElement("a");We.href=Nt,We.textContent=q(A),y.appendChild(We)}else ue(y,q(A))}else ue(y,q(A)+(A!=null&&m.suffix?m.suffix:""));!be&&Jt(ke,Ye?null:A)&&(y.appendChild(document.createTextNode(" ")),y.appendChild(rt(ke,"cell"))),he.appendChild(y)}),o.appendChild(he)}),c.appendChild(o)}),d.appendChild(c),u.appendChild(d),j.appendChild(u);var f=typeof ResizeObserver=="function";function s(){var r=d.scrollWidth-d.clientWidth>2,o=d.scrollLeft+d.clientWidth>=d.scrollWidth-2;u.classList.toggle("jamfor-table-panel--scrollable",r&&!o)}d.addEventListener("scroll",s,{passive:!0}),f&&new ResizeObserver(s).observe(d),requestAnimationFrame(s),Tt(i)}function Ct(e){var t=e.huvudmanNamn||re;if(t===t.toUpperCase()&&t.length>3){var n={AB:1,HB:1,KB:1,EF:1,AS:1,I:1},i={KOMMUN:1,REGION:1,STAD:1};t=t.split(/\s+/).map(function(l){return n[l]?l:i[l]||/^\(.*\)$/.test(l)?l.toLowerCase():l.charAt(0)+l.slice(1).toLowerCase()}).join(" ")}var a=e.enrichment&&e.enrichment.organizerType;return a==="KOMMUN"?t+window._L(" (Kommun)"," (Municipal)"):a==="ENSKILD"?t+window._L(" (Friskola)"," (Independent)"):a==="REGION"?t+window._L(" (Region)"," (Region)"):t}function jn(e){if(e==null)return"â";var t=(e>0?"+":"")+q(e);return t}function Nn(e,t){for(var n=null,i=-1,a=0,l=0;l<e.length;l++)e[l]!=null&&(a++,(n===null||(t?e[l]<n:e[l]>n))&&(n=e[l],i=l));if(a<2)return-1;var u=e.filter(function(d){return d!=null}).every(function(d){return d===n});return u?-1:i}var On=F?F.textContent:"";function Pn(){var e=window.location.href,t=F,n=p.map(function(d){var c=k.find(function(w){return w.skolenhetskod===d});return c?X(c):d}).join(", "),i=window._L("Jämför skolor â Skolkoll","Compare schools â Skolkoll"),a=window._L("Jämför: ","Compare: ")+n,l=function(){t.textContent=window._L("Kopierad!","Copied!"),setTimeout(function(){t.textContent=On},2e3),window.dispatchEvent(new CustomEvent("skolkoll:analytics",{detail:{event:"comparison_shared",source:"clipboard"}}))};if(typeof window._skolnavShare=="function"){window._skolnavShare(i,e,a).then(function(d){d==="shared"?window.dispatchEvent(new CustomEvent("skolkoll:analytics",{detail:{event:"comparison_shared",source:"web_share"}})):d==="copied"&&l()});return}if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(e).then(l).catch(function(){var d=document.createElement("input");d.value=e,document.body.appendChild(d),d.select(),document.execCommand("copy"),d.remove(),l()});else{var u=document.createElement("input");u.value=e,document.body.appendChild(u),u.select(),document.execCommand("copy"),u.remove(),l()}}function xt(){var e=ht();return le&&Pe===e||(Pe=e,le=dn().then(function(){if(ht()!==e)return xt();O()})),le}function Et(){le=null,Pe=""}function At(){Re||(Re=!0,xt().catch(function(){}).then(function(){Tt(Le()),window.print()}).finally(function(){Re=!1,Et()}))}function Rn(){cn(),O(),Et()}function Mn(e){if(!(!e||e.defaultPrevented)){var t=String(e.key||"").toLowerCase();t!=="p"||!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),At())}}function Tt(e){if(!e||e.length<2){He();return}if(N){for(;N.firstChild;)N.removeChild(N.firstChild);var t=document.createElement("strong");t.textContent=window._L("Datakvalitet: ","Data quality: ");var n=document.createElement("span"),i=new Date,a=[i.getFullYear(),String(i.getMonth()+1).padStart(2,"0"),Str
1ing(i.getDate()).padStart(2,"0")].join("-");n.textContent=window._L("Ikoner visas pÃ¥ webben men döljs i PDF/export. ","Icons are shown on the web page but hidden in PDF/export. ")+window._L("Källor visas per rad i jämförelsetabellen. ","Sources are shown per row in the comparison table. ")+window._L("Exporten innehÃ¥ller bara valda skolor/kommuner, datakvalitet och genereringsdatum; ingen adress eller personliga prioriteringar. ","The export contains only selected schools/municipalities, data quality and generation date; no address or personal priorities. ")+window._L("Genererad: ","Generated: ")+a+". "+e.map(function(l){var u=nt(tt(l));return(X(l)||l.skolenhetskod)+" â "+u.label}).join(" · "),N.appendChild(t),N.appendChild(n),N.hidden=!1}}function In(e){!L.contains(e.target)&&!T.contains(e.target)&&de()}function Fn(e){if(!T.hidden){var t=T.querySelectorAll("li[data-code], li[data-kommun]");if(t.length){var n=T.querySelector(".jamfor-dropdown-active"),i=-1;t.forEach(function(a,l){a===n&&(i=l)}),e.key==="ArrowDown"?(e.preventDefault(),n&&n.classList.remove("jamfor-dropdown-active"),i=(i+1)%t.length,t[i].classList.add("jamfor-dropdown-active"),t[i].scrollIntoView({block:"nearest"})):e.key==="ArrowUp"?(e.preventDefault(),n&&n.classList.remove("jamfor-dropdown-active"),i=i<=0?t.length-1:i-1,t[i].classList.add("jamfor-dropdown-active"),t[i].scrollIntoView({block:"nearest"})):e.key==="Enter"?(e.preventDefault(),n&&n.click()):e.key==="Escape"&&de()}}}var ee=new URLSearchParams(window.location.search).has("kommuner");ee||(De(),z&&p.length===0&&(z.hidden=!1));var ae="loading",me="";function pe(e){var t=p.some(function(n){return!k.some(function(i){return i.skolenhetskod===n})});t&&Y==="idle"&&mt().then(function(){pe(!1),O()}),(!t||Y==="ready")&&(p=p.filter(function(n){return k.some(function(i){return i.skolenhetskod===n})}),xe()),Ee(e),t&&Y==="failed"&&window.announceStatus(K,window._L("Alla valda skolor kunde inte läsas in. Urvalet är bevarat; försök ladda om sidan.","Some selected schools could not be loaded. Your selection is preserved; try reloading the page."))}ln().then(function(){if(ae="ready",!ee){var e=me;me="",pe(e?!1:void 0),e&&G&&p.length>0&&window.announceStatus(K,e+" "+Ue()),O()}},function(e){ae="failed",!ee&&z&&(z.hidden=!1),typeof console<"u"&&console.warn&&console.warn("[jamfor] school data load failed; comparison list unavailable until reload.",e)}),window.ComparisonStore.subscribe(function(){if(!ee){var e=window.ComparisonStore.getCodes();JSON.stringify(e)!==JSON.stringify(p)&&(p=e,G=!1,ae==="ready"&&(pe(!1),O()))}}),L.addEventListener("input",mn),L.addEventListener("keydown",Fn),T.addEventListener("click",vn),ee?window.__jamforShowSchoolMode=function(e){if(delete window.__jamforShowSchoolMode,ee=!1,C.addEventListener("click",St),De(),ae!=="ready"){for(;C.firstChild;)C.removeChild(C.firstChild);for(;j.firstChild;)j.removeChild(j.firstChild);if(z&&(z.hidden=ae==="loading"&&p.length>0),e){me=e;var t=function(){me===e&&(me="")};window.announceStatus(K,e,t,t)}return{announcement:"",renderTable:function(){}}}return pe(!1),{announcement:G&&p.length>0?Ue():"",renderTable:O}}:C.addEventListener("click",St),F.addEventListener("click",Pn),J.addEventListener("click",At),window.addEventListener("beforeprint",Rn),window.addEventListener("keydown",Mn),document.addEventListener("click",In);function Kn(e){var t=e.target.closest&&e.target.closest(".jfr-text-toggle");if(t){e.preventDefault();var n=t.closest("td.jfr-cell--text");if(n){var i=n.classList.toggle("jfr-text-expanded");t.setAttribute("aria-expanded",i?"true":"false"),t.textContent=i?window._L("Visa mindre","Show less"):window._L("Läs mer","Read more");var a=t.getAttribute("aria-label");if(a){var l=a.replace(/^(L[äa]s mer|Read more|Visa mindre|Show less)\s*/i,"");t.setAttribute("aria-label",(i?window._L("Visa mindre ","Show less "):window._L("Läs mer ","Read more "))+l)}var u=t.getAttribute("data-school-text-code");if(i&&u&&t.getAttribute("data-school-text-loaded")!=="true"){for(var d=null,c=n.querySelectorAll("[data-school-text-full]"),w=0;w<c.length;w++)if(c[w].getAttribute("data-school-text-full")===u){d=c[w];break}var x=k.find(function(b){return b.skolenhetskod===u});t.setAttribute("aria-busy","true"),d&&(d.textContent="Laddar fulltextâ¦"),wt(x).then(function(){t.setAttribute("data-school-text-loaded","true"),t.removeAttribute("aria-busy"),d&&(d.textContent=(x&&x.verksamhetsbeskrivning||"")+" ")}).catch(function(){t.removeAttribute("aria-busy"),d&&(d.textContent="Fulltexten kunde inte hämtas just nu.")})}}}}function Bn(e){if(!(e.key!=="Enter"&&e.key!==" ")){var t=e.target.closest&&e.target.closest(".
1jfr-text-toggle");t&&(e.preventDefault(),t.click())}}j.addEventListener("click",Kn),j.addEventListener("keydown",Bn)})();
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.