1import{_ as N}from"./D_WufO7W.js";import{S as L,a as S,A}from"./CypD_tRT.js";import{_ as M,e as p,o as i,w as e,b as t,a1 as x,m as I,c,r as v,a as o,F as _,d as f,f as y,t as P}from"./Cl0D3-zx.js";import{b as d,a as g,V as u}from"./CespofgP.js";import{u as T}from"./DPr59d8s.js";import{_ as B}from"./CGo3v_ai.js";import{a as D,V as C}from"./CX4WbF9V.js";import{a as E,V as k}from"./B4CzSLxS.js";import{V as R}from"./DtfjdQIJ.js";import{V as U}from"./CDCVows3.js";import{V as $}from"./CJv9yFH9.js";import"./DGX6U3eZ.js";const z={data(){return{modules:[A],swiperOptions:{loop:!0,slidesPerView:8,spaceBetween:30,autoplay:{delay:5e3},breakpoints:{320:{slidesPerView:4,spaceBetween:10},640:{slidesPerView:4,spaceBetween:15},768:{slidesPerView:4,spaceBetween:20},1024:{slidesPerView:4,spaceBetween:25},1280:{slidesPerView:4,spaceBetween:30}}},images:["forbes","td","ct","security"]}},components:{Swiper:S,SwiperSlide:L},methods:{getImagePath(l){return`/images/partners/news/${l}.png`}}},H=["src"];function j(l,s,n,m,r,w){const h=x("swiper-slide"),b=x("swiper");return i(),p(u,{fluid:"",class:"partners"},{default:e(()=>[t(g,null,{default:e(()=>[t(d,{col:"12"},{default:e(()=>[t(b,I(r.swiperOptions,{modules:r.modules,class:"mySwiper"}),{default:e(()=>[(i(!0),c(_,null,v(r.images,(a,V)=>(i(),p(h,{key:V},{default:e(()=>[o("img",{contain:"",src:w.getImagePath(a)},null,8,H)]),_:2},1024))),128))]),_:1},16,["modules"])]),_:1})]),_:1})]),_:1})}const F=M(z,[["render",j]]),K={name:"NewsList",data(){return{pageTitle:"News",baseUrl:this.$config.public.baseUrl,title:"News",subtitle:"Our latest announcements, publications and articles",articles:[],currentPage:-1,loading:!1,hasMore:!0,pager:{total_pages:0},articleRef:[]}},methods:{async fetchArticles(l){const s=`${this.baseUrl}/api/news?page=${l}&items_per_page=4`;try{const n=await fetch(s);if(!n.ok)throw new Error("Failed to fetch articles");const m=await n.json();return this.pager=m.pager,m.rows}catch(n){return console.error("Error fetching articles:",n),[]}},async loadMore(){if(this.loading||!this.hasMore)return;this.loading=!0;const l=await this.fetchArticles(this.currentPage+1);l.length>0&&(this.articles=[...this.articles,...l],this.currentPage++,this.$nextTick(()=>{if(this.articleRef.length>0){const s=this.articleRef[this.articleRef.length-l.length];s&&s.scrollIntoView({behavior:"smooth"})}})),this.hasMore=this.currentPage<this.pager.total_pages-1,this.loading=!1},setItemRef(l){l&&this.articleRef.push(l)}},async mounted(){await this.loadMore()},created(){T({title:this.pageTitle,meta:[{property:"og:title",content:this.pageTitle}]})}},O=["src"],G={class:"news-driver-footer"},q=["src"],J={key:1},Q={class:"news-info"},W=["innerHTML"];function X(l,s,n,m,r,w){const h=N,b=F;return i(),c(_,null,[t(h,{title:r.title,subtitle:r.subtitle},null,8,["title","subtitle"]),t(b),t(u,null,{default:e(()=>[t(g,null,{default:e(()=>[t(d,{cols:"12",class:"pl-3 pt-0 pb-0"},{default:e(()=>[t(D,{class:"chips-group"},{default:e(()=>
1[t(C,{class:"chip","prepend-icon":"mdi-circle-medium",variant:"text",size:"x-large"},{default:e(()=>s[0]||(s[0]=[f("Articles")])),_:1}),t(C,{class:"chip",to:"/videos",variant:"plain",size:"x-large"},{default:e(()=>s[1]||(s[1]=[f("Videos")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),r.articles.length!=0?(i(),p(u,{key:0,class:"spacer_bottom_80"},{default:e(()=>[t(g,null,{default:e(()=>[(i(!0),c(_,null,v(r.articles,(a,V)=>(i(),p(d,{key:V,ref_for:!0,ref:r.articleRef,cols:"12",lg:"6",md:"6"},{default:e(()=>[t(E,{class:"news-page"},{default:e(()=>[t(R,{elevation:"0",class:"rounded-0 news-driver-block"},{default:e(()=>[o("img",{src:`${r.baseUrl}/${a.image}`,class:"img-responsive"},null,8,O),s[3]||(s[3]=o("div",{class:"news-driver"},[o("div",{class:"news-driver-green"}),o("div",{class:"news-driver-purple"})],-1)),o("div",G,[s[2]||(s[2]=o("img",{class:"news-logo",alt:"DEKI Logo",contain:"",src:B},null,-1)),a.partner_logo?(i(),c("img",{key:0,class:"news-partners",alt:"DEKI Logo",contain:"",src:`${r.baseUrl}/${a.partner_logo}`},null,8,q)):y("",!0),t(U),a.category?(i(),c("h5",J,P(a.category),1)):y("",!0)])]),_:2},1024),o("div",Q,[o("h2",null,P(a.title),1),o("div",{class:"news-text",innerHTML:a.body},null,8,W),t(k,{class:"back text-none",size:"large",variant:"outlined",to:`/news/detail?id=${a.nid}`},{default:e(()=>s[4]||(s[4]=[f(" Read more ")])),_:2},1032,["to"])])]),_:2},1024)]),_:2},1024))),128)),r.hasMore?(i(),p(d,{key:0,cols:"12",class:"d-flex justify-center"},{default:e(()=>[t(k,{size:"x-large",variant:"flat",color:"black",class:"text-none menu-btn btn-black mt-12",onClick:w.loadMore,loading:r.loading},{default:e(()=>s[5]||(s[5]=[f(" Load more ")])),_:1},8,["onClick","loading"])]),_:1})):y("",!0)]),_:1})]),_:1})):(i(),p(u,{key:1,class:"spacer_bottom_80"},{default:e(()=>[t(g,null,{default:e(()=>[(i(),c(_,null,v(4,a=>t(d,{key:a,cols:"12",lg:"6",md:"6"},{default:e(()=>[t($,{loading:r.loading,height:"250",type:"image, list-item-two-line"},null,8,["loading"])]),_:2},1024)),64))]),_:1})]),_:1})),t(u,{fluid:"",class:"bg-grey-lighten-5 news-media-block"},{default:e(()=>[t(u,{class:"pa-0"},{default:e(()=>[t(g,{"no-gutters":"",class:"justify-center"},{default:e(()=>[t(d,{cols:"12",md:"4"},{default:e(()=>[t(R,{class:"news-media text-center"},{default:e(()=>[s[7]||(s[7]=o("img",{src:B,class:"img-responsive"},null,-1)),s[8]||(s[8]=o("p",null,"Download the DEKI logo to use it in your media resources",-1)),t(k,{href:"/images/logo.svg",size:"x-large",variant:"flat",color:"black",class:"text-none menu-btn btn-black",download:""},{default:e(()=>s[6]||(s[6]=[f(" Download logo ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})],64)}const de=M(K,[["render",X]]);export{de 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.