1import{j as e}from"./editor-BhGk7_S1.js";import{b as l}from"./leaflet-DcfcX7a_.js";import{C as s}from"./card-CaSmhJ1l.js";import{B as m}from"./button-CK76V7Lo.js";import{b as j,t as n}from"./index-BjIHAQhU.js";import{R as d}from"./refresh-cw-A4TQI-r2.js";import{G as D}from"./globe-rpSIUeg6.js";import{U as H}from"./users-CXg3PGFq.js";import{S as f}from"./sparkles-d8zLxPkz.js";import{C as O}from"./calendar-DWvkJ5SF.js";import{D as N}from"./download-DqerNq_s.js";import"./mapbox-BPFQ-Sfv.js";import"./trpc-DqtxhgQo.js";function M(){const[t,x]=l.useState(null),[p,u]=l.useState(!0),[r,o]=l.useState(!1);l.useEffect(()=>{i()},[]);const i=async()=>{try{const a=await fetch("/onehome-data/statistics.json");if(a.ok){const c=await a.json();x(c)}}catch(a){console.error("Erreur lors du chargement des statistiques:",a)}finally{u(!1)}},g=j.oneHomeCapture.capture.useMutation({onSuccess:()=>{n.success("Capture réussie !"),setTimeout(()=>{i();const a=document.getElementById("onehome-map");a&&(a.src=`/onehome-data/blue-revolution-map.png?t=${Date.now()}`)},1e3)},onError:a=>{console.error("Erreur:",a),n.error("Erreur lors de la capture")}}),b=async()=>{o(!0),n.info("Démarrage de la capture...");try{await g.mutateAsync()}finally{o(!1)}},h=a=>{const c=new Date(a);return new Intl.DateTimeFormat("fr-FR",{dateStyle:"long",timeStyle:"short"}).format(c)};return p?e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:78",className:"min-h-screen bg-gradient-to-b from-blue-950 via-blue-900 to-blue-950 flex items-center justify-center",children:e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:79",className:"text-white text-xl",children:"Chargement..."})}):e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:85",className:"min-h-screen bg-gradient-to-b from-blue-950 via-blue-900 to-blue-950",children:[e.jsx("header",{"data-loc":"client/src/pages/OneHomeData.tsx:87",className:"border-b border-blue-800/30 bg-blue-950/50 backdrop-blur-sm",children:e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:88",className:"container mx-auto px-4 py-6",children:e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:89",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:90",children:[e.jsx("h1",{"data-loc":"client/src/pages/OneHomeData.tsx:91",className:"text-3xl font-bold text-white mb-2",children:"Données OneHome"}),e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:94",className:"text-blue-300",children:"Carte et statistiques de la Blue Revolution"})]}),e.jsx(m,{"data-loc":"client/src/pages/OneHomeData.tsx:98",onClick:b,disabled:r,className:"bg-blue-600 hover:bg-blue-700 text-white",children:r?e.jsxs(e.Fragment,{children:[e.jsx(d,{"data-loc":"client/src/pages/OneHomeData.tsx:105",className:"w-4 h-4 mr-2 animate-spin"}),"Capture en cours..."]}):e.jsxs(e.Fragment,{children:[e.jsx(d,{"data-loc":"client/src/pages/OneHomeData.tsx:110",className:"w-4 h-4 mr-2"}),"Capturer maintenant"]})})]})})}),e.jsxs("main",{"data-loc":"client/src/pages/OneHomeData.tsx:120",className:"container mx-auto px-4 py-8",children:[t&&e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:123",className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[e.jsx(s,{"data-loc":"client/src/pages/OneHomeData.tsx:124",className:"bg-blue-900/30 border-blue-700/50 backdrop-blur-sm p-6",children:e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:125",className:"flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:126",className:"p-3 bg-blue-600/20 rounded-lg",children:e.jsx(D,{"data-loc":"client/src/pages/OneHomeData.tsx:127",className:"w-8 h-8 text-blue-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:129",children:[e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:130",className:"text-blue-300 text-sm mb-1",children:"Pays participants"}),e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:131",className:"text-4xl font-bold text-white",children:t.countries})]})]})}),e.jsx(s,{"data-loc":"client/src/pages/OneHomeData.tsx:136",className:"bg-blue-900/30 border-blue-700/50 backdrop-blur-sm p-6",children:e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:137",className:"flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:138",className:"p-3 bg-blue-600/20 rounded-lg",children:e.jsx(H,{"data-loc":"client/src/pages/OneHomeData.tsx:139",className:"w-8 h-8 text-blue-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:141",children:[e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:142",className:"text-blue-300 text-sm mb-1",children:"Personnes engagées"}),e.jsxs("p",{"data-loc":"client/src/pages/OneHomeData.tsx:143",className:"text-4xl font-bold text-white",children:[t.peo
1ple,"M"]})]})]})}),e.jsx(s,{"data-loc":"client/src/pages/OneHomeData.tsx:148",className:"bg-blue-900/30 border-blue-700/50 backdrop-blur-sm p-6",children:e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:149",className:"flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:150",className:"p-3 bg-blue-600/20 rounded-lg",children:e.jsx(f,{"data-loc":"client/src/pages/OneHomeData.tsx:151",className:"w-8 h-8 text-blue-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:153",children:[e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:154",className:"text-blue-300 text-sm mb-1",children:"Ãvénements organisés"}),e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:155",className:"text-4xl font-bold text-white",children:t.events})]})]})})]}),e.jsxs(s,{"data-loc":"client/src/pages/OneHomeData.tsx:163",className:"bg-blue-900/30 border-blue-700/50 backdrop-blur-sm p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:164",className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{"data-loc":"client/src/pages/OneHomeData.tsx:165",className:"text-2xl font-bold text-white",children:"Carte Blue Revolution"}),t&&e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:167",className:"flex items-center gap-2 text-blue-300 text-sm",children:[e.jsx(O,{"data-loc":"client/src/pages/OneHomeData.tsx:168",className:"w-4 h-4"}),"Dernière mise à jour : ",h(t.lastUpdated)]})]}),e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:174",className:"relative rounded-lg overflow-hidden bg-blue-950/50",children:e.jsx("img",{"data-loc":"client/src/pages/OneHomeData.tsx:175",id:"onehome-map",src:"/onehome-data/blue-revolution-map.png",alt:"Carte Blue Revolution OneHome",className:"w-full h-auto"})}),e.jsx("div",{"data-loc":"client/src/pages/OneHomeData.tsx:183",className:"mt-4 flex justify-end",children:e.jsxs(m,{"data-loc":"client/src/pages/OneHomeData.tsx:184",variant:"outline",className:"border-blue-600 text-blue-300 hover:bg-blue-900/50",onClick:()=>{const a=document.createElement("a");a.href="/onehome-data/blue-revolution-map.png",a.download="blue-revolution-map.png",a.click()},children:[e.jsx(N,{"data-loc":"client/src/pages/OneHomeData.tsx:194",className:"w-4 h-4 mr-2"}),"Télécharger l'image"]})})]}),e.jsxs(s,{"data-loc":"client/src/pages/OneHomeData.tsx:201",className:"bg-blue-900/30 border-blue-700/50 backdrop-blur-sm p-6 mt-6",children:[e.jsx("h3",{"data-loc":"client/src/pages/OneHomeData.tsx:202",className:"text-xl font-bold text-white mb-3",children:"à propos de la capture"}),e.jsxs("div",{"data-loc":"client/src/pages/OneHomeData.tsx:203",className:"text-blue-200 space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:204",children:"Cette page affiche les données capturées automatiquement depuis le site OneHome.org."}),e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:207",children:"La carte montre les pays participants à la Blue Revolution, avec l'objectif d'illuminer 100 pays d'ici le Jour de la Terre 2026 (22 avril)."}),e.jsx("p",{"data-loc":"client/src/pages/OneHomeData.tsx:211",className:"text-sm text-blue-300 mt-4",children:'ð¡ Utilisez le bouton "Capturer maintenant" pour mettre à jour les données manuellement.'})]})]})]})]})}export{M 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.