PageSourceSearch

https://mytiktiok-empire-ia.hf.space/assets/DossiersWorkspaceView-Du01DQ7-.js

js mytiktiok-empire-ia.hf.space collected 2026-10-03 17:09:51 UTC 56,400 bytes, 4 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BfFoir-D.js","assets/vendor-framer-4qzhpEbi.js","assets/vendor-react-DoD6Cqi4.js","assets/vendor-store-DzZixoKE.js","assets/vendor-ui-DKVeHV7E.js","assets/vendor-markdown-DLx0uNNN.js","assets/index-DF8lWLnB.css"])))=>i.map(i=>d[i]);
2import{_ as ye}from"./vendor-pdf-tfVvIPiR.js";import{j as e,m as C,A as rt}from"./vendor-framer-4qzhpEbi.js";import{r as a,R as k}from"./vendor-react-DoD6Cqi4.js";import{u as p,a as M,g as at,b as q,V as it,e as lt,s as nt,d as ot,c as ke,f as ct}from"./temporalMemoryBridge-BwE-VTJj.js";import{w as O,g as dt,M as xt,a7 as Ce,a3 as mt,S as ut,dD as pt,i as ht,B as bt,dF as L,dG as ft,dE as gt,ah as jt}from"./index-BfFoir-D.js";import{L as _e,S,cp as vt,M as wt,q as Nt,a8 as K,s as Te,aP as Q,aj as X,ei as Y,by as yt,cr as Z,ai as kt,D as Ae,aS as Se,bw as Ct,cb as De,h as At,cg as St,J as Dt,a6 as _t,cd as Tt,e as Et,aK as Rt,as as Pt,at as It,k as qt,aC as Lt,b as Mt,R as Ft,a as $t,au as Bt}from"./vendor-ui-DKVeHV7E.js";import{u as zt}from"./useAuth-qrUVCgph.js";import{M as Ut,r as Vt}from"./vendor-markdown-DLx0uNNN.js";import"./vendor-store-DzZixoKE.js";import"./vendor-three-97KX4nAg.js";function Ht(){const[c,l]=a.useState(null),[b,d]=a.useState(!0),[f,m]=a.useState(null);return a.useEffect(()=>{let o=!0;return(async()=>{try{const h=O(),u=await(await fetch(`${dt()}/api/memory/soul-mirror`,{headers:h?{Authorization:`Bearer ${h}`}:{}})).json();u.ok&&o?l(u):o&&m(u.detail||"Erreur inconnue")}catch(h){o&&m(h.message)}finally{o&&d(!1)}})(),()=>{o=!1}},[]),b?e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center p-8 text-texte-faible",children:[e.jsx(_e,{className:"mb-4 h-8 w-8 animate-spin text-[var(--champagne)]/50"}),e.jsx("p",{className:"text-sm font-medium",children:"ARIA vous observe en silence..."})]}):f?e.jsxs("div",{className:"p-8 text-center text-red-400",children:[e.jsx("p",{children:"Impossible de lire dans le miroir."}),e.jsx("p",{className:"text-xs opacity-50",children:f})]}):e.jsxs("div",{className:"relative flex h-full w-full flex-col items-center justify-start overflow-y-auto p-4 sm:p-8 scrollbar-thin scrollbar-thumb-white/10",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-20",style:{background:"radial-gradient(circle at 50% 0%, rgba(196,165,116,0.15) 0%, transparent 60%)"}}),e.jsxs(C.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative z-10 w-full max-w-2xl text-center",children:[e.jsx("div",{className:"mb-8 flex justify-center",children:e.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-gradient-to-br from-[rgba(196,165,116,0.20)] to-[rgba(196,165,116,0.05)] border border-[rgba(196,165,116,0.22)] shadow-[0_0_40px_rgba(196,165,116,0.15)] ring-1 ring-white/10",children:e.jsx(S,{className:"h-7 w-7 text-[var(--champagne)]"})})}),e.jsx("h2",{className:"mb-4 text-3xl font-light tracking-tight text-texte",children:"Le Miroir de l'Âme"}),e.jsx("p",{className:"mb-10 text-sm font-medium text-texte-faible max-w-lg mx-auto",children:"Ceci n'est pas une simple liste de vos données. C'est le portrait intime qu'ARIA dresse de vous, basé sur tout ce qu'elle a compris de votre parcours."}),c?.insights&&c.insights.length>0&&e.jsx("div",{className:"mb-12 flex flex-wrap justify-center gap-3",children:c.insights.map((o,g)=>e.jsx(C.span,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5+g*.1},className:"rounded-full border border-[rgba(196,165,116,0.30)] bg-[rgba(196,165,116,0.10)] px-4 py-1.5 text-xs font-semibold uppercase tracking-wider text-[#E8D5B5]",children:o},o))}),e.jsxs(C.div,{initial:{opacity:0}
2,animate:{opacity:1},transition:{delay:.8,duration:1},className:"relative rounded-3xl border border-border bg-surface-voile p-8 text-left backdrop-blur-md shadow-2xl",children:[e.jsx(vt,{className:"absolute top-8 right-8 h-6 w-6 opacity-10"}),e.jsx("div",{className:"prose prose-invert max-w-none text-texte-doux prose-p:leading-relaxed prose-p:mb-6",children:c?.portrait.split(`
3
4`).map((o,g)=>e.jsx("p",{children:o},g))})]})]})]})}function Gt({isOpen:c,onClose:l,creation:b}){const[d,f]=a.useState("desktop");if(!b)return null;const m=b.content||"";return e.jsx(xt,{open:c,onClose:l,size:"full",noPadding:!0,title:"Création ARIA",className:d==="mobile"?"w-full max-w-[375px]":"w-full max-w-[90vw]",icon:e.jsxs("div",{className:"flex space-x-1 rounded-lg bg-surface-glass p-1",children:[e.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),f("desktop")},className:`rounded-md p-1.5 transition-colors ${d==="desktop"?"bg-panel-glass text-white":"text-texte-faible hover:text-texte"}`,title:"Vue ordinateur","aria-label":"Vue ordinateur",children:e.jsx(wt,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),f("mobile")},className:`rounded-md p-1.5 transition-colors ${d==="mobile"?"bg-panel-glass text-white":"text-texte-faible hover:text-texte"}`,title:"Vue téléphone","aria-label":"Vue téléphone",children:e.jsx(Nt,{className:"h-4 w-4"})})]}),children:e.jsx("div",{className:"bg-gradient-to-b from-[#111111] to-[#0A0A0A] p-6 custom-scrollbar",children:e.jsx("div",{className:"prose prose-invert max-w-none",children:e.jsx(Ut,{remarkPlugins:[Vt],children:m})})})})}function Jt(){const{user:c}=zt(),[l,b]=a.useState([]),[d,f]=a.useState([]),[m,o]=a.useState(!0),[g,h]=a.useState("internal"),[j,u]=a.useState(null);return a.useEffect(()=>{if(!c?.uid)return;async function r(){try{o(!0);const x=await fetch(`${Ce}/api/v1/aria-workspace/internal-threads?limit=20`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${O()}`}});if(x.ok){const w=await x.json();b(w.threads||[])}const v=await fetch(`${Ce}/api/v1/aria-workspace/creations?limit=20`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${O()}`}});if(v.ok){const w=await v.json();f(w.creations||[])}}catch(x){console.error("Erreur lors de la récupération de l'Espace ARIA:",x)}finally{o(!1)}}r()},[c?.uid]),m?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-texte-faible",children:[e.jsx(_e,{className:"w-8 h-8 animate-spin mb-4"}),e.jsx("p",{children:"Synchronisation de l'Espace ARIA..."})]}):e.jsxs("div",{className:"h-full flex flex-col space-y-6",children:[e.jsxs("div",{className:"flex items-center space-x-2 bg-surface-glass p-1 rounded-xl w-max",children:[e.jsx("button",{onClick:()=>h("internal"),className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${g==="internal"?"bg-panel-glass text-white shadow-sm":"text-texte-faible hover:text-texte hover:bg-surface-glass"}`,children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(K,{className:"w-4 h-4"}),e.jsx("span",{children:"Dossiers & Agents"})]})}),e.jsx("button",{onClick:()=>h("creations"),className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${g==="creations"?"bg-panel-glass text-white shadow-sm":"text-texte-faible hover:text-texte hover:bg-surface-glass"}`,children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(S,{className:"w-4 h-4"}),e.jsx("span",{children:"Créations ARIA"})]})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar pr-2",children:g==="internal"?e.jsx("div",{className:"grid gap-4",children:l.length===0?e.jsx("div",{className:"text-center text-texte-faible py-12",children:"Aucun dossier interne pour le moment."}):l.map(r=>e.jsxs("div",{className:"bg-surface-glass border border-border-light rounded-xl p-5 hover:bg-panel-glass transition-colors cursor-pointer group",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsx("h3",{className:"text-white font-medium group-hover:text-[#C4A574] transition-colors",children:r.title}),e.jsx("span",{className:"text-xs bg-[rgba(196,165,116,0.20)] text-[#E8D5B5] px-2 py-1 rounded-full border border-[rgba(196,165,116,0.30)]",children:"Internal"})]}),e.jsx("p",{className:"text-sm text-texte-doux line-clamp-2",children:r.last_message||"En cours de réflexion..."}),e.jsxs("div",{className:"flex items-center space-x-4 mt-4 text-xs text-texte-faible",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(K,{className:"w-3 h-3"}),e.jsx("span",{children:new Date(r.updated_at).toLocaleDateString("fr-FR",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(Te,{className:"w-3 h-3"}),e.jsxs("span",{children:[r.message_count," messages internes"]})]})]})]},r.id))}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:d.length===0?e.jsx("div",{className:"col-span-full text-center text-texte-faible py-12",children:"Aucune création pour le moment."}):d.map(r=>e.jsxs("div",{onClick:()=>u(r),className:"bg-gradient-to-br from-white/5 to-transparent border border-border-light rounded-xl p-5 hover:border-[rgba(196,165,116,0.50)] transition-all cursor-pointer group flex flex-col",children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[e.jsx(S,{className:"w-4 h-4 text-[#C4A574]"}),e.jsx("span",{className:"text-white font-medium",children:"Widget Généré"})]}),e.jsx("div",{className:"text-sm text-texte-faible bg-black/40 rounded-lg p-3 line-clamp-3 font-mono flex-1",children:r.content}),e.jsx("div",{className:"mt-4 text-xs text-[#C4A574] opacity-0 group-hover:opacity-100 transition-opacity flex items-center",children:"Cliquer pour ouvrir en plein écran →"})]},r.id))})}),j&&e.jsx(Gt,{isOpen:!!j,onClose:()=>u(null),creation:j})]})}const Wt=({asset:c,onClassified:l})=>{const{success:b}=mt(),d=p(r=>r.qualifyAsset),f=p(r=>r.activeDossierId),m=p(r=>r.activeDossierTitle),o=typeof window<"u"&&ut()||"local",[g,h]=a.use
4State(!1),j=typeof window<"u"?M(o):[],u=(r,x,v)=>{d(c.id,r,x,v);let w="Simple Photo / Média";r==="project_asset"&&(w=`Livrable Dossier « ${v||"Projet"} »`),r==="legal_evidence"&&(w="Preuve Juridique Scellée"),r==="idea_note"&&(w="Note Personnelle"),r==="administrative"&&(w="Document Administratif"),b(`Élément classé : ${w}`),l&&l(r,x)};return e.jsxs(C.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},className:"rounded-2xl border border-[rgba(196,165,116,0.30)] bg-gradient-to-br from-[#0e1424] via-[#090d18] to-black/80 p-4 shadow-xl text-left my-2 backdrop-blur-xl",children:[e.jsx("div",{className:"flex items-start justify-between gap-3 border-b border-white/[0.08] pb-3 mb-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-white/[0.05] border border-white/10 shrink-0",children:c.mimeType.startsWith("image/")?e.jsx(Q,{className:"h-5 w-5 text-pink-300"}):e.jsx(X,{className:"h-5 w-5 text-[#E8D5B5]"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-[#C4A574]",children:"Qualification Requise"}),e.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] font-mono bg-amber-500/15 text-amber-300 border border-amber-500/30",children:"Anti-Pollution"})]}),e.jsx("h4",{className:"text-xs font-bold text-white mt-0.5 truncate max-w-[240px] sm:max-w-md",children:c.name}),e.jsxs("span",{className:"text-[10px] text-texte-faible",children:[c.sizeFormatted," · Détecté par ARIA"]})]})]})}),e.jsx("p",{className:"text-[11px] text-texte-faible leading-relaxed mb-3",children:"Pour ne pas polluer vos dossiers, indiquez à ARIA la nature exacte de cet élément :"}),g?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs text-white/80 mb-1",children:[e.jsx("span",{className:"font-bold",children:"Choisir le dossier de destination :"}),e.jsx("button",{type:"button",onClick:()=>h(!1),className:"text-[11px] text-[#C4A574] hover:underline",children:"Retour"})]}),e.jsx("div",{className:"max-h-36 overflow-y-auto space-y-1.5 custom-scrollbar pr-1",children:j.length===0?e.jsx("p",{className:"text-[11px] text-texte-faible italic p-2",children:"Aucun dossier existant."}):j.map(r=>e.jsxs("button",{type:"button",onClick:()=>u("project_asset",r.id,r.title),className:"w-full flex items-center justify-between p-2 rounded-lg border border-white/10 bg-white/[0.03] hover:bg-[rgba(196,165,116,0.15)] text-left text-xs transition-all",children:[e.jsx("span",{className:"font-semibold text-white truncate max-w-[200px]",children:r.title}),e.jsx("span",{className:"text-[10px] text-texte-faible uppercase font-mono",children:r.category})]},r.id))})]}):e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>u("media_photo"),className:"flex items-center gap-2 p-2.5 rounded-xl border border-pink-400/20 bg-pink-500/[0.06] hover:bg-pink-500/[0.14] text-pink-200 text-xs font-semibold transition-all group text-left",children:[e.jsx(Q,{className:"h-4 w-4 text-pink-300 shrink-0"}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-white text-[11px] font-bold",children:"Simple Photo / Média"}),e.jsx("span",{className:"block text-[10px] text-texte-faible font-normal",children:"Isolé, ne pollue aucun dossier"})]})]}),m?e.jsxs("button",{type:"button",onClick:()=>u("project_asset",f||void 0,m),className:"flex items-center gap-2 p-2.5 rounded-xl border border-[rgba(196,165,116,0.30)] bg-[rgba(196,165,116,0.10)] hover:bg-[rgba(196,165,116,0.20)] text-[#E8D5B5] text-xs font-semibold transition-all text-left",children:[e.jsx(Y,{className:"h-4 w-4 text-[#C4A574] shrink-0"}),e.jsxs("div",{className:"truncate",children:[e.jsx("span",{className:"block text-white text-[11px] font-bold truncate",children:"Dossier en cours"}),e.jsxs("span",{className:"block text-[10px] text-[#C4A574] font-normal truncate",children:["« ",m," »"]})]})]}):e.jsxs("button",{type:"button",onClick:()=>h(!0),className:"flex items-center gap-2 p-2.5 rounded-xl border border-cyan-400/20 bg-cyan-500/[0.06] hover:bg-cyan-500/[0.14] text-cyan-200 text-xs font-semibold transition-all text-left",children:[e.jsx(Y,{className:"h-4 w-4 text-cyan-300 shrink-0"}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-white text-[11px] font-bold",children:"Rattacher à un Dossier"}),e.jsx("span",{className:"block text-[10px] text-texte-faible font-normal",children:"Sélectionner parmi vos projets"})]})]}),e.jsxs("button",{type:"button",onClick:()=>u("idea_note"),className:"flex items-center gap-2 p-2.5 rounded-xl border border-purple-400/20 bg-purple-500/[0.06] hover:bg-purple-500/[0.14] text-purple-200 text-xs font-semibold transition-all text-left",children:[e.jsx(yt,{className:"h-4 w-4 text-purple-300 shrink-0"}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-white text-[11px] font-bold",children:"Note / Idée Personnelle"}),e.jsx("span",{className:"block text-[10px] text-texte-faible font-normal",children:"Brouillon de réflexion libre"})]})]}),e.jsxs("button",{type:"button",onClick:()=>u("legal_evidence"),className:"flex items-center gap-2 p-2.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.07] hover:bg-amber-500/[0.15] text-amber-200 text-xs font-semibold transition-all text-left",children:[e.jsx(Z,{className:"h-4 w-4 text-amber-300 shrink-0"}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-white text-[11px] font-bold",children:"Preuve Juridique Scellée"}),e.jsx("span",{className:"block text-[10px] text-texte-faible font-normal",children:"Certifier sous scellé SHA-256"})]})]})]})]})};function ls(){const c=a.useRef(null),l=typeof localStorage<"u"&&localStorage.getItem("aria_uid")||"local",b=k.useMemo(()=>pt(l,"dossiers_view"),[l]),[d,f]=a.useState(()=>
4b?.dossiers||[]),[m,o]=a.useState(()=>b?.threads||[]),[g,h]=a.useState(()=>!b),[j,u]=a.useState("all"),[r,x]=a.useState("dossiers"),v=p(t=>t.assets),w=p(t=>t.registerAsset),Ee=p(t=>t.activeDossierId);p(t=>t.activeDossierTitle);const ee=p(t=>t.setActiveDossier),Re=p(t=>t.autoMode),Pe=p(t=>t.setAutoMode),te=p(t=>t.legalDetection),se=p(t=>t.setLegalDetection),re=p(t=>t.dormantThresholdDays);p(t=>t.setDormantThresholdDays);const A=k.useMemo(()=>v.filter(t=>t.status==="unclassified"||t.needsUserConfirmation),[v]),D=k.useMemo(()=>r==="temporal"?at():{dormantDossiers:[]},[r]),_=k.useRef(null),[Ot,Kt]=a.useState("all"),[Ie,qe]=a.useState(null),[F,Le]=a.useState(""),[$,Me]=a.useState("desc"),[ae,Fe]=a.useState({}),[N,B]=a.useState(()=>q(l)),[T,ie]=a.useState(()=>M(l)),[z,le]=a.useState("pieces"),[U,$e]=a.useState("all"),[V,Be]=a.useState(""),[ze,ne]=a.useState(null),[Ue,E]=a.useState(!1),[R,oe]=a.useState(""),[ce,de]=a.useState(""),[xe,Ve]=a.useState("litige"),[me,H]=a.useState([]),P=k.useRef(null);a.useEffect(()=>{const t=()=>{B(q(l))},s=()=>{ie(M(l))};return window.addEventListener("aria:legal-piece-added",t),window.addEventListener("aria:legal-case-updated",s),()=>{window.removeEventListener("aria:legal-piece-added",t),window.removeEventListener("aria:legal-case-updated",s)}},[l]);const He=async t=>{const s=Array.from(t.target.files||[]);if(s.length!==0){for(const i of s)try{await w(i)}catch(n){console.error("Erreur import universel:",n)}_.current&&(_.current.value="")}},Ge=async t=>{const s=Array.from(t.target.files||[]);if(s.length!==0){for(const i of s)try{const n=await lt(i);nt(l,n)}catch(n){console.error("Erreur scellement direct:",n)}B(q(l)),P.current&&(P.current.value="")}},Je=t=>{navigator.clipboard.writeText(t).catch(()=>{}),ne(t),setTimeout(()=>ne(null),2e3)},We=t=>{ot(l,t),B(q(l))},Oe=t=>{const s=t.pieces&&t.pieces.length>0?t.pieces:N.slice(0,5),i=ke({caseTitle:t.title,caseRef:t.id,category:t.category,description:t.description,pieces:s});ye(async()=>{const{useChatWorkspaceStore:n}=await import("./index-BfFoir-D.js").then(y=>y.eC);return{useChatWorkspaceStore:n}},__vite__mapDeps([0,1,2,3,4,5,6])).then(({useChatWorkspaceStore:n})=>{n.getState().pushArtifact({id:`dossier_juridique_${Date.now()}`,title:`Dossier Juridique : ${t.title}`,kind:"document",content:i})})},Ke=()=>{const t=ke({caseTitle:"Bordereau Chronologique Général des Pièces Scellées",caseRef:`bordereau_general_${Date.now()}`,category:"Bordereau d'Administration de la Preuve (eIDAS / Art. 1366)",description:"Inventaire chronologique complet de l'ensemble des fichiers, médias, enregistrements et documents remis sous scellés électroniques inviolables.",pieces:N});ye(async()=>{const{useChatWorkspaceStore:s}=await import("./index-BfFoir-D.js").then(i=>i.eC);return{useChatWorkspaceStore:s}},__vite__mapDeps([0,1,2,3,4,5,6])).then(({useChatWorkspaceStore:s})=>{s.getState().pushArtifact({id:`bordereau_general_${Date.now()}`,title:"Bordereau Général des Pièces (SHA-256)",kind:"document",content:t})})},Qe=()=>{if(!R.trim())return;const t=N.filter(i=>me.includes(i.id)),s={id:`case_${Date.now().toString(36)}`,title:R.trim(),description:ce.trim()||"Dossier d'analyse juridique constitué sous égide ARIA.",category:xe,createdAt:new Date().toISOString(),status:"actif",pieces:t};ct(l,s),ie(M(l)),E(!1),oe(""),de(""),H([])},[Xe,G]=a.useState(!1),[J,ue]=a.useState(""),[pe,Ye]=a.useState("general"),[W,he]=a.useState(""),[Ze,be]=a.useState(!1),[fe,ge]=a.useState(""),I=async()=>{d.length===0&&h(!0);try{const[t,s]=await Promise.all([L.list(!0),ft.list(10)]),i=Array.isArray(t?.dossiers)?t.dossiers:[],n=Array.isArray(s?.threads)?s.threads:m;f(i),o(n),gt(l,"dossiers_view",{dossiers:i,threads:n})}catch(t){console.warn("[DossiersWorkspaceView] Backend offline/vide:",t),d.length===0&&f([])}finally{h(!1)}};a.useEffect(()=>{I()},[]);const et=async t=>{if(t.preventDefault(),!!J.trim())try{(await L.create({content:J,category:pe,status:"open",initial_event:"Création manuelle du dossier"}))?.status==="success"&&(ue(""),G(!1),await I())}catch(s){console.error("[Dossiers] Erreur création:",s)}},je=async t=>{if(W.trim())try{await L.addMilestone({dossier_id_or_match:t,event_text:W}),he(""),await I()}catch(s){console.error("[Dossiers] Erreur jalon:",s)}},ve=async(t,s)=>{try{await L.updateStatus({dossier_id_or_match:t,status:s}),await I()}catch(i){console.error("[Dossiers] Erreur statut:",i)}},tt=async()=>{be(!0);try{const t=await jt.generateReport({title:"Bilan de Situation ARIA",include_dossiers:!0,include_patterns:!0,format:"markdown"});t?.report&&(await navigator.clipboard.writeText(t.report),ge("Rapport copié dans le presse-papier !"),setTimeout(()=>ge(""),3e3))}catch(t){console.error("[Export] Erreur rapport:",t)}finally{be(!1)}},we=k.useMemo(()=>{const t=F.trim().toLowerCase();return d.filter(i=>!(j!=="all"&&i.status!==j||t&&!`${i.content||""} ${i.category||""}`.toLowerCase().includes(t))).sort((i,n)=>{const y=new Date(i.updated_at||i.created_at||0).getTime(),Ne=new Date(n.updated_at||n.created_at||0).getTime();return $==="desc"?Ne-y:y-Ne})},[d,j,F,$]),st=t=>{switch(t){case"open":return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-[rgba(196,165,116,0.10)] px-2 py-0.5 text-[11px] font-medium text-[#C4A574] border border-[rgba(196,165,116,0.20)]",children:[e.jsx(S,{className:"h-3 w-3"})," En cours"]});
4case"pending":return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[11px] font-medium text-amber-300 border border-amber-500/20",children:[e.jsx(K,{className:"h-3 w-3"})," En attente"]});case"archived":return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-[rgba(196,165,116,0.10)] px-2 py-0.5 text-[11px] font-medium text-[#E8D5B5] border border-[rgba(196,165,116,0.20)]",children:[e.jsx(Bt,{className:"h-3 w-3"})," Archivé"]});default:return null}};return e.jsxs("div",{className:"flex h-full flex-col overflow-hidden bg-[#07090f] text-texte p-3",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border-light pb-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-[rgba(196,165,116,0.10)] text-[#C4A574] border border-[rgba(196,165,116,0.20)]",children:e.jsx(kt,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-semibold tracking-wide text-white",children:"Dossiers & Frise ARIA"}),e.jsxs("p",{className:"text-[11px] text-texte-faible",children:[d.length," dossiers identifiés"]})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("button",{type:"button",onClick:tt,disabled:Ze,className:"flex items-center gap-1 rounded-lg border border-border-light bg-surface-glass px-2.5 py-1.5 text-[11px] font-medium text-texte hover:bg-panel-glass transition-colors",title:"Générer un rapport de synthèse complet",children:[e.jsx(Ae,{className:"h-3 w-3 text-[#C4A574]"}),e.jsx("span",{children:"Synthèse"})]}),e.jsxs("button",{type:"button",onClick:()=>G(!0),className:"flex items-center gap-1 rounded-lg bg-[rgba(196,165,116,0.20)] border border-[rgba(196,165,116,0.30)] px-2.5 py-1.5 text-[11px] font-medium text-[#E8D5B5] hover:bg-[rgba(196,165,116,0.30)] transition-colors",children:[e.jsx(Se,{className:"h-3 w-3"}),e.jsx("span",{children:"Nouveau"})]})]})]}),fe&&e.jsx("div",{className:"mb-2 rounded-lg bg-emerald-500/10 border border-emerald-500/20 px-3 py-1.5 text-[11px] text-emerald-400 animate-fade-in",children:fe}),e.jsxs("div",{className:"flex w-full mb-3 rounded-xl bg-surface-pose p-1 border border-border overflow-x-auto custom-scrollbar",children:[e.jsx("button",{onClick:()=>x("dossiers"),className:`flex-1 min-w-[85px] rounded-lg py-1.5 px-2 text-xs font-semibold transition-all shrink-0 ${r==="dossiers"?"bg-[rgba(196,165,116,0.20)] text-[#E8D5B5] shadow-sm border border-[rgba(196,165,116,0.30)]":"text-texte-faible hover:text-texte-doux"}`,children:"📁 Dossiers"}),e.jsxs("button",{onClick:()=>x("triage"),className:`flex-1 min-w-[110px] rounded-lg py-1.5 px-2 text-xs font-semibold transition-all shrink-0 flex items-center justify-center gap-1.5 ${r==="triage"?"bg-cyan-500/20 text-cyan-300 shadow-sm border border-cyan-400/30":"text-texte-faible hover:text-texte-doux"}`,children:[e.jsx("span",{children:"📥 À Classifier"}),A.length>0&&e.jsx("span",{className:"px-1.5 py-0.2 rounded-full text-[9px] font-bold bg-amber-500 text-black",children:A.length})]}),e.jsx("button",{onClick:()=>x("juridique"),className:`flex-1 min-w-[95px] rounded-lg py-1.5 px-2 text-xs font-semibold transition-all shrink-0 ${r==="juridique"?"bg-amber-500/20 text-amber-300 shadow-sm border border-amber-500/30":"text-texte-faible hover:text-texte-doux"}`,children:"⚖️ Juridique"}),e.jsxs("button",{onClick:()=>x("temporal"),className:`flex-1 min-w-[110px] rounded-lg py-1.5 px-2 text-xs font-semibold transition-all shrink-0 flex items-center justify-center gap-1.5 ${r==="temporal"?"bg-purple-500/20 text-purple-300 shadow-sm border border-purple-400/30":"text-texte-faible hover:text-texte-doux"}`,children:[e.jsx("span",{children:"⏳ Suivi (> 1 mois)"}),D.dormantDossiers.length>0&&e.jsx("span",{className:"px-1.5 py-0.2 rounded-full text-[9px] font-bold bg-purple-500/30 text-purple-200 border border-purple-400/40",children:D.dormantDossiers.length})]}),e.jsx("button",{onClick:()=>x("settings"),className:`flex-1 min-w-[100px] rounded-lg py-1.5 px-2 text-xs font-semibold transition-all shrink-0 ${r==="settings"?"bg-[rgba(196,165,116,0.20)] text-[#E8D5B5] shadow-sm border border-[rgba(196,165,116,0.30)]":"text-texte-faible hover:text-texte-doux"}`,children:"⚙️ Paramètres IA"}),e.jsx("button",{onClick:()=>x("mirror"),className:`flex-1 min-w-[75px] rounded-lg py-1.5 px-2 text-xs font-semibold transition-all shrink-0 ${r==="mirror"?"bg-white/10 text-white shadow-sm border border-white/20":"text-texte-faible hover:text-texte-doux"}`,children:"Miroir"}),e.jsx("button",{onClick:()=>x("aria_backoffice"),className:`flex-1 min-w-[85px] rounded-lg py-1.5 px-2 text-xs font-semibold transition-all shrink-0 ${r==="aria_backoffice"?"bg-blue-500/20 text-blue-300 shadow-sm border border-blue-500/30":"text-texte-faible hover:text-texte-doux"}`,children:"Backoffice"})]}),r==="mirror"?e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(Ht,{})}):r==="aria_backoffice"?e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(Jt,{})}):r==="triage"?e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto space-y-4 custom-scrollbar pr-1 text-left",children:[e.jsx("input",{ref:_,type:"file",multiple:!0,onChange:He,className:"hidden"}),e.jsxs("div",{className:"p-4 rounded-2xl border border-cyan-400/25 bg-gradient-to-br from-cyan-500/[0.08] via-black/40 to-transparent flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"p-1.5 rounded-lg bg-cyan-500/20 text-cyan-300 border border-cyan-400/30",children:e.jsx(Ct,{className:"h-4 w-4"})}),e.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-cyan-200",children:"File de Qualification & Anti-Pollution"})]}),e.jsx("p",{className:"text-[11px] text-texte-faible mt-1 max-w-xl leading-relaxed",children:"Toutes les pièces, images et notes en attente d'arbitrage. Choisissez en 1 clic s'il s'agit d'une simple photo/note ou d'un élément d'un dossier."})]}),e.jsxs("button",{type:"button",onClick:()=>_.current?.click(),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-cyan-500/20 hover:bg-cyan-500/30 border border-cyan-400/30 text-cyan-200 text-xs font-bold transition shrink-0",children:[e.jsx(De,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Ajouter un fichier ou photo"})]})]}),A.length>0?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-wider text-amber-300",children:["⚠️ ",A.length," élément(s) à qualifier avant intégration"]}),e.jsx("div",{className:"space-y-2",children:A.map(t=>e.jsx(Wt,{asset:t},t.id))})]}):e.jsxs("div",{className:"rounded-2xl border border-dashed border-emerald-500/30 bg-emerald-500/[0.03] p-6 text-center",children:[e.jsx(At,{className:"h-7 w-7 text-emerald-400 mx-auto mb-2"}),e.jsx("h5",{className:"text-xs font-bold text-white",children:"Aucun élément en attente de tri"}),e.jsx("p",{className:"text-[11px] text-texte-faible mt-1 max-w-md mx-auto leading-relaxed",children:"Tous vos fichiers et photos sont soit classés dans vos dossiers, soit isolés. Aucune pollution de dossier détectée."})]}),v.length>0&&e.jsxs("div",{className:"mt-6 pt-4 border-t border-white/10 space-y-3",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("span",{className:"text-xs font-bold text-white",children:["Historique de vos éléments (",v.length,")"]})}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:v.map(t=>e.jsxs("div",{className:"p-3 rounded-xl border border-white/10 bg-white/[0.02] flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"text-xs font-bold text-white block truncate",children:t.name}),e.jsxs("span",{className:"text-[10px] text-texte-faible uppercase font-mono block mt-0.5",children:[t.domain.replace("_"," ")," · ",t.dossierTitle?`Dossier: ${t.dossierTitle}`:"Isolé"]})]}),e.jsx("span",{className:"px-2 py-0.5 rounded text-[9px] font-mono bg-white/5 text-white/60 shrink-0",children:t.sizeFormatted})]},t.id))})]})]}):r==="temporal"?e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto space-y-4 custom-scrollbar pr-1 text-left",children:[e.jsxs("div",{className:"p-4 rounded-2xl border border-purple-400/25 bg-gradient-to-br from-purple-500/[0.08] via-black/40 to-transparent flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"p-1.5 rounded-lg bg-purple-500/20 text-purple-300 border border-purple-400/30",children:e.jsx(St,{className:"h-4 w-4"})}),e.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-purple-200",children:"Conscience Temporelle & Suivi Long Terme"})]}),e.jsx("p",{className:"text-[11px] text-texte-faible mt-1 max-w-xl leading-relaxed",children:"ARIA garde la mémoire des jalons et des dossiers créés il y a plusieurs semaines ou mois. Elle fait les rapprochements naturels sans jamais couper le fil."})]}),e.jsxs("button",{type:"button",onClick:()=>{navigator.clipboard.writeText("Peux-tu me faire un point d'étape complet sur mes dossiers et projets en cours, en particulier ceux créés il y a plus d'un mois ? Fais le lien avec nos échanges récents et propose-moi les prochaines actions stratég
4iques."),ht.getState().addToast({type:"success",title:"Bilan temporel copié",message:"Prompt de bilan temporel copié dans le presse-papier !"})},className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-purple-500/20 hover:bg-purple-500/30 border border-purple-400/30 text-purple-200 text-xs font-bold transition shrink-0",children:[e.jsx(Te,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Bilan temporel ARIA"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("span",{className:"text-xs font-bold text-white flex items-center gap-1.5",children:[e.jsx(Dt,{className:"h-3.5 w-3.5 text-purple-300"}),"Dossiers Historiques & Suivi (> ",re," jours)"]}),D.dormantDossiers.length===0?e.jsxs("div",{className:"p-4 rounded-xl border border-white/5 bg-white/[0.02] text-center text-texte-faible text-xs",children:["Aucun dossier en sommeil de plus de ",re," jours. Vos dossiers sont actifs et à jour."]}):e.jsx("div",{className:"space-y-2",children:D.dormantDossiers.map(t=>e.jsxs("div",{className:"p-3 rounded-xl border border-purple-500/20 bg-purple-500/[0.04] flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"text-xs font-bold text-white",children:t.title}),e.jsxs("span",{className:"text-[10px] text-texte-faible block mt-0.5",children:["Dernier jalon : ",t.lastActivityDateStr," · ",t.itemCount," pièce(s)"]})]}),e.jsxs("span",{className:"px-2 py-1 rounded-lg text-[10px] font-bold bg-purple-500/20 text-purple-300 border border-purple-500/30 shrink-0",children:["Il y a ",t.daysSinceLastActivity," jours"]})]},t.id))})]})]}):r==="settings"?e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto space-y-4 custom-scrollbar pr-1 text-left",children:[e.jsxs("div",{className:"p-4 rounded-2xl border border-[rgba(196,165,116,0.30)] bg-gradient-to-br from-[rgba(196,165,116,0.08)] via-black/40 to-transparent",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_t,{className:"h-4 w-4 text-[#C4A574]"}),e.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-[#E8D5B5]",children:"Paramètres de Tri & Qualification Intelligente"})]}),e.jsx("p",{className:"text-[11px] text-texte-faible mt-1 leading-relaxed",children:"Définissez comment ARIA doit classifier vos documents et photos sans jamais polluer vos dossiers ni forcer un cadre juridique."})]}),e.jsxs("div",{className:"p-4 rounded-xl border border-white/10 bg-white/[0.02] space-y-2",children:[e.jsx("label",{className:"text-xs font-bold text-white block",children:"Mode d'Attribution aux Dossiers"}),e.jsx("p",{className:"text-[11px] text-texte-faible",children:"Contrôle la façon dont les nouvelles pièces sont classées :"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2 pt-1",children:[{id:"confirm_always",title:"Confirmation Requise",desc:"ARIA demande toujours validation (Recommandé)",badge:"Sécurisé"},{id:"suggest",title:"Suggestion Pré-remplie",desc:"Pré-associe avec badge à valider",badge:"Hybride"},{id:"autonomous",title:"Autonome > 90%",desc:"Associe directement si certitude maximale",badge:"Rapide"}].map(t=>e.jsxs("button",{type:"button",onClick:()=>Pe(t.id),className:`p-3 rounded-xl border text-left transition-all ${Re===t.id?"border-[rgba(196,165,116,0.50)] bg-[rgba(196,165,116,0.15)] text-white":"border-white/10 bg-white/[0.02] text-texte-faible hover:text-white"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs font-bold",children:t.title}),e.jsx("span",{className:"text-[9px] uppercase font-mono px-1 py-0.5 rounded bg-white/10",children:t.badge})]}),e.jsx("span",{className:"text-[10px] leading-snug block opacity-80",children:t.desc})]},t.id))})]}),e.jsxs("div",{className:"p-4 rounded-xl border border-white/10 bg-white/[0.02] space-y-2",children:[e.jsx("label",{className:"text-xs font-bold text-white block",children:"Sensibilité Juridique"}),e.jsx("p",{className:"text-[11px] text-texte-faible",children:"Évite de considérer toute image ou facture comme un litige légal :"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 pt-1",children:[e.jsxs("button",{type:"button",onClick:()=>se("explicit_only"),className:`p-3 rounded-xl border text-left transition-all ${te==="explicit_only"?"border-amber-400/50 bg-amber-500/15 text-white":"border-white/10 bg-white/[0.02] text-texte-faible hover:text-white"}`,children:[e.jsx("span",{className:"text-xs font-bold block mb-1",children:"Strictement Explicite (Recommandé)"}),e.jsx("span",{className:"text-[10px] block opacity-80 leading-snug",children:"Un fichier n'est JAMAIS marqué juridique ou scellé sans ordre explicite de l'utilisateur."})]}),e.jsxs("button",{type:"button",onClick:()=>se("smart_detect"),className:`p-3 rounded-xl border text-left transition-all ${te==="smart_detect"?"border-amber-400/50 bg-amber-500/15 text-white":"border-white/10 bg-white/[0.02] text-texte-faible hover:text-white"}`,children:[e.jsx("span",{className:"text-xs font-bold block mb-1",children:"Détection Contextuelle"}),e.jsx("span",{className:"text-[10px] block opacity-80 leading-snug",children:"ARIA analyse le contenu et propose la certification s'il contient des clauses de droit."})]})]})]}),e.jsxs("div",{className:"p-4 rounded-xl border border-white/10 bg-white/[0.02] space-y-2",children:[e.jsx("label",{className:"text-xs font-bold text-white block",children:"Dossier Actif par Défaut"}),e.jsx("p",{className:"text-[11px] text-texte-faible",children:"Dossier dans lequel les livrables de session seront regroupés :"}),e.jsxs("select",{value:Ee||"",onChange:t=>{const s=t.target.value;if(!s)ee(null);else{const i=T.find(n=>n.id===s);ee(s,i?i.title:s)}},className:"w-full rounded-xl border border-white/15 bg-[#101422] p-2 text-xs text-white focus:outline-none focus:border-[rgba(196,165,116,0.40)]",children:[e.jsx("option",{value:"",children:"Aucun dossier par défaut (Toujours demander)"}),T.map(t=>e.jsxs("option",{value:t.id,children:[t.title," (",t.category,")"]},t.id))]})]})]}):r==="juridique"?e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto space-y-4 custom-scrollbar-cyan pr-1",children:[e.jsx("input",{ref:P,type:"file",multiple:!0,onChange:Ge,className:"hidden"}),e.jsxs("div",{className:"p-3.5 rounded-2xl bg-amber-500/[0.07] border border-amber-500/25 flex flex-col md:flex-row md:items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"w-4 h-4 text-amber-400"}),e.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-amber-300",children:"Sanctuaire Juridique & Scellés Numériques"})]}),e.jsxs("p",{className:"text-[11px] text-amber-200/80 mt-1 leading-relaxed",children:["Extraction automatique d'empreintes ",e.jsx("strong",{children:"SHA-256"})," et métadonnées certifiées à valeur probante (Art. 1366 Code Civil)."]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>P.current?.click(),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-amber-500/20 hover:bg-amber-500/30 border border-amber-500/40 text-amber-200 text-xs font-bold transition shadow-sm",children:[e.jsx(De,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Sceller un fichier"})]}),e.jsxs("button",{type:"button",onClick:Ke,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-[rgba(196,165,116,0.20)] hover:bg-[rgba(196,165,116,0.30)] border border-[rgba(196,165,116,0.40)] text-[#E8D5B5] text-xs font-bold transition shadow-sm",children:[e.jsx(Tt,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Bordereau Global"})]}),e.jsxs("button",{type:"button",onClick:()=>E(!0),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-white/10 hover:bg-white/15 border border-white/20 text-white text-xs font-bold transition shadow-sm",children:[e.jsx(Se,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Nouveau Dossier"})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-white/10 pb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>le("pieces"),className:`px-3 py-1.5 rounded-xl text-xs font-bold transition ${z==="pieces"?"bg-amber-500/20 text-amber-300 border border-amber-500/40":"text-texte-faible hover:text-white bg-white/[0.02]"}`,children:["📜 Pièces Scellées (",N.length,")"]}),e.jsxs("button",{type:"button",onClick:()=>le("cases"),className:`px-3 py-1.5 rounded-xl text-xs font-bold transition ${z==="cases"?"bg-amber-500/20 text-amber-300 border border-amber-500/40":"text-texte-faible hover:text-white bg-white/[0.02]"}`,children:["📁 Dossiers Thématiques (",T.length,")"]})]}),ze&&e.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono animate-pulse flex items-center gap-1",children:[e.jsx(Et,{className:"w-3 h-3"})," Empreinte SHA-256 copiée !"]})]}),z==="pieces"?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Rt,{className:"w-3.5 h-3.5 text-texte-faible absolute left-3 top-1/2 -translate-y-1/2"}),e.jsx("input",{type:"text",value:V,onChange:t=>Be(t.target.value),placeholder:"Rechercher par nom, hash ou catégorie...",className:"w-full rounded-xl border border-white/10 bg-white/[0.03] pl-9 pr-3 py-1.5 text-xs text-white placeholder-texte-faible focus:outline-none focus:border-amber-500/50"})]}),e.jsx("div",{className:"flex items-center gap-1 overflow-x-auto scrollbar-hide py-0.5",children:["all","image","video","document","audio"].map(t=>e.jsx("button",{type:"button",onClick:()=>$e(t),className:`px-2.5 py-1 rounded-lg text-[11px] font-semibold transition shrink-0 ${U===t?"bg-amber-500/20 text-amber-300 border border-amber-500/30":"text-texte-faible hover:text-white bg-white/[0.02]"}`,children:t==="all"?"Toutes":t==="image"?"🖼️ Images":t==="video"?"🎬 Vidéos":t==="document"?"📄 Documents":"🎙️ Audios"},t))})]}),e.jsx("div",{className:"space-y-2",children:N.filter(t=>{if(U!=="all"&&t.type!==U)return!1;if(V.trim()){const s=V.toLowerCase();return t.name.toLowerCase().includes(s)||t.category.toLowerCase().includes(s)||t.hashSha256.toLowerCase().includes(s)}return!0}).map(t=>{const s=t.type==="image"?Q:t.type==="video"?Pt:t.type==="audio"?It:X;return e.jsxs("div",{className:"rounded-2xl border border-white/10 bg-surface-voile p-3 space-y-2.5 hover:border-amber-500/30 transition-all shadow-sm",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex items-start gap-2.5 overflow-hidden",children:[e.jsx("div",{className:"p-2 rounded-xl bg-amber-500/10 text-amber-400 shrink-0 mt-0.5",children:e.jsx(s,{className:"w-4 h-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h5",{className:"text-xs font-bold text-white truncate",children:t.name}),e.jsx("span",{className:"px-2 py-0.5 rounded-full text-[9px] font-mono bg-white/5 border border-white/10 text-texte-doux",children:t.sizeFormatted}),t.dimensions&&e.jsx("span",{className:"px-2 py-0.5 rounded-full text-[9px] font-mono bg-white/5 border border-white/10 text-[#E8D5B5]",children:t.dimensions})]}),e.jsx("p",{className:"text-[11px] text-texte-faible mt-0.5",children:t.category})]})]}),e.jsx("div",{className:"flex items-center gap-1 shrink-0",children:e.jsx("button",{type:"button",onClick:()=>We(t.id),title:"Supprimer du registre",className:"p-1.5 rounded-lg text-texte-faible hover:text-red-400 hover:bg-red-500/10 transition",children:e.jsx(qt,{className:"w-3.5 h-3.5"})})})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-1.5 p-2 rounded-xl bg-black/50 border border-white/5 font-mono text-[10px]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 overflow-hidden text-emerald-400",children:[e.jsx(Lt,{className:"w-3 h-3 shrink-0 text-emerald-400"}),e.jsx("span",{className:"shrink-0 font-semibold text-white/70",children:"SHA-256 :"}),e.jsx("span",{className:"truncate text-emerald-300 select-all",children:t.hashSha256})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("span",{className:"text-texte-faible",children:t.createdAtFormatted}),e.jsxs("button",{type:"button",onClick:()=>Je(t.hashSha256),className:"flex items-center gap-1 px-2 py-0.5 rounded bg-white/5 hover:bg-white/10 text-texte-doux hover:text-white transition",children:[e.jsx(Mt,{className:"w-3 h-3"}),e.jsx("span",{children:"Copier"})]})]})]})]},t.id)})})]}):e.jsx("div",{className:"space-y-3",children:T.map(t=>e.jsxs("div",{className:"rounded-2xl border border-white/10 bg-surface-voile p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-bold uppercase bg-amber-500/20 text-amber-300 border border-amber-500/30",children:t.id}),e.jsx("h4",{className:"text-sm font-bold text-white",children:t.title})]}),e.jsx("p",{className:"text-xs text-texte-faible mt-1",children:t.description})]}),e.jsxs("button",{type:"button",onClick:()=>Oe(t),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-amber-500/20 hover:bg-amber-500/30 border border-amber-500/35 text-xs font-bold text-amber-200 transition shrink-0",children:[e.jsx(Ae,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Compiler PDF"})]})]}),e.jsxs("div",{className:"space-y-1.5 pt-1",children:[e.jsxs("span",{className:"text-[11px] font-semibold text-white/70 block mb-1",children:["Pièces associées au dossier (",t.pieces?.length||0,") :"]}),(t.pieces||[]).map((s,i)=>e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-1 p-2 rounded-xl bg-black/40 border border-white/5 text-[11px]",children:[e.jsxs("div",{className:"flex items-center gap-2 truncate",children:[e.jsx(X,{className:"w-3.5 h-3.5 text-amber-400 shrink-0"}),e.jsx("span",{className:"font-semibold text-white truncate",children:s.name}),e.jsxs("span",{className:"text-texte-faible font-mono text-[10px]",children:["(",s.sizeFormatted||s.mimeType,")"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-texte-faible font-mono",children:[e.jsxs("span",{className:"text-emerald-400 font-semibold",children:["SHA256: ",s.hashSha256?`${s.hashSha256.slice(0,12)}...`:""]}),e.jsx("span",{children:"•"}),e.jsx("span",{children:s.createdAtFormatted})]})]},i))]})]},t.id))}),Ue&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70 backdrop-blur-md overflow-y-auto",children:e.jsxs("div",{className:"w-full max-w-lg rounded-2xl bg-[#0d1117] border border-amber-500/30 p-5 space-y-4 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"w-4 h-4 text-amber-400"}),e.jsx("h3",{className:"text-sm font-bold text-white",children:"Constituer un Dossier Juridique"})]}),e.jsx(bt,{variant:"ghost",size:"icon",type:"button",onClick:()=>E(!1),icon:e.jsx("span",{children:"✕"}),"aria-label":"Fermer"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] font-semibold text-texte-doux block mb-1",children:"Titre de l'affaire / litige"}),e.jsx("input",{type:"text",value:R,onChange:t=>oe(t.target.value),placeholder:"Ex: Dépôt brevet, Litige commercial, Preuve de signature...",className:"w-full rounded-xl border border-white/10 bg-white/[0.03] px-3 py-2 text-xs text-white placeholder-texte-faible focus:outline-none focus:border-amber-500/50"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] font-semibold text-texte-doux block mb-1",children:"Catégorie juridique"}),e.jsxs("select",{value:xe,onChange:t=>Ve(t.target.value),className:"w-full rounded-xl border border-white/10 bg-[#161b22] px-3 py-2 text-xs text-white focus:outline-none focus:border-amber-500/50",children:[e.jsx("option",{value:"litige",children:"Litige Commercial & Injonction"}),e.jsx("option",{value:"propriete_intellectuelle",children:"
4Propriété Intellectuelle & Brevets"}),e.jsx("option",{value:"contrat",children:"Exécution Contractuelle"}),e.jsx("option",{value:"rgpd_sante",children:"Données Personnelles & Santé (RGPD)"}),e.jsx("option",{value:"constat",children:"Constat Matériel & Électronique"}),e.jsx("option",{value:"general",children:"Dossier Général"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] font-semibold text-texte-doux block mb-1",children:"Exposé des faits / Résumé"}),e.jsx("textarea",{value:ce,onChange:t=>de(t.target.value),rows:3,placeholder:"Décris l'objet du dossier et les points d'appui juridiques...",className:"w-full rounded-xl border border-white/10 bg-white/[0.03] px-3 py-2 text-xs text-white placeholder-texte-faible focus:outline-none focus:border-amber-500/50"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-[11px] font-semibold text-texte-doux block mb-1",children:["Sélectionner les pièces à associer (",N.length," disponibles)"]}),e.jsx("div",{className:"max-h-32 overflow-y-auto space-y-1.5 p-2 rounded-xl bg-black/30 border border-white/5 text-xs",children:N.map(t=>{const s=me.includes(t.id);return e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer p-1 rounded hover:bg-white/5",children:[e.jsx("input",{type:"checkbox",checked:s,onChange:i=>{i.target.checked?H(n=>[...n,t.id]):H(n=>n.filter(y=>y!==t.id))},className:"rounded border-white/20 text-amber-500 focus:ring-0"}),e.jsx("span",{className:"text-white truncate font-medium",children:t.name}),e.jsxs("span",{className:"text-texte-faible font-mono text-[10px]",children:["(",t.sizeFormatted,")"]})]},t.id)})})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2 border-t border-white/10",children:[e.jsx("button",{type:"button",onClick:()=>E(!1),className:"px-3 py-1.5 rounded-xl border border-white/10 text-xs font-semibold text-texte-doux hover:text-white",children:"Annuler"}),e.jsx("button",{type:"button",onClick:Qe,disabled:!R.trim(),className:"px-4 py-1.5 rounded-xl bg-amber-500 hover:bg-amber-400 text-black text-xs font-bold transition disabled:opacity-50",children:"Créer le Dossier"})]})]})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("input",{type:"text",value:F,onChange:t=>Le(t.target.value),placeholder:"Filtrer les dossiers par mot-clé...",className:"flex-1 rounded-xl border border-white/10 bg-white/[0.03] px-3 py-1.5 text-xs text-white placeholder-texte-faible focus:outline-none focus:border-[rgba(196,165,116,0.40)]"}),e.jsx("button",{type:"button",onClick:()=>Me(t=>t==="desc"?"asc":"desc"),className:"px-2.5 py-1.5 rounded-xl border border-white/10 bg-white/[0.03] text-[11px] font-semibold text-texte-faible hover:text-white",children:$==="desc"?"Plus récents":"Plus anciens"})]}),e.jsx("div",{className:"flex items-center gap-1 mb-3 bg-surface-pose p-1 rounded-xl border border-border",children:["all","open","pending","archived"].map(t=>e.jsx("button",{type:"button",onClick:()=>u(t),className:`flex-1 rounded-lg py-1 text-[11px] font-medium transition-all ${j===t?"bg-[rgba(196,165,116,0.20)] text-[#E8D5B5] shadow-sm border border-[rgba(196,165,116,0.30)]":"text-texte-faible hover:text-texte"}`,children:t==="all"?"Tous":t==="open"?"En cours":t==="pending"?"Attente":"Archivés"},t))}),e.jsxs("div",{ref:c,className:"min-h-0 flex-1 overflow-auto space-y-2.5 custom-scrollbar-cyan pr-1",children:[g?e.jsxs("div",{className:"flex h-32 items-center justify-center text-sm text-texte-faible",children:[e.jsx(Ft,{className:"h-4 w-4 animate-spin mr-2"})," Chargement des dossiers..."]}):we.length===0?e.jsxs("div",{className:"flex h-32 flex-col items-center justify-center rounded-xl border border-dashed border-border-light p-4 text-center",children:[e.jsx(Y,{className:"h-6 w-6 text-texte-efface mb-1"}),e.jsx("p",{className:"text-xs text-texte-faible",children:"Aucun dossier dans cette catégorie"})]}):e.jsx(it,{items:we,scrollRef:c,getKey:t=>t.id,estimateSize:160,overscan:6,virtualizeAbove:30,renderItem:t=>e.jsxs(C.div,{layout:!0,className:"rounded-xl border border-border-light bg-surface-voile hover:bg-surface-pose p-3 transition-colors mb-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[st(t.status),e.jsx("span",{className:"text-[10px] uppercase font-bold tracking-wider text-texte-efface",children:t.category||"Général"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[t.status!=="open"&&e.jsx("button",{type:"button",onClick:()=>ve(t.id,"open"),className:"rounded p-1 text-[10px] text-[#C4A574] hover:bg-[rgba(196,165,116,0.10)]",title:"Rouvrir",children:"Ouvrir"}),t.status!=="archived"&&e.jsx("button",{type:"button",onClick:()=>ve(t.id,"archived"),className:"rounded p-1 text-[10px] text-[#C4A574] hover:bg-[rgba(196,165,116,0.10)]",title:"Archiver",children:"Archiver"})]})]}),e.jsx("p",{className:"text-xs text-texte font-medium leading-relaxed mb-2",children:t.content}),t.milestones&&t.milestones.length>0&&e.jsxs("div",{className:"space-y-1 border-t border-border pt-2 mb-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-[10px] font-semibold text-texte-faible uppercase",children:["Jalons & Événements (",t.milestones.length,")"]}),t.milestones.length>4&&e.jsx("button",{type:"button",onClick:()=>Fe(s=>({...s,[t.id]:!s[t.id]})),className:"text-[10px] font-semibold text-[#C4A574] hover:underline",children:ae[t.id]?"Réduire":`Voir tout (${t.milestones.length})`})]}),(ae[t.id]?t.milestones:t.milestones.slice(-4)).map((s,i)=>e.jsxs("div",{className:"flex items-start gap-1.5 text-[11px] text-texte-doux",children:[e.jsx($t,{className:"h-3 w-3 text-[#C4A574] 
4shrink-0 mt-0.5"}),e.jsx("span",{children:s.event})]},i))]}),e.jsxs("div",{className:"flex items-center gap-1.5 pt-1 border-t border-white/[0.04]",children:[e.jsx("input",{type:"text",placeholder:"Ajouter une étape marquante...",value:Ie?.id===t.id?W:"",onFocus:()=>qe(t),onChange:s=>he(s.target.value),onKeyDown:s=>{s.key==="Enter"&&je(t.id)},className:"flex-1 bg-black/40 border border-border-light rounded-lg px-2 py-1 text-[11px] text-white placeholder-white/30 focus:border-[rgba(196,165,116,0.50)] focus:outline-none"}),e.jsx("button",{type:"button",onClick:()=>je(t.id),className:"rounded-lg bg-panel-glass px-2 py-1 text-[11px] font-medium text-texte hover:bg-white/15",children:"Ajouter"})]})]},t.id)}),m.length>0&&e.jsxs("div",{className:"mt-4 pt-3 border-t border-border-light",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(S,{className:"h-3.5 w-3.5 text-amber-400"}),e.jsx("h3",{className:"text-xs font-semibold text-texte-doux",children:"Fils Pendants & Intentions"})]}),e.jsx("div",{className:"space-y-1.5",children:m.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-amber-500/[0.04] border border-amber-500/10 p-2 text-[11px]",children:[e.jsx("span",{className:"text-texte truncate",children:t.intention}),e.jsx("span",{className:"text-[10px] text-amber-400/70 shrink-0 ml-2",children:"À suivre"})]},t.id))})]})]})]}),e.jsx(rt,{children:Xe&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:e.jsxs(C.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"w-full max-w-sm rounded-2xl border border-border-light bg-[#0d111a] p-4 shadow-2xl max-h-[90dvh] overflow-y-auto custom-scrollbar",children:[e.jsx("h3",{className:"text-sm font-semibold text-white mb-2",children:"Nouveau Dossier ARIA"}),e.jsxs("form",{onSubmit:et,className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] text-texte-doux mb-1",children:"Description / Sujet clé"}),e.jsx("textarea",{rows:3,value:J,onChange:t=>ue(t.target.value),placeholder:"Ex: Refonte du site web client, Suivi du bail commercial...",className:"w-full bg-black/40 border border-border-light rounded-xl p-2 text-xs text-white focus:border-[rgba(196,165,116,0.50)] focus:outline-none",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] text-texte-doux mb-1",children:"Catégorie"}),e.jsxs("select",{value:pe,onChange:t=>Ye(t.target.value),className:"w-full bg-black/40 border border-border-light rounded-xl p-2 text-xs text-white focus:border-[rgba(196,165,116,0.50)] focus:outline-none",children:[e.jsx("option",{value:"general",children:"Général"}),e.jsx("option",{value:"business",children:"Projet / Business"}),e.jsx("option",{value:"admin",children:"Administratif / Juridique"}),e.jsx("option",{value:"finance",children:"Finance / Achats"}),e.jsx("option",{value:"health",children:"Santé & Bien-être"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>G(!1),className:"rounded-xl px-3 py-1.5 text-xs text-texte-doux hover:text-white",children:"Annuler"}),e.jsx("button",{type:"submit",className:"rounded-xl bg-[rgba(196,165,116,0.20)] border border-[rgba(196,165,116,0.30)] px-3 py-1.5 text-xs font-semibold text-[#E8D5B5] hover:bg-[rgba(196,165,116,0.30)]",children:"Créer le dossier"})]})]})]})})})]})}export{ls 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.