(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{7:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});var o=r(4208);function n({title:e,description:t}){return(0,o.jsxs)("header",{className:"mb-6",children:[(0,o.jsx)("h2",{className:"text-lg font-medium text-foreground",children:e}),t?(0,o.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:t}):null]})}},2259:(e,t,r)=>{"use strict";r.d(t,{y:()=>x});var o=r(4208),n=r(91356),a=r(86466),s=r(93497),d=r(12551),i=r(89032),l=r(83984),c=r(97150),u=r(58113),m=r(55883);function x({avatarUrl:e,displayName:t,email:r,onChange:g,variant:b="panel",className:p}){let f=(0,n.useRef)(null),h="page"===b;async function v(e){let t=e.target.files?.[0];if(e.target.value="",t)try{let e=await (0,c.yj)(t);g(e)}catch(e){i.oR.error(e instanceof Error?e.message:"Impossible d'ajouter la photo.")}}let w=!!e||!!t;return(0,o.jsxs)("div",{className:(0,u.cn)("relative flex flex-col items-center",p),children:[(0,o.jsxs)("button",{type:"button",onClick:function(){f.current?.click()},className:"group relative rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40","aria-label":e?"Changer la photo":"Ajouter une photo",children:[w?(0,o.jsx)(l.q,{avatarUrl:e,name:t,email:r,size:h?"2xl":"lg"}):h?(0,o.jsx)("div",{className:m.js,children:(0,o.jsx)(a.A,{className:"h-12 w-12"})}):(0,o.jsx)("div",{className:m.Au,children:(0,o.jsx)(a.A,{className:"h-8 w-8"})}),(0,o.jsx)("div",{className:m.PP,children:(0,o.jsx)(s.A,{className:"h-4 w-4"})}),e?(0,o.jsx)("span",{role:"button",tabIndex:0,onClick:function(e){e.stopPropagation(),g(void 0)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),g(void 0))},className:"absolute -right-1 -top-1 flex size-6 items-center justify-center rounded-full border border-border bg-background text-muted-foreground opacity-0 shadow-sm transition-opacity group-hover:opacity-100 hover:text-foreground","aria-label":"Supprimer la photo",children:(0,o.jsx)(d.A,{className:"h-3.5 w-3.5"})}):null]}),(0,o.jsx)("input",{ref:f,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",className:"hidden",onChange:v})]})}},6078:(e,t,r)=>{"use strict";r.d(t,{v:()=>s});var o=r(4208),n=r(61554),a=r(18747);function s({isFetching:e,isError:t,onRetry:r}){let{ready:n,authenticated:i}=(0,a.v)();return!n||e?null:i?t?(0,o.jsx)(d,{onRetry:r}):null:(0,o.jsx)("p",{className:"mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900/40 dark:bg-amber-950/30 dark:text-amber-200",children:"Connectez-vous pour synchroniser avec le serveur. Les r\xe9glages locaux restent disponibles hors ligne."})}function d({onRetry:e}){return(0,o.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:[(0,o.jsx)("span",{children:"\xc9chec de synchronisation avec le serveur."}),e?(0,o.jsx)(n.$,{type:"button",variant:"outline",size:"sm",className:"h-7",onClick:e,children:"R\xe9essayer"}):null]})}},30273:(e,t,r)=>{"use strict";r.d(t,{Su:()=>s,_w:()=>i,ax:()=>d,pi:()=>a,wQ:()=>n});var o=r(58113);let n="h-8 w-8 shrink-0 object-contain object-center select-none",a="flex shrink-0 items-center gap-2.5",s=(0,o.cn)("font-[Helvetica_Neue,Helvetica,Arial,sans-serif]","shrink-0 text-[1.375rem] font-semibold leading-normal tracking-tight","text-mail-text dark:text-mail-text-strong"),d="text-muted-foreground hover:bg-accent hover:text-accent-foreground",i=(0,o.cn)("border border-border bg-[var(--suite-surface-elevated)] text-foreground shadow-xl")},40505:(e,t,r)=>{"use strict";r.d(t,{Y7:()=>i,Yc:()=>l,tR:()=>s,yT:()=>c,zT:()=>d});var o=r(98306),n=r(17745),a=r(94927);function s(e){let t="number"==typeof e&&Number.isFinite(e)?e:0;return new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2,maximumFractionDigits:4}).format(t/1e6)}function d(e){let t=e.cost_limit_month_micro_eur;return!t||t<=0?null:Math.min(100,Math.round(e.cost_used_month_micro_eur/t*100))}function i(){return(0,o.I)({queryKey:["ai","config"],queryFn:()=>a.uE.get("/ai/config"),staleTime:6e4})}function l(e=!0){return(0,o.I)({queryKey:["ai","quota"],queryFn:()=>a.uE.get("/ai/quota"),enabled:e,staleTime:3e4})}function c(){return(0,n.n)({mutationFn:e=>a.uE.post("/ai/sessions",{app:e.app,temporary:e.temporary??!0,message_id:e.messageId,account_id:e.accountId,drive_path:e.drivePath,file_id:e.fileId,contact_id:e.contactId,subject:e.subject,snippet:e.snippet})})}},44410:(e,t,r)=>{"use strict";r.d(t,{$i:()=>m,$p:()=>E,AO:()=>c,Az:()=>p,Bh:()=>U,Cc:()=>v,DO:()=>V,E1:()=>y,E7:()=>F,Fr:()=>q,G7:()=>G,HU:()=>X,I8:()=>A,IK:()=>O,KZ:()=>u,LQ:()=>I,Mz:()=>z,PG:()=>S,Q5:()=>W,QU:()=>k,R5:()=>ee,RA:()=>x,Sh:()=>d,TN:()=>Z,Un:()=>i,Ww:()=>Q,Yh:()=>H,Yj:()=>b,a9:()=>g,c7:()=>h,d9:()=>er,gS:()=>s,h6:()=>_,hf:()=>P,hn:()=>B,hz:()=>n,i1:()=>N,il:()=>w,j7:()=>T,l9:()=>l,lK:()=>R,lQ:()=>L,l_:()=>f,nr:()=>a,pK:()=>D,sF:()=>J,th:()=>C,tv:()=>en,uU:()=>j,wC:()=>et,wJ:()=>M,wf:()=>Y,wo:()=>eo,yv:()=>K});var o=r(58113);let n=(0,o.cn)("min-w-[220px] rounded-lg border border-border bg-popover p-0 py-1 text-popover-foreground shadow-lg","[&_[data-slot=dropdown-menu-item]]:gap-3 [&_[data-slot=dropdown-menu-item]]:rounded-none","[&_[data-slot=dropdown-menu-item]]:px-3 [&_[data-slot=dropdown-menu-item]]:py-2 [&_[data-slot=dropdown-menu-item]]:text-sm","[&_[data-slot=dropdown-menu-item]]:focus:bg-accent [&_[data-slot=dropdown-menu-item]]:focus:text-accent-foreground","[&_[data-slot=dropdown-menu-sub-trigger]]:gap-3 [&_[data-slot=dropdown-menu-sub-trigger]]:rounded-none","[&_[data-slot=dropdown-menu-sub-trigger]]:px-3 [&_[data-slot=dropdown-menu-sub-trigger]]:py-2","[&_[data-slot=dropdown-menu-sub-trigger]]:text-sm","[&_[data-slot=dropdown-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=dropdown-menu-sub-trigger]]:data-[state=open]:bg-accent","[&_[data-slot=dropdown-menu-sub-content]]:min-w-[200px]","[&_[data-slot=dropdown-menu-sub-content]]:rounded-lg","[&_[data-slot=dropdown-menu-sub-content]]:border [&_[data-slot=dropdown-menu-sub-content]]:border-border","[&_[data-slot=dropdown-menu-sub-content]]:bg-popover","[&_[data-slot=dropdown-menu-sub-content]]:p-0 [&_[data-slot=dropdown-menu-sub-content]]:py-1","[&_[data-slot=dropdown-menu-sub-content]]:shadow-lg","[&_[data-slot=dropdown-menu-separator]]:mx-0 [&_[data-slot=dropdown-menu-separator]]:my-1","[&_[data-slot=dropdown-menu-separator]]:bg-border","[&_[data-slot=context-menu-item]]:focus:bg-accent [&_[data-slot=context-menu-item]]:focus:text-accent-foreground","[&_[data-slot=context-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=context-menu-sub-content]]:border-border [&_[data-slot=context-menu-sub-content]]:bg-popover"),a=(0,o.cn)(n,"min-w-[280px]"),s=(0,o.cn)("min-w-[240px] border-border bg-popover p-0 py-1.5 text-popover-foreground shadow-md","[&_[data-slot=dropdown-menu-label]]:text-muted-foreground","[&_[data-slot=dropdown-menu-item]]:text-popover-foreground","[&_[data-slot=dropdown-menu-item]]:focus:bg-accent [&_[data-slot=dropdown-menu-item]]:focus:text-accent-foreground","[&_[data-slot=dropdown-menu-sub-trigger]]:text-popover-foreground","[&_[data-slot=dropdown-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=dropdown-menu-sub-trigger]]:data-[state=open]:bg-accent","[&_[data-slot=context-menu-label]]:text-muted-foreground","[&_[data-slot=context-menu-item]]:text-popover-foreground","[&_[data-slot=context-menu-item]]:focus:bg-accent [&_[data-slot=context-menu-item]]:focus:text-accent-foreground","[&_[data-slot=context-menu-sub-trigger]]:text-popover-foreground","[&_[data-slot=context-menu-sub-trigger]]:focus:bg-accent","[&_[data-slot=context-menu-sub-trigger]]:data-[state=open]:bg-accent"),d=(0,o.cn)("mx-1 flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm text-popover-foreground","focus:bg-accent focus:text-accent-foreground"),i=(0,o.cn)("mx-1 cursor-pointer rounded-sm px-2 py-2 text-popover-foreground","focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent"),l=(0,o.cn)("mx-1 cursor-pointer px-3 py-2 text-sm text-popover-foreground focus:bg-accent focus:text-accent-foreground"),c="my-1.5 bg-border",u="border-border bg-mail-surface ring-offset-background hover:ring-muted-foreground focus-visible:ring-ring",m=(0,o.cn)("min-w-[180px] border-border bg-popover p-2 text-popover-foreground shadow-md"),x="text-muted-foreground hover:bg-accent hover:text-accent-foreground";(0,o.cn)("border border-border bg-mail-surface-elevated text-foreground shadow-xl"),(0,o.cn)("h-9 w-9 shrink-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground");let g="dark:!text-white",b="min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-y-contain [scrollbar-gutter:stable] outline-none max-sm:pb-16 [scrollbar-color:color-mix(in_srgb,var(--muted-foreground)_55%,transparent)_transparent] [scrollbar-width:auto] [&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/45",p="bg-gradient-to-b from-transparent via-mail-surface/90 to-mail-surface pt-3",f=(0,o.cn)("inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-full border border-border","bg-mail-surface px-6 py-2.5 text-sm font-medium text-foreground shadow-sm","transition-shadow hover:bg-accent hover:shadow-md"),h=(0,o.cn)("mx-6 mb-4 rounded-xl border border-border bg-mail-invitation px-4 py-3 shadow-sm"),v="hover:bg-accent/60",w=(0,o.cn)("flex h-10 shrink-0 cursor-pointer items-center rounded-t-lg bg-muted px-3","dark:bg-[#2d2e30]"),j=(0,o.cn)("border-border bg-popover p-3 text-popover-foreground shadow-lg"),y="bg-accent text-accent-foreground",k=(0,o.cn)("flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground disabled:opacity-40"),_="bg-accent text-foreground",N="mx-0.5 h-5 w-px bg-border",z=(0,o.cn)("flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground"),S="bg-accent text-foreground",M=(0,o.cn)("inline-flex h-9 items-center bg-primary text-primary-foreground","hover:bg-primary/90 hover:shadow-md transition-all"),I="ml-3 border-b border-border",A="bg-primary/10",C="hover:bg-accent",P=(0,o.cn)("inline-flex items-center gap-1 rounded-full bg-muted py-0.5 pl-0.5 pr-2 text-sm text-foreground","hover:bg-accent transition-colors"),R=(0,o.cn)("absolute inset-0 z-50 flex items-center justify-center rounded-lg border-2 border-dashed border-primary","bg-primary/5");(0,o.cn)("pointer-events-auto size-9 shrink-0 rounded-full border border-border","bg-mail-surface/80 text-muted-foreground shadow-md backdrop-blur","hover:bg-accent hover:text-accent-foreground");let U="border border-border bg-popover text-popover-foreground shadow-md",E="",F=(0,o.cn)("relative box-border w-full max-w-full overflow-hidden rounded-xl border border-border","bg-mail-surface text-foreground shadow-md ring-1 ring-primary/15"),$=(0,o.cn)("size-4 min-h-4 min-w-4 shrink-0 border-[1.5px] border-mail-row-checkbox-border bg-transparent shadow-none","dark:bg-transparent focus-visible:ring-mail-row-checkbox-border/30","data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"),q=(0,o.cn)($,"rounded-full"),D=(0,o.cn)($,"rounded-[2.5px]"),L="divide-y divide-mail-list-divider";(0,o.cn)("relative flex min-w-0 flex-1 items-center rounded-full border border-border","bg-mail-surface-elevated shadow-sm transition-shadow focus-within:shadow-md");let O="border-mail-border",T=(0,o.cn)("border-mail-list-chip-border bg-mail-list-chip-muted text-mail-list-chip-text"),B=(0,o.cn)("rounded-md border border-solid !border-mail-border bg-mail-surface-muted text-foreground shadow-none","focus-visible:!border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","dark:!border-mail-border dark:!bg-mail-surface-muted"),G=(0,o.cn)("size-4 border-[1.5px] border-mail-row-checkbox-border bg-mail-surface-muted shadow-none","dark:bg-mail-surface-muted","data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground","data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground"),K=(0,o.cn)("bg-mail-surface-elevated/80 backdrop-blur-xl backdrop-saturate-150","supports-[backdrop-filter]:bg-mail-surface-elevated/65"),H=(0,o.cn)("absolute left-0 right-0 top-full z-50 mt-1 overflow-hidden rounded-lg border text-foreground shadow-lg",O,K),Q=(0,o.cn)("absolute left-0 top-full z-50 mt-1 max-h-[80vh] overflow-y-auto rounded-lg border",O,"bg-mail-surface-elevated text-foreground shadow-lg","data-mail-search-advanced","sm:min-w-[34rem] sm:max-w-[min(42rem,calc(100vw-5rem))]","md:min-w-[38rem]","lg:right-0 lg:min-w-0 lg:max-w-none"),Z=(0,o.cn)("z-[101] flex h-[100dvh] max-h-[100dvh] w-full flex-col gap-0 rounded-none border-0","bg-mail-surface text-foreground p-0 shadow-xl","duration-300 ease-out","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom","pb-[env(safe-area-inset-bottom)]","data-mail-mobile-search"),V=(0,o.cn)("max-sm:bg-app-canvas/80 max-sm:backdrop-blur-xl max-sm:backdrop-saturate-150 max-sm:supports-[backdrop-filter]:bg-app-canvas/65","sm:bg-transparent"),Y="mail-sidebar-blur-surface",W="mail-sidebar-overlay-panel",J=(0,o.cn)("flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground","outline-none hover:bg-accent/80 focus-visible:ring-2 focus-visible:ring-ring/50");function X(e){return(0,o.cn)("transition-colors",e.isSelected?"bg-mail-nav-selected text-mail-nav-selected font-medium":e.isOver?"bg-mail-nav-drop text-foreground":e.rowHoverHeld?"bg-mail-nav-hover text-foreground":e.hasUnread?"text-foreground hover:bg-mail-nav-hover":"text-muted-foreground hover:bg-mail-nav-hover",e.extra)}let ee="flex min-h-0 min-w-0 flex-1 flex-col px-1 pb-1 max-sm:px-0 max-sm:pb-0",et="flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl bg-mail-surface shadow-sm max-sm:rounded-none max-sm:shadow-none",er=(0,o.cn)("flex h-auto w-fit max-w-full flex-wrap gap-1.5","[&_[data-slot=tabs-trigger]]:flex-none"),eo=(0,o.cn)("mail-settings-card rounded-lg border border-mail-border bg-mail-surface shadow-sm","dark:bg-mail-surface-elevated dark:shadow-[0_1px_4px_rgba(0,0,0,0.35)]"),en=(0,o.cn)("mail-settings-masonry-section border-border px-0 py-5","lg:rounded-xl lg:border lg:border-mail-border lg:bg-mail-surface lg:px-5 lg:py-5 lg:shadow-sm","dark:lg:bg-mail-surface-elevated dark:lg:shadow-[0_1px_4px_rgba(0,0,0,0.35)]")},51618:(e,t,r)=>{"use strict";r.d(t,{A0:()=>s,BF:()=>d,Hj:()=>i,XI:()=>a,nA:()=>c,nd:()=>l});var o=r(4208);r(91356);var n=r(58113);function a({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,o.jsx)("table",{"data-slot":"table",className:(0,n.cn)("w-full caption-bottom text-sm",e),...t})})}function s({className:e,...t}){return(0,o.jsx)("thead",{"data-slot":"table-header",className:(0,n.cn)("[&_tr]:border-b",e),...t})}function d({className:e,...t}){return(0,o.jsx)("tbody",{"data-slot":"table-body",className:(0,n.cn)("[&_tr:last-child]:border-0",e),...t})}function i({className:e,...t}){return(0,o.jsx)("tr",{"data-slot":"table-row",className:(0,n.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function l({className:e,...t}){return(0,o.jsx)("th",{"data-slot":"table-head",className:(0,n.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function c({className:e,...t}){return(0,o.jsx)("td",{"data-slot":"table-cell",className:(0,n.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}},52590:(e,t,r)=>{"use strict";r.d(t,{x:()=>c});var o=r(46298),n=r(22029),a=r(91025),s=r(81893),d=r(65367),i=r(19916);let l={quickSettingsOpen:!1,themeDialogOpen:!1,density:"default",themeMode:"system",backgroundId:"none",inboxSort:"default",readingPane:"none",conversationMode:!0,infiniteScroll:!1,listPageSize:i.Lw,...d.L5},c=(0,o.v)()((0,n.Zr)(e=>({...l,setQuickSettingsOpen:t=>e({quickSettingsOpen:t}),setThemeDialogOpen:t=>e({themeDialogOpen:t}),setDensity:t=>e({density:t}),setThemeMode:t=>e({themeMode:t}),setBackgroundId:t=>e({backgroundId:t}),setInboxSort:t=>e({inboxSort:t}),setReadingPane:t=>e({readingPane:t}),setConversationMode:t=>e({conversationMode:t}),setInfiniteScroll:t=>e({infiniteScroll:t}),setListPageSize:t=>e({listPageSize:t}),setDesktopNewMail:t=>e({desktopNewMail:t}),setDesktopMentions:t=>e({desktopMentions:t}),setEmailDigest:t=>e({emailDigest:t}),setSoundEnabled:t=>e({soundEnabled:t}),hydrateFromApi:t=>e(e=>({...e,...t,...void 0!==t.backgroundId?{backgroundId:(0,s.y9)(t.backgroundId)}:{}}))}),{name:"ultimail-mail-settings",storage:a.$,partialize:e=>({density:e.density,themeMode:e.themeMode,backgroundId:e.backgroundId,inboxSort:e.inboxSort,readingPane:e.readingPane,conversationMode:e.conversationMode,infiniteScroll:e.infiniteScroll,listPageSize:e.listPageSize,desktopNewMail:e.desktopNewMail,desktopMentions:e.desktopMentions,emailDigest:e.emailDigest,soundEnabled:e.soundEnabled}),merge:(e,t)=>e?{...t,...e,backgroundId:(0,s.y9)(e.backgroundId??"none"),listPageSize:(0,i.rq)(Number(e.listPageSize))?(0,i.QK)(Number(e.listPageSize)):t.listPageSize}:t}))},55883:(e,t,r)=>{"use strict";r.d(t,{AT:()=>H,Au:()=>D,BP:()=>I,Bu:()=>C,Dw:()=>U,GW:()=>eh,Io:()=>v,Iz:()=>V,MS:()=>eb,MZ:()=>B,Ml:()=>i,NC:()=>_,NS:()=>g,NY:()=>l,OL:()=>d,Op:()=>Z,Ot:()=>ef,PP:()=>ec,Pe:()=>S,Pq:()=>en,Qn:()=>k,Qo:()=>c,RJ:()=>N,Rd:()=>A,Se:()=>O,Th:()=>$,Tu:()=>ei,U1:()=>X,UM:()=>Y,Um:()=>E,VC:()=>ex,VE:()=>eg,XF:()=>s,YS:()=>x,ZT:()=>F,_L:()=>h,_w:()=>T,au:()=>ed,av:()=>m,ax:()=>em,c0:()=>R,cB:()=>ea,cI:()=>eu,cY:()=>W,dn:()=>L,ic:()=>J,js:()=>el,ko:()=>eo,lT:()=>y,mB:()=>Q,mI:()=>K,mQ:()=>G,o7:()=>f,oW:()=>et,oz:()=>w,q$:()=>es,qL:()=>q,rb:()=>j,sV:()=>b,uX:()=>ee,us:()=>z,vK:()=>u,vR:()=>ep,xk:()=>P,xu:()=>p,ys:()=>er,zA:()=>M});var o=r(58113),n=r(44410),a=r(30273);let s=(0,o.cn)(n.gS,"bg-mail-surface-elevated text-foreground"),d="bg-app-canvas text-foreground",i=(0,o.cn)("flex h-full w-60 shrink-0 flex-col border-r border-border bg-mail-surface","transition-transform duration-200 ease-out"),l=(0,o.cn)("flex h-14 w-full items-center gap-3 rounded-2xl bg-mail-surface px-4","shadow-md ring-1 ring-border transition-shadow hover:bg-accent hover:shadow-lg"),c="bg-mail-nav-selected font-medium text-mail-nav-selected",u="text-foreground hover:bg-mail-nav-hover",m="text-muted-foreground",x="text-muted-foreground",g="text-foreground",b=(0,o.cn)("flex h-10 w-full max-w-[720px] items-center gap-2 rounded-full border border-mail-border-subtle bg-mail-surface-muted px-3","shadow-sm transition-[border-color,box-shadow]","focus-within:border-mail-border focus-within:shadow-md sm:h-12 sm:gap-3 sm:px-4"),p="flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground",f="text-muted-foreground hover:bg-accent hover:text-foreground",h="grid items-center gap-2 border-b border-border py-1.5 text-sm font-medium text-muted-foreground",v="flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-full hover:bg-muted/60 -m-0.5",w="mb-2 flex h-10 items-center justify-between gap-2",j=(0,o.cn)("sticky top-0 z-10 -mx-3 bg-app-canvas px-3 sm:-mx-6 sm:px-6"),y=(0,o.cn)("grid w-full cursor-pointer items-center gap-2 border-b border-border py-2.5 text-left text-sm","text-foreground transition-colors hover:bg-accent/50"),k=(0,o.cn)("rounded border border-mail-border bg-mail-surface px-2 py-1 text-sm text-foreground outline-none","focus:border-ring focus:ring-1 focus:ring-ring"),_=(0,o.cn)("rounded-full bg-primary px-5 text-sm font-medium text-primary-foreground hover:bg-primary/90");(0,o.cn)("inline-flex h-9 items-center gap-2 rounded-full border border-border bg-mail-surface px-5","text-sm font-medium text-foreground transition-colors hover:bg-accent");let N="flex h-full flex-col bg-mail-surface text-foreground",z="flex h-12 shrink-0 items-center justify-between border-b border-border px-4",S="flex h-12 shrink-0 items-center gap-2 border-b border-border px-4",M=a.Su,I="h-8 w-8 rounded-full text-muted-foreground",A="px-4 py-2 text-xs font-medium text-muted-foreground",C="px-4 py-1 text-xs font-medium uppercase text-muted-foreground",P="hover:bg-accent cursor-pointer",R=(0,o.cn)("flex w-full items-center gap-3 px-4 h-12",P),U="text-sm font-medium text-primary",E=(0,o.cn)("flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground"),F=(0,o.cn)("rounded-full bg-muted px-5 h-9 text-sm font-medium text-foreground","hover:bg-accent disabled:opacity-40 disabled:cursor-not-allowed transition-colors"),$=(0,o.cn)("inline-flex items-center gap-1 rounded-full border border-border bg-muted px-2.5 py-0.5 text-xs text-foreground"),q=(0,o.cn)("inline-flex items-center gap-1 rounded-full border border-border px-2.5 py-0.5 text-xs text-muted-foreground hover:bg-accent"),D="flex h-20 w-20 items-center justify-center rounded-full bg-muted text-muted-foreground",L="space-y-2 rounded-lg border border-mail-border p-3",O="border-t border-border",T="text-muted-foreground",B=(0,o.cn)("inline-flex h-9 items-center gap-2 rounded-full bg-primary/15 px-5 text-sm font-medium text-primary","transition-colors hover:bg-primary/25"),G=(0,o.cn)("flex h-9 w-9 items-center justify-center rounded-full border border-border text-muted-foreground hover:bg-accent"),K=(0,o.cn)("peer h-[42px] w-full rounded border border-mail-border bg-mail-surface px-3 pt-4 pb-1 text-sm text-foreground outline-none transition-colors","focus:border-ring focus:ring-1 focus:ring-ring"),H=(0,o.cn)("peer w-full rounded border border-mail-border bg-mail-surface px-3 pt-5 pb-2 text-sm text-foreground outline-none transition-colors resize-none","focus:border-ring focus:ring-1 focus:ring-ring"),Q="pointer-events-none absolute left-3 bg-mail-surface transition-all duration-150",Z=(0,o.cn)("!h-[42px] !min-h-[42px] w-full rounded border border-mail-border bg-mail-surface px-3 py-0 text-sm text-foreground shadow-none","data-[size=default]:!h-[42px] focus:border-ring focus:ring-1 focus:ring-ring"),V="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm hover:bg-accent",Y="h-10 w-10 rounded-full text-muted-foreground",W=(0,o.cn)(F,"px-6 py-2.5"),J="text-2xl font-normal text-foreground",X="text-lg font-normal text-foreground";(0,o.cn)("font-normal",g);let ee=(0,o.cn)("min-w-0 rounded-xl border border-mail-border bg-mail-surface p-5 shadow-sm","dark:bg-mail-surface-elevated dark:shadow-[0_1px_4px_rgba(0,0,0,0.35)]"),et="flex flex-col gap-5",er=(0,o.cn)("animate-in fade-in-0 slide-in-from-bottom-4 duration-300 ease-out","motion-reduce:animate-none"),eo=(0,o.cn)("flex w-full flex-col items-center justify-center py-6"),en=(0,o.cn)("inline-flex max-w-full items-center gap-0.5 rounded-full border px-2 py-0.5 text-xs","border-mail-list-chip-border bg-mail-list-chip-muted text-mail-list-chip-text"),ea=(0,o.cn)("rounded-md border border-mail-border bg-mail-surface-muted/70 p-2","dark:border-mail-border dark:bg-mail-surface-muted"),es=(0,o.cn)("flex items-center justify-between gap-2 rounded-md border border-mail-border bg-mail-surface-muted/50 px-2 py-1.5","dark:bg-mail-surface-muted"),ed=(0,o.cn)("min-w-0 rounded-lg border border-mail-border-subtle bg-mail-surface-muted/40 p-2","dark:border-mail-border-subtle dark:bg-mail-surface-muted/70"),ei="text-sm font-medium text-primary hover:text-primary/80",el="flex h-28 w-28 items-center justify-center rounded-full bg-muted text-muted-foreground",ec="absolute -bottom-1 -right-1 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow",eu=(0,o.cn)("inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-xs text-foreground"),em="mb-4 flex items-center justify-between rounded-lg bg-muted px-4 py-3",ex=(0,o.cn)("mb-6 flex items-start gap-4 rounded-xl border border-mail-border bg-mail-surface-muted p-5","dark:bg-mail-surface dark:border-mail-border"),eg="flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-primary/15",eb="rounded-full bg-primary/20 px-4 py-2 text-sm font-medium text-foreground",ep=(0,o.cn)("rounded-full bg-muted px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent"),ef=(0,o.cn)(k,"h-24 w-full rounded-lg px-3 py-2"),eh="flex-1 text-left text-sm font-medium text-foreground"},64156:(e,t,r)=>{Promise.resolve().then(r.bind(r,82688))},65367:(e,t,r)=>{"use strict";r.d(t,{IX:()=>n,L5:()=>o,Sm:()=>a});let o={desktopNewMail:!0,desktopMentions:!0,emailDigest:!1,soundEnabled:!1};function n(e){let t=e.notifications;return{density:e.density,themeMode:e.theme_mode,backgroundId:e.background_id,inboxSort:e.inbox_sort,readingPane:e.reading_pane,conversationMode:e.conversation_mode,desktopNewMail:t?.desktop_new_mail??o.desktopNewMail,desktopMentions:t?.desktop_mentions??o.desktopMentions,emailDigest:t?.email_digest??o.emailDigest,soundEnabled:t?.sound_enabled??o.soundEnabled}}function a(e){let t={};void 0!==e.density&&(t.density=e.density),void 0!==e.themeMode&&(t.theme_mode=e.themeMode),void 0!==e.backgroundId&&(t.background_id=e.backgroundId),void 0!==e.inboxSort&&(t.inbox_sort=e.inboxSort),void 0!==e.readingPane&&(t.reading_pane=e.readingPane),void 0!==e.conversationMode&&(t.conversation_mode=e.conversationMode);let r={};return void 0!==e.desktopNewMail&&(r.desktop_new_mail=e.desktopNewMail),void 0!==e.desktopMentions&&(r.desktop_mentions=e.desktopMentions),void 0!==e.emailDigest&&(r.email_digest=e.emailDigest),void 0!==e.soundEnabled&&(r.sound_enabled=e.soundEnabled),Object.keys(r).length>0&&(t.notifications=r),t}},69640:(e,t,r)=>{"use strict";r.d(t,{BT:()=>i,Wu:()=>l,ZB:()=>d,Zp:()=>a,aR:()=>s,wL:()=>c});var o=r(4208);r(91356);var n=r(58113);function a({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"card",className:(0,n.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function s({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"card-header",className:(0,n.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function d({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"card-title",className:(0,n.cn)("leading-none font-semibold",e),...t})}function i({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"card-description",className:(0,n.cn)("text-muted-foreground text-sm",e),...t})}function l({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"card-content",className:(0,n.cn)("px-6",e),...t})}function c({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"card-footer",className:(0,n.cn)("flex items-center px-6 [.border-t]:pt-6",e),...t})}},81893:(e,t,r)=>{"use strict";r.d(t,{Pu:()=>s,UT:()=>n,y9:()=>a});let o={mountains:"photo-mountains",ocean:"gradient-ocean",forest:"photo-nature",abstract:"gradient-blossom"},n=[{id:"none",label:"Aucun",background:"none",fallbackColor:"var(--app-canvas)"},{id:"gradient-aurora",label:"Aurore",background:'url("/mail-backgrounds/gradient-aurora.svg") center / cover no-repeat',fallbackColor:"#667eea"},{id:"gradient-sunset",label:"Coucher de soleil",background:'url("/mail-backgrounds/gradient-sunset.svg") center / cover no-repeat',fallbackColor:"#e44d26"},{id:"gradient-ocean",label:"Oc\xe9an",background:'url("/mail-backgrounds/gradient-ocean.svg") center / cover no-repeat',fallbackColor:"#203a43"},{id:"gradient-blossom",label:"Floral",background:'url("/mail-backgrounds/gradient-blossom.svg") center / cover no-repeat',fallbackColor:"#ffecd2"},{id:"photo-mountains",label:"Montagnes",background:'url("https://picsum.photos/seed/ultimail-mountains/1920/1080") center / cover no-repeat',fallbackColor:"#5c6b73"},{id:"photo-ocean",label:"Mer",background:'url("https://picsum.photos/seed/ultimail-ocean/1920/1080") center / cover no-repeat',fallbackColor:"#1a5276"},{id:"photo-city",label:"Ville",background:'url("https://picsum.photos/seed/ultimail-city/1920/1080") center / cover no-repeat',fallbackColor:"#2c3e50"},{id:"photo-nature",label:"Nature",background:'url("https://picsum.photos/seed/ultimail-nature/1920/1080") center / cover no-repeat',fallbackColor:"#2d5016"}];function a(e){return n.some(t=>t.id===e)?e:o[e]??"none"}function s(e){let t,r=(t=a(e),n.find(e=>e.id===t)??n[0]);return{background:r.background,fallbackColor:r.fallbackColor}}},82688:(e,t,r)=>{"use strict";r.d(t,{CompteSettingsSectionFromSegments:()=>V});var o=r(4208),n=r(26938),a=r(35855),s=r.n(a),d=r(80691),i=r(4433),l=r(26159),c=r(48843),u=r(58113),m=r(44410);function x({className:e,children:t}){return(0,o.jsx)("div",{className:(0,u.cn)(m.wo,"p-5",e),children:t})}var g=r(6146);let b=[{href:`${n.qH}/informations`,icon:d.A,title:"Informations personnelles",description:"Consultez votre nom, votre adresse e-mail et votre identifiant Ulti."},{href:`${n.qH}/securite`,icon:i.A,title:"S\xe9curit\xe9",description:"G\xe9rez votre mot de passe, la validation en deux \xe9tapes et vos sessions."}];var p=r(89032),f=r(2259),h=r(39927),v=r(17745),w=r(94927);function j({avatarUrl:e,name:t,email:r}){let n,a,s=(n=(0,h.jE)(),(0,v.n)({mutationFn:e=>w.uE.put("/users/me/avatar",{avatar_url:e}),onSuccess:()=>{n.invalidateQueries({queryKey:["current-user"]})}})),d=(a=(0,h.jE)(),(0,v.n)({mutationFn:()=>w.uE.delete("/users/me/avatar"),onSuccess:()=>{a.invalidateQueries({queryKey:["current-user"]})}})),i=s.isPending||d.isPending;async function l(e){try{e?(await s.mutateAsync(e),p.oR.success("Photo de profil mise \xe0 jour.")):(await d.mutateAsync(),p.oR.success("Photo de profil supprim\xe9e."))}catch(e){p.oR.error(e instanceof Error?e.message:"Impossible de mettre \xe0 jour la photo.")}}return(0,o.jsxs)(x,{className:"flex flex-col items-center gap-3 sm:flex-row sm:items-center sm:gap-6",children:[(0,o.jsx)(f.y,{avatarUrl:e,displayName:t,email:r,variant:"page",className:i?"pointer-events-none opacity-60":void 0,onChange:e=>void l(e)}),(0,o.jsxs)("div",{className:"min-w-0 text-center sm:text-left",children:[(0,o.jsx)("h3",{className:"text-sm font-medium text-foreground",children:"Photo de profil"}),(0,o.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Visible dans l'en-t\xeate de la suite et sur votre page compte. JPEG, PNG, GIF ou WebP — 512 Ko max."})]})]})}var y=r(91356),k=r(17996),_=r(81613),N=r(61554),z=r(49039);let S={details:"page-details",sessions:"page-sessions",mfa:"page-mfa",sources:"page-sources"};function M(){try{return(0,z.xb)().replace(/\/$/,"")}catch{return null}}function I(e,t){if(!t)return e;try{let r=new URL(e);return r.searchParams.set("theme",t),r.toString()}catch{return e}}var A=r(52590);function C({title:e,description:t,tab:r,flowSlug:n,actionLabel:a,icon:s}){let d=(0,A.x)(e=>e.themeMode),{resolvedTheme:i}=(0,k.D)(),l="light"===d||"dark"===d?d:"dark"===i||"light"===i?i:"u">typeof document&&document.documentElement.classList.contains("dark")?"dark":"light",c=(0,y.useMemo)(()=>(function(e){let{tab:t,flowSlug:r,theme:o}=e;if(r){let e,t,n=(e=M(),t=r.trim().replace(/^\/+|\/+$/g,""),e&&t?I(`${e}/if/flow/${t}/`,o):null);if(n)return n}return function(e="details",t){let r,o=M();return o?I(`${o}${(r=function(e){if(!e||"details"===e)return"#/settings";let t=encodeURIComponent(JSON.stringify({page:S[e]}));return`#/settings;${t}`}(e),`/if/user/${r}`)}`,t):null}(t??"details",o)})({tab:r,flowSlug:n,theme:l}),[r,n,l]);return c?(0,o.jsxs)(x,{children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,o.jsx)(P,{icon:s,title:e,description:t}),(0,o.jsx)(N.$,{type:"button",variant:"outline",className:"h-9 shrink-0 rounded-full px-4 text-sm font-medium",asChild:!0,children:(0,o.jsxs)("a",{href:c,target:"_blank",rel:"noreferrer",children:[a,(0,o.jsx)(_.A,{className:"size-3.5","aria-hidden":!0})]})})]}),(0,o.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"Ouverture du portail d'identit\xe9 Authentik dans un nouvel onglet."})]}):(0,o.jsxs)(x,{children:[(0,o.jsx)(P,{icon:s,title:e,description:t}),(0,o.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"Portail d'identit\xe9 non configur\xe9."})]})}function P({icon:e,title:t,description:r}){return(0,o.jsxs)("div",{className:"flex min-w-0 flex-1 gap-3",children:[e?(0,o.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-accent text-muted-foreground",children:e}):null,(0,o.jsxs)("div",{className:"min-w-0",children:[(0,o.jsx)("h3",{className:"text-sm font-medium text-foreground",children:t}),(0,o.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:r})]})]})}var R=r(7),U=r(6078),E=r(93021);let F={admin:"Administrateur",user:"Utilisateur",guest:"Invit\xe9",suspended:"Suspendu"};function $({label:e,value:t,mono:r=!1}){return(0,o.jsxs)("div",{className:"flex flex-col gap-0.5 border-b border-border px-4 py-3 last:border-b-0 sm:flex-row sm:items-center sm:gap-4",children:[(0,o.jsx)("span",{className:"w-40 shrink-0 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),(0,o.jsx)("span",{className:r?"min-w-0 break-all font-mono text-xs text-foreground":"min-w-0 truncate text-sm text-foreground",children:t})]})}var q=r(49405),D=r(11458),L=r(75291),O=r(19084),T=r(30826),B=r(69640),G=r(51618),K=r(95291),H=r(40505);let Q={home:function(){let e=(0,g.o)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("header",{className:"mb-8 flex flex-col items-center text-center",children:[e?(0,o.jsx)(c.h,{account:{name:e.name,email:e.email,avatarUrl:e.avatarUrl},size:"lg"}):(0,o.jsx)("div",{className:"size-20 rounded-full bg-muted","aria-hidden":!0}),(0,o.jsx)("h2",{className:"mt-4 text-2xl font-normal text-foreground",children:e?`Bonjour ${e.firstName} !`:"Votre compte Ulti"}),(0,o.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"G\xe9rez vos informations et la s\xe9curit\xe9 de votre compte sur l'ensemble de la suite Ulti."}),e?(0,o.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e.email}):null]}),(0,o.jsx)("div",{className:"grid gap-4 sm:grid-cols-2",children:b.map(e=>{let t=e.icon;return(0,o.jsx)(s(),{href:e.href,className:"group block",children:(0,o.jsxs)(x,{className:(0,u.cn)("h-full transition-colors hover:bg-accent/40","group-focus-visible:ring-2 group-focus-visible:ring-ring"),children:[(0,o.jsx)(t,{className:"size-6 text-muted-foreground","aria-hidden":!0}),(0,o.jsxs)("span",{className:"mt-3 flex items-center gap-1 text-sm font-medium text-foreground",children:[e.title,(0,o.jsx)(l.A,{className:"size-4 text-muted-foreground transition-transform group-hover:translate-x-0.5","aria-hidden":!0})]}),(0,o.jsx)("span",{className:"mt-1 block text-sm text-muted-foreground",children:e.description})]})},e.href)})})]})},"personal-info":function(){let e=(0,g.o)(),{data:t,isFetching:r,isError:n,refetch:a}=(0,E.i)(),s=t?.name||e?.name||"—",i=t?.email||e?.email||"—";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.y,{title:"Informations personnelles",description:"Informations de votre compte Ulti, partag\xe9es par toutes les applications de la suite."}),(0,o.jsx)(U.v,{isFetching:r,isError:n,onRetry:()=>a()}),(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsx)(j,{avatarUrl:t?.avatar_url,name:s,email:i}),(0,o.jsxs)(x,{className:"overflow-hidden p-0",children:[(0,o.jsx)($,{label:"Nom",value:s}),(0,o.jsx)($,{label:"Adresse e-mail",value:i}),(0,o.jsx)($,{label:"Identifiant",value:t?.sub??"—",mono:!0}),t?(0,o.jsx)($,{label:"R\xf4le",value:F[t.role]??t.role}):null,t?.groups?.length?(0,o.jsx)($,{label:"Groupes",value:t.groups.join(", ")}):null]}),(0,o.jsx)(C,{icon:(0,o.jsx)(d.A,{className:"size-5","aria-hidden":!0}),title:"Modifier le profil",description:"Nom, adresse e-mail et locale selon les droits d\xe9finis par votre organisation.",tab:"details",actionLabel:"Modifier le profil"})]})]})},security:function(){let e=(0,T._)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.y,{title:"S\xe9curit\xe9",description:"Mot de passe, validation en deux \xe9tapes, sessions actives et d\xe9connexion."}),(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsx)(C,{icon:(0,o.jsx)(q.A,{className:"size-5","aria-hidden":!0}),title:"Mot de passe",description:"Changez le mot de passe de votre compte Ulti.",flowSlug:"default-password-change",actionLabel:"Changer le mot de passe"}),(0,o.jsx)(C,{icon:(0,o.jsx)(D.A,{className:"size-5","aria-hidden":!0}),title:"Validation en deux \xe9tapes",description:"Ajoutez ou retirez des appareils TOTP, cl\xe9s de s\xe9curit\xe9 WebAuthn ou codes de secours.",tab:"mfa",actionLabel:"G\xe9rer la validation"}),(0,o.jsx)(C,{icon:(0,o.jsx)(L.A,{className:"size-5","aria-hidden":!0}),title:"Sessions et appareils",description:"Consultez les sessions actives et d\xe9connectez un appareil distant.",tab:"sessions",actionLabel:"G\xe9rer les sessions"}),(0,o.jsx)(C,{icon:(0,o.jsx)(i.A,{className:"size-5","aria-hidden":!0}),title:"Services connect\xe9s",description:"Liez ou d\xe9liez des comptes externes (Google, GitHub, etc.) si votre organisation les propose.",tab:"sources",actionLabel:"G\xe9rer les connexions"}),(0,o.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-mail-border bg-mail-surface p-5 shadow-sm dark:bg-mail-surface-elevated sm:flex-row sm:items-center sm:justify-between",children:[(0,o.jsxs)("div",{className:"min-w-0",children:[(0,o.jsx)("h3",{className:"text-sm font-medium text-foreground",children:"Session sur cet appareil"}),(0,o.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:"Met fin \xe0 votre session Ulti sur ce navigateur. Vous devrez vous reconnecter."})]}),(0,o.jsxs)(N.$,{type:"button",variant:"outline",className:"h-9 shrink-0 rounded-full px-4 text-sm font-medium",onClick:()=>void e(),children:[(0,o.jsx)(O.A,{className:"size-4","aria-hidden":!0}),"Se d\xe9connecter"]})]})]})]})},"usage-ia":function(){let{data:e}=(0,H.Y7)(),{data:t,isLoading:r}=(0,H.Yc)(e?.enabled??!1);return e?.enabled?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.y,{title:"Usage IA",description:"Consommation estim\xe9e de vos requ\xeates LLM ce mois-ci."}),r?(0,o.jsx)("p",{className:"text-sm text-muted-foreground",children:"Chargement…"}):t?(0,o.jsxs)("div",{className:"space-y-6 max-w-xl",children:[(0,o.jsxs)(B.Zp,{children:[(0,o.jsx)(B.aR,{className:"pb-2",children:(0,o.jsx)(B.ZB,{className:"text-sm font-medium",children:"Budget mensuel"})}),(0,o.jsxs)(B.Wu,{children:[(0,o.jsx)(K.u,{quota:t}),(0,o.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-4 text-sm",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-muted-foreground",children:"Aujourd'hui"}),(0,o.jsx)("p",{className:"font-medium tabular-nums",children:(0,H.tR)(t.cost_used_today_micro_eur)})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-muted-foreground",children:"Ce mois"}),(0,o.jsx)("p",{className:"font-medium tabular-nums",children:(0,H.tR)(t.cost_used_month_micro_eur)})]})]})]})]}),(t.by_provider_keys?.length??0)>0?(0,o.jsxs)(B.Zp,{children:[(0,o.jsx)(B.aR,{className:"pb-2",children:(0,o.jsx)(B.ZB,{className:"text-sm font-medium",children:"Par cl\xe9 API"})}),(0,o.jsx)(B.Wu,{className:"p-0",children:(0,o.jsxs)(G.XI,{children:[(0,o.jsx)(G.A0,{children:(0,o.jsxs)(G.Hj,{children:[(0,o.jsx)(G.nd,{children:"Cl\xe9 / fournisseur"}),(0,o.jsx)(G.nd,{className:"text-right",children:"Ce mois"})]})}),(0,o.jsx)(G.BF,{children:t.by_provider_keys.map(e=>(0,o.jsxs)(G.Hj,{children:[(0,o.jsxs)(G.nA,{children:[(0,o.jsx)("div",{children:e.label}),(0,o.jsx)("div",{className:"text-xs text-muted-foreground",children:"user"===e.billing_scope?"Cl\xe9 personnelle":"Organisation"})]}),(0,o.jsx)(G.nA,{className:"text-right tabular-nums",children:(0,H.tR)(e.cost_month_micro_eur)})]},e.fingerprint))})]})})]}):null]}):null]}):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(R.y,{title:"Usage IA",description:"UltiAI n'est pas activ\xe9 sur cette instance."})})}};function Z({sectionId:e}){let t=Q[e];return(0,o.jsx)(t,{})}function V({segments:e}){let t=(0,n.zt)(e);return(0,o.jsx)(Z,{sectionId:t})}},83984:(e,t,r)=>{"use strict";r.d(t,{q:()=>l});var o=r(4208),n=r(98565),a=r(97150),s=r(22054),d=r(58113);let i={xs:{className:"size-8",gravatar:64,text:"text-xs"},sm:{className:"size-10",gravatar:80,text:"text-sm"},md:{className:"size-14",gravatar:112,text:"text-lg"},lg:{className:"size-20",gravatar:160,text:"text-2xl"},xl:{className:"size-24",gravatar:192,text:"text-3xl"},"2xl":{className:"size-28",gravatar:224,text:"text-4xl"}};function l({contact:e,name:t,email:r,avatarUrl:c,size:u="sm",className:m,alt:x}){let g=i[u],b=function(e,t,r){if(t?.trim())return t.trim();if(e){let t=`${e.firstName??""} ${e.lastName??""}`.trim();if(t)return t}return r?.trim()||(0,a.J_)(e??{})||"?"}(e,t,r),p=r?.trim()||(0,a.J_)(e??{}),f=c??e?.avatarUrl,h=p?(0,a.yR)(p,g.gravatar):void 0,v=(0,s.w7)(b),w=(0,s.V7)(b);return(0,o.jsxs)(n.eu,{className:(0,d.cn)("shrink-0",g.className,m),children:[f?(0,o.jsx)(n.BK,{src:f,alt:x??b}):null,h?(0,o.jsx)(n.BK,{src:h,alt:x??b}):null,(0,o.jsx)(n.q5,{className:(0,d.cn)("font-medium text-white",g.text),style:{backgroundColor:w},children:v})]})}},95291:(e,t,r)=>{"use strict";r.d(t,{u:()=>l});var o=r(4208),n=r(35855),a=r.n(n),s=r(40505),d=r(26938),i=r(58113);function l({quota:e,compact:t=!1,className:r}){let n=(0,s.zT)(e),c=e.warn_threshold_pct||80,u=null!=n&&n>=c;if(!e.billing_scope_org){let n=(e.by_provider_keys??[]).reduce((e,t)=>e+t.cost_month_micro_eur,e.cost_used_month_micro_eur);return(0,o.jsxs)("div",{className:(0,i.cn)("space-y-1",r),children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[(0,o.jsx)("span",{children:"Cl\xe9 personnelle"}),(0,o.jsxs)("span",{className:"tabular-nums",children:[(0,s.tR)(n)," / mois"]})]}),!t&&(e.by_provider_keys?.length??0)>0?(0,o.jsx)("div",{className:"space-y-0.5 pl-2 text-[10px] text-muted-foreground",children:e.by_provider_keys.slice(0,3).map(e=>(0,o.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,o.jsx)("span",{className:"truncate",children:e.label}),(0,o.jsx)("span",{className:"tabular-nums shrink-0",children:(0,s.tR)(e.cost_month_micro_eur)})]},e.fingerprint))}):null]})}return(0,o.jsxs)("div",{className:(0,i.cn)("space-y-1",r),children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs text-muted-foreground",children:[(0,o.jsxs)("span",{className:(0,i.cn)(u&&"text-amber-600 dark:text-amber-400"),children:["IA ",u?"\xb7 proche du plafond":""]}),(0,o.jsxs)("span",{className:"tabular-nums",children:[(0,s.tR)(e.cost_used_month_micro_eur),e.cost_limit_month_micro_eur?` / ${(0,s.tR)(e.cost_limit_month_micro_eur)}`:""]})]}),null!=n?(0,o.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:(0,o.jsx)("div",{className:(0,i.cn)("h-full rounded-full transition-all",u?"bg-amber-500":"bg-primary"),style:{width:`${n}%`}})}):null,t?null:(0,o.jsx)(a(),{href:`${d.qH}/usage-ia`,className:"text-[10px] text-muted-foreground underline-offset-2 hover:underline",children:"D\xe9tail de consommation"})]})}}}]);