@lacneu/atrium 0.10.17 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/assets/{AccessTab-wgwrrOkq.js → AccessTab-BgfZsfNr.js} +1 -1
  2. package/dist/assets/{AdvancedFilter-CQA9SSeX.js → AdvancedFilter-BHDc_Mha.js} +1 -1
  3. package/dist/assets/AgentFilesTab-DSPXqfOM.js +3 -0
  4. package/dist/assets/AnomaliesTab-4g_AnyLu.js +1 -0
  5. package/dist/assets/{AuditTab-BCGc5fh-.js → AuditTab-CkPlBQRT.js} +1 -1
  6. package/dist/assets/BridgeTab-BYYayIJU.js +1 -0
  7. package/dist/assets/{ChatDefaultsTab-C4KGYhV-.js → ChatDefaultsTab-C1ld4NBa.js} +1 -1
  8. package/dist/assets/{DataTableShell-B62Qv-tB.js → DataTableShell-D_G9F2EP.js} +1 -1
  9. package/dist/assets/{DetailChips-fND9q0WY.js → DetailChips-HmAlB_yt.js} +1 -1
  10. package/dist/assets/FeedbacksTab-C_uUMTSv.js +1 -0
  11. package/dist/assets/FieldLabel-CUj6dNrs.js +4 -0
  12. package/dist/assets/FilesTab-BFMU8erL.js +1 -0
  13. package/dist/assets/{FilterBar-CWlA8nZ0.js → FilterBar-B_NTOVaW.js} +1 -1
  14. package/dist/assets/GroupsTab-CdYeoYBE.js +1 -0
  15. package/dist/assets/InstancesTab-Dkc2Fe6L.js +1 -0
  16. package/dist/assets/IntegrationsTab-DuOC5fWh.js +1 -0
  17. package/dist/assets/{KpiTab-Cn6U4E5D.js → KpiTab-C5oeAjTK.js} +1 -1
  18. package/dist/assets/PreferencesTab-DuHg9Syi.js +1 -0
  19. package/dist/assets/{PromptInjectionsTab-ZwimzgiF.js → PromptInjectionsTab-CB-1bh5C.js} +2 -2
  20. package/dist/assets/RolesTab-Pf9vwOs8.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-BJdu3AyM.js +1 -0
  22. package/dist/assets/ThemeShowroom-BU8IBnxU.js +1 -0
  23. package/dist/assets/{TimeRangePicker-CXb27Tev.js → TimeRangePicker-CW3Y_mIF.js} +1 -1
  24. package/dist/assets/TracesTab-BOR4V9ff.js +1 -0
  25. package/dist/assets/UsersTab-ByY5HbmY.js +1 -0
  26. package/dist/assets/{button-G-_IqZDp.js → button-DuXPa4Vl.js} +1 -1
  27. package/dist/assets/{card-B3VbgixI.js → card-CWLBezSK.js} +1 -1
  28. package/dist/assets/chevrons-up-down-DGeJvEkD.js +1 -0
  29. package/dist/assets/{compatView-hfeNAe7g.js → compatView-6XUIK3Ob.js} +1 -1
  30. package/dist/assets/{dispatchErrorInfo-DpmUia7q.js → dispatchErrorInfo-Y76YNHBy.js} +1 -1
  31. package/dist/assets/{dist--S7AYRAA.js → dist-DjXzB84V.js} +1 -1
  32. package/dist/assets/{dist-BDPwn3r0.js → dist-ZW9rNZ8M.js} +1 -1
  33. package/dist/assets/dist-cXwNU958.js +5 -0
  34. package/dist/assets/{dist-CgXYe09h.js → dist-ws-D-Lv-.js} +1 -1
  35. package/dist/assets/{highlighted-body-OFNGDK62-5MhDiezJ.js → highlighted-body-OFNGDK62-qhyRliwG.js} +1 -1
  36. package/dist/assets/index-D2h8Mdp2.js +226 -0
  37. package/dist/assets/mermaid-GHXKKRXX-B7ZmJyV2.js +1 -0
  38. package/dist/assets/roleDescriptions-KrB9-er6.js +1 -0
  39. package/dist/assets/{table-xKqB5hyP.js → table-CoglL6L8.js} +1 -1
  40. package/dist/assets/x-D96nOW2m.js +1 -0
  41. package/dist/index.html +7 -7
  42. package/package.json +1 -1
  43. package/dist/assets/AgentFilesTab-DpvNcKxY.js +0 -3
  44. package/dist/assets/AnomaliesTab-CsVaUK9r.js +0 -1
  45. package/dist/assets/BridgeTab-CI5Pr3zt.js +0 -1
  46. package/dist/assets/FeedbacksTab-xd7LisqB.js +0 -1
  47. package/dist/assets/FieldLabel-DkIcKewT.js +0 -4
  48. package/dist/assets/FilesTab-BzZTNirP.js +0 -1
  49. package/dist/assets/GroupsTab-DDGHlCam.js +0 -1
  50. package/dist/assets/InstancesTab-CENcOK8c.js +0 -1
  51. package/dist/assets/IntegrationsTab-DSfAaftT.js +0 -1
  52. package/dist/assets/PreferencesTab-SI6PHYsQ.js +0 -1
  53. package/dist/assets/RolesTab-Dm9rHjli.js +0 -1
  54. package/dist/assets/ServiceAccountsTab-Oxuo-aSo.js +0 -1
  55. package/dist/assets/ThemeShowroom-O_cVLe2-.js +0 -1
  56. package/dist/assets/TracesTab-CWvJFPjX.js +0 -1
  57. package/dist/assets/UsersTab-Co8sYpJL.js +0 -1
  58. package/dist/assets/chevrons-up-down-BlHpdE9v.js +0 -1
  59. package/dist/assets/dist-0Nx0BXy1.js +0 -5
  60. package/dist/assets/index-BmXiVWTf.js +0 -221
  61. package/dist/assets/mermaid-GHXKKRXX-CNK1PBuN.js +0 -1
  62. package/dist/assets/roleDescriptions-I2Mil-DA.js +0 -1
  63. package/dist/assets/x-CpLBfKr9.js +0 -1
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$o as r,Go as i,Jo as a,Ko as o,Qo as s,Xo as c,Yo as l,Zo as u,es as d,ns as f,qo as p,ts as m,uw as h}from"./dist-CgXYe09h.js";import{t as g}from"./button-G-_IqZDp.js";import{J as _,ct as v,lt as y,st as b,ut as x,vt as S}from"./index-BmXiVWTf.js";var C=h(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),w=t(e(),1),T={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function E(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=T[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function D(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:E(e.from,t)??t-T.h,to:E(e.to,t)??t}}var O=[{label:f(),from:`now-5m`},{label:m(),from:`now-15m`},{label:d(),from:`now-30m`},{label:r(),from:`now-1h`},{label:s(),from:`now-3h`},{label:u(),from:`now-6h`},{label:c(),from:`now-12h`},{label:l(),from:`now-24h`},{label:a(),from:`now-2d`},{label:p(),from:`now-7d`},{label:o(),from:`now-30d`},{label:i(),from:`now-90d`}];function k(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function A(e){if(e.kind===`relative`){let t=O.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${k(e.from)} → ${k(e.to)}`}function j(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function M(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function N(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var P=n();function F(e){let[t,n]=(0,w.useState)(0);return(0,w.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,w.useMemo)(()=>{let{from:t,to:n}=D(e);return e.kind===`absolute`?{from:t,to:n}:{from:I(t),to:I(n)}},[e,t])}function I(e){return Math.floor(e/6e4)*6e4}function L({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=D(e),[s,c]=(0,w.useState)(()=>j(o.from)),[l,u]=(0,w.useState)(()=>j(o.to));function d(t){if(t){let t=D(e);c(j(t.from)),u(j(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=M(s),n=M(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?O:O.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=M(s)!==null&&M(l)!==null;return(0,P.jsxs)(y,{open:n,onOpenChange:d,children:[(0,P.jsx)(x,{asChild:!0,children:(0,P.jsxs)(g,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,P.jsx)(C,{}),A(e)]})}),(0,P.jsx)(v,{children:(0,P.jsx)(b,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,P.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,P.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,P.jsx)(_,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,P.jsx)(_,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,P.jsx)(g,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,P.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,P.jsx)(S,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,P.jsx)(_,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,P.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,P.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,P.jsx)(`li`,{children:(0,P.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>f(t.from),children:t.label})},t.from))})]})]})})})]})}export{F as n,N as r,L as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$o as r,Go as i,Jo as a,Ko as o,Qo as s,Xo as c,Yo as l,Zo as u,dw as d,es as f,ns as p,qo as m,ts as h}from"./dist-ws-D-Lv-.js";import{t as g}from"./button-DuXPa4Vl.js";import{J as _,ct as v,lt as y,st as b,ut as x,vt as S}from"./index-D2h8Mdp2.js";var C=d(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),w=t(e(),1),T={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function E(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=T[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function D(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:E(e.from,t)??t-T.h,to:E(e.to,t)??t}}var O=[{label:p(),from:`now-5m`},{label:h(),from:`now-15m`},{label:f(),from:`now-30m`},{label:r(),from:`now-1h`},{label:s(),from:`now-3h`},{label:u(),from:`now-6h`},{label:c(),from:`now-12h`},{label:l(),from:`now-24h`},{label:a(),from:`now-2d`},{label:m(),from:`now-7d`},{label:o(),from:`now-30d`},{label:i(),from:`now-90d`}];function k(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function A(e){if(e.kind===`relative`){let t=O.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${k(e.from)} → ${k(e.to)}`}function j(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function M(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function N(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var P=n();function F(e){let[t,n]=(0,w.useState)(0);return(0,w.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,w.useMemo)(()=>{let{from:t,to:n}=D(e);return e.kind===`absolute`?{from:t,to:n}:{from:I(t),to:I(n)}},[e,t])}function I(e){return Math.floor(e/6e4)*6e4}function L({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=D(e),[s,c]=(0,w.useState)(()=>j(o.from)),[l,u]=(0,w.useState)(()=>j(o.to));function d(t){if(t){let t=D(e);c(j(t.from)),u(j(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=M(s),n=M(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?O:O.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=M(s)!==null&&M(l)!==null;return(0,P.jsxs)(y,{open:n,onOpenChange:d,children:[(0,P.jsx)(x,{asChild:!0,children:(0,P.jsxs)(g,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,P.jsx)(C,{}),A(e)]})}),(0,P.jsx)(v,{children:(0,P.jsx)(b,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,P.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,P.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,P.jsx)(_,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,P.jsx)(_,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,P.jsx)(g,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,P.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,P.jsx)(S,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,P.jsx)(_,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,P.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,P.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,P.jsx)(`li`,{children:(0,P.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>f(t.from),children:t.label})},t.from))})]})]})})})]})}export{F as n,N as r,L as t};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$g as r,Al as i,Bl as a,Cl as o,Dl as s,El as c,Fl as l,Gg as u,Gl as d,Hg as f,Hl as p,Il as m,Jg as h,Jl as g,Kg as _,Kl as v,Ll as ee,Ml as te,Nl as ne,Ol as re,Pl as ie,Qg as y,Rl as ae,Sl as oe,Tl as se,Ug as b,Ul as ce,Vg as x,Vl as le,Wg as ue,Wl as de,Xg as fe,Xl as pe,Yg as S,Yl as me,Zg as C,Zl as he,_l as ge,_w as w,a_ as T,bl as _e,c_ as E,d_ as D,e_ as O,f_ as k,gl as ve,gw as A,hl as j,i_ as M,jl as ye,kl as be,l_ as N,ml as P,n_ as F,o_ as I,pl as L,qg as R,ql as xe,r_ as z,s_ as Se,t_ as Ce,u_ as we,uw as B,vl as Te,wl as Ee,xl as De,yl as Oe,zl as ke}from"./dist-ws-D-Lv-.js";import{n as Ae}from"./dist-DjXzB84V.js";import{n as je}from"./TimeRangePicker-CW3Y_mIF.js";import{t as Me}from"./x-D96nOW2m.js";import{t as V}from"./button-DuXPa4Vl.js";import{A as Ne,C as H,F as Pe,I as Fe,Ot as Ie,P as Le,R as Re,S as U,Tt as ze,a as Be,b as W,i as Ve,kt as He,m as G,o as Ue,ot as We,r as Ge,x as K,y as q,z as Ke}from"./index-D2h8Mdp2.js";import{t as qe}from"./FilterBar-B_NTOVaW.js";import{t as Je}from"./AdvancedFilter-BHDc_Mha.js";import{t as Ye}from"./DataTableShell-D_G9F2EP.js";var J=t(e(),1),Y=n(),X=e=>e===null?`—`:String(Math.round(e));function Xe(){let e=w(B.me.getMe,{host:We})?.role===`admin`,t=w(B.deliveryTiming.getDeliveryStatus,{}),n=A(B.deliveryTiming.startDeliveryRecord),r=A(B.deliveryTiming.stopDeliveryRecord),i=A(B.deliveryTiming.deleteDeliverySessions),[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(null),[l,u]=(0,J.useState)(new Set),[d,f]=(0,J.useState)(!1),[p,m]=(0,J.useState)(!1),h=w(B.deliveryTiming.listDeliverySessions,a?{}:`skip`),g=w(B.deliveryTiming.getDeliveryReport,a?{sessionId:s??void 0}:`skip`),v=t?.recording??!1,ee=async()=>{f(!0);try{v?await r({}):await n({})}finally{f(!1)}},te=()=>{g&&navigator.clipboard?.writeText(Ne(g)).then(()=>{m(!0),window.setTimeout(()=>m(!1),1200)}).catch(()=>{})},ne=e=>u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),re=async()=>{let e=[...l];if(e.length!==0){f(!0);try{await i({sessionIds:e}),s!==null&&l.has(s)&&c(null),u(new Set)}finally{f(!1)}}};return(0,Y.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:k()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:D()})]}),e?(0,Y.jsx)(V,{variant:v?`destructive`:`default`,size:`sm`,disabled:d||t===void 0,onClick:()=>void ee(),children:v?N():we()}):null]}),v?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(G,{variant:`secondary`,children:E()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:Se({time:new Date(t.startedAt).toLocaleTimeString()})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(V,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:a?T():I()})}),a?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ze,{sessions:h,selected:s,checked:l,isAdmin:e,onSelect:c,onToggleCheck:ne}),e&&l.size>0?(0,Y.jsx)(`div`,{children:(0,Y.jsx)(V,{variant:`destructive`,size:`sm`,disabled:d,onClick:()=>void re(),children:_({n:l.size})})}):null,(0,Y.jsx)(Qe,{report:g,copied:p,onCopy:te})]}):null]})}function Ze({sessions:e,selected:t,checked:n,isAdmin:r,onSelect:i,onToggleCheck:a}){return e?e.length===0?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:u()}):(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Y.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:ue()}),(0,Y.jsx)(`ul`,{className:`flex flex-col`,children:e.map(e=>{let o=t===e.sessionId,s=new Date(e.startedAt).toLocaleString();return(0,Y.jsxs)(`li`,{className:`flex items-center gap-2 border-t border-border py-1 text-sm first:border-t-0`,children:[r?(0,Y.jsx)(`input`,{type:`checkbox`,"aria-label":`${b()} — ${s}`,checked:n.has(e.sessionId),onChange:()=>a(e.sessionId)}):null,(0,Y.jsx)(`button`,{type:`button`,"aria-pressed":o,className:`flex-1 truncate text-left ${o?`font-medium`:`text-muted-foreground`}`,onClick:()=>i(o?null:e.sessionId),children:s}),e.active?(0,Y.jsx)(G,{variant:`secondary`,children:f()}):null]},e.sessionId)})})]}):null}function Qe({report:e,copied:t,onCopy:n}){if(!e)return null;if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:M()});let i=e.segments,a=(e,t)=>(0,Y.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,Y.jsx)(`td`,{className:`py-1`,children:e}),(0,Y.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,Y.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[X(t.p50),` / `,X(t.p95),` / `,X(t.max)]})]});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,x()]}),(0,Y.jsxs)(V,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Ae,{size:13,"aria-hidden":!0}):(0,Y.jsx)(ze,{size:13,"aria-hidden":!0}),t?R():h()]})]}),(0,Y.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,Y.jsx)(`th`,{className:`py-1 font-medium`,children:z()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:F()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Ce()})]})}),(0,Y.jsxs)(`tbody`,{children:[a(O(),i.bridge),a(r(),i.A),a(y(),i.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:C()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:S()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:fe()})]})}var $e=[50,100,200,500],Z=`all`,Q=`__all__`,et=[`2xx`,`4xx`,`5xx`],tt=[`user`,`service`,`system`],nt=[`inbound`,`outbound`,`internal`],rt={kind:`relative`,from:`now-30d`,to:`now`},it=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function at(){let e=He({from:`/settings/traces`}),t=Ie({from:`/settings/traces`}),n=e.limit,r=e.kind,u=e.statusClass??Q,f=e.principalType??Q,h=e.direction??Q,_=e.roleKey??Q,y=e.q??``,b=Ge(e.from,e.to),x=(0,J.useMemo)(()=>Ue(e.adv),[e.adv]),{from:ue,to:fe}=je(b),[S,C]=(0,J.useState)(null),[T,E]=(0,J.useState)(null),D=e=>void t({search:t=>({...t,limit:e})}),O=e=>void t({search:t=>({...t,kind:e})}),k=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),A=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),j=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),M=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),N=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),P=e=>void t({search:t=>({...t,...Be(e)})}),F=e=>void t({search:t=>({...t,adv:Ve(e)}),replace:!0}),I=w(B.observability.listEvents,{limit:n}),L=w(B.observability.listEvents,{limit:n,kind:r===Z?void 0:r,filter:{q:y||void 0,from:ue,to:fe,statusClass:u===Q?void 0:u,principalType:f===Q?void 0:f,direction:h===Q?void 0:h,roleKey:_===Q?void 0:_,advanced:x.length>0?x:void 0}}),R=(0,J.useMemo)(()=>{let e=new Set;for(let t of I??[])e.add(t.kind);return[...e].sort()},[I]),z=(0,J.useMemo)(()=>{let e=new Set;for(let t of I??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[I]),Se=y!==``||u!==Q||f!==Q||h!==Q||_!==Q||x.length>0||b.kind!==`relative`||b.from!==rt.from;function Ce(){t({search:{limit:100,kind:`all`},replace:!0})}let we=S?I?.filter(e=>e.correlationId===S):L;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Xe,{}),(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[he(),(0,Y.jsx)(`strong`,{children:pe()}),me(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:g()})]}),(0,Y.jsxs)(qe,{q:y,onQChange:k,searchPlaceholder:xe(),timeRange:b,onTimeRangeChange:P,onReset:Ce,canReset:Se,children:[(0,Y.jsxs)(q,{value:u,onValueChange:A,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:v()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:d()}),et.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:f,onValueChange:j,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:de()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:ce()}),tt.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:h,onValueChange:M,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(H,{placeholder:p()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:le()}),nt.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:_,onValueChange:N,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(H,{placeholder:a()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Q,children:ke()}),z.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:r,onValueChange:O,children:[(0,Y.jsx)(U,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(H,{placeholder:ae()})}),(0,Y.jsxs)(W,{children:[(0,Y.jsx)(K,{value:Z,children:ee()}),R.map(e=>(0,Y.jsx)(K,{value:e,children:e},e))]})]}),(0,Y.jsxs)(q,{value:String(n),onValueChange:e=>D(Number(e)),children:[(0,Y.jsx)(U,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(H,{})}),(0,Y.jsx)(W,{children:$e.map(e=>(0,Y.jsx)(K,{value:String(e),children:m({count:e})},e))})]})]}),(0,Y.jsx)(Je,{fields:it,seed:x,onChange:F}),S?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>C(null),title:l(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ie(),(0,Y.jsx)(`code`,{children:$(S)})]}),(0,Y.jsx)(Me,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:ne()})]})}):null,(0,Y.jsx)(Ye,{title:te(),rows:we,emptyHint:S?ye():i(),columns:[{header:be(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:re(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(G,{variant:`secondary`,children:e.kind})},{header:s(),sort:e=>st(e)??null,cell:e=>{let t=st(e);return t?(0,Y.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,Y.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":c(),children:`✓`})}},{header:se(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(G,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ee(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(G,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:o(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(G,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:oe(),sort:e=>e.route,cell:e=>e.route?(0,Y.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,Y.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:De(),sort:e=>e.status,cell:e=>e.status===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsx)(`span`,{className:`oc-traces__status ${ot(e.status)}`,children:e.status})},{header:_e(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:Oe(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:Te(),onClick:()=>C(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ge(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(V,{variant:`outline`,size:`sm`,onClick:()=>E(e),children:ve()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(ct,{row:T,onClose:()=>E(null)})]})}function ot(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function st(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function ct({row:e,onClose:t}){let n=(0,J.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,Y.jsx)(Le,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(Pe,{className:`max-w-lg`,children:[(0,Y.jsxs)(Re,{children:[(0,Y.jsxs)(Ke,{className:`oc-traces__meta-title`,children:[j(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(G,{variant:`outline`,children:P()})]}),(0,Y.jsx)(Fe,{children:L()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{at as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Ac as r,Am as i,Bc as a,Cm as o,Dm as s,Em as c,Fc as l,Ic as u,Lc as d,Mc as f,Mm as p,Nc as m,Oc as h,Om as ee,Pc as g,Rc as _,Sm as v,Tm as te,_m as ne,_w as y,am as re,bm as b,cm as x,dm as S,fm as C,gm as w,gw as T,hm as ie,im as ae,jc as E,jm as D,kc as O,km as oe,lm as se,mm as ce,om as le,pm as ue,sm as de,um as fe,uw as k,vm as pe,wm as me,xm as he,ym as ge,zc as A,zp as j}from"./dist-ws-D-Lv-.js";import{t as M}from"./button-DuXPa4Vl.js";import{$ as N,C as P,F,I,M as L,N as _e,O as R,Ot as ve,P as z,Q as ye,R as be,S as B,_t as V,b as H,d as U,et as xe,f as Se,gt as W,j as G,kt as Ce,m as K,ot as we,p as q,rt as Te,tt as Ee,x as J,y as Y,z as De}from"./index-D2h8Mdp2.js";import{t as Oe}from"./FilterBar-B_NTOVaW.js";import{t as ke}from"./DataTableShell-D_G9F2EP.js";import{t as Ae}from"./DetailChips-HmAlB_yt.js";var X=t(e(),1),Z=n();function je({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=y(k.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=y(k.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((o??[]).map(e=>`${e.instanceName}/${e.agentId}`)),c=(o??[]).find(e=>e.isDefault)??null,l=c?`${c.instanceName}/${c.agentId}`:null,f=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),p=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!f.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],h=new Map;for(let e of p){let t=h.get(e.instanceName)??[];t.push(e),h.set(e.instanceName,t)}return(0,Z.jsx)(z,{open:n,onOpenChange:r,children:(0,Z.jsxs)(F,{className:`oc-access`,children:[(0,Z.jsxs)(be,{children:[(0,Z.jsx)(De,{children:a({user:t})}),(0,Z.jsx)(I,{children:A()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?_():d()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:u()}):p.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:m()}):[...h.entries()].map(([t,n])=>(0,Z.jsx)(Q,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function Q({profileId:e,instanceName:t,kind:n,agents:i,assigned:a,defaultKey:o}){let s=T(k.agents.assignAgent),c=T(k.agents.removeAgent),u=T(k.agents.setDefaultAgent),d=G();if(!e)return null;async function p(n,r){try{r?await c({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(l(),e)}}async function m(n){try{await u({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(g(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(V,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__kind`,children:n})]}),i.map(e=>{let n=`${t}/${e.agentId}`,i=a.has(n),s=o===n,c=e.state===`deleted`;return(0,Z.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Z.jsx)(R,{checked:i,disabled:c&&!i,onCheckedChange:()=>void p(e.agentId,i),"aria-label":f({name:e.displayName??e.agentId})}),(0,Z.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Z.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,c?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:E()}):null,e.outOfPool?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:r()}):null,i?s?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":O(),title:O(),children:(0,Z.jsx)(W,{size:14,fill:`currentColor`})}):(0,Z.jsx)(M,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":h(),title:h(),onClick:()=>void m(e.agentId),children:(0,Z.jsx)(W,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=U.filter(e=>n.has(q[e])).length;return(0,Z.jsxs)(ye,{children:[(0,Z.jsx)(Te,{asChild:!0,children:(0,Z.jsx)(M,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?p():D({count:r})})}),(0,Z.jsxs)(N,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(Ee,{children:i()}),U.map(e=>{let r=q[e];return(0,Z.jsxs)(xe,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(R,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:Se[e]??e})]},e)})]})]})}function Ne(){let e=Ce({from:`/settings/users`}),t=ve({from:`/settings/users`}),n=e.q??``,r=e.role??$,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),a=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),l=y(k.admin.listUsers,{filter:{q:n||void 0,role:r===$?void 0:r},withAgents:!0}),u=y(k.me.getMe,{host:we}),d=T(k.admin.setRole),f=T(k.admin.setUserPermissions),p=T(k.admin.startImpersonation),m=T(k.admin.deleteUser),h=T(k.admin.setUserName),g=L(),_=_e(),E=G(),[D,O]=(0,X.useState)(null),A=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of l??[])e.add(t.role);return[...e]},[l]),M=n!==``||r!==$;function N(){t({search:{},replace:!0})}async function F(e){try{await d(e)}catch(e){E.error(oe(),e)}}async function I(e){try{await f(e)}catch(e){E.error(ee(),e)}}async function R(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await g({title:he(),description:b({user:t}),confirmWord:ge(),confirmLabel:pe(),destructive:!0}))try{await m({profileId:e._id}),E.success(w({user:t}))}catch(e){E.error(ne(),e)}}async function z(e){let t=e.email||e.name||e.userId.slice(0,8),n=await _({title:ce(),label:ue({user:t}),placeholder:C(),defaultValue:e.name??``,confirmLabel:j()});if(n!==null)try{await h({profileId:e._id,name:n}),E.success(S())}catch(e){E.error(fe(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Oe,{q:n,onQChange:i,searchPlaceholder:s(),onReset:N,canReset:M,children:(0,Z.jsxs)(Y,{value:r,onValueChange:a,children:[(0,Z.jsx)(B,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(P,{})}),(0,Z.jsxs)(H,{children:[(0,Z.jsx)(J,{value:$,children:c()}),A.map(e=>(0,Z.jsx)(J,{value:e,children:e},e))]})]})}),(0,Z.jsx)(ke,{title:te(),rows:l,emptyHint:me(),rowActions:e=>{let t=[{label:ae(),onSelect:()=>O({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:ie(),onSelect:()=>void z(e)}];return e.userId!==u?.userId&&t.push({label:o(),onSelect:()=>void p({profileId:e._id})},{label:v(),variant:`destructive`,onSelect:()=>void R(e)}),t},columns:[{header:se(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(`span`,{children:t}),n?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:x(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(Y,{value:e.role,onValueChange:t=>void F({profileId:e._id,role:t}),children:[(0,Z.jsx)(B,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(P,{})}),(0,Z.jsxs)(H,{children:[(0,Z.jsx)(J,{value:`pending`,children:`pending`}),(0,Z.jsx)(J,{value:`user`,children:`user`}),(0,Z.jsx)(J,{value:`admin`,children:`admin`})]})]})},{header:de(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:le()}):(0,Z.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),I({profileId:e._id,permissions:[...n]})}})},{header:re(),cell:e=>(0,Z.jsx)(Ae,{icon:(0,Z.jsx)(V,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Z.jsx)(je,{profileId:D?.profileId??null,userLabel:D?.label??``,open:D!==null,onOpenChange:e=>{e||O(null)}})]})}export{Ne as UsersTab};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{iw as n,n as r,t as i}from"./dist-CgXYe09h.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{aw as n,n as r,t as i}from"./dist-ws-D-Lv-.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-CgXYe09h.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-ws-D-Lv-.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
@@ -0,0 +1 @@
1
+ import{dw as e}from"./dist-ws-D-Lv-.js";var t=e(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);export{t};
@@ -1 +1 @@
1
- import{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-CgXYe09h.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?t():e===`beyond`?a():r()}function p(t){return t??e()}function m(e){return e===null?i():n({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
1
+ import{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-ws-D-Lv-.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?t():e===`beyond`?a():r()}function p(t){return t??e()}function m(e){return e===null?i():n({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
@@ -1 +1 @@
1
- import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-CgXYe09h.js";var k={AGENT_NOT_FOUND:()=>({label:g(),hint:o()}),AUTH_TOKEN_MISMATCH:()=>({label:_(),hint:t()}),DEVICE_SIGNING_FAILED:()=>({label:O(),hint:p()}),SESSION_SCOPE_DENIED:()=>({label:c(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:a(),hint:f()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:l()}),ATTACHMENT_TOO_LARGE:()=>({label:C(),hint:d()}),ATTACHMENT_REJECTED:()=>({label:r(),hint:i()}),BRIDGE_UNREACHABLE:()=>({label:S(),hint:e()}),INVALID_REQUEST:()=>({label:h(),hint:T()}),NOT_CONFIGURED:()=>({label:n(),hint:m()}),UNROUTED:()=>({label:E(),hint:y()}),UPSTREAM_ERROR:()=>({label:D(),hint:w()}),UNKNOWN:()=>({label:v(),hint:b()})};function A(e){return e?k[e]?.()??{label:e,hint:x()}:k.UNKNOWN()}export{A as t};
1
+ import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-ws-D-Lv-.js";var k={AGENT_NOT_FOUND:()=>({label:g(),hint:o()}),AUTH_TOKEN_MISMATCH:()=>({label:_(),hint:t()}),DEVICE_SIGNING_FAILED:()=>({label:O(),hint:p()}),SESSION_SCOPE_DENIED:()=>({label:c(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:a(),hint:f()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:l()}),ATTACHMENT_TOO_LARGE:()=>({label:C(),hint:d()}),ATTACHMENT_REJECTED:()=>({label:r(),hint:i()}),BRIDGE_UNREACHABLE:()=>({label:S(),hint:e()}),INVALID_REQUEST:()=>({label:h(),hint:T()}),NOT_CONFIGURED:()=>({label:n(),hint:m()}),UNROUTED:()=>({label:E(),hint:y()}),UPSTREAM_ERROR:()=>({label:D(),hint:w()}),UNKNOWN:()=>({label:v(),hint:b()})};function A(e){return e?k[e]?.()??{label:e,hint:x()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{uw as n}from"./dist-CgXYe09h.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
1
+ import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{dw as n}from"./dist-ws-D-Lv-.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{QC as r,aw as i,cw as a,uw as o}from"./dist-CgXYe09h.js";var s=o(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=o(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),l=t(e(),1),u=n();function d(e){let t=e+`CollectionProvider`,[n,o]=r(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=l.useRef(null),i=l.useRef(new Map).current;return(0,u.jsx)(s,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:a(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=a(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...i}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:r})});v.displayName=h;function y(t){let n=c(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,o]}var f=l.createContext(void 0);function p(e){let t=l.useContext(f);return e||t||`ltr`}export{s as i,d as n,c as r,p as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,dw as i,lw as a,ow as o}from"./dist-ws-D-Lv-.js";var s=i(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=i(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),l=t(e(),1),u=n();function d(e){let t=e+`CollectionProvider`,[n,i]=r(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=l.useRef(null),i=l.useRef(new Map).current;return(0,u.jsx)(s,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=o(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:a(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=o(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=a(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...i}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:r})});v.displayName=h;function y(t){let n=c(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,i]}var f=l.createContext(void 0);function p(e){let t=l.useContext(f);return e||t||`ltr`}export{s as i,d as n,c as r,p as t};
@@ -0,0 +1,5 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,GC as i,HC as a,JC as o,KC as s,QC as c,UC as l,WC as u,XC as d,YC as f,lw as p,nw as m,ow as ee,qC as h,rw as g}from"./dist-ws-D-Lv-.js";var _=t(e(),1),v=n(),y=`Dialog`,[b,x]=r(y),[S,C]=b(y),w=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=_.useRef(null),l=_.useRef(null),[u,f]=d({prop:r,defaultProp:i??!1,onChange:a,caller:y});return(0,v.jsx)(S,{scope:t,triggerRef:c,contentRef:l,contentId:o(),titleId:o(),descriptionId:o(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(e=>!e),[f]),modal:s,children:n})};w.displayName=y;var T=`DialogTrigger`,E=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=C(T,n),a=p(t,i.triggerRef);return(0,v.jsx)(g.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":K(i.open),...r,ref:a,onClick:m(e.onClick,i.onOpenToggle)})});E.displayName=T;var D=`DialogPortal`,[O,k]=b(D,{forceMount:void 0}),A=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=C(D,t);return(0,v.jsx)(O,{scope:t,forceMount:n,children:_.Children.map(r,e=>(0,v.jsx)(f,{present:n||o.open,children:(0,v.jsx)(i,{asChild:!0,container:a,children:e})}))})};A.displayName=D;var j=`DialogOverlay`,M=_.forwardRef((e,t)=>{let n=k(j,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=C(j,e.__scopeDialog);return a.modal?(0,v.jsx)(f,{present:r||a.open,children:(0,v.jsx)(P,{...i,ref:t})}):null});M.displayName=j;var N=ee(`DialogOverlay.RemoveScroll`),P=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=C(j,n);return(0,v.jsx)(l,{as:N,allowPinchZoom:!0,shards:[i.contentRef],children:(0,v.jsx)(g.div,{"data-state":K(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),F=`DialogContent`,I=_.forwardRef((e,t)=>{let n=k(F,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=C(F,e.__scopeDialog);return(0,v.jsx)(f,{present:r||a.open,children:a.modal?(0,v.jsx)(L,{...i,ref:t}):(0,v.jsx)(R,{...i,ref:t})})});I.displayName=F;var L=_.forwardRef((e,t)=>{let n=C(F,e.__scopeDialog),r=_.useRef(null),i=p(t,n.contentRef,r);return _.useEffect(()=>{let e=r.current;if(e)return a(e)},[]),(0,v.jsx)(z,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:m(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:m(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:m(e.onFocusOutside,e=>e.preventDefault())})}),R=_.forwardRef((e,t)=>{let n=C(F,e.__scopeDialog),r=_.useRef(!1),i=_.useRef(!1);return(0,v.jsx)(z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),z=_.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,c=C(F,n),l=_.useRef(null),d=p(t,l);return u(),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(s,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,v.jsx)(h,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":K(c.open),...o,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(X,{titleId:c.titleId}),(0,v.jsx)(Q,{contentRef:l,descriptionId:c.descriptionId})]})]})}),B=`DialogTitle`,V=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=C(B,n);return(0,v.jsx)(g.h2,{id:i.titleId,...r,ref:t})});V.displayName=B;var H=`DialogDescription`,U=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=C(H,n);return(0,v.jsx)(g.p,{id:i.descriptionId,...r,ref:t})});U.displayName=H;var W=`DialogClose`,G=_.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=C(W,n);return(0,v.jsx)(g.button,{type:`button`,...r,ref:t,onClick:m(e.onClick,()=>i.onOpenChange(!1))})});G.displayName=W;function K(e){return e?`open`:`closed`}var q=`DialogTitleWarning`,[J,Y]=c(q,{contentName:F,titleName:B,docsSlug:`dialog`}),X=({titleId:e})=>{let t=Y(q),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
+
3
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
+
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Z=`DialogDescriptionWarning`,Q=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Y(Z).contentName}}.`;return _.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},$=w,te=E,ne=A,re=M,ie=I,ae=V,oe=U,se=G;export{ne as a,te as c,re as i,J as l,ie as n,$ as o,oe as r,ae as s,se as t,x as u};