PageSourceSearch

https://lbhi.is/_nuxt/2-lnG3cU.js

js lbhi.is collected 2026-10-02 04:19:54 UTC 5,691 bytes, 1 lines download raw bytes

1import{_ as H}from"./DrAQg-gO.js";import{d as W,N as A,U as Y,R as G,n as j,P as _,a4 as J,a5 as K,a as o,e as V,b as l,c as Q,W as D,w as X,t as i,x as t,a0 as E,a1 as Z,a2 as I,F as v,q as C,k as ee,S as te,o as n,j as N,f as ae,s as B,a3 as se}from"./DnvDOgAx.js";import{_ as le}from"./32mqiGQG.js";const ne={class:"mb-10 lg:mb-20 mx-global"},oe={class:"flex flex-wrap gap-y-8"},re={class:"xl:max-w-3xl text-gray"},ce={class:"relative ml-auto w-full h-[52px] sm:max-w-96"},ue=["placeholder"],ie={class:"overflow-x-auto bg-white text-gray mt-4 xl:mt-12 my-12"},pe={class:"w-full min-w-[1400px] border-collapse"},de={class:"flex h-full flex-col justify-between"},me={class:"mb-3 block font-medium text-sm pl-2"},he={key:0,class:"relative"},fe=["onUpdate:modelValue"],_e={value:""},ve=["value"],be=["href"],ye={key:0},ge=["colspan"],Ce=W({__name:"index",async setup(ke){let k,M;const{t:h}=A();Y({title:"Samstarfsskólar"});const F=[{name:h("partnerSchoolsPage"),slug:"partner-schools"}],{data:b,status:P}=([k,M]=G(()=>te("partner-school-contracts",()=>$fetch("/api/partner-schools/contracts"))),k=await k,M(),k),x=j(1),S=j(25),y=j(""),{t:p,locale:U}=A(),O=["Undergraduate","Masters","Doctorate"],u=_(()=>[{key:"haskoli",value:e=>U.value==="en"?e.school.name.en:e.school.name.is,label:p("partnerSchools.columns.university"),filterable:!0},{key:"land",value:e=>U.value==="en"?e.country.en:e.country.is,label:p("partnerSchools.columns.country"),filterable:!0},{key:"borg",value:e=>e.city,label:p("partnerSchools.columns.city"),filterable:!0},{key:"skolakodi",value:e=>e.schoolCode,label:p("partnerSchools.columns.schoolCode"),filterable:!1},{key:"tegundSamnings",value:e=>e.agreementType,label:p("partnerSchools.columns.agreementType"),filterable:!0},{key:"namsgrein",value:e=>e.subject,label:p("partnerSchools.columns.subject"),filterable:!0},{key:"nanarUmNamsgrein",value:e=>U.value==="en"?e.subjectDetails.en:e.subjectDetails.is,label:p("partnerSchools.columns.moreAboutSubject"),filterable:!1},{key:"namsstig",value:e=>e.studyLevel,label:p("partnerSchools.columns.studyLevel"),filterable:!0,options:O,matches:(e,a)=>e.studyLevel.split(", ").includes(a)}]),w=J(Object.fromEntries(u.value.filter(e=>e.filterable).map(e=>[e.key,""]))),R=_(()=>{const e={};for(const a of u.value){if(!a.filterable)continue;if(a.options){e[a.key]=a.options;continue}const g=new Set;for(const c of b.value??[]){const d=a.value(c);d&&g.add(d)}e[a.key]=[...g].sort()}return e}),L=_(()=>{if(!b.value)return[];const e=y.value.trim().toLowerCase();return b.value.filter(a=>u.value.every(c=>{if(!c.filterable)return!0;const d=w[c.key];return d?c.matches?c.matches(a,d):c.value(a)===d:!0})?e?u.value.some(c=>c.value(a).toLowerCase().includes(e)):!0:!1)});K([w,y],()=>{x.value=1});const T=_(()=>L.value.length),z=_(()=>Math.ceil(T.value/S.value)),$=_(()=>{const e=(x.value-1)*S.value,a=e+S.value;return L.value.slice(e,a)});return(e,a)=>{const g=H,c=ee,d=ae,q=le;return n(),o("section",ne,[V(g,{breadcrumbs:F}),V(c,{class:"my-12"},{default:X(()=>[N(i(t(h)("partnerSchools.heading")),1)]),_:1}),l("div",oe,[l("div",re,i(t(h)("partnerSchools.description")),1),l("div",ce,[V(d,{name:"app-i:search",size:"24",class:"absolute right-4 top-1/2 -translate-y-1/2"}),E(l("input",{"onUpdate:modelValue":a[0]||(a[0]=s=>I(y)?y.value=s:null),type:"text",class:"border border-darkgreen rounded-lg w-full h-full pl-4 pr-12 placeholder-black",placeholder:t(h)("partnerSchools.searchPlaceholder")},null,8,ue),[[Z,t(y)]])])]),l("div",ie,[l("table",pe,[l("thead",null,[l("tr",null,[(n(!0),o(v,null,C(t(u),(s,m)=>(n(),o("th",{key:s.key,class:B(["bg-white pb-4 pt-3 text-left align-top h-px",{"pr-4":m===0,"pr-2":m!==t(u).length-1}])},[l("div",de,[l("span",me,i(s.label),1),s.filterable?(n(),o("div",he,[E(l("select",{"onUpdate:modelValue":r=>t(w)[s.key]=r,class:"w-full appearance-none rounded-lg text-sm font-medium border border-darkgreen/20 bg-white py-2 pl-3 pr-8 transition focus:border-darkgreen/50 focus:ring-2"},[l("option",_e,i(t(h)("partnerSchools.filterAll")),1),(n(!0),o(v,null,C(t(R)[s.key],r=>(n(),o("option",{key:r,value:r},i(r),9,ve))),128))],8,fe),[[se,t(w)[s.key]]]),a[2]||(a[2]=l("svg",{class:"pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-darkgreen/60",viewBox:"0 0 20 20",fill:"none"},[l("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})],-1))])):D("",!0)])],2))),128))])]),l("tbody",null,[(n(!0),o(v,null,C(t($),(s,m)=>(n(),o("tr",{key:s.id},[(n(!0),o(v,null,C(t(u),(r,f)=>(n(),o("td",{key:r.key,class:B(["text-sm h-px",{"px-4 py-4":f!==0,"pr-4 max-w-44"
1:f===0,"min-w-[250px] max-w-[450px]":r.key==="nanarUmNamsgrein","whitespace-nowrap":r.key==="skolakodi","bg-olive/10":m%2===0&&f!==0,"rounded-l-xl":m%2===0&&f===1,"rounded-r-xl":m%2===0&&f===t(u).length-1}])},[f===0?(n(),o("div",{key:0,class:B(["px-4 py-4 h-full flex items-center",{"bg-olive/20 rounded-xl":m%2===0,"rounded-r-xl":m%2===0&&t(u).length===1}])},[s.school.website?(n(),o("a",{key:0,href:s.school.website,target:"_blank",rel:"noopener noreferrer",class:"text-green hover:underline"},i(r.value(s)||"-"),9,be)):(n(),o(v,{key:1},[N(i(r.value(s)||"-"),1)],64))],2)):(n(),o(v,{key:1},[N(i(r.value(s)||"-"),1)],64))],2))),128))]))),128)),t(b)&&t(L).length===0?(n(),o("tr",ye,[l("td",{colspan:t(u).length,class:"px-4 py-14 text-center text-gray/50"},i(t(h)("partnerSchools.noResults")),9,ge)])):D("",!0)])])]),t(b)&&t(z)>1?(n(),Q(q,{key:0,disabled:t(P)==="pending",pagination:{page:t(x),pageSize:t(S),pageCount:t(z),total:t(T)},scroll:"",onOnChange:a[1]||(a[1]=s=>x.value=s)},null,8,["disabled","pagination"])):D("",!0)])}}});export{Ce 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.