@lacneu/atrium 0.49.0 → 0.51.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 (74) hide show
  1. package/dist/assets/AccessTab-BTTUfIwc.js +1 -0
  2. package/dist/assets/{AdvancedFilter-BzRzcaLe.js → AdvancedFilter-BQlL-4N9.js} +1 -1
  3. package/dist/assets/AgentFilesTab-By3Jzopm.js +3 -0
  4. package/dist/assets/AnomaliesTab-Cs6vlfDv.js +1 -0
  5. package/dist/assets/AuditTab-BOu6pgTB.js +1 -0
  6. package/dist/assets/BridgeTab-DFpunFsv.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-DkHZTknY.js +1 -0
  8. package/dist/assets/{DataTableShell-CySP6pgB.js → DataTableShell-KGrtOG5M.js} +1 -1
  9. package/dist/assets/{DetailChips-CqgbiqUw.js → DetailChips-C2LFFpNg.js} +1 -1
  10. package/dist/assets/FeedbacksTab-D34MEu6C.js +1 -0
  11. package/dist/assets/{FieldLabel-CyXK3G_H.js → FieldLabel-CKVYl95W.js} +1 -1
  12. package/dist/assets/FilesTab-ByKXXey8.js +1 -0
  13. package/dist/assets/{FilterBar-irfwrPVv.js → FilterBar-BVVVO1_O.js} +1 -1
  14. package/dist/assets/GroupsTab-CJUI6gQ9.js +1 -0
  15. package/dist/assets/InstancesTab-Cb_2msXj.js +1 -0
  16. package/dist/assets/IntegrationsTab-B9Nkc7-l.js +1 -0
  17. package/dist/assets/KpiTab-B6SqslSj.js +1 -0
  18. package/dist/assets/PreferencesTab-BdvOFp2E.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-CgAFhOn5.js +4 -0
  20. package/dist/assets/RolesTab-CtV113pW.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-Bu_j0kUL.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-G_s4_aPf.js +1 -0
  23. package/dist/assets/ThemeShowroom-CbU-xJra.js +1 -0
  24. package/dist/assets/{TimeRangePicker-3h2VniWx.js → TimeRangePicker-NSOkx3C0.js} +1 -1
  25. package/dist/assets/TracesTab-Wo-rxO1v.js +1 -0
  26. package/dist/assets/UsersTab-DO7Wa8iJ.js +1 -0
  27. package/dist/assets/VoiceTab-ilUT53Ds.js +1 -0
  28. package/dist/assets/{button-Dbs-wspp.js → button-b04wLuGq.js} +1 -1
  29. package/dist/assets/{card-B_7M0l5O.js → card-DdBF2ct9.js} +1 -1
  30. package/dist/assets/chevrons-up-down-Kyw8BbOf.js +1 -0
  31. package/dist/assets/{compatView-CeYXlVzu.js → compatView-S4X8HKXY.js} +1 -1
  32. package/dist/assets/dispatchErrorInfo-Cs8_1qCQ.js +1 -0
  33. package/dist/assets/{dist-CF-vNq7s.js → dist-6oi7FQ0i.js} +1 -1
  34. package/dist/assets/{dist-CZwMA8Oj.js → dist-CtUr3P8h.js} +1 -1
  35. package/dist/assets/{dist-BC4E1wqn.js → dist-DBet7oNc.js} +1 -1
  36. package/dist/assets/{dist-D8Kd0X5G.js → dist-HBBi9Y25.js} +5 -5
  37. package/dist/assets/{highlighted-body-OFNGDK62-DSPtdVav.js → highlighted-body-OFNGDK62-BOjjbbd6.js} +1 -1
  38. package/dist/assets/{index-BH6LVgWl.css → index-CBZrw7d-.css} +1 -1
  39. package/dist/assets/index-DBQ43N4_.js +238 -0
  40. package/dist/assets/mermaid-GHXKKRXX-CXCdU_oF.js +1 -0
  41. package/dist/assets/{pdf-Dwqw551E.js → pdf-D7AA0FY6.js} +1 -1
  42. package/dist/assets/roleDescriptions-onSlZ7A3.js +1 -0
  43. package/dist/assets/{table-RDie4v3L.js → table-CtNwimV_.js} +1 -1
  44. package/dist/assets/{tabs-uwXJdjSE.js → tabs-BJyz65LR.js} +1 -1
  45. package/dist/assets/x-DBKGK4o_.js +1 -0
  46. package/dist/index.html +8 -8
  47. package/package.json +1 -1
  48. package/dist/assets/AccessTab-C5QpmPe2.js +0 -1
  49. package/dist/assets/AgentFilesTab-DgyYp1Yu.js +0 -3
  50. package/dist/assets/AnomaliesTab-BfvM_oKR.js +0 -1
  51. package/dist/assets/AuditTab-B5U0zwjP.js +0 -1
  52. package/dist/assets/BridgeTab-BHnMaTub.js +0 -1
  53. package/dist/assets/ChatDefaultsTab-BKky_1Av.js +0 -1
  54. package/dist/assets/FeedbacksTab-UO9aY9Rc.js +0 -1
  55. package/dist/assets/FilesTab-BAhDA2Oi.js +0 -1
  56. package/dist/assets/GroupsTab-KElXEjtm.js +0 -1
  57. package/dist/assets/InstancesTab-CnxJKNrU.js +0 -1
  58. package/dist/assets/IntegrationsTab-C_WMMnfP.js +0 -1
  59. package/dist/assets/KpiTab-DLCBfUyr.js +0 -1
  60. package/dist/assets/PreferencesTab-CsHMsOBx.js +0 -1
  61. package/dist/assets/PromptInjectionsTab-Iuv2LIWX.js +0 -4
  62. package/dist/assets/RolesTab-JyOSiabk.js +0 -1
  63. package/dist/assets/ServiceAccountsTab-C1S0vg1x.js +0 -1
  64. package/dist/assets/SubAgentReportsTab-DmMB0i9U.js +0 -1
  65. package/dist/assets/ThemeShowroom-DxS8vmei.js +0 -1
  66. package/dist/assets/TracesTab-DTrYQKIz.js +0 -1
  67. package/dist/assets/UsersTab-Bg8hwoUX.js +0 -1
  68. package/dist/assets/VoiceTab-CjWmW8mr.js +0 -1
  69. package/dist/assets/chevrons-up-down-CGy16B32.js +0 -1
  70. package/dist/assets/dispatchErrorInfo-CgEoICK4.js +0 -1
  71. package/dist/assets/index-Se6baszB.js +0 -233
  72. package/dist/assets/mermaid-GHXKKRXX-C_IvlBqL.js +0 -1
  73. package/dist/assets/roleDescriptions-DuRh679l.js +0 -1
  74. package/dist/assets/x-B-jDgsYW.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$_ as r,B_ as i,Bw as a,CT as o,D as s,DM as c,E as l,F_ as u,Fw as d,G_ as f,Gw as p,H_ as m,Hw as h,I_ as g,Iw as _,J_ as ee,Jw as v,K_ as y,Kw as b,L_ as te,Lw as ne,M_ as x,N_ as S,OM as C,P_ as re,Q_ as ie,R_ as ae,Rw as w,ST as T,U_ as oe,Uw as E,V_ as se,Vw as D,W_ as ce,Ww as le,X_ as ue,Y_ as de,Yw as fe,Z_ as pe,_T as me,aT as he,av as ge,bT as _e,cT as ve,cv as ye,dT as O,dv as be,eT as xe,ev as Se,fT as k,fv as Ce,gT as we,gn as Te,hT as A,hn as j,hv as Ee,iT as M,iv as De,j_ as N,lT as P,lv as Oe,mT as F,mn as ke,mv as Ae,nT as je,nv as Me,oT as Ne,ov as Pe,pT as Fe,pv as Ie,q_ as Le,qw as Re,rT as ze,rv as Be,sT as Ve,sv as He,tT as I,tv as Ue,uT as We,uv as Ge,vT as Ke,wT as qe,xT as Je,yT as Ye,z_ as Xe,zw as Ze}from"./dist-HBBi9Y25.js";import{n as Qe}from"./dist-6oi7FQ0i.js";import{t as $e}from"./x-DBKGK4o_.js";import{i as L,n as R,r as et,t as tt}from"./tabs-BJyz65LR.js";import{t as z}from"./button-b04wLuGq.js";import{Bt as nt,C as B,S as V,Vt as rt,Wt as it,Xt as at,Yt as ot,a as st,b as H,ct as U,dt as ct,et as W,ft as lt,ht as ut,i as dt,j as ft,mt as pt,o as mt,r as ht,tt as gt,ut as _t,w as G,x as K,xt as vt}from"./index-DBQ43N4_.js";import{n as yt}from"./TimeRangePicker-NSOkx3C0.js";import{t as bt}from"./FilterBar-BVVVO1_O.js";import{t as xt}from"./AdvancedFilter-BQlL-4N9.js";import{t as St}from"./DataTableShell-KGrtOG5M.js";var Ct=s(`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`}]]),wt=s(`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 Tt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?he():n===`agent`?`${M()} - ${r}`:e}function Et(){let e=C(l.me.getMe,{host:vt})?.role===`admin`,t=C(l.deliveryTiming.getDeliveryStatus,{}),n=c(l.deliveryTiming.startDeliveryRecord),r=c(l.deliveryTiming.stopDeliveryRecord),[i,a]=(0,q.useState)(!1),[s,u]=(0,q.useState)(!1),d=t?.recording??!1,f=async()=>{u(!0);try{d?await r({}):await n({})}finally{u(!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:qe()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:o()})]}),e?(0,J.jsx)(z,{variant:d?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void f(),children:d?Je():T()}):null]}),d?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(U,{variant:`secondary`,children:_e()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:Ye({time:gt(t.startedAt)})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?we():me()})}),i?(0,J.jsx)(Dt,{isAdmin:e}):null]})}function Dt({isAdmin:e}){let t=C(l.deliveryTiming.listDeliverySessions,{}),n=c(l.deliveryTiming.deleteDeliverySessions),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(`all`),[s,u]=(0,q.useState)(Y),[d,f]=(0,q.useState)(null),{from:p,to:m}=yt(s),h=s.to===`now`?1/0:m,g=r.trim()!==``||a!==`all`||s!==Y,ee=()=>{i(``),o(`all`),u(Y)},v=(0,q.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(a===`all`||(a===`active`?t.active:!t.active))&&t.startedAt>=p&&t.startedAt<=h).map(e=>({...e,_id:e.sessionId}))},[t,r,a,p,h]),y=e=>{let t=new Set((v??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),d!==null&&r.includes(d)&&f(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(bt,{q:r,onQChange:i,searchPlaceholder:F(),timeRange:s,onTimeRangeChange:u,onReset:ee,canReset:g,children:(0,J.jsxs)(H,{value:a,onValueChange:e=>o(e),children:[(0,J.jsx)(B,{size:`sm`,className:`w-36`,children:(0,J.jsx)(G,{})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:`all`,children:Fe()}),(0,J.jsx)(V,{value:`active`,children:k()}),(0,J.jsx)(V,{value:`stopped`,children:O()})]})]})}),(0,J.jsx)(St,{title:A(),rows:v,emptyHint:_(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":d===e.sessionId?je():ze(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:d===e.sessionId?(0,J.jsx)(Ct,{size:15,"aria-hidden":!0}):(0,J.jsx)(rt,{size:15,"aria-hidden":!0})})},{header:We(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:W(e.startedAt)})},{header:P(),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:W(e.stoppedAt)})},{header:ve(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:Ve(),sort:e=>e.startedBy,cell:e=>Tt(e.startedBy)},{header:Ne(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(U,{variant:`secondary`,children:k()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:O()})}],rowActions:e?e=>[{label:I(),variant:`destructive`,onSelect:()=>y([e.sessionId])}]:void 0,bulkActions:e?[{label:I(),variant:`destructive`,onSelect:e=>y(e)}]:void 0,isExpanded:e=>e.sessionId===d,renderExpanded:e=>(0,J.jsx)(Ot,{sessionId:e.sessionId})})]})}function Ot({sessionId:e}){let t=C(l.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(kt,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(ft(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function kt({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:xe()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ke()});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,` `,d()]}),(0,J.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)(Qe,{size:13,"aria-hidden":!0}):(0,J.jsx)(it,{size:13,"aria-hidden":!0}),t?ne():w()]})]}),(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:Re()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:b()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:p()})]})}),(0,J.jsxs)(`tbody`,{children:[i(le(),r.bridge),i(E(),r.A),i(h(),r.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:D()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ze()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:a()})]})}var At=[50,100,200,500],Z=`all`,Q=`__all__`,jt=[`2xx`,`4xx`,`5xx`],Mt=[`user`,`service`,`system`],Nt=[`inbound`,`outbound`,`internal`],Pt={kind:`relative`,from:`now-30d`,to:`now`},Ft=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:Te()},{value:`principalType`,label:j()},{value:`direction`,label:`direction`},{value:`roleKey`,label:ke()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=at({from:`/settings/traces`}),t=ot({from:`/settings/traces`}),n=e.limit,a=e.kind,o=e.statusClass??Q,s=e.principalType??Q,c=e.direction??Q,d=e.roleKey??Q,p=e.q??``,h=ht(e.from,e.to),_=(0,q.useMemo)(()=>mt(e.adv),[e.adv]),{from:b,to:ne}=yt(h),[x,S]=(0,q.useState)(null),[w,T]=(0,q.useState)(null),E=e=>void t({search:t=>({...t,limit:e})}),D=e=>void t({search:t=>({...t,kind:e})}),le=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),me=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),he=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),_e=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),ve=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),O=e=>void t({search:t=>({...t,...st(e)})}),xe=e=>void t({search:t=>({...t,adv:dt(e)}),replace:!0}),k=C(l.observability.listEvents,{limit:n}),we=C(l.observability.listEvents,{limit:n,kind:a===Z?void 0:a,filter:{q:p||void 0,from:b,to:ne,statusClass:o===Q?void 0:o,principalType:s===Q?void 0:s,direction:c===Q?void 0:c,roleKey:d===Q?void 0:d,advanced:_.length>0?_:void 0}}),Te=(0,q.useMemo)(()=>{let e=new Set;for(let t of k??[])e.add(t.kind);return[...e].sort()},[k]),A=(0,q.useMemo)(()=>{let e=new Set;for(let t of k??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[k]),j=p!==``||o!==Q||s!==Q||c!==Q||d!==Q||_.length>0||h.kind!==`relative`||h.from!==Pt.from;function M(){t({search:{limit:100,kind:`all`},replace:!0})}let N=x?k?.filter(e=>e.correlationId===x):we,P=e.section,F=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,J.jsxs)(tt,{value:P,onValueChange:e=>F(e),children:[(0,J.jsxs)(et,{className:`w-full`,children:[(0,J.jsxs)(L,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(nt,{size:13,"aria-hidden":!0}),fe()]}),(0,J.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(wt,{size:13,"aria-hidden":!0}),v()]})]}),(0,J.jsx)(R,{value:`latency`,children:(0,J.jsx)(Et,{})}),(0,J.jsxs)(R,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[Ee(),(0,J.jsx)(`strong`,{children:Ae()}),Ie(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:Ce()})]}),(0,J.jsxs)(bt,{q:p,onQChange:le,searchPlaceholder:be(),timeRange:h,onTimeRangeChange:O,onReset:M,canReset:j,children:[(0,J.jsxs)(H,{value:o,onValueChange:me,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:Ge()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:Oe()}),jt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:s,onValueChange:he,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:ye()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:He()}),Mt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:c,onValueChange:_e,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:Pe()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:ge()}),Nt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:d,onValueChange:ve,children:[(0,J.jsx)(B,{size:`sm`,className:`w-36`,children:(0,J.jsx)(G,{placeholder:De()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:Be()}),A.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:a,onValueChange:D,children:[(0,J.jsx)(B,{size:`sm`,className:`w-44`,children:(0,J.jsx)(G,{placeholder:Me()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Z,children:Ue()}),Te.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:String(n),onValueChange:e=>E(Number(e)),children:[(0,J.jsx)(B,{size:`sm`,className:`w-28`,children:(0,J.jsx)(G,{})}),(0,J.jsx)(K,{children:At.map(e=>(0,J.jsx)(V,{value:String(e),children:Se({count:e})},e))})]})]}),(0,J.jsx)(xt,{fields:Ft,seed:_,onChange:xe}),x?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>S(null),title:r(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ie(),(0,J.jsx)(`code`,{children:$(x)})]}),(0,J.jsx)($e,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:pe()})]})}):null,(0,J.jsx)(St,{title:ue(),rows:N,emptyHint:x?de():ee(),columns:[{header:Le(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:W(e.at)})},{header:y(),sort:e=>e.kind,cell:e=>(0,J.jsx)(U,{variant:`secondary`,children:e.kind})},{header:f(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(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":ce(),children:`✓`})}},{header:oe(),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:m(),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:se(),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:i(),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:Xe(),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 ${Lt(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:te(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:g(),onClick:()=>S(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:u(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>T(e),children:re()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(zt,{row:w,onClose:()=>T(null)})]})]})}function Lt(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 Rt(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 zt({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)(_t,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(ct,{className:`max-w-lg`,children:[(0,J.jsxs)(pt,{children:[(0,J.jsxs)(ut,{className:`oc-traces__meta-title`,children:[S(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(U,{variant:`outline`,children:x()})]}),(0,J.jsx)(lt,{children:N()})]}),(0,J.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{It as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$S as r,$g as i,AS as a,BS as o,Cu as s,DM as c,DS as l,E as u,ES as d,FS as f,GS as p,Gg as m,HS as h,IS as ee,JS as te,Jg as g,KS as ne,Kg as _,LS as re,MS as ie,NS as ae,OM as v,OS as oe,PS as se,QS as y,Qg as b,RS as ce,Su as x,US as le,VS as ue,WS as S,XS as de,Xg as C,YS as fe,Yg as w,ZS as pe,Zg as T,eC as E,e_ as D,jS as me,kS as he,n_ as O,qS as ge,qg as k,r_ as A,sS as _e,t_ as j,xu as M,zS as N}from"./dist-HBBi9Y25.js";import{t as P}from"./button-b04wLuGq.js";import{B as F,C as I,Mt as L,Nt as R,S as z,V as ve,Xt as ye,Yt as be,at as B,b as V,c as xe,ct as H,dt as Se,ft as Ce,ht as we,it as Te,l as U,mt as Ee,nt as De,p as W,rt as Oe,s as G,st as ke,ut as Ae,w as K,x as q,xt as je,z as J}from"./index-DBQ43N4_.js";import{t as Me}from"./FilterBar-BVVVO1_O.js";import{t as Ne}from"./DataTableShell-KGrtOG5M.js";import{t as Pe}from"./DetailChips-C2LFFpNg.js";var Y=t(e(),1),X=n();function Fe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let a=v(u.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=v(u.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,d=new Set((a?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),f=[...(a?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!d.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,enabled:e.enabled,state:e.state,outOfPool:!0}))],p=new Map;for(let e of f){let t=p.get(e.instanceName)??[];t.push(e),p.set(e.instanceName,t)}return(0,X.jsx)(Ae,{open:n,onOpenChange:r,children:(0,X.jsxs)(Se,{className:`oc-access`,children:[(0,X.jsxs)(Ee,{children:[(0,X.jsx)(we,{children:A({user:t})}),(0,X.jsx)(Ce,{children:O()})]}),a?(0,X.jsx)(`p`,{className:`oc-access__hint`,children:a.inGroup?j():D()}):null,(0,X.jsx)(`div`,{className:`oc-access__list`,children:a===void 0?(0,X.jsx)(`p`,{className:`oc-access__hint`,children:i()}):f.length===0?(0,X.jsx)(`p`,{className:`oc-access__hint`,children:C()}):[...p.entries()].map(([t,n])=>(0,X.jsx)(Ie,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function Ie({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=c(u.agents.assignAgent),s=c(u.agents.removeAgent),l=c(u.agents.setDefaultAgent),d=J();if(!e)return null;async function f(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(b(),e)}}async function p(n){try{await l({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(T(),e)}}return(0,X.jsxs)(`div`,{className:`oc-access__group`,children:[(0,X.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,X.jsx)(R,{size:13,"aria-hidden":!0}),(0,X.jsx)(`span`,{children:t}),(0,X.jsx)(H,{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`,c=!e.enabled;return(0,X.jsxs)(`div`,{className:`oc-access__row${c?` is-disabled`:``}`,children:[(0,X.jsx)(W,{checked:r,disabled:(s||c)&&!r,onCheckedChange:()=>void f(e.agentId,r),"aria-label":w({name:e.displayName??e.agentId})}),(0,X.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,X.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,X.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:g()}):null,e.outOfPool?(0,X.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:k()}):null,r?o?(0,X.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":_(),title:_(),children:(0,X.jsx)(L,{size:14,fill:`currentColor`})}):(0,X.jsx)(P,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":m(),title:m(),disabled:c,onClick:()=>void p(e.agentId),children:(0,X.jsx)(L,{size:14})}):null]},e.agentId)})]})}var Z=`__all__`;function Q(e){switch(e){case`pending`:return M();case`user`:return x();case`admin`:return s();default:return e}}function Le({granted:e,onToggle:t}){let n=new Set(e),i=G.filter(e=>n.has(U[e])).length;return(0,X.jsxs)(De,{children:[(0,X.jsx)(ke,{asChild:!0,children:(0,X.jsx)(P,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:i===0?E():r({count:i})})}),(0,X.jsxs)(Oe,{align:`start`,className:`w-52`,children:[(0,X.jsx)(B,{children:y()}),G.map(e=>{let r=U[e];return(0,X.jsxs)(Te,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,X.jsx)(W,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,X.jsx)(`span`,{children:xe[e]()})]},e)})]})]})}function $(){let e=ye({from:`/settings/users`}),t=be({from:`/settings/users`}),n=e.q??``,r=e.role??Z,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,role:e===Z?void 0:e})}),m=v(u.admin.listUsers,{filter:{q:n||void 0,role:r===Z?void 0:r},withAgents:!0}),g=v(u.me.getMe,{host:je}),_=c(u.admin.setRole),y=c(u.admin.setUserPermissions),b=c(u.admin.startImpersonation),x=c(u.admin.deleteUser),C=c(u.admin.setUserName),w=F(),T=ve(),E=J(),[D,O]=(0,Y.useState)(null),k=(0,Y.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of m??[])e.add(t.role);return[...e]},[m]),A=n!==``||r!==Z;function j(){t({search:{},replace:!0})}async function M(e){try{await _(e)}catch(e){E.error(pe(),e)}}async function P(e){try{await y(e)}catch(e){E.error(de(),e)}}async function L(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await w({title:le(),description:h({user:t}),confirmWord:ue(),confirmLabel:o(),destructive:!0}))try{await x({profileId:e._id}),E.success(ce({user:t}))}catch(e){E.error(N(),e)}}async function B(e){let t=e.email||e.name||e.userId.slice(0,8),n=await T({title:ee(),label:f({user:t}),placeholder:se(),defaultValue:e.name??``,confirmLabel:_e()});if(n!==null)try{await C({profileId:e._id,name:n}),E.success(ae())}catch(e){E.error(ie(),e)}}return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Me,{q:n,onQChange:i,searchPlaceholder:fe(),onReset:j,canReset:A,children:(0,X.jsxs)(V,{value:r,onValueChange:s,children:[(0,X.jsx)(I,{size:`sm`,className:`w-36`,children:(0,X.jsx)(K,{})}),(0,X.jsxs)(q,{children:[(0,X.jsx)(z,{value:Z,children:te()}),k.map(e=>(0,X.jsx)(z,{value:e,children:Q(e)},e))]})]})}),(0,X.jsx)(Ne,{title:ge(),rows:m,emptyHint:ne(),rowActions:e=>{let t=[{label:d(),onSelect:()=>O({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:re(),onSelect:()=>void B(e)}];return e.userId!==g?.userId&&t.push({label:p(),onSelect:()=>void b({profileId:e._id})},{label:S(),variant:`destructive`,onSelect:()=>void L(e)}),t},columns:[{header:me(),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,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsx)(`span`,{children:t}),n?(0,X.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:a(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,X.jsxs)(V,{value:e.role,onValueChange:t=>void M({profileId:e._id,role:t}),children:[(0,X.jsx)(I,{size:`sm`,className:`w-28`,children:(0,X.jsx)(K,{})}),(0,X.jsxs)(q,{children:[(0,X.jsx)(z,{value:`pending`,children:Q(`pending`)}),(0,X.jsx)(z,{value:`user`,children:Q(`user`)}),(0,X.jsx)(z,{value:`admin`,children:Q(`admin`)})]})]})},{header:he(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,X.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:oe()}):(0,X.jsx)(Le,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),P({profileId:e._id,permissions:[...n]})}})},{header:l(),cell:e=>(0,X.jsx)(Pe,{icon:(0,X.jsx)(R,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,X.jsx)(Fe,{profileId:D?.profileId??null,userLabel:D?.label??``,open:D!==null,onOpenChange:e=>{e||O(null)}})]})}export{$ as UsersTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$ as r,At as i,Ct as a,D as o,DM as s,Dt as c,E as l,Et as u,Fl as d,Ft as f,H as ee,J as p,K as m,Mt as h,Nt as g,OM as _,Ot as v,Pt as y,Q as b,St as x,TM as S,Tt as te,U as ne,V as re,W as C,Y as w,_t as T,bt as ie,dt as ae,et as oe,ft as se,gt as E,hc as ce,ht as le,jt as ue,k as de,kt as D,mt as O,nt as fe,pc as pe,pt as me,q as k,tt as A,ut as j,vt as M,wt as N,xM as P,xt as F,yM as I,yt as L}from"./dist-HBBi9Y25.js";import{i as R,n as z,r as he,t as B}from"./tabs-BJyz65LR.js";import{t as V}from"./button-b04wLuGq.js";import{C as H,F as ge,I as U,L as W,Lt as _e,M as ve,N as ye,P as be,R as xe,S as G,Xt as Se,Yt as Ce,b as K,ct as q,kt as we,p as J,w as Y,x as X,xt as Te}from"./index-DBQ43N4_.js";/* empty css */var Ee=o(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),Z=t(e(),1),Q=n(),De=[[`auto`,()=>v()],[`fr-FR`,()=>fe()],[`en-US`,()=>A()],[`en-GB`,()=>oe()],[`de-DE`,()=>r()],[`es-ES`,()=>b()]],Oe=[[`0.75`,()=>u()],[`1`,()=>te()],[`1.25`,()=>N()],[`1.5`,()=>a()]],$=0;function ke({instance:e}){let t=s(l.admin.upsertInstanceConfig),n=e.config??{},r={enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0},[a,o]=(0,Z.useState)(r),[u,f]=(0,Z.useState)(`idle`),[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(!1),_=S(l.voice.gatewayTtsPreview);(0,Z.useEffect)(()=>{o({enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0}),f(`idle`)},[e._id]);let v=a.enabled!==r.enabled||a.engine!==r.engine||a.lang!==r.lang||a.rate!==r.rate||a.autoRead!==r.autoRead;async function y(){f(`saving`);try{let n={...e.config??{}};n.voiceEnabled=a.enabled,a.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,a.lang===`auto`?delete n.voiceLang:n.voiceLang=a.lang;let r=Number.parseFloat(a.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,a.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),f(`idle`)}catch{f(`error`)}}return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:e.name}),(0,Q.jsx)(q,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(J,{checked:a.enabled,onCheckedChange:e=>o({...a,enabled:e===!0}),"aria-label":i()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:i()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:C()}),(0,Q.jsxs)(K,{value:a.engine,onValueChange:e=>o({...a,engine:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":C(),children:(0,Q.jsx)(Y,{})}),(0,Q.jsxs)(X,{children:[(0,Q.jsx)(G,{value:`browser`,children:ne()}),e.kind===`hermes`?null:(0,Q.jsx)(G,{value:`gateway`,children:ee()})]})]})]}),a.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:re()}):null,a.engine===`gateway`?null:(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:D()}),(0,Q.jsxs)(K,{value:a.lang,onValueChange:e=>o({...a,lang:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":D(),children:(0,Q.jsx)(Y,{})}),(0,Q.jsx)(X,{children:De.map(([e,t])=>(0,Q.jsx)(G,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:c()}),(0,Q.jsxs)(K,{value:a.rate,onValueChange:e=>o({...a,rate:e}),disabled:!a.enabled,children:[(0,Q.jsx)(H,{size:`sm`,"aria-label":c(),children:(0,Q.jsx)(Y,{})}),(0,Q.jsx)(X,{children:Oe.map(([e,t])=>(0,Q.jsx)(G,{value:e,children:t()},e))})]})]}),a.engine===`gateway`?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(J,{checked:a.autoRead,onCheckedChange:e=>o({...a,autoRead:e===!0}),disabled:!a.enabled,"aria-label":x()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:x()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:F()})]}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(V,{size:`sm`,disabled:!v||u===`saving`,onClick:()=>void y(),children:u===`saving`?d():ce()}),(0,Q.jsx)(V,{variant:`outline`,size:`sm`,disabled:!a.enabled||p,onClick:()=>{let t=Number.parseFloat(a.rate)||1,n=++$;if(g(!1),W(),U(),a.engine!==`gateway`){ge(M(),{lang:be(a.lang,P()),rate:t});return}m(!0),_({instanceName:e.name,text:M()}).then(({mime:e,audioBase64:r})=>{n===$&&ye(r,e,{rate:t})}).catch(()=>{n===$&&g(!0)}).finally(()=>m(!1))},children:p?d():ie()}),(0,Q.jsx)(V,{variant:`ghost`,size:`sm`,onClick:()=>{$++,m(!1),W(),U()},children:L()})]}),u===`error`||h?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:h?de():pe()}):null]})}function Ae({stt:e}){let t=_(l.me.getMe,{host:Te}),n=s(l.admin.setFeatureEnabled),r=t?.ui?.featuresEnabled?.voiceInput===!0,i=t?.role===`admin`;return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:E()}),(0,Q.jsx)(q,{variant:e?`secondary`:`outline`,children:e?ae():j()}),(0,Q.jsx)(q,{variant:r?`secondary`:`destructive`,children:r?p():k()})]}),i?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(J,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":w()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:w()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:le()})]})}function je(){let e=_(l.admin.listInstances,{}),t=(0,Z.useMemo)(()=>xe(),[]),n=(0,Z.useMemo)(()=>ve(),[]),{section:r}=Se({from:`/settings/voice`}),i=Ce({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:f()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(q,{variant:t?`secondary`:`destructive`,children:t?y():g()}),(0,Q.jsx)(q,{variant:n?`secondary`:`destructive`,children:n?h():ue()})]}),(0,Q.jsxs)(B,{value:r,onValueChange:e=>void i({search:{section:e},replace:!0}),children:[(0,Q.jsxs)(he,{className:`w-full`,children:[(0,Q.jsxs)(R,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(we,{size:13,"aria-hidden":!0}),m()]}),(0,Q.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(_e,{size:13,"aria-hidden":!0}),E()]}),(0,Q.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Ee,{size:13,"aria-hidden":!0}),O()]})]}),(0,Q.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:I()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:T()}):e.map(e=>(0,Q.jsx)(ke,{instance:e},e._id))}),(0,Q.jsx)(z,{value:`dictation`,children:(0,Q.jsx)(Ae,{stt:n})}),(0,Q.jsx)(z,{value:`talk`,children:(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:O()}),(0,Q.jsx)(q,{variant:`outline`,children:me()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:se()})]})})]})]})}export{je as VoiceTab};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-D8Kd0X5G.js";e();var a=t(),o=r(`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:r=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?i:`button`,{"data-slot":`button`,"data-variant":t,"data-size":r,className:n(o({variant:t,size:r,className:e})),...c})}export{o as n,s as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-HBBi9Y25.js";e();var a=t(),o=r(`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:r=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?i:`button`,{"data-slot":`button`,"data-variant":t,"data-size":r,className:n(o({variant:t,size:r,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-D8Kd0X5G.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-HBBi9Y25.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-HBBi9Y25.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{Bs as e,Hs as t,Ls as n,Rs as r,Vs as i,Xs as a,qt as o}from"./dist-D8Kd0X5G.js";var s=e=>typeof e==`string`?e:null;function c(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function l(e,t){let n=c(e),r=c(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 u(e,t){if(e===null||t===null)return!1;let n=l(t,e.min);return n!==null&&n>=0}function d(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,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=s(e.min),n=s(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:c}}function f(e,t,n){if(e===null)return`unknown`;let{range:r}=d(n,t);return u(r,e)?r!==null&&(l(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function p(n){return n===`supported`?t():n===`beyond`?i():e()}function m(e){return e??a()}function h(e,t){return t&&t!==`openclaw`?o({provider:t}):e===null?n():r({version:e})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
1
+ import{$s as e,Js as t,Qs as n,Ys as r,Zs as i,qt as a,sc as o}from"./dist-HBBi9Y25.js";var s=e=>typeof e==`string`?e:null;function c(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function l(e,t){let n=c(e),r=c(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 u(e,t){if(e===null||t===null)return!1;let n=l(t,e.min);return n!==null&&n>=0}function d(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,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=s(e.min),n=s(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:c}}function f(e,t,n){if(e===null)return`unknown`;let{range:r}=d(n,t);return u(r,e)?r!==null&&(l(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function p(t){return t===`supported`?e():t===`beyond`?n():i()}function m(e){return e??o()}function h(e,n){return n&&n!==`openclaw`?a({provider:n}):e===null?t():r({version:e})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
@@ -0,0 +1 @@
1
+ import{Af as e,Cf as t,Df as n,Ef as r,Ff as i,Mf as a,Nf as o,Of as s,Pf as c,Sf as l,Tf as u,_f as d,bf as f,cf as p,df as m,ff as h,gf as g,hf as _,jf as v,kf as y,lf as b,mf as x,pf as S,sf as C,uf as w,vf as T,wf as E,xf as D,yf as O}from"./dist-HBBi9Y25.js";var k={AGENT_NOT_FOUND:()=>({label:i(),hint:c()}),AUTH_TOKEN_MISMATCH:()=>({label:o(),hint:a()}),DEVICE_SIGNING_FAILED:()=>({label:v(),hint:e()}),SESSION_SCOPE_DENIED:()=>({label:y(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:n(),hint:r()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:E()}),ATTACHMENT_TOO_LARGE:()=>({label:D(),hint:f()}),ATTACHMENT_REJECTED:()=>({label:O(),hint:T()}),BRIDGE_UNREACHABLE:()=>({label:t(),hint:l()}),INVALID_REQUEST:()=>({label:d(),hint:g()}),NOT_CONFIGURED:()=>({label:_(),hint:x()}),UNROUTED:()=>({label:S(),hint:h()}),UPSTREAM_ERROR:()=>({label:m(),hint:w()}),UNKNOWN:()=>({label:b(),hint:p()})};function A(e){return e?k[e]?.()??{label:e,hint:C()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{D as n}from"./dist-D8Kd0X5G.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{D as n}from"./dist-HBBi9Y25.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,4 +1,4 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{S as r,T as i,a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,s as m,u as h,v as g,y as _}from"./dist-D8Kd0X5G.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),l=v.useRef(null),[u,d]=c({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:l,contentId:h(),titleId:h(),descriptionId:h(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(E,n),o=i(t,a.triggerRef);return(0,y.jsx)(_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":q(a.open),...r,ref:o,onClick:g(e.onClick,a.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)(s,{present:n||a.open,children:(0,y.jsx)(m,{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)(s,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=r(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(a,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(_.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)(s,{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=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return u(e)},[]),(0,y.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:g(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:g(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:g(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:a,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),f=i(t,u);return p(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,y.jsx)(d,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:f,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)(_.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,{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)(_.button,{type:`button`,...r,ref:t,onClick:g(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=f(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{S as r,T as i,a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,s as m,u as h,v as g,y as _}from"./dist-HBBi9Y25.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),l=v.useRef(null),[u,d]=c({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:l,contentId:h(),titleId:h(),descriptionId:h(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(E,n),o=i(t,a.triggerRef);return(0,y.jsx)(_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":q(a.open),...r,ref:o,onClick:g(e.onClick,a.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)(s,{present:n||a.open,children:(0,y.jsx)(m,{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)(s,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=r(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(a,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(_.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)(s,{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=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return u(e)},[]),(0,y.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:g(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:g(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:g(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:a,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),f=i(t,u);return p(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,y.jsx)(d,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:f,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)(_.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,{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)(_.button,{type:`button`,...r,ref:t,onClick:g(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=f(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
 
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{D as r,S as i,T as a,h as o}from"./dist-D8Kd0X5G.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]=o(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,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
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{D as r,S as i,T as a,h as o}from"./dist-HBBi9Y25.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]=o(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,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};