@lacneu/atrium 0.18.1 → 0.19.1

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 (71) hide show
  1. package/dist/assets/AccessTab-SACgMGAi.js +1 -0
  2. package/dist/assets/{AdvancedFilter-CxFcwq_P.js → AdvancedFilter-D7QXVQ5_.js} +1 -1
  3. package/dist/assets/AgentFilesTab-DcWaUTsA.js +3 -0
  4. package/dist/assets/AnomaliesTab-B856xOQY.js +1 -0
  5. package/dist/assets/{AuditTab-C5iOM0e2.js → AuditTab-B0xwh9EC.js} +1 -1
  6. package/dist/assets/BridgeTab-KP5PlAMx.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-1p-luBRT.js +1 -0
  8. package/dist/assets/{DataTableShell-DQ-E7MMz.js → DataTableShell-C1ZKbpq3.js} +1 -1
  9. package/dist/assets/{DetailChips-DLGo-JpY.js → DetailChips-Dg4YEpwe.js} +1 -1
  10. package/dist/assets/FeedbacksTab-Bg62mK4W.js +1 -0
  11. package/dist/assets/{FieldLabel-D8ek_B4M.js → FieldLabel-X2EAqICh.js} +1 -1
  12. package/dist/assets/FilesTab-BiW2j80D.js +1 -0
  13. package/dist/assets/{FilterBar-C2YZIUUe.js → FilterBar-CSA8xMkl.js} +1 -1
  14. package/dist/assets/GroupsTab-CevcyqNU.js +1 -0
  15. package/dist/assets/InstancesTab-CK-3Nvfy.js +1 -0
  16. package/dist/assets/IntegrationsTab-Cf2NA4f0.js +1 -0
  17. package/dist/assets/{KpiTab-BSPnCroi.js → KpiTab-BHkpsXb_.js} +1 -1
  18. package/dist/assets/PreferencesTab-DBxEQcoG.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-ILsAUU_D.js +2 -0
  20. package/dist/assets/RolesTab-cg8r2k6J.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-DV9xE6V0.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-Cre8FArV.js +1 -0
  23. package/dist/assets/ThemeShowroom-DxfyV3nj.js +1 -0
  24. package/dist/assets/{TimeRangePicker-BrRrLGuZ.js → TimeRangePicker-CY6cFX3v.js} +1 -1
  25. package/dist/assets/TracesTab-C5hnZP3-.js +1 -0
  26. package/dist/assets/UsersTab-DDINHhFG.js +1 -0
  27. package/dist/assets/button-DXGXeanX.js +1 -0
  28. package/dist/assets/{card-DfgoJ62e.js → card-B60DsQBe.js} +1 -1
  29. package/dist/assets/chevrons-up-down-CeISPPN2.js +1 -0
  30. package/dist/assets/{compatView-DkKdPV6Y.js → compatView-BKe3swOt.js} +1 -1
  31. package/dist/assets/dispatchErrorInfo-DekuLV6o.js +1 -0
  32. package/dist/assets/{dist-uaKglBXL.js → dist-AH7-HhdT.js} +1 -1
  33. package/dist/assets/{dist-BUmwZkrg.js → dist-By-c_NRB.js} +1 -1
  34. package/dist/assets/dist-BzNYkP4V.js +44 -0
  35. package/dist/assets/{dist-nuTFLy00.js → dist-CWfWFr7t.js} +1 -1
  36. package/dist/assets/{highlighted-body-OFNGDK62-CFixeKPt.js → highlighted-body-OFNGDK62-CVA3g0hA.js} +1 -1
  37. package/dist/assets/index-CKlFEsq3.js +227 -0
  38. package/dist/assets/{index-CwMQjTTm.css → index-DnIjl_W2.css} +1 -1
  39. package/dist/assets/mermaid-GHXKKRXX-BKbfiXDa.js +1 -0
  40. package/dist/assets/roleDescriptions-BN-dndvd.js +1 -0
  41. package/dist/assets/{table-DwL2Ye60.js → table-AFxsandT.js} +1 -1
  42. package/dist/assets/{tabs-B6uAHd27.js → tabs-9X-5Pgx3.js} +1 -1
  43. package/dist/assets/x-DQ_CLIEK.js +1 -0
  44. package/dist/index.html +8 -8
  45. package/package.json +1 -1
  46. package/dist/assets/AccessTab-TkrgrzLa.js +0 -1
  47. package/dist/assets/AgentFilesTab-CatKzUVP.js +0 -3
  48. package/dist/assets/AnomaliesTab-DSRyvaxR.js +0 -1
  49. package/dist/assets/BridgeTab-B7qr2P6q.js +0 -1
  50. package/dist/assets/ChatDefaultsTab-iOv_x32i.js +0 -1
  51. package/dist/assets/FeedbacksTab-CvsErlG2.js +0 -1
  52. package/dist/assets/FilesTab-B33o68UO.js +0 -1
  53. package/dist/assets/GroupsTab-CdvzID07.js +0 -1
  54. package/dist/assets/InstancesTab-CGkYjfNo.js +0 -1
  55. package/dist/assets/IntegrationsTab-CQpiJULa.js +0 -1
  56. package/dist/assets/PreferencesTab-C7qcojIg.js +0 -1
  57. package/dist/assets/PromptInjectionsTab-CogXAvHV.js +0 -2
  58. package/dist/assets/RolesTab--gHOFpff.js +0 -1
  59. package/dist/assets/ServiceAccountsTab-Cp2DaUB7.js +0 -1
  60. package/dist/assets/SubAgentReportsTab-UtnXHw5b.js +0 -1
  61. package/dist/assets/ThemeShowroom-cqNDsPWJ.js +0 -1
  62. package/dist/assets/TracesTab-nnYTuzmk.js +0 -1
  63. package/dist/assets/UsersTab-C0cFq4Am.js +0 -1
  64. package/dist/assets/button-C-Nb2Vgm.js +0 -1
  65. package/dist/assets/chevrons-up-down-BX1oFIbx.js +0 -1
  66. package/dist/assets/dispatchErrorInfo-B5yYJpqG.js +0 -1
  67. package/dist/assets/dist-dqCqhBJa.js +0 -44
  68. package/dist/assets/index-Chpx7q4s.js +0 -227
  69. package/dist/assets/mermaid-GHXKKRXX-l2fnQUrB.js +0 -1
  70. package/dist/assets/roleDescriptions-BAcwraVL.js +0 -1
  71. package/dist/assets/x-BK7YTQm6.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$d as r,$y as i,Af as a,Ay as o,By as s,CD as c,Cf as l,Df as u,Dy as d,Ef as f,Ey as p,Fy as m,Gy as h,Iy as g,Jy as _,Ky as v,Ly as y,Mf as ee,My as b,Nf as x,Ny as S,Of as te,Oy as C,Py as w,Qd as ne,Qy as re,Ry as T,SD as E,Sf as ie,Tf as ae,Xd as D,Xy as O,Yd as k,Yy as A,Zd as oe,Zy as se,_D as j,_f as ce,ab as le,af as ue,bf as de,cb as fe,cf as pe,db as me,df as he,eb as ge,ef as _e,fb as ve,ff as ye,gD as M,gf as be,hb as N,hf as xe,ib as P,if as Se,jf as Ce,jy as F,kf as we,ky as Te,lb as Ee,lf as De,mb as Oe,mf as ke,nb as I,nf as Ae,ob as je,of as Me,pb as Ne,pf as Pe,qy as Fe,rb as L,rf as Ie,sb as Le,sf as Re,tb as ze,tf as Be,ub as Ve,uf as He,vf as Ue,wf as We,xf as Ge,yf as Ke,zy as qe}from"./dist-BzNYkP4V.js";import{n as Je}from"./dist-CWfWFr7t.js";import{t as Ye}from"./x-DQ_CLIEK.js";import{i as R,n as z,r as Xe,t as Ze}from"./tabs-9X-5Pgx3.js";import{t as B}from"./button-DXGXeanX.js";import{$ as Qe,C as V,Ct as $e,Dt as et,Mt as tt,Q as nt,S as H,X as U,a as rt,b as W,et as it,i as at,jt as ot,k as st,nt as ct,o as lt,ot as ut,r as dt,rt as ft,wt as pt,x as G,y as K}from"./index-CKlFEsq3.js";import{n as mt}from"./TimeRangePicker-CY6cFX3v.js";import{t as ht}from"./FilterBar-CSA8xMkl.js";import{t as gt}from"./AdvancedFilter-D7QXVQ5_.js";import{t as _t}from"./DataTableShell-C1ZKbpq3.js";var vt=j(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),yt=j(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),q=t(e(),1),J=n(),Y={kind:`relative`,from:`now-520w`,to:`now`},X=e=>e===null?`-`:String(Math.round(e));function bt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?O():n===`agent`?`${A()} - ${r}`:e}function xt(){let e=c(M.me.getMe,{host:ut})?.role===`admin`,t=c(M.deliveryTiming.getDeliveryStatus,{}),n=E(M.deliveryTiming.startDeliveryRecord),r=E(M.deliveryTiming.stopDeliveryRecord),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),l=t?.recording??!1,u=async()=>{s(!0);try{l?await r({}):await n({})}finally{s(!1)}};return(0,J.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h3`,{className:`text-sm font-semibold`,children:N()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Oe()})]}),e?(0,J.jsx)(B,{variant:l?`destructive`:`default`,size:`sm`,disabled:o||t===void 0,onClick:()=>void u(),children:l?ve():Ne()}):null]}),l?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(U,{variant:`secondary`,children:me()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:Ve({time:new Date(t.startedAt).toLocaleTimeString()})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?Le():fe()})}),i?(0,J.jsx)(St,{isAdmin:e}):null]})}function St({isAdmin:e}){let t=c(M.deliveryTiming.listDeliverySessions,{}),n=E(M.deliveryTiming.deleteDeliverySessions),[r,a]=(0,q.useState)(``),[o,s]=(0,q.useState)(`all`),[l,u]=(0,q.useState)(Y),[f,p]=(0,q.useState)(null),{from:m,to:h}=mt(l),g=l.to===`now`?1/0:h,y=r.trim()!==``||o!==`all`||l!==Y,ee=()=>{a(``),s(`all`),u(Y)},b=(0,q.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(o===`all`||(o===`active`?t.active:!t.active))&&t.startedAt>=m&&t.startedAt<=g).map(e=>({...e,_id:e.sessionId}))},[t,r,o,m,g]),x=e=>{let t=new Set((b??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),f!==null&&r.includes(f)&&p(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(ht,{q:r,onQChange:a,searchPlaceholder:le(),timeRange:l,onTimeRangeChange:u,onReset:ee,canReset:y,children:(0,J.jsxs)(K,{value:o,onValueChange:e=>s(e),children:[(0,J.jsx)(H,{size:`sm`,className:`w-36`,children:(0,J.jsx)(V,{})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:`all`,children:P()}),(0,J.jsx)(G,{value:`active`,children:L()}),(0,J.jsx)(G,{value:`stopped`,children:I()})]})]})}),(0,J.jsx)(_t,{title:je(),rows:b,emptyHint:d(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":f===e.sessionId?Fe():_(),onClick:()=>p(t=>t===e.sessionId?null:e.sessionId),children:f===e.sessionId?(0,J.jsx)(vt,{size:15,"aria-hidden":!0}):(0,J.jsx)(pt,{size:15,"aria-hidden":!0})})},{header:ze(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.startedAt).toLocaleString()})},{header:ge(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,J.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.stoppedAt).toLocaleString()})},{header:i(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:re(),sort:e=>e.startedBy,cell:e=>bt(e.startedBy)},{header:se(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(U,{variant:`secondary`,children:L()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:I()})}],rowActions:e?e=>[{label:v(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:v(),variant:`destructive`,onSelect:e=>x(e)}]:void 0,isExpanded:e=>e.sessionId===f,renderExpanded:e=>(0,J.jsx)(Ct,{sessionId:e.sessionId})})]})}function Ct({sessionId:e}){let t=c(M.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(wt,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(st(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function wt({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:h()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ee()});let r=e.segments,i=(e,t)=>(0,J.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,J.jsx)(`td`,{className:`py-1`,children:e}),(0,J.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,J.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[X(t.p50),` / `,X(t.p95),` / `,X(t.max)]})]});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,p()]}),(0,J.jsxs)(B,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)(Je,{size:13,"aria-hidden":!0}):(0,J.jsx)(et,{size:13,"aria-hidden":!0}),t?C():Te()]})]}),(0,J.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,J.jsx)(`th`,{className:`py-1 font-medium`,children:T()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:y()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:g()})]})}),(0,J.jsxs)(`tbody`,{children:[i(m(),r.bridge),i(w(),r.A),i(S(),r.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:b()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:o()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:F()})]})}var Tt=[50,100,200,500],Z=`all`,Q=`__all__`,Et=[`2xx`,`4xx`,`5xx`],Dt=[`user`,`service`,`system`],Ot=[`inbound`,`outbound`,`internal`],kt={kind:`relative`,from:`now-30d`,to:`now`},At=[{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 jt(){let e=tt({from:`/settings/traces`}),t=ot({from:`/settings/traces`}),n=e.limit,i=e.kind,o=e.statusClass??Q,d=e.principalType??Q,p=e.direction??Q,m=e.roleKey??Q,h=e.q??``,g=dt(e.from,e.to),_=(0,q.useMemo)(()=>lt(e.adv),[e.adv]),{from:v,to:y}=mt(g),[b,S]=(0,q.useState)(null),[C,w]=(0,q.useState)(null),re=e=>void t({search:t=>({...t,limit:e})}),T=e=>void t({search:t=>({...t,kind:e})}),E=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),D=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),O=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),A=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),oe=e=>void t({search:t=>({...t,...rt(e)})}),se=e=>void t({search:t=>({...t,adv:at(e)}),replace:!0}),j=c(M.observability.listEvents,{limit:n}),le=c(M.observability.listEvents,{limit:n,kind:i===Z?void 0:i,filter:{q:h||void 0,from:v,to:y,statusClass:o===Q?void 0:o,principalType:d===Q?void 0:d,direction:p===Q?void 0:p,roleKey:m===Q?void 0:m,advanced:_.length>0?_:void 0}}),fe=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),me=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),ge=h!==``||o!==Q||d!==Q||p!==Q||m!==Q||_.length>0||g.kind!==`relative`||g.from!==kt.from;function ve(){t({search:{limit:100,kind:`all`},replace:!0})}let N=b?j?.filter(e=>e.correlationId===b):le,[P,F]=(0,q.useState)(`events`);return(0,J.jsxs)(Ze,{value:P,onValueChange:e=>F(e),children:[(0,J.jsxs)(Xe,{className:`w-full`,children:[(0,J.jsxs)(R,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)($e,{size:13,"aria-hidden":!0}),s()]}),(0,J.jsxs)(R,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(yt,{size:13,"aria-hidden":!0}),qe()]})]}),(0,J.jsx)(z,{value:`latency`,children:(0,J.jsx)(xt,{})}),(0,J.jsxs)(z,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[x(),(0,J.jsx)(`strong`,{children:ee()}),Ce(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:a()})]}),(0,J.jsxs)(ht,{q:h,onQChange:E,searchPlaceholder:we(),timeRange:g,onTimeRangeChange:oe,onReset:ve,canReset:ge,children:[(0,J.jsxs)(K,{value:o,onValueChange:D,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:te()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:u()}),Et.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:d,onValueChange:O,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:f()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:ae()}),Dt.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:p,onValueChange:k,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:We()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:l()}),Ot.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:m,onValueChange:A,children:[(0,J.jsx)(H,{size:`sm`,className:`w-36`,children:(0,J.jsx)(V,{placeholder:ie()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:Ge()}),me.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:i,onValueChange:T,children:[(0,J.jsx)(H,{size:`sm`,className:`w-44`,children:(0,J.jsx)(V,{placeholder:de()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Z,children:Ke()}),fe.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:String(n),onValueChange:e=>re(Number(e)),children:[(0,J.jsx)(H,{size:`sm`,className:`w-28`,children:(0,J.jsx)(V,{})}),(0,J.jsx)(W,{children:Tt.map(e=>(0,J.jsx)(G,{value:String(e),children:Ue({count:e})},e))})]})]}),(0,J.jsx)(gt,{fields:At,seed:_,onChange:se}),b?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>S(null),title:ce(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[be(),(0,J.jsx)(`code`,{children:$(b)})]}),(0,J.jsx)(Ye,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:xe()})]})}):null,(0,J.jsx)(_t,{title:ke(),rows:N,emptyHint:b?Pe():ye(),columns:[{header:he(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:He(),sort:e=>e.kind,cell:e=>(0,J.jsx)(U,{variant:`secondary`,children:e.kind})},{header:De(),sort:e=>Nt(e)??null,cell:e=>{let t=Nt(e);return t?(0,J.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,J.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":pe(),children:`✓`})}},{header:Re(),sort:e=>e.direction,cell:e=>e.direction?(0,J.jsx)(U,{variant:`outline`,children:e.direction}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Me(),sort:e=>e.principalType,cell:e=>(0,J.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,J.jsx)(U,{variant:`outline`,children:e.principalType}),e.principalId?(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:ue(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,J.jsx)(U,{variant:`secondary`,children:e.roleKey}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Se(),sort:e=>e.route,cell:e=>e.route?(0,J.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,J.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ie(),sort:e=>e.status,cell:e=>e.status===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsx)(`span`,{className:`oc-traces__status ${Mt(e.status)}`,children:e.status})},{header:Ae(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:Be(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:_e(),onClick:()=>S(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:r(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>w(e),children:ne()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(Pt,{row:C,onClose:()=>w(null)})]})]})}function Mt(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 Nt(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 Pt({row:e,onClose:t}){let n=(0,q.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,J.jsx)(nt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(Qe,{className:`max-w-lg`,children:[(0,J.jsxs)(ct,{children:[(0,J.jsxs)(ft,{className:`oc-traces__meta-title`,children:[oe(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(U,{variant:`outline`,children:D()})]}),(0,J.jsx)(it,{children:k()})]}),(0,J.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{jt as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$g as r,Bg as i,CD as a,Gg as o,Hg as s,Jg as c,Kg as l,Qg as u,SD as d,Ug as f,Vg as ee,Wg as te,Xg as ne,Yg as re,Zg as ie,_d as p,a_ as ae,bd as m,c_ as oe,d_ as se,dd as h,e_ as ce,f_ as g,fd as _,gD as v,gd as y,hd as b,i_ as le,l_ as ue,ld as x,m_ as S,md as C,n_ as de,o_ as fe,p_ as w,pd as T,qg as E,r_ as D,s_ as pe,t_ as me,u_ as he,ud as O,vd as k,xd as A,xg as ge,yd as j}from"./dist-BzNYkP4V.js";import{t as M}from"./button-DXGXeanX.js";import{$ as N,A as P,C as F,G as I,K as L,M as _e,Mt as ve,Q as R,S as z,W as B,X as V,Y as ye,_ as H,_t as U,b as W,d as G,et as be,f as K,gt as q,j as xe,jt as Se,nt as Ce,ot as we,p as J,q as Te,rt as Ee,x as Y,y as X}from"./index-CKlFEsq3.js";import{t as De}from"./FilterBar-CSA8xMkl.js";import{t as Oe}from"./DataTableShell-C1ZKbpq3.js";import{t as ke}from"./DetailChips-Dg4YEpwe.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=a(v.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=a(v.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,u=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),d=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!u.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}))],f=new Map;for(let e of d){let t=f.get(e.instanceName)??[];t.push(e),f.set(e.instanceName,t)}return(0,Q.jsx)(R,{open:n,onOpenChange:r,children:(0,Q.jsxs)(N,{className:`oc-access`,children:[(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:A({user:t})}),(0,Q.jsx)(be,{children:m()})]}),i?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?j():k()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:p()}):d.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:C()}):[...f.entries()].map(([t,n])=>(0,Q.jsx)(je,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function je({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=d(v.agents.assignAgent),s=d(v.agents.removeAgent),c=d(v.agents.setDefaultAgent),l=P();if(!e)return null;async function u(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(y(),e)}}async function f(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(b(),e)}}return(0,Q.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Q.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Q.jsx)(U,{size:13,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:t}),(0,Q.jsx)(V,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(H,{checked:r,disabled:s&&!r,onCheckedChange:()=>void u(e.agentId,r),"aria-label":T({name:e.displayName??e.agentId})}),(0,Q.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Q.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,Q.jsx)(V,{variant:`outline`,className:`oc-access__gone`,children:_()}):null,e.outOfPool?(0,Q.jsx)(V,{variant:`outline`,className:`oc-access__gone`,children:h()}):null,r?o?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":O(),title:O(),children:(0,Q.jsx)(q,{size:14,fill:`currentColor`})}):(0,Q.jsx)(M,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":x(),title:x(),onClick:()=>void f(e.agentId),children:(0,Q.jsx)(q,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=G.filter(e=>n.has(J[e])).length;return(0,Q.jsxs)(B,{children:[(0,Q.jsx)(ye,{asChild:!0,children:(0,Q.jsx)(M,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?S():w({count:r})})}),(0,Q.jsxs)(I,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(Te,{children:g()}),G.map(e=>{let r=J[e];return(0,Q.jsxs)(L,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Q.jsx)(H,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Q.jsx)(`span`,{children:K[e]??e})]},e)})]})]})}function Ne(){let e=ve({from:`/settings/users`}),t=Se({from:`/settings/users`}),n=e.q??``,p=e.role??$,m=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),h=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),g=a(v.admin.listUsers,{filter:{q:n||void 0,role:p===$?void 0:p},withAgents:!0}),_=a(v.me.getMe,{host:we}),y=d(v.admin.setRole),b=d(v.admin.setUserPermissions),x=d(v.admin.startImpersonation),S=d(v.admin.deleteUser),C=d(v.admin.setUserName),w=xe(),T=_e(),O=P(),[k,A]=(0,Z.useState)(null),j=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of g??[])e.add(t.role);return[...e]},[g]),M=n!==``||p!==$;function N(){t({search:{},replace:!0})}async function I(e){try{await y(e)}catch(e){O.error(se(),e)}}async function L(e){try{await b(e)}catch(e){O.error(he(),e)}}async function R(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await w({title:D(),description:de({user:t}),confirmWord:me(),confirmLabel:ce(),destructive:!0}))try{await S({profileId:e._id}),O.success(u({user:t}))}catch(e){O.error(r(),e)}}async function B(e){let t=e.email||e.name||e.userId.slice(0,8),n=await T({title:ne(),label:re({user:t}),placeholder:c(),defaultValue:e.name??``,confirmLabel:ge()});if(n!==null)try{await C({profileId:e._id,name:n}),O.success(E())}catch(e){O.error(l(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(De,{q:n,onQChange:m,searchPlaceholder:ue(),onReset:N,canReset:M,children:(0,Q.jsxs)(X,{value:p,onValueChange:h,children:[(0,Q.jsx)(z,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(W,{children:[(0,Q.jsx)(Y,{value:$,children:oe()}),j.map(e=>(0,Q.jsx)(Y,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:pe(),rows:g,emptyHint:fe(),rowActions:e=>{let t=[{label:i(),onSelect:()=>A({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:ie(),onSelect:()=>void B(e)}];return e.userId!==_?.userId&&t.push({label:ae(),onSelect:()=>void x({profileId:e._id})},{label:le(),variant:`destructive`,onSelect:()=>void R(e)}),t},columns:[{header:o(),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,Q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Q.jsx)(`span`,{children:t}),n?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:te(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(X,{value:e.role,onValueChange:t=>void I({profileId:e._id,role:t}),children:[(0,Q.jsx)(z,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(W,{children:[(0,Q.jsx)(Y,{value:`pending`,children:`pending`}),(0,Q.jsx)(Y,{value:`user`,children:`user`}),(0,Q.jsx)(Y,{value:`admin`,children:`admin`})]})]})},{header:f(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:s()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),L({profileId:e._id,permissions:[...n]})}})},{header:ee(),cell:e=>(0,Q.jsx)(ke,{icon:(0,Q.jsx)(U,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Q.jsx)(Ae,{profileId:k?.profileId??null,userLabel:k?.label??``,open:k!==null,onOpenChange:e=>{e||A(null)}})]})}export{Ne as UsersTab};
@@ -0,0 +1 @@
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{dD as n,n as r,t as i}from"./dist-BzNYkP4V.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-dqCqhBJa.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-BzNYkP4V.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{_D as e}from"./dist-BzNYkP4V.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{Fn as e,Jn as t,Ln as n,Pn as r,Rn as i,zn as a}from"./dist-dqCqhBJa.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`?a():e===`beyond`?i():n()}function p(e){return e??t()}function m(t){return t===null?r():e({version:t})}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{Fn as e,Jn as t,Ln as n,Pn as r,Rn as i,zn as a}from"./dist-BzNYkP4V.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`?a():e===`beyond`?i():n()}function p(e){return e??t()}function m(t){return t===null?r():e({version:t})}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};
@@ -0,0 +1 @@
1
+ import{$o as e,Jo as t,Qo as n,Ss as r,Xo as i,Yo as a,Zo as o,_s as s,as as c,bs as l,cs as u,ds as d,es as f,fs as p,gs as m,hs as h,is as g,ls as _,ms as v,ns as y,os as b,ps as x,rs as S,ss as C,ts as w,us as T,vs as E,xs as D,ys as O}from"./dist-BzNYkP4V.js";var k={AGENT_NOT_FOUND:()=>({label:r(),hint:D()}),AUTH_TOKEN_MISMATCH:()=>({label:l(),hint:O()}),DEVICE_SIGNING_FAILED:()=>({label:E(),hint:s()}),SESSION_SCOPE_DENIED:()=>({label:m(),hint:h()}),GATEWAY_TIMEOUT:()=>({label:v(),hint:x()}),GATEWAY_DISCONNECTED:()=>({label:p(),hint:d()}),ATTACHMENT_TOO_LARGE:()=>({label:u(),hint:C()}),ATTACHMENT_REJECTED:()=>({label:b(),hint:c()}),BRIDGE_UNREACHABLE:()=>({label:T(),hint:_()}),INVALID_REQUEST:()=>({label:g(),hint:S()}),NOT_CONFIGURED:()=>({label:y(),hint:w()}),UNROUTED:()=>({label:f(),hint:e()}),UPSTREAM_ERROR:()=>({label:n(),hint:o()}),UNKNOWN:()=>({label:i(),hint:a()})};function A(e){return e?k[e]?.()??{label:e,hint:t()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{eD as r,fD as i,sD as a,uD as o}from"./dist-dqCqhBJa.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=a(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:o(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=a(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=l.useRef(null),s=o(t,a),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(a,{ref:a,...i}),()=>void d.itemMap.delete(a))),(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};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{_D as r,aD as i,fD as a,hD as o}from"./dist-BzNYkP4V.js";var s=r(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=r(`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,r]=i(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=a(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:o(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=a(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=l.useRef(null),s=o(t,a),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(a,{ref:a,...i}),()=>void d.itemMap.delete(a))),(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,r]}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,4 +1,4 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$E as r,GE as i,JE as a,KE as o,UE as s,WE as c,XE as l,YE as u,ZE as d,eD as f,iD as p,qE as m,rD as h,sD as g,uD as _}from"./dist-dqCqhBJa.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=f(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,f]=d({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:u(),titleId:u(),descriptionId:u(),open:l,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(E,n),a=_(t,i.triggerRef);return(0,y.jsx)(p.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":q(i.open),...r,ref:a,onClick:h(e.onClick,i.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(l,{present:n||a.open,children:(0,y.jsx)(o,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(l,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=g(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(c,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(p.div,{"data-state":q(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(l,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),i=_(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return s(e)},[]),(0,y.jsx)(B,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:h(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:h(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...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()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),d=_(t,u);return i(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,y.jsx)(a,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:l.titleId}),(0,y.jsx)($,{contentRef:u,descriptionId:l.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(p.h2,{id:i.titleId,...r,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(U,n);return(0,y.jsx)(p.p,{id:i.descriptionId,...r,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(G,n);return(0,y.jsx)(p.button,{type:`button`,...r,ref:t,onClick:h(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=r(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$E as r,JE as i,QE as a,XE as o,YE as s,ZE as c,aD as l,cD as u,eD as d,fD as f,hD as p,iD as m,lD as h,nD as g,tD as _}from"./dist-BzNYkP4V.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=l(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=g({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:d(),titleId:d(),descriptionId:d(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(E,n),a=p(t,i.triggerRef);return(0,y.jsx)(h.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":q(i.open),...r,ref:a,onClick:u(e.onClick,i.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(_,{present:n||a.open,children:(0,y.jsx)(c,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(_,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=f(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(s,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(h.div,{"data-state":q(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(_,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),a=p(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return i(e)},[]),(0,y.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:u(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:u(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:u(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...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()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:c,...l}=e,u=w(I,n),d=v.useRef(null),f=p(t,d);return o(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(a,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:c,children:(0,y.jsx)(r,{role:`dialog`,id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":q(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:u.titleId}),(0,y.jsx)($,{contentRef:d,descriptionId:u.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(h.h2,{id:i.titleId,...r,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(U,n);return(0,y.jsx)(h.p,{id:i.descriptionId,...r,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(G,n);return(0,y.jsx)(h.button,{type:`button`,...r,ref:t,onClick:u(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=m(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
2
 
3
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
4