PageSourceSearch

https://campus.formationsfootball.fr/build/assets/Index-Dl2HffOO.js

js formationsfootball.fr collected 2026-09-25 07:59:15 UTC 11,592 bytes, 2 lines download raw bytes

1import{P as S,U as C,S as oe,_ as W,a as ie}from"./pagination-_jLlkVqV.js";import{d as te,o as t,c as f,w as m,a as d,b as u,u as o,t as g,e as _,r as v,f as r,x as re,F as $,g as N,h as x,n as ue,i as ne,j as I,k as ce}from"./app-CqoTU_r8.js";import{F as de,l as Z}from"./DialogTitle-Cl6iCBtm.js";import{u as fe}from"./usePageGtm-02gaaHvJ.js";import{_ as me}from"./FORMATIONSFOOTBALLPrereqModal.vue_vue_type_script_setup_true_lang-DPvhPcit.js";import{u as pe}from"./usePrereqModal-V6E3L5JB.js";import{_ as ge}from"./FORMATIONSFOOTBALLBaseMediaCardSkeleton.vue_vue_type_script_setup_true_lang-Dzxs-NVd.js";import{_ as _e,a as ve}from"./FORMATIONSFOOTBALLCoursCard.vue_vue_type_script_setup_true_lang-Dlq3oYDg.js";import{_ as R}from"./FORMATIONSFOOTBALLDropdownFilter.vue_vue_type_script_setup_true_lang-BNwkoH3G.js";import{_ as ee}from"./FORMATIONSFOOTBALLFilterCount.vue_vue_type_script_setup_true_lang-vx51aOkO.js";import{u as he,_ as be}from"./NavLanguageSwitch.vue_vue_type_script_setup_true_lang-DLVTPbNS.js";import{_ as U}from"./index-CuqVbQI4.js";import{_ as Ce}from"./FORMATIONSFOOTBALLBaseMediaListSkeleton.vue_vue_type_script_setup_true_lang-CIq_Ye5V.js";import{_ as Te}from"./Progress.vue_vue_type_script_setup_true_lang-cEG_KuOx.js";import{_ as ye}from"./FORMATIONSFOOTBALLThematiqueBadges.vue_vue_type_script_setup_true_lang-B2FePoDl.js";import{_ as De}from"./FORMATIONSFOOTBALLBaseMediaList.vue_vue_type_script_setup_true_lang-QLY93gJC.js";import{L as Se}from"./loader-circle-xCQoQhNY.js";
1import{X as se}from"./Teleport-jFdzBv2M.js";import{C as $e}from"./circle-play-Cu5kocnU.js";import"./Heading.vue_vue_type_script_setup_true_lang-PTVltxWT.js";import"./chevron-up-BgbmtHlU.js";import"./createLucideIcon-B0sVoUuK.js";import"./AppLayout.vue_vue_type_script_setup_true_lang-C6FAg976.js";import"./AppHead.vue_vue_type_script_setup_true_lang-BOz3cqMd.js";import"./calendar-3YbhN0dO.js";import"./check-Cjopx6Pw.js";import"./chevron-left-CeIN_7Ma.js";import"./move-down-CV2BIwL0.js";import"./facebook-C1LrJvED.js";import"./star-DF1jzPxr.js";import"./useForwardExpose-IYU1RO6l.js";import"./Presence-BR5UDM69.js";import"./AlertDialogContent.vue_vue_type_script_setup_true_lang-Cymd4VJD.js";import"./index-CCkXavDQ.js";import"./CardContent.vue_vue_type_script_setup_true_lang-C4naLszX.js";import"./Skeleton.vue_vue_type_script_setup_true_lang-BjjKEh6a.js";import"./FORMATIONSFOOTBALLBaseMediaCard.vue_vue_type_script_setup_true_lang-lSGuesIQ.js";import"./index-smZkrPnL.js";import"./useDirection-BuwaX9Gn.js";import"./RovingFocusGroup-D9PPARMY.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};i.SENTRY_RELEASE={id:"d3e60479824897f99026a3f418f9a7d4ce8b6d7d"};var h=new i.Error().stack;h&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[h]="72ccc558-a330-4bba-af5d-5fe8af25c181",i._sentryDebugIdIdentifier="sentry-dbid-72ccc558-a330-4bba-af5d-5fe8af25c181")}catch{}})();const Oe={class:"flex items-center gap-2"},we={class:"text-xs whitespace-nowrap text-muted-foreground"},Ee=te({__name:"FORMATIONSFOOTBALLCoursListItem",props:{cours:{}},setup(i){return(h,P)=>{var L,k,s;return t(),f(De,{href:h.route("cours.show",{cours:i.cours.id}),title:i.cours.name,description:i.cours.description_preview,"accent-color":(s=(k=(L=i.cours.ff_thematique)==null?void 0:L.enum_data)==null?void 0:k.styles)==null?void 0:s["background-color"]},{badges:m(()=>[u(ye,{thematiques:i.cours.ff_thematique||[]},null,8,["thematiques"]),i.cours.difficulte_label?(t(),f(_e,{key:0,difficulte:i.cours.difficulte,difficulteLabel:i.cours.difficulte_label},null,8,["difficulte","difficulteLabel"])):_("",!0)]),progress:m(()=>{var A,c;return[d("div",Oe,[u(o(Te),{"model-value":(A=i.cours.user_progress)==null?void 0:A.progress_percentage,class:"h-2 w-sm [&>[data-slot=progress-indicator]]:bg-[#29F173]"},null,8,["model-value"]),d("span",we,g((c=i.cours.user_progress)==null?void 0:c.progress_percentage)+"%",1)])]}),_:1},8,["href","title","description","accent-color"])}}}),Le={class:"flex items-center gap-3"},ke={class:"text-2xl font-bold"},Ae={class:"mt-2 text-base text-white/80"},qe={class:"hidden md:flex md:w-full md:items-center md:justify-between"},Fe={class:"flex items-center gap-3"},Ne={class:"flex flex-col gap-3 md:hidden"},xe={class:"flex w-full gap-3"},Ie={class:"flex flex-1 items-center"},Re={key:0,class:"flex flex-col gap-3"},Ue={class:"flex w-full gap-3"},Pe={key:0,class:"grid auto-rows-min gap-4 md:grid-cols-3 2xl:grid-cols-4"},Me={key:1,class:"grid auto-rows-min gap-4 md:grid-cols-3 2xl:grid-cols-4"},Je={key:0,class:"col-span-full"},Be={class:"text-muted-foreground"},ze={key:0,class:"flex flex-col"},Ge={key:1,class:"flex flex-col"},je={key:0},Ve={class:"text-muted-foreground"},Ke={key:2,class:"mt-8 flex justify-center"},Ye={key:1},Xe={key:2},Rs=te({__name:"Index",props:{pageData:{},subtenantCours:{},subtenantCoursAvailableDifficulte:{},subtenantCoursAvailableThematiques:{},filters:{},gtmEvents:{}},setup(i){fe();const{showPrereqModal:h,prereqMessage:P,prereqUrls:L,closePrereqModal:k}=pe(),s=i,A=I(()=>s.pageData.icon&&Z[s.pageData.icon]?Z[s.pageData.icon]:$e),c=v(s.filters.difficultes||s.subtenantCoursAvailableDifficulte.map(e=>e.value)),p=v(s.filters.thematiques||s.subtenantCoursAvailableThematiques.map(e=>e.id)),b=v(s.filters.sort||S.DEFAULT_SORT),T=v(!1),O=v(!1),w=v([...s.subtenantCours.data]),y=v({current_page:s.subtenantCours.current_page,has_more_pages:s.subtenantCours.has_more_pages,total:s.subtenantCours.total}),E=v(!1);(()=>{const e=s.subtenantCoursAvailableDifficulte.map(D=>D.value),l=s.subtenantCoursAvailableThematiques.map(D=>D.id),a=S.DEFAULT_SORT,J=JSON.stringify([...c.value].sort())!==JSON.stringify([...e].sort()),B=JSON.stringify([...p.value].sort())!==JSON.stringify([...l].sort()),z=b.value!==a;E.value=J||B||z})();const ae=()=>{T.value=!0,ce.post(route("cours.index"),{difficultes:c.value,thematiques:p.value,sort:b.value,page:1},{preserveState:!1,preserveScroll:!0,onFinish:()=>{T.value=!1},onSuccess:()=>{w.value=[...s.subtenantCours.data],y.value={current_page:s.subtenantCours.current_page,has_more_pages:s.subtenantCours.has_more_pages,total:s.subtenantCours.total}}})},le=()=>{if(O.value||!y.value.has_more_pages)return;O.value=!0;const e=y.value.current_page+1,l=new URLSearchParams;l.append("page",e.toString()),c.value.forEach(a=>{l.append("difficultes[]",a)}),p.value.forEach(a=>{l.append("thematiques[]",a)}),l.append("sort",b.value),fetch(route("cours.index")+"?"+l.toString()).then(a=>a.json()).then(a=>{w.value.push(...a.data),y.value={current_page:a.current_page,has_more_pages:a.has_more_pages,total:a.total}}).finally(()=>{O.value=!1})};let G;const q=()=>{clearTimeout(G),G=setTimeout(ae,S.DEBOUNCE_DELAY)},j=e=>{const l=c.value.indexOf(e);l>-1?c.value.splice(l,1):c.value.push(e),F.success(C.FILTER_UPDATED),q()},V=e=>{const l=p.value.indexOf(e);l>-1?p.value.splice(l,1):p.value.push(e),F.success(C.FILTER_UPDATED),q()},K=I(()=>s.subtenantCoursAvailableDifficulte.map(e=>({id:e.value,label:e.label}))),Y=I(()=>s.subtenantCoursAvailableThematiques.map(e=>({id:e.id,label:e.enum_data.label,color:e.enum_data.styles["background-color"]}))),n={count:{singular:"cours_singular",plural:"cours_plural"},difficultes:{singular:"Difficulté",plural:"Difficultés"},thematiques:{singular:"Thématique",plural:"Thématiques"},sort:{label:"Filtrer par",options:[...oe]}},X=e=>{b.value=e,F.success(C.FILTER_UPDATED),q()},M=I(()=>{const e=s.subtenantCoursAvailableDifficulte.map(D=>D.value),l=s.subtenantCoursAvailableThematiques.map(D=>D.id),a=S.DEFAULT_SORT,J=JSON.stringify([...c.value].sort())!==JSON.stringify([...e].sort()),B=JSON.stringify([...p.value].sort())!==JSON.stringify([...l].sort()),z=b.value!==a;return J||B||z}),H=()=>{c.value=s.subtenantCoursAvailableDifficulte.map(e=>e.value),p.value=s.subtenantCoursAvailableThematiques.map(e=>e.id),b.value=S.DEFAULT_SORT,F.success(C.FILTER_UPDATED),q()},{toast:F}=he(),Q=v("card");return(e,l)=>(t(),r($,null,[u(me,{open:o(h),"onUpdate:open":l[0]||(l[0]=a=>re(h)?h.value=a:null),message:o(P),urls:o(L),onClose:o(k)},null,8,["open","message","urls","onClose"]),u(ie,{pageData:s.pageData},{"heading-title":m(()=>[d("div",Le,[(t(),f(ne(A.value),{class:"h-7 w-7 text-tenant-primary"})),d("span",ke,g(s.pageData.title),1)])]),"heading-description":m(()=>[d("p",Ae,g(s.pageData.description),1)]),filters:m(()=>[d("div",qe,[d("div",Fe,[u(ee,{count:y.value.total,singular:e.$t(n.count.singular),plural:e.$t(n.count.plural),isLoading:T.value},null,8,["count","singular","plural","isLoading"]),u(R,{singular:e.$t(n.difficultes.singular),plural:e.$t(n.difficultes.plural),items:K.value,selected:c.value,onToggle:j},null,8,["singular","plural","items","selected"]),u(R,{singular:e.$t(n.thematiques.singular),plural:e.$t(n.thematiques.plural),items:Y.value,selected:p.value,onToggle:V},null,8,["singular","plural","items","selected"]),M.value?(t(),f(o(U),{key:0,variant:"secondary",class:"cursor-pointer gap-2",onClick:H},{default:m(()=>[x(g(e.$t("Remettre à zéro"))+" ",1),u(o(se),{class:"h-4 w-4"})]),_:1})):_("",!0)]),u(W,{label:e.$t(n.sort.label),items:n.sort.options,selected:b.value,onChange:X},null,8,["label","items","selected"])]),d("div",Ne,[d("div",xe,[d("div",Ie,[u(ee,{count:y.value.total,singular:e.$t(n.count.singular),plural:e.$t(n.count.plural),isLoading:T.value},null,8,["count","singular","plural","isLoading"])]),u(o(U),{variant:"outline",class:ue(["w-1/2 gap-2",{"bg-accent":E.value}]),onClick:l[1]||(l[1]=a=>E.value=!E.value)},{default:m(()=>[u(o(de),{class:"h-4 w-4"}),x(" "+g(e.$t("Filtres"))+" ",1),M.value?(t(),f(o(be),{key:0,variant:"secondary",class:"ml-1"},{default:m(()=>[...l[2]||(l[2]=[x("●",-1)])]),_:1})):_("",!0)]),_:1},8,["class"])]),E.value?(t(),r("div",Re,[d("div",Ue,[u(R,{singular:e.$t(n.difficultes.singular),plural:e.$t(n.difficultes.plural),items:K.value,selected:c.value,onToggle:j},null,8,["singular","plural","items","selected"]),u(R,{singular:e.$t(n.thematiques.singular),plural:e.$t(n.thematiques.plural),items:Y.value,selected:p.value,onToggle:V},null,8,["singular","plural","items","selected"])]),u(W,{label:n.sort.label,items:n.sort.options,selected:b.value,onChange:X},null,8,["label","items","selected"])])):_("",!0),M.value?(t(),f(o(U),{key:1,variant:"secondary",class:"w-full cursor-pointer gap-2",onClick:H},{default:m(()=>[x(g(e.$t("Remettre à zéro"))+" ",1),u(o(se),{class:"h-4 w-4"})]),_:1})):_("",!0)])]),content:m(()=>[Q.value==="card"?(t(),r($,{key:0},[T.value?(t(),r("div",Pe,[(t(!0),r($,null,N(o(S).SKELETON_COUNT,a=>(t(),f(ge,{key:a}))),128))])):(t(),r("div",Me,[(t(!0),r($,null,N(w.value,a=>(t(),f(ve,{key:a.id,cours:a},null,8,["cours"]))),128)),w.value.length===0?(t(),r("div",Je,[d("p",Be,g(e.$t(o(C).NO_RESULTS)),1)])):_("",!0)]))],64)):Q.value==="list"?(t(),r($,{key:1},[T.value?(t(),r("div",ze,[(t(!0),r($,null,N(o(S).SKELETON_LIST_COUNT,a=>(t(),f(Ce,{key:a}))),128))])):(t(),r("div",Ge,[(t(!0),r($,null,N(w.value,a=>(t(),f(Ee,{key:a.id,cours:a},null,8,["cours"]))),128)),w.value.length===0?(t(),r("div",je,[d("p",Ve,g(e.$t(o(C).NO_RESULTS)),1)])):_("",!0)]))],64)):_("",!0),y.value.has_more_pages&&!T.value?(t(),r("div",Ke,[u(o(U),{onClick:le,disabled:O.value,class:"min-w-[200px] cursor-pointer gap-2",variant:"outline"},{default:m(()=>[O.value?(t(),f(o(Se),{key:0,class:"h-4 w-4 animate-spin"})):_("",!0),O.value?(t(),r("span",Ye,g(e.$t(o(C).LOADING)),1)):(t(),r("span",Xe,g(e.$t(o(C).LOAD_MORE)),1))]),_:1},8,["disabled"])])):_("",!0)]),_:1},8,["pageData"])],64))}});
1export{Rs as default};
2//# sourceMappingURL=Index-Dl2HffOO.js.map

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.