1import{_ as C}from"./yqJAeT97.js";import{_ as I}from"./mr1lTHZI.js";import{_ as A,u as S,r,J as B,x as M,c as l,h as f,d as _,t as $,F as P,z as V,e as s,n as D,i as k,q as R,b as a}from"./BekPpw_-.js";import{u as T}from"./yZBrqaMB.js";import"./ST9G1b2R.js";const U={class:"news"},q={class:"content"},z={class:"title secondary-title"},E={class:"grid-square"},F=["innerHTML"],H={key:2,class:"error"},N={__name:"index",async setup(J){let c,m;const{locale:v,t:x}=S(),p=R(),u=r(6),g=r(1),t=r(!1),n=r(!1),i=r(!0);B(x("pages.videos.name"),null,null);const h=(e=1)=>{let d=v.value!=="fr"?`${p.public.API_URL}posts?lang=${v.value}&per_page=${u.value}&page=${e}`:`${p.public.API_URL}posts?per_page=${u.value}&page=${e}`;return d+=`&categories=${p.public.CAT_VIDEOS}`,d},{data:o}=([c,m]=M(()=>T("fetchVideos",()=>$fetch(h()))),c=await c,m(),c),L=async()=>{if(!(n.value||!i.value)){n.value=!0,t.value=!1,g.value++;try{const e=await $fetch(h(g.value));if(!e||e.length===0){i.value=!1,t.value=!0;return}o.value.push(...e),e.length<u.value&&(i.value=!1,t.value=!0)}catch{t.value=!0}finally{n.value=!1}}};return(e,d)=>{const b=C,w=I;return a(),l("section",U,[f("div",q,[f("h2",z,$(e.$t("pages.videos.name")),1),f("div",E,[(a(!0),l(P,null,V(s(o),(y,O)=>(a(),k(b,{data:y,key:y.slug},null,8,["data"]))),128))]),s(o)&&s(o).length>=s(u)?(a(),l("div",{key:0,class:D(["more",{visible:s(o)}])},[s(i)&&!s(n)&&!s(t)?(a(),l("button",{key:0,onClick:L,innerHTML:e.$t("loadmore.videos",{startSpan:"<span>",endSpan:"</span>"})},null,8,F)):_("",!0),s(n)?(a(),k(w,{key:1})):_("",!0),s(t)?(a(),l("p",H,$(e.$t("loadmore.nomore.videos")),1)):_("",!0)],2)):_("",!0)])])}}},X=A(N,[["__scopeId","data-v-8e1fc87a"]]);export{X 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.