local-operator-ui 0.31.34 → 0.32.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.
- package/out/main/index.js +23 -0
- package/out/renderer/assets/{_basePickBy-BGuZGQlL.js → _basePickBy-DRT8mURG.js} +1 -1
- package/out/renderer/assets/{_baseUniq-avrxGYhI.js → _baseUniq-CIOjpfWF.js} +1 -1
- package/out/renderer/assets/{agent-details-page-CSjm9_q7.js → agent-details-page-BBAgSKbU.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-BXiVDudt.js → agent-hub-page-HG8d0q6h.js} +1 -1
- package/out/renderer/assets/{agents-page-CDuIQEse.js → agents-page-DTA47rf7.js} +3 -3
- package/out/renderer/assets/{arc-CQRcxcOn.js → arc-Bevww3yK.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-CkwuxGbl.js → architectureDiagram-IEHRJDOE-CEnq5TT8.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-DErhLlTs.js → blockDiagram-JOT3LUYC-K3xa6m3w.js} +1 -1
- package/out/renderer/assets/{book-open-CueO0nwZ.js → book-open-D5MeCdw_.js} +1 -1
- package/out/renderer/assets/{browser-page-BH9k2DzV.js → browser-page-BNCBisfY.js} +1 -1
- package/out/renderer/assets/{browser-webauthn-prompt-D5Ca5EtW.js → browser-webauthn-prompt-BV2bzF8P.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-Bvg0BHpF.js → c4Diagram-VJAJSXHY-os41x4WA.js} +1 -1
- package/out/renderer/assets/channel-sCVkoHKF.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-EIhFYl3X.js → chunk-4BMEZGHF-DxKznC1E.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-xwy-uUTS.js → chunk-A2AXSNBT-Db9UnhTg.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-Br1voKIL.js → chunk-AEK57VVT-D2U_alKj.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-C4Dh_tJf.js → chunk-D6G4REZN-CqzqKJ-4.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-bSGVs_Tb.js → chunk-RZ5BOZE2-CUx4xiz9.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-CN1-qcAy.js → chunk-XZIHB7SX-DjD7wu1d.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-D7ZemIB3.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-D7ZemIB3.js +1 -0
- package/out/renderer/assets/clone-JfI-y0gA.js +1 -0
- package/out/renderer/assets/{conversation-input-sync-QxTZG_kn.js → conversation-input-sync-BW_UGWKP.js} +129 -129
- package/out/renderer/assets/{dagre-OKDRZEBW-BY039iHz.js → dagre-OKDRZEBW-Dj_wtrdP.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-bB3dlGcF.js → diagram-SSKATNLV-CWXvBT_I.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-Cyhtu1_5.js → diagram-VNBRO52H-B8-Il89w.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-CNtBW35e.js → erDiagram-Q7BY3M3F-BwKwqiQY.js} +1 -1
- package/out/renderer/assets/{error-boundary-BCN3_4Dn.js → error-boundary-9syfMgM3.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-DpPSE1IC.js → flowDiagram-4HSFHLVR-FGlmzDKl.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-xMxTMO4B.js → ganttDiagram-APWFNJXF-TchvnIff.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-B7-mMQYk.js → gitGraphDiagram-7IBYFJ6S-Co26gdlj.js} +1 -1
- package/out/renderer/assets/{graph-By5Jgx_F.js → graph-CvvOmP6Y.js} +1 -1
- package/out/renderer/assets/{index-DE0OwCyE.js → index-BpABOauh.js} +1 -1
- package/out/renderer/assets/{index-CL3E7OEw.js → index-C024E3U7.js} +78 -78
- package/out/renderer/assets/{index-jwwX9AyN.js → index-_QUiqVbu.js} +1 -1
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-DX8aEhB8.js → infoDiagram-PH2N3AL5-CN23wDMW.js} +1 -1
- package/out/renderer/assets/{installer-DovMkJto.js → installer-D0Jz9VHA.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-CH_A0wDP.js → journeyDiagram-U35MCT3I-HV2jfVJT.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-DtwsMDtl.js → kanban-definition-NDS4AKOZ-BQu-qphz.js} +1 -1
- package/out/renderer/assets/{layout-HO9_Xm1P.js → layout-MYedaf7A.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-D6fK_4tD.js → legacy-agents-page-DCtoJwsh.js} +1 -1
- package/out/renderer/assets/{mermaid.core-w9t0zfcx.js → mermaid.core-C1M4biFs.js} +5 -5
- package/out/renderer/assets/{mesh-page-D4paHK3u.js → mesh-page-CRwc_0Bf.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-B76wJgpo.js → mindmap-definition-ALO5MXBD-B0qKqswI.js} +1 -1
- package/out/renderer/assets/{mini-BUYwiX1L.js → mini-qY60RaMD.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-CoX7en0B.js → org-surface-gate-D2GQhf_o.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DBCDwb5q.js → pieDiagram-IB7DONF6-DJlTqIhZ.js} +1 -1
- package/out/renderer/assets/{projects-page-agDoCBOh.js → projects-page-BTq_jLmk.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-OWbzuMt_.js → quadrantDiagram-7GDLP6J5-DU9HBTR5.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-CRLok0av.js → radar-MK3ICKWK-D4UgxYCc.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-BuYF7pw2.js → radient-auth-buttons-BvFFkaXp.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-Ct-Jg5Jo.js → requirementDiagram-KVF5MWMF-B7PaS_mq.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-BJ0V1pBE.js → sankeyDiagram-QLVOVGJD-umwUfQuz.js} +1 -1
- package/out/renderer/assets/{schedules-page-BjwANHEZ.js → schedules-page-BkDhaIK1.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CqLGptQb.js → sequenceDiagram-X6HHIX6F-ChhSJ-Dd.js} +1 -1
- package/out/renderer/assets/settings-page-Cw012Hb0.js +292 -0
- package/out/renderer/assets/{settings-section-8d2ITQC3.js → settings-section-AlEM_Xkt.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-B-WRbN_h.js → stateDiagram-DGXRK772-CTemFlyh.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-D81WdJ5C.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-Cdvoj120.js → timeline-definition-BDJGKUSR-D8qcgZDU.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-BEa3kVfY.js → use-download-agent-mutation-B_t9rwmc.js} +1 -1
- package/out/renderer/assets/{use-memberships-query-TpnxzBRP.js → use-memberships-query-HW4ts4RC.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-c6md61_B.js → xychartDiagram-VJFVF3MP-PSEehwvd.js} +1 -1
- package/out/renderer/index.html +3 -3
- package/out/renderer/installer.html +2 -2
- package/out/renderer/mini.html +3 -3
- package/package.json +2 -2
- package/out/renderer/assets/channel-238GQ5wt.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-BFR--RB2.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-BFR--RB2.js +0 -1
- package/out/renderer/assets/clone-DJut1uh5.js +0 -1
- package/out/renderer/assets/settings-page-NSosCB_S.js +0 -292
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CzCtqiki.js +0 -1
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import{r as i,j as t,c as oe,t as Mn}from"./index-DvjcW_EJ.js";import{cq as rt,cr as An,cs as Mt,ct as ge,bK as Rn,aG as Ce,a7 as Wt,a8 as gt,ax as Qt,u as Zt,aN as Tn,aO as In,cu as En,cv as Ln,cw as On,cx as Fn,cy as Jt,cz as yt,a5 as Xt,cA as Pe,cB as Dn,aS as $n,cC as At,S as xt,cD as Un,cE as zn,aw as en,aU as it,aV as ct,cF as Pn,aY as Kn,cG as Hn,c4 as lt,a as Bn,d as Rt,ah as Be,cH as Vn,cI as Gn,cJ as qn,X as Ke,cK as dt,cL as Yn,cM as Wn,cN as Qn,aQ as Zn,bc as Jn,cO as tn,cP as Xn,cQ as es,cR as ts,aM as ns,cS as nn,aT as sn,cT as an,cU as ss,cV as as,cW as on,cX as os,b5 as rs,bN as is,bh as cs,cY as ls,bM as ds,cZ as us,c_ as ms,c$ as hs,d0 as ps,d1 as fs}from"./conversation-input-sync-QxTZG_kn.js";import{u as Ee,b as gs,d as rn}from"./ui-preferences-store-ClQPCzID.js";import{a_ as cn,a$ as ys,b0 as xs,ap as Tt,b1 as ks,b2 as vs,S as bs,aL as ws,b3 as js,b4 as _s,b5 as Ns,b6 as Ss,b7 as Cs,b8 as Ms,aB as It,aw as As,aI as Et,b9 as Rs,aJ as Ts,aK as Is,ba as Es,bb as Ls}from"./index-CL3E7OEw.js";import{P as Os}from"./page-header-ouA0fPx9.js";import{c as x,B as $,S as re,x as Fs,s as Ds,t as $s,u as Us,v as zs,w as Ps,f as Fe,J as Ye,L as ye,I as Me,z as ut,F as mt,G as Le,_ as Lt,T as ln,O as Ks,D as Hs,l as Bs,m as Vs,o as Gs,p as Ot,k as qs,A as ie,j as Ys,Q as Ws,C as Qs,e as dn}from"./error-boundary-BCN3_4Dn.js";import{S as se,I as kt,a as ae,N as Zs}from"./settings-section-8d2ITQC3.js";import{R as Js}from"./radient-auth-buttons-BuYF7pw2.js";import{B as Xs}from"./book-open-CueO0nwZ.js";import{a as ea,p as tt}from"./parseISO-CZfAC2_J.js";import{i as ta,a as je,f as na}from"./format-CZUObkkr.js";import{t as sa}from"./en-US-BcB1DWxG.js";import"./console-mirror-D3uHRfYy.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const aa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m14.31 8 5.74 9.94",key:"1y6ab4"}],["path",{d:"M9.69 8h11.48",key:"1wxppr"}],["path",{d:"m7.38 12 5.74-9.94",key:"1grp0k"}],["path",{d:"M9.69 16 3.95 6.06",key:"libnyf"}],["path",{d:"M14.31 16H2.83",key:"x5fava"}],["path",{d:"m16.62 12-5.74 9.94",key:"1vwawt"}]],oa=x("aperture",aa);/**
|
|
7
|
-
* @license lucide-react v0.507.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const ra=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]],ia=x("atom",ra);/**
|
|
12
|
-
* @license lucide-react v0.507.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const ca=[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]],la=x("audio-waveform",ca);/**
|
|
17
|
-
* @license lucide-react v0.507.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const da=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]],ua=x("binary",da);/**
|
|
22
|
-
* @license lucide-react v0.507.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const ma=[["path",{d:"M10 7v10.9",key:"1gynux"}],["path",{d:"M14 6.1V17",key:"116kdf"}],["path",{d:"M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4",key:"gpb6xx"}],["path",{d:"M16.536 7.465a5 5 0 0 0-7.072 0l-2 2a5 5 0 0 0 0 7.07 5 5 0 0 0 7.072 0l2-2a5 5 0 0 0 0-7.07",key:"1tsln4"}],["path",{d:"M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4",key:"qexcha"}]],ha=x("candy",ma);/**
|
|
27
|
-
* @license lucide-react v0.507.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const pa=[["path",{d:"m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8",key:"1imjwt"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 14h.01",key:"7oqj8z"}],["rect",{width:"18",height:"8",x:"3",y:"10",rx:"2",key:"a7itu8"}],["path",{d:"M5 18v2",key:"ppbyun"}],["path",{d:"M19 18v2",key:"gy7782"}]],fa=x("car-front",pa);/**
|
|
32
|
-
* @license lucide-react v0.507.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const ga=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["circle",{cx:"8",cy:"10",r:"2",key:"1xl4ub"}],["path",{d:"M8 12h8",key:"1wcyev"}],["circle",{cx:"16",cy:"10",r:"2",key:"r14t7q"}],["path",{d:"m6 20 .7-2.9A1.4 1.4 0 0 1 8.1 16h7.8a1.4 1.4 0 0 1 1.4 1l.7 3",key:"l01ucn"}]],ya=x("cassette-tape",ga);/**
|
|
37
|
-
* @license lucide-react v0.507.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const xa=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],ka=x("chart-line",xa);/**
|
|
42
|
-
* @license lucide-react v0.507.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const va=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]],ba=x("circle-play",va);/**
|
|
47
|
-
* @license lucide-react v0.507.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const wa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],ja=x("circle-plus",wa);/**
|
|
52
|
-
* @license lucide-react v0.507.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const _a=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]],Na=x("circuit-board",_a);/**
|
|
57
|
-
* @license lucide-react v0.507.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Sa=[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",key:"1cez44"}],["path",{d:"m13 12-3 5h4l-3 5",key:"1t22er"}]],Ca=x("cloud-lightning",Sa);/**
|
|
62
|
-
* @license lucide-react v0.507.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const Ma=[["path",{d:"M10.188 8.5A6 6 0 0 1 16 4a1 1 0 0 0 6 6 6 6 0 0 1-3 5.197",key:"erj67n"}],["path",{d:"M13 16a3 3 0 1 1 0 6H7a5 5 0 1 1 4.9-6Z",key:"p44pc9"}]],Aa=x("cloud-moon",Ma);/**
|
|
67
|
-
* @license lucide-react v0.507.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Ra=[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M8 19h.01",key:"puxtts"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M12 21h.01",key:"h35vbk"}],["path",{d:"M16 15h.01",key:"rnfrdf"}],["path",{d:"M16 19h.01",key:"1vcnzz"}]],Ta=x("cloud-snow",Ra);/**
|
|
72
|
-
* @license lucide-react v0.507.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const Ia=[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}],["path",{d:"M15.947 12.65a4 4 0 0 0-5.925-4.128",key:"dpwdj0"}],["path",{d:"M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z",key:"s09mg5"}]],Ea=x("cloud-sun",Ia);/**
|
|
77
|
-
* @license lucide-react v0.507.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const La=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],Oa=x("coffee",La);/**
|
|
82
|
-
* @license lucide-react v0.507.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Fa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 18a6 6 0 0 0 0-12v12z",key:"j4l70d"}]],un=x("contrast",Fa);/**
|
|
87
|
-
* @license lucide-react v0.507.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Da=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],$a=x("credit-card",Da);/**
|
|
92
|
-
* @license lucide-react v0.507.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const Ua=[["path",{d:"m6 8 1.75 12.28a2 2 0 0 0 2 1.72h4.54a2 2 0 0 0 2-1.72L18 8",key:"8166m8"}],["path",{d:"M5 8h14",key:"pcz4l3"}],["path",{d:"M7 15a6.47 6.47 0 0 1 5 0 6.47 6.47 0 0 0 5 0",key:"yjz344"}],["path",{d:"m12 8 1-6h2",key:"3ybfa4"}]],za=x("cup-soda",Ua);/**
|
|
97
|
-
* @license lucide-react v0.507.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Pa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M6 12c0-1.7.7-3.2 1.8-4.2",key:"oqkarx"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M18 12c0 1.7-.7 3.2-1.8 4.2",key:"1eah9h"}]],Ka=x("disc-3",Pa);/**
|
|
102
|
-
* @license lucide-react v0.507.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const Ha=[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]],Ba=x("droplet",Ha);/**
|
|
107
|
-
* @license lucide-react v0.507.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const Va=[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]],Ga=x("droplets",Va);/**
|
|
112
|
-
* @license lucide-react v0.507.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const qa=[["path",{d:"M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z",key:"15baut"}],["path",{d:"M18 12v.5",key:"18hhni"}],["path",{d:"M16 17.93a9.77 9.77 0 0 1 0-11.86",key:"16dt7o"}],["path",{d:"M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33",key:"l9di03"}],["path",{d:"M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4",key:"1kjonw"}],["path",{d:"m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98",key:"1zlm23"}]],Ya=x("fish",qa);/**
|
|
117
|
-
* @license lucide-react v0.507.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const Wa=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],Qa=x("flame",Wa);/**
|
|
122
|
-
* @license lucide-react v0.507.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const Za=[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]],Ja=x("flower-2",Za);/**
|
|
127
|
-
* @license lucide-react v0.507.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const Xa=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5",key:"14wa3c"}],["path",{d:"M12 7.5V9",key:"1oy5b0"}],["path",{d:"M7.5 12H9",key:"eltsq1"}],["path",{d:"M16.5 12H15",key:"vk5kw4"}],["path",{d:"M12 16.5V15",key:"k7eayi"}],["path",{d:"m8 8 1.88 1.88",key:"nxy4qf"}],["path",{d:"M14.12 9.88 16 8",key:"1lst6k"}],["path",{d:"m8 16 1.88-1.88",key:"h2eex1"}],["path",{d:"M14.12 14.12 16 16",key:"uqkrx3"}]],eo=x("flower",Xa);/**
|
|
132
|
-
* @license lucide-react v0.507.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const to=[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]],no=x("ghost",to);/**
|
|
137
|
-
* @license lucide-react v0.507.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const so=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],ao=x("github",so);/**
|
|
142
|
-
* @license lucide-react v0.507.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const oo=[["path",{d:"m11.9 12.1 4.514-4.514",key:"109xqo"}],["path",{d:"M20.1 2.3a1 1 0 0 0-1.4 0l-1.114 1.114A2 2 0 0 0 17 4.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 17.828 7h1.344a2 2 0 0 0 1.414-.586L21.7 5.3a1 1 0 0 0 0-1.4z",key:"txyc8t"}],["path",{d:"m6 16 2 2",key:"16qmzd"}],["path",{d:"M8.23 9.85A3 3 0 0 1 11 8a5 5 0 0 1 5 5 3 3 0 0 1-1.85 2.77l-.92.38A2 2 0 0 0 12 18a4 4 0 0 1-4 4 6 6 0 0 1-6-6 4 4 0 0 1 4-4 2 2 0 0 0 1.85-1.23z",key:"1de1vg"}]],ro=x("guitar",oo);/**
|
|
147
|
-
* @license lucide-react v0.507.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const io=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]],co=x("hexagon",io);/**
|
|
152
|
-
* @license lucide-react v0.507.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const lo=[["path",{d:"M12 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6m-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0",key:"1uxfcu"}],["path",{d:"M12.14 11a3.5 3.5 0 1 1 6.71 0",key:"4k3m1s"}],["path",{d:"M15.5 6.5a3.5 3.5 0 1 0-7 0",key:"zmuahr"}]],uo=x("ice-cream-bowl",lo);/**
|
|
157
|
-
* @license lucide-react v0.507.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const mo=[["path",{d:"M21 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-2Z",key:"jg2n2t"}],["path",{d:"M6 15v-2",key:"gd6mvg"}],["path",{d:"M12 15V9",key:"8c7uyn"}],["circle",{cx:"12",cy:"6",r:"3",key:"1gm2ql"}]],ho=x("joystick",mo);/**
|
|
162
|
-
* @license lucide-react v0.507.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const po=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],fo=x("leaf",po);/**
|
|
167
|
-
* @license lucide-react v0.507.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const go=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],yo=x("lightbulb",go);/**
|
|
172
|
-
* @license lucide-react v0.507.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const xo=[["path",{d:"M8 2h8",key:"1ssgc1"}],["path",{d:"M9 2v2.789a4 4 0 0 1-.672 2.219l-.656.984A4 4 0 0 0 7 10.212V20a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-9.789a4 4 0 0 0-.672-2.219l-.656-.984A4 4 0 0 1 15 4.788V2",key:"qtp12x"}],["path",{d:"M7 15a6.472 6.472 0 0 1 5 0 6.47 6.47 0 0 0 5 0",key:"ygeh44"}]],ko=x("milk",xo);/**
|
|
177
|
-
* @license lucide-react v0.507.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const vo=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9",key:"4ay0iu"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}]],bo=x("moon-star",vo);/**
|
|
182
|
-
* @license lucide-react v0.507.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const wo=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],jo=x("moon",wo);/**
|
|
187
|
-
* @license lucide-react v0.507.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const _o=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}],["path",{d:"M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19",key:"1pvmmp"}]],No=x("mountain-snow",_o);/**
|
|
192
|
-
* @license lucide-react v0.507.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const So=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],Co=x("mountain",So);/**
|
|
197
|
-
* @license lucide-react v0.507.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const Mo=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],Ao=x("radio",Mo);/**
|
|
202
|
-
* @license lucide-react v0.507.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const Ro=[["path",{d:"M22 18H2a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4Z",key:"1404fh"}],["path",{d:"M21 14 10 2 3 14h18Z",key:"1nzg7v"}],["path",{d:"M10 2v16",key:"1labyt"}]],To=x("sailboat",Ro);/**
|
|
207
|
-
* @license lucide-react v0.507.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const Io=[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]],Eo=x("shirt",Io);/**
|
|
212
|
-
* @license lucide-react v0.507.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const Lo=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],Oo=x("skull",Lo);/**
|
|
217
|
-
* @license lucide-react v0.507.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const Fo=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],Do=x("snowflake",Fo);/**
|
|
222
|
-
* @license lucide-react v0.507.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const $o=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}]],Uo=x("sparkle",$o);/**
|
|
227
|
-
* @license lucide-react v0.507.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const zo=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M20 12h.01",key:"1ykeid"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M4 12h.01",key:"158zrr"}],["path",{d:"M17.657 6.343h.01",key:"31pqzk"}],["path",{d:"M17.657 17.657h.01",key:"jehnf4"}],["path",{d:"M6.343 17.657h.01",key:"gdk6ow"}],["path",{d:"M6.343 6.343h.01",key:"1uurf0"}]],Po=x("sun-dim",zo);/**
|
|
232
|
-
* @license lucide-react v0.507.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const Ko=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Ho=x("sun",Ko);/**
|
|
237
|
-
* @license lucide-react v0.507.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const Bo=[["path",{d:"M12 2v8",key:"1q4o3n"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],Vo=x("sunrise",Bo);/**
|
|
242
|
-
* @license lucide-react v0.507.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const Go=[["path",{d:"M12 10V2",key:"16sf7g"}],["path",{d:"m4.93 10.93 1.41 1.41",key:"2a7f42"}],["path",{d:"M2 18h2",key:"j10viu"}],["path",{d:"M20 18h2",key:"wocana"}],["path",{d:"m19.07 10.93-1.41 1.41",key:"15zs5n"}],["path",{d:"M22 22H2",key:"19qnx5"}],["path",{d:"m16 6-4 4-4-4",key:"6wukr"}],["path",{d:"M16 18a4 4 0 0 0-8 0",key:"1lzouq"}]],qo=x("sunset",Go);/**
|
|
247
|
-
* @license lucide-react v0.507.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const Yo=[["path",{d:"M3.5 21 14 3",key:"1szst5"}],["path",{d:"M20.5 21 10 3",key:"1310c3"}],["path",{d:"M15.5 21 12 15l-3.5 6",key:"1ddtfw"}],["path",{d:"M2 21h20",key:"1nyx9w"}]],Wo=x("tent",Yo);/**
|
|
252
|
-
* @license lucide-react v0.507.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const Qo=[["path",{d:"M8 19a4 4 0 0 1-2.24-7.32A3.5 3.5 0 0 1 9 6.03V6a3 3 0 1 1 6 0v.04a3.5 3.5 0 0 1 3.24 5.65A4 4 0 0 1 16 19Z",key:"oadzkq"}],["path",{d:"M12 19v3",key:"npa21l"}]],Zo=x("tree-deciduous",Qo);/**
|
|
257
|
-
* @license lucide-react v0.507.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const Jo=[["path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4",key:"foxbe7"}],["path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3",key:"18arnh"}],["path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35",key:"ywahnh"}],["path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14",key:"ft0feo"}]],Xo=x("tree-palm",Jo);/**
|
|
262
|
-
* @license lucide-react v0.507.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const er=[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]],tr=x("tree-pine",er);/**
|
|
267
|
-
* @license lucide-react v0.507.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const nr=[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]],sr=x("trees",nr);/**
|
|
272
|
-
* @license lucide-react v0.507.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const ar=[["path",{d:"M22 12a10.06 10.06 1 0 0-20 0Z",key:"1teyop"}],["path",{d:"M12 12v8a2 2 0 0 0 4 0",key:"ulpmoc"}],["path",{d:"M12 2v1",key:"11qlp1"}]],or=x("umbrella",ar);/**
|
|
277
|
-
* @license lucide-react v0.507.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const rr=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],ir=x("waves",rr);/**
|
|
282
|
-
* @license lucide-react v0.507.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const cr=[["path",{d:"M2 22 16 8",key:"60hf96"}],["path",{d:"M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"1rdhi6"}],["path",{d:"M7.47 8.53 9 7l1.53 1.53a3.5 3.5 0 0 1 0 4.94L9 15l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"1sdzmb"}],["path",{d:"M11.47 4.53 13 3l1.53 1.53a3.5 3.5 0 0 1 0 4.94L13 11l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"eoatbi"}],["path",{d:"M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z",key:"19rau1"}],["path",{d:"M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"tc8ph9"}],["path",{d:"M15.47 13.47 17 15l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"2m8kc5"}],["path",{d:"M19.47 9.47 21 11l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L13 11l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"vex3ng"}]],lr=x("wheat",cr);/**
|
|
287
|
-
* @license lucide-react v0.507.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const dr=[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]],ur=x("wind",dr),mr=({appVersion:e=null,slowWaitHintMs:s})=>{const n="https://local-operator.com/download",[a,o]=i.useState(!1),r=cn(a,s??ys),[u,d]=i.useState(!1),[c,m]=i.useState(null),[y,v]=i.useState("info"),[w,h]=i.useState(null),[k,R]=i.useState(null),C=e?.trim()?e.trim():null,H=i.useRef(!1),_=rt(I=>I.openDetail),U=i.useRef(!1),O=i.useRef(0),A=i.useRef(!1),S=i.useCallback((I,L)=>{U.current=!1,m(I),v(L),d(!0)},[]),V=i.useCallback(I=>{U.current=!0,m(I),v("success"),d(!0)},[]),B=i.useCallback(()=>{U.current&&(U.current=!1,d(!1),m(null))},[]),{clearDeferredUpdate:Y}=An();i.useEffect(()=>{const I=window.api.updater.onUpdateError(P=>{H.current&&P.includes("manually")&&(h({message:"The server is installed outside the app, so use the tool you installed it with - uv, pipx or pip.",command:""}),U.current=!1,m(null),v("warning"),d(!0))}),L=window.api.updater.onBackendUpdateDevMode(P=>{H.current&&S(P,"info")}),F=()=>{A.current=!0,B()},z=window.api.updater.onUpdateAvailable(F),D=window.api.updater.onUpdateNpxAvailable(F),te=window.api.updater.onBackendUpdateAvailable(F);return()=>{I(),L(),z(),D(),te()}},[B,S]),i.useEffect(()=>{let I=!1;const L=()=>{window.api.updater.getLastInstallAttempt().then(z=>{I||R(z)}).catch(()=>{})};L();const F=window.api.updater.onUpdateInstallFailed(()=>L());return()=>{I=!0,F()}},[]);const G=async()=>{const I=++O.current;B(),A.current=!1;try{o(!0),H.current=!0,Y(ge.UI),Y(ge.BACKEND);const L=await window.api.updater.checkForAllUpdates({manual:!0});if(I!==O.current)return;L.app==="available"&&_(ge.UI),L.server==="available"&&_(ge.BACKEND),L?.affirmation&&!A.current?V(L.affirmation):B()}catch(L){if(I!==O.current)return;console.warn(`Update check failed; the app-level alert owns the report: ${xs(L)}`)}finally{I===O.current&&o(!1),setTimeout(()=>{H.current=!1},2e3)}},W=()=>{U.current=!1,d(!1),m(null)};return t.jsxs(t.Fragment,{children:[k&&t.jsxs("div",{className:"mb-3 rounded-sm bg-sunken p-3",children:[t.jsxs("p",{className:"text-body-sm text-ink",children:["The last update to version ",k.targetVersion," didn't finish",k.attempts>1?` (${k.attempts} attempts)`:"",".",C?` Version ${C} is running.`:null]}),t.jsxs("p",{className:"mt-1 text-meta text-ink-dim",children:["Detected"," ",k.detectedAt?new Date(k.detectedAt).toLocaleString():"at an unknown time",". ",k.detail]}),t.jsx($,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>void window.api.openExternal(n),children:"Download a fresh copy"})]}),t.jsxs($,{variant:"outline",onClick:()=>void G(),disabled:a,children:[a?t.jsx(re,{size:"sm"}):null,a?"Checking...":"Check for updates"]}),r&&t.jsx("p",{className:"mt-2 text-meta text-ink-muted",children:"Still checking. A slow or stalled connection can hold this for about a minute and a half - the app stops waiting on its own."}),w&&t.jsxs(Mt,{open:u,autoHideDuration:1e4,onClose:W,variant:"warning",children:[t.jsx("p",{className:"text-body-sm",children:w.message}),w.command&&t.jsx("code",{className:"mt-2 block rounded-sm bg-sunken p-2 text-mono-sm text-ink",children:w.command})]}),c&&y!=="danger"&&t.jsx(Mt,{open:u,autoHideDuration:6e3,onClose:W,variant:y,children:c})]})},Ve=["system-prompt"],hr=()=>{const{shouldEnableQuery:e}=Rn();return Ce({enabled:e({bypassInternetCheck:!0}),queryKey:Ve,queryFn:async()=>{try{const n=await Wt(gt.baseUrl).config.getSystemPrompt();if(n===null)return null;if(n.status>=400)throw new Error(n.message||"Failed to fetch system prompt");return n.result}catch(s){const n=s instanceof Error?s.message:"An unknown error occurred while fetching system prompt";throw Qt(n),s}},refetchOnWindowFocus:!1,staleTime:5e3})},pr=()=>{const e=Zt(),s=Wt(gt.baseUrl);return Tn({mutationFn:async n=>{try{const a=await s.config.updateSystemPrompt(n);if(a.status>=400)throw new Error(a.message||"Failed to update system prompt");return a.result}catch(a){const o=a instanceof Error?a.message:"An unknown error occurred while updating system prompt";throw Qt(o),a}},onSuccess:async n=>{await e.invalidateQueries({queryKey:Ve,refetchType:"none"}),e.setQueryData(Ve,a=>a&&{...a,...n}),await e.refetchQueries({queryKey:Ve,type:"all"}),In("System prompt updated")},onError:n=>{console.error("Error updating system prompt:",n)}})},fr=({value:e,label:s,description:n,onChange:a,icon:o,isSaving:r=!1})=>{const[u,d]=i.useState(e),c=i.useId(),m=`${c}-label`,y=`${c}-description`,v=async w=>{if(!r){d(w);try{await a(w)}catch(h){d(!w),console.error("Error toggling setting:",h)}}};return t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsxs("span",{id:m,className:"flex min-h-6 items-center gap-2 text-body text-ink",children:[o&&t.jsx(o,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim"}),s]}),n&&t.jsx("p",{id:y,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:n})]}),t.jsx("div",{className:"flex h-6 shrink-0 items-center",children:r?t.jsx(re,{size:"md",label:`Saving ${s}`}):t.jsx(Fs,{checked:u,onCheckedChange:v,"aria-labelledby":m,"aria-describedby":n?y:void 0})})]})};function Ft(e,s){const n=sa(e,s?.in);if(!ta(n))throw new RangeError("Invalid time value");const a=je(n.getDate(),2),o=je(n.getMonth()+1,2),r=n.getFullYear(),u=je(n.getHours(),2),d=je(n.getMinutes(),2),c=je(n.getSeconds(),2);let m="",y="";const v=n.getTimezoneOffset();if(v!==0){const w=Math.abs(v),h=je(Math.trunc(w/60),2),k=je(w%60,2);y=`${v<0?"+":"-"}${h}:${k}`}else y="Z";return`${r}-${o}-${a}T${u}:${d}:${c}${m}${y}`}function gr(e,s,n){return ea(e,-30,n)}var yr=En({chartName:"LineChart",GraphicalChild:Jt,axisComponents:[{axisType:"xAxis",AxisComp:Ln},{axisType:"yAxis",AxisComp:On}],formatAxisMap:Fn});const xr=["radient","creditBalance"],kr=e=>{const{user:s,isAuthenticated:n}=yt(),a=s?.account?.tenant_id,o=n&&!!a&&e?.enabled;return Ce({queryKey:[xr,a],queryFn:async()=>{if(!a)throw new Error("Tenant ID not available");const r=await Xt({operation:"credits",tenantId:a});if(!r||typeof r.balance!="number")throw new Error("Invalid credit balance response format");return r},enabled:o,staleTime:5*60*1e3,refetchOnWindowFocus:!0})},vr=["radient","usageRollup"],br=(e,s)=>{const{user:n,isAuthenticated:a}=yt(),o=n?.account?.tenant_id,r=a&&!!o&&s?.enabled;return Ce({queryKey:[...vr,o,e],queryFn:async()=>{if(!o)throw new Error("Tenant ID not available");const u={};for(const[c,m]of Object.entries(e))m!=null&&(u[c]=String(m));const d=await Xt({operation:"usage",tenantId:o,query:u});if(!d)throw new Error("Invalid usage rollup response format");return d},enabled:r,staleTime:5*60*1e3,refetchOnWindowFocus:!0})},Dt={[ge.UI]:"Application updates",[ge.BACKEND]:"Server updates"},$t=({type:e})=>{const s=rt(a=>a.followed[e]),n=rt(a=>a.setFollowedSegment);return t.jsxs("div",{className:"flex flex-col gap-1.5 sm:flex-row sm:items-center sm:justify-between sm:gap-6",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-body-sm text-ink",children:Dt[e]}),t.jsx("div",{className:"mt-0.5 text-meta text-ink-muted",children:Pe[s].description})]}),t.jsxs(Ds,{value:s,onValueChange:a=>n(e,a),children:[t.jsx($s,{"aria-label":`${Dt[e]}: ${Pe[s].label}`,className:"w-full sm:w-56","data-followed-segment":e,children:t.jsx(Us,{})}),t.jsx(zs,{children:Dn.map(a=>t.jsx(Ps,{value:a,title:Pe[a].description,children:Pe[a].label},a))})]})]})},wr=()=>t.jsxs("div",{className:oe("flex flex-col gap-3"),children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-heading text-ink",children:"Update notifications"}),t.jsx("p",{className:"mt-1 text-meta text-ink-muted",children:"How much of a version change shows the update notice at the bottom of the window. A check you run yourself always reports what it finds."})]}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx($t,{type:ge.UI}),t.jsx($t,{type:ge.BACKEND})]})]}),jr=({appVersion:e})=>t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(wr,{}),t.jsx(mr,{appVersion:e})]}),_r=e=>{if(!e)return null;try{return new URL(e).host}catch{return null}},Nr=()=>{const[e,s]=i.useState(null),[n,a]=i.useState({value:"Loading...",detail:null,degraded:!1}),[o,r]=i.useState({platform:"Loading...",arch:"...",nodeVersion:"Loading...",electronVersion:"Loading...",chromeVersion:"Loading..."});i.useEffect(()=>{let d=!0;const c=h=>{if(!d)return;const k=_r(h.url);if(h.state==="connecting"){a({value:"Loading...",detail:null,degraded:!1});return}if(h.state==="detached"){a({value:"Not connected",detail:h.detail||null,degraded:!1});return}if(h.state==="wedged"){a({value:"Not attached",detail:h.detail||null,degraded:!1});return}const R=h.version||"Version unknown";a({value:k?`${R} · ${k}`:R,detail:h.detail||null,degraded:h.state==="degraded"})};let m=!1;const y=window.api?.backend?.onStatusChange(h=>{m=!0,c(h)}),v=async()=>{try{const[h,k]=await Promise.all([window.api.systemInfo.getAppVersion(),window.api.systemInfo.getPlatformInfo()]);d&&(s(h),r(k))}catch(h){console.error("Error fetching app information:",h)}},w=async()=>{try{const h=window.api?.backend;if(h){const C=await h.getStatus();m||c(C);return}const k=await At.healthCheck(gt.baseUrl),R=At.getServerVersion(k);d&&a({value:R,detail:null,degraded:!1})}catch(h){console.error("Error fetching server version:",h),d&&a({value:"Unavailable",detail:null,degraded:!1})}};return v(),w(),()=>{d=!1,y?.()}},[]);const u=(d,c,m,y={})=>t.jsx(ae,{label:t.jsx(Fe,{content:m,children:t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[t.jsx(Ye,{size:12,className:"shrink-0"}),d]})}),valueClassName:y.valueClassName,value:t.jsxs(t.Fragment,{children:[y.valueTooltip?t.jsx(Fe,{content:y.valueTooltip,children:t.jsx("span",{"data-backend-version":y.valueHoverTarget?"":void 0,children:c})}):c,y.statusNote?t.jsx("span",{className:"mt-0.5 block text-meta text-ink-dim",children:y.statusNote}):null]})});return t.jsx(se,{title:"Application updates and info",icon:$n,description:"Check for updates and view information about your Local Operator installation.",dataTourTag:"settings-app-updates-section",children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs(kt,{children:[u("Application version",e??"Loading...","The version of the Local Operator user interface application."),u("Server version",n.value,"The version of the Local Operator API server backend, and the address of the daemon it was read from.",{valueTooltip:n.detail,valueHoverTarget:!0,statusNote:n.degraded?"Not answering":void 0,valueClassName:n.degraded?"text-ink-muted":void 0}),u("Platform",`${o.platform} (${o.arch})`,"The operating system and architecture your application is running on."),u("Node.js version",o.nodeVersion,"The JavaScript runtime environment version."),u("Electron version",o.electronVersion,"The framework version enabling this desktop application.")]}),t.jsx(jr,{appVersion:e})]})})},Sr=[[[".claude.json"],"Claude Code"],[[".claude",".mcp.json"],"Claude Code"],[[".cursor","mcp.json"],"Cursor"],[[".vscode","mcp.json"],"VS Code"],[[".codex","config.toml"],"Codex CLI"]];function mn(e){if(!e)return null;const s=e.split("\\").join("/").split("/").filter(Boolean);for(const[n,a]of Sr)if(!(s.length<n.length)&&s.slice(-n.length).join("/")===n.join("/"))return a;return null}const Ge=e=>`${e} ${e===1?"tool":"tools"}`,Cr=e=>`${e} ${e===1?"integration":"integrations"}`,Mr=["connected","needs_sign_in","not_started","connecting","error"],hn=e=>Mr.includes(e),Ae=(e,s)=>[...s].filter(n=>n.name===e&&n.status==="running").sort((n,a)=>a.created_at-n.created_at)[0]??null,Ar={connectedAt:null,connectedToolCount:null,settledGroup:null,pinnedGroup:null,pinnedOperationId:null,needsKey:!1,needsSignIn:!1,disconnectedAt:null,holdUntil:null,lastDecisive:null},Rr=1e12,Tr=1e9,Ir=60*60*1e3,pn=(e,s=Date.now())=>{if(typeof e!="number"||!Number.isFinite(e))return null;const n=e>=Rr?e:e<Tr?null:e*1e3;return n===null||n>s+Ir?null:Math.min(n,s)},_e=(e,s)=>e?.[s]??Ar,$e=(e,s,n)=>Or(e,s)??n?.lastDecisive??null,Er=e=>({id:e.id,name:e.name,action:e.action,status:e.status,created_at:e.created_at,credential_removed:e.credential_removed,...e.message?{message:e.message}:{}}),vt=(e,s)=>e.status==="not_started"&&typeof e.tool_count=="number"&&(s.connectedAt!==null||e.status_basis==="stored"&&e.tool_count_basis==="last_seen"),Lr=(e,s)=>[...s].filter(n=>n.name===e).sort((n,a)=>a.created_at-n.created_at)[0]??null,Or=(e,s)=>Lr(e,s.filter(n=>n.status!=="cancelled")),We=e=>e.actions.includes("set_key")||e.actions.includes("add_key");function Fr(e,s){const n=Math.max(0,Math.round((e-s)/1e3));if(n<60)return"just now";const a=Math.round(n/60);if(a<60)return`${a} min ago`;const o=Math.round(a/60);return o<24?`${o} h ago`:`${Math.round(o/24)} d ago`}function nt(e){if(!e)return null;const s=e.trim();if(!s||/^\/\w/.test(s)||/\/mcp\s+\w+/.test(s))return null;let n=s;for(let a=0;a<3;a+=1){const o=n.replace(/^(?:connection (?:closed|error|refused)|error|closed|failed)\s*:\s*/i,"").trim();if(o===n)break;n=o}return n=n.replace(/\s*\(\s*\d{3}\s*\)/g,"").replace(/\s+([.,;])/g,"$1").replace(/\s{2,}/g," ").trim(),n||null}function Dr(e,s=[],n,a=Date.now()){const o=_e(n,e.name),r=Ae(e.name,s);if(r){if(r.action==="login"||r.action==="reauth")return{label:"Signing in…",tone:"info",detail:null,busy:!0};if(r.action==="logout")return{label:"Signing out…",tone:"info",detail:null,busy:!0}}if(!hn(e.status))return{label:"Status unavailable",tone:"neutral",detail:null,busy:!1};const u=$e(e.name,s,o),d=Qe(u)&&e.status!=="connected",c=vt(e,o),m=jt(u)&&e.status!=="connected",y=(u?.action==="login"||u?.action==="reauth")&&u.status==="failed";if(o.disconnectedAt!==null)return{label:"Not connected",tone:"neutral",detail:null,busy:!1};switch(e.status){case"connected":return{label:typeof e.tool_count=="number"?`Connected · ${Ge(e.tool_count)}`:"Connected",tone:"success",detail:null,busy:!1};case"connecting":return{label:"Connecting…",tone:"info",detail:null,busy:!0};case"needs_sign_in":return{label:e.auth.kind==="api_key"||Oe(e,s,o)?"Needs a key":"Needs sign-in",tone:"warning",detail:nt(e.status_reason),busy:!1};case"error":return{label:"Couldn't start",tone:"danger",detail:nt(e.status_reason)??"No reason was given.",busy:!1};default:if(d)return{label:"Signed out",tone:"warning",detail:null,busy:!1};if(m)return{label:"Sign-out didn't finish",tone:"warning",detail:"The sign-in is still saved.",busy:!1};if(Oe(e,s,o))return{label:"Needs a key",tone:"warning",detail:null,busy:!1};if(y)return{label:"Sign-in didn't finish",tone:"warning",detail:null,busy:!1};if(o.needsSignIn)return{label:e.auth.kind==="api_key"||Oe(e,s,o)?"Needs a key":"Needs sign-in",tone:"warning",detail:nt(e.status_reason),busy:!1};if(e.status_basis==="stored"&&c&&o.disconnectedAt===null){const v=o.connectedAt??pn(e.last_seen_at,a);return{label:v!==null?`Worked ${Fr(a,v)} · ${Ge(e.tool_count)}`:`Worked earlier · ${Ge(e.tool_count)}`,tone:"success",detail:null,busy:!1}}return e.status_basis==="live"?{label:"Not connected",tone:"neutral",detail:null,busy:!1}:{label:"Ready",tone:"neutral",detail:null,busy:!1}}}const fn=e=>e===1?"Replace the saved key":"Replace saved keys",$r=/[,;]?\s*(?:or|and)?\s*add (?:its|a|the) key instead\.?\s*$/i;function Ur(e,s){const n=e?.trim()??"";if(!n)return null;if(s)return n;const a=n.replace($r,"").trim();return a?/\.$/.test(a)?a:`${a}.`:n}const zr="Nothing is wrong. It starts when a chat uses it.",Pr="Not running in this chat.",Kr=e=>e.transport==="local_command"?"Local command":"Remote URL";function gn(e){switch(e.source.kind){case"local-operator":case"project-mcp-json":return null;case"claude-code":return"Claude Code";case"cursor":return"Cursor";case"vscode":return"VS Code";case"codex":return"Codex CLI";default:return mn(e.source.path)}}function Hr(e,s){const n=[Kr(e)];e.status!=="connected"&&e.tool_count_basis==="last_seen"&&typeof e.tool_count=="number"&&n.push(`${Ge(e.tool_count)} when last checked`),s&&n.push(e.scope==="project"?"This project":"Global");const a=gn(e);return a?n.push(`Imported from ${a}`):e.source.editable||n.push("Imported from a project file"),n}const bt=(e,s)=>s.disconnectedAt!==null?"not_started":e.status;function wt(e,s=[],n){const a=_e(n,e.name),o=Ae(e.name,s);if(o)return o.action==="login"||o.action==="reauth"?{kind:"sign_in",label:"Continue sign-in"}:null;const r=y=>e.actions.includes(y),u=We(e),d=Oe(e,s,a);if(!hn(e.status))return r("test")?{kind:"test",label:"Check again"}:null;const c=$e(e.name,s,a),m=c?.status==="failed"&&Ue(c);switch(bt(e,a)){case"connected":case"connecting":return null;case"needs_sign_in":return d?{kind:"set_key",label:"Add key"}:r("sign_in")?{kind:"sign_in",label:"Sign in"}:u?{kind:"set_key",label:"Add key"}:r("reauth")?{kind:"reauth",label:"Sign in again"}:{kind:"fix",label:"Fix"};case"error":return r("connect")?{kind:"connect",label:"Reconnect"}:r("test")?{kind:"test",label:"Retry"}:{kind:"fix",label:"Fix"};default:{if(Qe(c)&&r("sign_in"))return{kind:"sign_in",label:"Sign in"};if(jt(c)&&r("sign_out"))return{kind:"sign_out",label:"Sign out again"};if(a.disconnectedAt!==null&&r("connect"))return{kind:"connect",label:"Connect"};if(a.needsSignIn){if(d&&u)return{kind:"set_key",label:"Add key"};if(r("sign_in"))return{kind:"sign_in",label:"Sign in"}}return d&&u?{kind:"set_key",label:"Add key"}:m&&r("sign_in")?{kind:"sign_in",label:"Try again"}:vt(e,a)&&!r("connect")?null:r("connect")?{kind:"connect",label:"Connect",...a.connectedAt===null&&e.status_basis!=="live"?{variant:"ghost"}:{}}:r("test")&&e.tool_count===null&&e.tool_count_basis===null?{kind:"test",label:"Test",variant:"ghost"}:null}}}const Ue=e=>e.action==="login"||e.action==="reauth",Qe=e=>!!(e&&e.action==="logout"&&e.status==="complete"),jt=e=>!!(e&&e.action==="logout"&&e.status!=="running"&&e.status!=="complete"),yn=/no oauth authorization server/i;function Oe(e,s,n){if(!We(e))return!1;const a=$e(e.name,s,n);return a&&Ue(a)&&a.status==="failed"&&yn.test(a.message??"")?!0:n.needsKey}function Br(e,s=[],n){const a=wt(e,s,n)?.kind,o=bt(e,_e(n,e.name)),r=c=>e.actions.includes(c),u=[],d=Ae(e.name,s);if(d&&u.push({kind:"cancel",label:"Cancel"}),!d&&r("test")&&a!=="test"&&u.push({kind:"test",label:"Test connection"}),r("connect")&&a!=="connect"&&o!=="connected"&&u.push({kind:"connect",label:"Reconnect"}),!d&&r("sign_in")&&a!=="sign_in"&&o!=="connected"&&u.push({kind:"sign_in",label:"Sign in"}),r("reload")&&u.push({kind:"reload",label:"Reload"}),!d&&r("reauth")&&a!=="reauth"&&u.push({kind:"reauth",label:"Sign in again"}),We(e)&&a!=="set_key"&&u.push({kind:"set_key",label:e.auth.secret_refs.length>0?"Update key":"Add key"}),r("sign_out")&&u.push({kind:"sign_out",label:"Sign out"}),r("disconnect")&&o==="connected"&&u.push({kind:"disconnect",label:"Disconnect"}),r("copy_setup")&&e.setup_prompt&&u.push({kind:"copy_setup",label:"Copy setup prompt"}),a!=="fix"&&u.push({kind:"open_config",label:"Open config file"}),r("remove"))u.push({kind:"remove",label:"Remove",destructive:!0});else if(!e.source.editable){const c=gn(e);u.push({kind:"remove_elsewhere",label:c?`Remove in ${c}`:"Remove in its own file",hint:c?`Defined in ${c}'s config. Remove it there.`:"Defined in a file this app doesn't write. Remove it there."})}return u}const Vr={attention:"Needs attention",connected:"Connected",ready:"Available"};function xn(e,s=[],n){const a=_e(n,e.name),o=Ae(e.name,s),r=bt(e,a);if(o&&a.pinnedGroup&&a.pinnedOperationId===o.id)return a.pinnedGroup;if(r==="needs_sign_in"||r==="error")return"attention";const u=$e(e.name,s,a);return Qe(u)&&r!=="connected"||jt(u)&&r!=="connected"?"attention":a.disconnectedAt!==null?"ready":Oe(e,s,a)||a.needsSignIn&&r!=="connected"||u?.status==="failed"&&Ue(u)&&r!=="connected"?"attention":r==="connected"||e.status_basis==="stored"&&vt(e,a)?"connected":o&&o.action!=="test"?"attention":"ready"}function Gr(e,s=[],n){return["attention","connected","ready"].map(o=>({id:o,title:Vr[o],rows:e.filter(r=>xn(r,s,n)===o)})).filter(o=>o.rows.length>0)}function qr(e,s,n=Date.now()){if(!s)return e??{};const a={};for(const o of s.servers){const r=_e(e,o.name),u=Ae(o.name,s.operations),d=$e(o.name,s.operations,r),c=Qe(d),m=o.status==="connected"&&(o.status_basis==="probe"||o.status_basis==="live"),y=r.holdUntil!==null&&n<r.holdUntil,v=!y&&!c&&r.connectedAt===null&&o.status_basis==="stored"&&o.tool_count_basis==="last_seen"?pn(o.last_seen_at,n):null,w=!c,h=d?.status==="failed"&&Ue(d)&&yn.test(d.message??""),k={connectedAt:m&&!y?n:v!==null?v:w?r.connectedAt:null,connectedToolCount:m&&!y||v!==null?o.tool_count??r.connectedToolCount:w?r.connectedToolCount:null,settledGroup:r.settledGroup,pinnedGroup:u&&r.pinnedOperationId===u.id?r.pinnedGroup:u?r.settledGroup:null,pinnedOperationId:u?u.id:null,needsKey:m?!1:r.needsKey||h,needsSignIn:m||c?!1:r.needsSignIn||o.status==="needs_sign_in",disconnectedAt:m&&!y?null:r.disconnectedAt,holdUntil:y?r.holdUntil:null,lastDecisive:d?Er(d):null};u||(k.settledGroup=xn(o,s.operations,{...a,[o.name]:k})),a[o.name]=k}return a}const Yr=(e,s)=>e!==null&&s===e,ht="local-operator.settings.integrations.row-memory",kn=(e,s)=>`${e}#${s}`;function Wr(e,s){const n={};if(!s)return n;for(const a of s.servers){const o=e[a.name];o&&(n[kn(a.source.path,a.name)]=o)}return n}function Qr(e,s,n){if(!s)return e;let a=null;for(const o of s.servers){if(Object.prototype.hasOwnProperty.call(e,o.name))continue;const r=Xr(n[kn(o.source.path,o.name)]);r&&(a=a??{...e},a[o.name]=r)}return a??e}const Zr=["attention","connected","ready"],vn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),_t=e=>typeof e=="number"&&Number.isFinite(e)?e:null,Ut=e=>Zr.includes(e)?e:null,st=e=>{const s=_t(e);return s!==null&&s>=1e12?s:null};function Jr(e){if(!vn(e)||typeof e.id!="string"||typeof e.name!="string")return null;const s=e.action,n=e.status;return s!=="login"&&s!=="logout"&&s!=="reauth"&&s!=="test"||n!=="running"&&n!=="complete"&&n!=="cancelled"&&n!=="failed"?null:{id:e.id,name:e.name,action:s,status:n,created_at:_t(e.created_at)??0,credential_removed:e.credential_removed===!0,...typeof e.message=="string"?{message:e.message}:{}}}function Xr(e){if(!vn(e))return null;const s=st(e.connectedAt),n=st(e.disconnectedAt),a=e.needsKey===!0,o=e.needsSignIn===!0,r=Jr(e.lastDecisive);return s===null&&n===null&&!a&&!o&&!r?null:{connectedAt:s,connectedToolCount:_t(e.connectedToolCount),settledGroup:Ut(e.settledGroup),pinnedGroup:Ut(e.pinnedGroup),pinnedOperationId:typeof e.pinnedOperationId=="string"?e.pinnedOperationId:null,needsKey:a,needsSignIn:o,disconnectedAt:n,holdUntil:st(e.holdUntil),lastDecisive:r}}const bn=2e3,zt=8e3;function ei(e){return e&&(e.servers.some(n=>n.status==="connecting")||e.operations.some(n=>n.status==="running"))?bn:!1}const ti=/^[A-Za-z0-9_.:-]{1,100}$/,ni=/:\/\//;function si(e,s){const n=e.trim();return n?ti.test(n)?s.includes(n)?`An integration named ${n} already exists.`:null:"Use letters, numbers, dots, dashes, underscores or colons, with no spaces.":"Give it a name."}function ai(e){const s=e.trim();if(!s)return"Enter the server's URL.";let n;try{n=new URL(s)}catch{return"Enter a full URL, like https://mcp.example.com/mcp."}return n.protocol!=="https:"&&n.protocol!=="http:"?"The URL must start with https:// or http://.":n.hostname?n.username||n.password?"Remove the username or password from the URL. Keys are added after it's saved.":n.search||n.hash?"Remove the ? or # part of the URL. Keys are added after it's saved.":ni.test(s.slice(n.protocol.length+2))?"This looks like two URLs pasted together. Enter just one.":null:"The URL needs a host name."}const oi=e=>e.split(`
|
|
292
|
-
`).map(s=>s.trim()).filter(Boolean);function pt(e,s){const n=!!e?.cold,a=(e?.servers??[]).map(o=>{const r=o.transport==="http",u=o.secret_refs??[],d=o.status==="connected"?"connected":o.status==="connecting"?"connecting":o.status==="auth-required"?"needs_sign_in":"not_started",c=[];d!=="connected"&&c.push("connect"),d==="connected"&&c.push("disconnect"),n||c.push("reload"),r&&o.transport_oauth_supported!==!1&&c.push("sign_in"),u.length>0&&c.push("set_key"),o.owned_scope&&c.push("remove"),o.setup?.text&&c.push("copy_setup");const m=mn(o.source);return{id:o.name,name:o.name,scope:o.owned_scope??"global",project_cwd:null,source:{kind:ri(o.source,m,o.owned_scope),path:o.source??"",editable:o.owned_scope!==null,owned_scope:o.owned_scope},transport:r?"remote_url":"local_command",endpoint:{command:null,url:null,endpoint_redacted:!1},status:d,status_reason:null,status_observed_at:null,last_seen_at:null,status_basis:n?"stored":"live",auth:{kind:u.length?"api_key":r?"unknown":"none",signed_in:null,secret_refs:u.map(y=>({id:y.id,state:"missing"}))},tool_count:typeof o.tool_count=="number"?o.tool_count:null,tool_count_basis:typeof o.tool_count=="number"?"live":null,actions:c,setup_prompt:o.setup?.text??null}});return{cwd:"",project_scope_available:a.some(o=>o.source.owned_scope==="project"),global_path:"",project_path:null,status_source:n?"config":"live",session_id:s,servers:a,operations:(e?.operations??[]).map(o=>({...o}))}}const ri=(e,s,n)=>s==="Claude Code"?"claude-code":s==="Cursor"?"cursor":s==="VS Code"?"vscode":s==="Codex CLI"?"codex":n?"local-operator":e?"project-mcp-json":"local-operator",Pt={invalid_config:"That configuration isn't valid. Check the command or the URL, then try again.",operation_unavailable:"That sign-in or test isn't running any more. Try again.",exists:"An integration with this name already exists. Choose another name.",not_owned:"It's defined in another tool's config, so it can't be changed here. Edit it in that file.",project_scope_unavailable:"There's no separate project config here, so it can only be added globally.",unknown_server:"It no longer exists. The list has been refreshed.",oauth_unsupported:"It doesn't use browser sign-in.",grant_running:"A sign-in or test is already running. Wait for it to finish, or cancel it.",too_many_operations:"Too many sign-ins and tests are waiting. Try again in a moment.",write_failed:"The config file couldn't be written. Check that it isn't read-only.",mcp_starting:"Integrations are still starting. Try again in a moment.",mcp_control_refused:"The server refused it, so nothing was changed."},ii="The server refused it, so nothing was changed. Try again.";function He(e,s,n){if(s instanceof xt&&s.status===409){const a=typeof s.code=="string"&&Object.prototype.hasOwnProperty.call(Pt,s.code)?Pt[s.code]:ii;return`${Un[e]}. ${a}`}return zn(e,s,n).message}const ci="New chats can use it right away. Open chats pick it up when you start a new chat or reload integrations there.",li="Most services give you a URL. Use Local command when their setup says npx or uvx.",di=({existingNames:e,projectScopeAvailable:s,projectLabel:n,onSubmit:a,onCancel:o,initial:r})=>{const[u,d]=i.useState(r?.name??""),[c,m]=i.useState(r?.mode??"command"),[y,v]=i.useState(r?.command??""),[w,h]=i.useState(r?.args??""),[k,R]=i.useState(r?.url??""),[C,H]=i.useState("global"),[_,U]=i.useState(r?.touched?{name:!0,command:!0,url:!0}:{}),[O,A]=i.useState(!!r?.touched),[S,V]=i.useState(!1),[B,Y]=i.useState(null),G=i.useRef(null),W=i.useRef(null),I=i.useRef(null);i.useEffect(()=>{G.current?.focus()},[]);const L=si(u,e),F=c==="command"&&!y.trim()?"Enter the command to run.":null,z=c==="url"?ai(k):null,D=j=>O||_[j],te=async j=>{if(j.preventDefault(),A(!0),L||F||z){L?G.current?.focus():F?W.current?.focus():I.current?.focus();return}V(!0),Y(null);const Q=s?C:"global",J=c==="command"?{name:u.trim(),scope:Q,mode:c,command:y.trim(),args:oi(w)}:{name:u.trim(),scope:Q,mode:c,url:k.trim()},ue=await a(J);V(!1),Y(ue)},P=(j,Q,J)=>Q&&D(J)?t.jsx("p",{id:j,className:"text-body-sm text-danger",children:Q}):null,ee=j=>j.preventDefault();return t.jsxs("form",{noValidate:!0,"aria-label":"Add integration",className:"flex flex-col gap-4 rounded-lg bg-surface p-4",onSubmit:j=>void te(j),onKeyDown:j=>{j.key==="Escape"&&(j.stopPropagation(),o())},children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(ye,{htmlFor:"integration-add-name",children:"Name"}),t.jsx(Me,{ref:G,id:"integration-add-name",value:u,placeholder:"e.g. notion",autoComplete:"off","aria-invalid":!!(L&&D("name")),"aria-describedby":L&&D("name")?"integration-add-name-error":void 0,onChange:j=>d(j.target.value),onBlur:()=>U(j=>({...j,name:!0}))}),P("integration-add-name-error",L,"name")]}),t.jsxs(ut,{value:c,onValueChange:j=>m(j==="url"?"url":"command"),className:"flex flex-col gap-1.5",children:[t.jsx("span",{id:"integration-add-transport-label",className:"font-medium text-body-sm text-ink",children:"How it runs"}),t.jsxs(mt,{"aria-labelledby":"integration-add-transport-label",children:[t.jsx(Le,{value:"command","data-integration-transport":"command",children:"Local command"}),t.jsx(Le,{value:"url","data-integration-transport":"url",children:"Remote URL"})]}),t.jsx("p",{className:"text-ink-dim text-meta",children:li}),t.jsxs(Lt,{value:"command",className:"mt-0 flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(ye,{htmlFor:"integration-add-command",children:"Command"}),t.jsx(Me,{ref:W,id:"integration-add-command",value:y,placeholder:"e.g. npx",autoComplete:"off",className:"font-mono","aria-invalid":!!(F&&D("command")),"aria-describedby":F&&D("command")?"integration-add-command-error":void 0,onChange:j=>v(j.target.value),onBlur:()=>U(j=>({...j,command:!0}))}),P("integration-add-command-error",F,"command")]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs(ye,{htmlFor:"integration-add-args",children:["Arguments"," ",t.jsx("span",{className:"font-normal text-ink-dim",children:"(one per line)"})]}),t.jsx(ln,{id:"integration-add-args",value:w,rows:2,className:"font-mono",onChange:j=>h(j.target.value)})]})]}),t.jsx(Lt,{value:"url",className:"mt-0 flex flex-col gap-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(ye,{htmlFor:"integration-add-url",children:"URL"}),t.jsx(Me,{ref:I,id:"integration-add-url",type:"url",value:k,placeholder:"https://mcp.example.com/mcp",autoComplete:"off",className:"font-mono","aria-invalid":!!(z&&D("url")),"aria-describedby":z&&D("url")?"integration-add-url-error":"integration-add-url-help",onChange:j=>R(j.target.value),onBlur:()=>U(j=>({...j,url:!0}))}),P("integration-add-url-error",z,"url")??t.jsx("p",{id:"integration-add-url-help",className:"text-ink-dim text-meta",children:"If it needs a sign-in or a key, you'll be asked after it's added."})]})})]}),s?t.jsxs(ut,{value:C,onValueChange:j=>H(j==="project"?"project":"global"),className:"flex flex-col gap-1.5",children:[t.jsx("span",{id:"integration-add-scope-label",className:"font-medium text-body-sm text-ink",children:"Available in"}),t.jsxs(mt,{"aria-labelledby":"integration-add-scope-label",children:[t.jsx(Le,{value:"global","data-integration-scope":"global",children:"All chats"}),t.jsx(Le,{value:"project","data-integration-scope":"project",children:"This project"})]}),n?t.jsx("p",{className:"text-ink-dim text-meta",children:C==="project"?`Only chats working in ${n}.`:"Every chat, in any folder."}):null]}):null,B?t.jsx("p",{className:"text-body-sm text-danger",role:"alert",children:B}):null,t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx("p",{className:oe("text-body-sm text-ink-dim"),children:ci}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx($,{type:"button",variant:"ghost",size:"md",onMouseDown:ee,onClick:o,children:"Cancel"}),t.jsxs($,{type:"submit",variant:"primary",size:"md",disabled:S,onMouseDown:ee,children:[S?t.jsx(re,{size:"xs"}):null,"Add integration"]})]})]})]})},ui=4;function mi(e){return e.rowMoving?e.now+e.windowMs:Math.max(e.hold.until,e.lastMovingAt+e.windowMs)}function hi(e){return e.now>e.hold.until||e.hold.reanchors>=ui?"drop":e.hold.landedOn.isConnected&&(!e.candidate||e.candidate===e.hold.landedOn)?"settled":e.active&&e.active!==e.body&&e.active!==e.hold.landedOn?"drop":e.candidate?.isConnected?"restore":"drop"}function pi(e){const s=mi({hold:e.hold,now:e.now,windowMs:e.windowMs,rowMoving:e.rowMoving,lastMovingAt:e.lastMovingAt});if(e.now>s)return{hold:null,land:null};const n=e.hold.landedOn??null,a=e.candidate;if(!a)return{hold:{until:s,reanchors:e.hold.reanchors,landedOn:n},land:null};if(!n)return{hold:{until:s,reanchors:e.hold.reanchors,landedOn:a},land:a};const o=hi({hold:{until:s,reanchors:e.hold.reanchors,landedOn:n},candidate:a,active:e.active,body:e.body,now:e.now});if(o==="settled")return{hold:{until:s,reanchors:e.hold.reanchors,landedOn:n},land:null};if(o==="drop")return{hold:null,land:null};const r=!n.isConnected;return{hold:{until:r?e.now+e.windowMs:s,reanchors:r?e.hold.reanchors+1:e.hold.reanchors,landedOn:a},land:a}}function fi(e){const{row:s,target:n}=e;return!s||!n||typeof n.nodeType!="number"?!1:!s.contains(n)}const Kt=250;function Ht(e){return e?!e.disabled:!1}function gi(e){return Ht(e.primary)?e.primary??null:Ht(e.overflow)?e.overflow??null:null}function yi(e){return e.verdict==="finished"?null:e.watchMs}const wn="key";function xi(e){const{name:s,keyless:n,freeName:a,names:o,values:r,replace:u,canReplace:d}=e;if(n){const c=ft(s,a);return{values:{[c]:(r[wn]??"").trim()},confirmedReplace:u&&d?[c]:[],header:a.trim()}}return{values:Object.fromEntries(o.map(c=>[c,(r[c]??"").trim()])),confirmedReplace:u&&d?o:[],header:void 0}}function ft(e,s){const n=Bt(e),a=Bt(s);if(!a)return"";const o=[n,a].filter(Boolean).join("_"),r=/^[A-Za-z_]/.test(o)?o:`K_${o}`;if(r.length<=at)return r;const u=ki(n),d=at-a.length-u.length-2,c=[n.slice(0,Math.max(d,0)),u,a].filter(Boolean).join("_");return c.length<=at?c:c.slice(-128)}const at=128,Bt=e=>e.trim().toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,""),ki=e=>{let s=2166136261;for(let n=0;n<e.length;n+=1)s^=e.charCodeAt(n),s=Math.imul(s,16777619)>>>0;return s.toString(36).toUpperCase().slice(0,5)},vi=({name:e,keyNames:s,keyless:n=!1,savedKeys:a=[],saving:o,failure:r,onSave:u,onClose:d})=>{const[c,m]=i.useState({}),[y,v]=i.useState(!1),[w,h]=i.useState(""),k=n?[ft(e,w)]:[...s],R=n?[wn]:k,C=(n?ft(e,w).length>0:!0)&&R.every(_=>(c[_]??"").trim()),H=k.some(_=>a.includes(_));return t.jsx(en,{open:!0,onClose:d,maxWidth:"xs",title:n||s.length===1?`Add the key for ${e}`:`Add keys for ${e}`,actions:t.jsxs(t.Fragment,{children:[t.jsx(it,{onClick:d,children:"Cancel"}),t.jsx(ct,{disabled:!C||o,onClick:()=>{const _=xi({name:e,keyless:n,freeName:w,names:k,values:c,replace:y,canReplace:H});u(_.values,_.confirmedReplace,_.header)},children:o?"Saving…":"Save and test"})]}),children:t.jsxs("div",{className:"flex flex-col gap-3 p-1.5 text-body text-ink-muted",children:[t.jsx("p",{className:"-mx-1.5",children:n?"Keys are saved encrypted on this computer. This one is stored under a name derived from this integration, so no other server shares it.":"Keys are saved encrypted on this computer. Other integrations that use the same key name share it."}),n?t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(ye,{htmlFor:"integration-key-name",children:"The header this server wants the key in"}),t.jsx(Me,{id:"integration-key-name",autoComplete:"off",placeholder:"e.g. Authorization or X-Api-Key",value:w,onChange:_=>h(_.target.value)}),t.jsx("p",{className:"-mx-1.5 text-ink-dim text-meta",children:"This server declares no key of its own, so Local Operator adds one to its config for you."})]}):null,R.filter(_=>n!==!0||_.trim().length>0).map(_=>t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx(ye,{htmlFor:`integration-key-${_}`,className:"font-mono",children:n?"Key":_}),t.jsx(Me,{id:`integration-key-${_}`,type:"password",autoComplete:"off",value:c[_]??"",onChange:U=>m(O=>({...O,[_]:U.target.value}))})]},_)),H?t.jsxs("div",{className:"flex items-center gap-2 text-body-sm",children:[t.jsx(Ks,{id:"integration-key-replace",checked:y,onCheckedChange:_=>v(_===!0)}),t.jsx(ye,{htmlFor:"integration-key-replace",className:"font-normal",children:fn(k.length)})]}):null,r?t.jsx("p",{className:"-mx-1.5 text-body-sm text-danger",role:"alert",children:r}):null]})})},bi={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",neutral:"bg-ink-dim"},wi={success:"text-ink-muted",warning:"text-warning",danger:"text-danger",info:"text-ink-muted",neutral:"text-ink-dim"},Vt={Ready:zr,"Not connected":Pr},ji=({row:e,operations:s,memories:n,now:a,projectScopeAvailable:o,highlighted:r=!1,rowRef:u,primaryRef:d,overflowRef:c,pending:m,failure:y,confirm:v,onPrimary:w,onOverflow:h,onConfirm:k,onCancelConfirm:R})=>{const C=Dr(e,s,n,a),H=r&&C.tone==="danger"?"text-ink":wi[C.tone],_=wt(e,s,n),U=Br(e,s,n),O=Hr(e,o),A=U.findIndex(S=>S.kind==="remove"||S.kind==="remove_elsewhere");return t.jsxs("li",{ref:u,"data-integration":e.name,"data-status":e.status,className:oe("flex min-h-14 flex-col justify-center gap-1 px-4 py-2.5",r&&"bg-row-selected"),onKeyDown:S=>{!v||S.key!=="Escape"||(S.stopPropagation(),R())},children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:C.busy?t.jsx(re,{size:"xs"}):t.jsx("span",{"aria-hidden":"true","data-tone":C.tone,className:oe("size-2 rounded-full",bi[C.tone])})}),t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[t.jsx("span",{className:"truncate font-medium text-body text-ink",title:e.name,children:e.name}),t.jsx("span",{className:"truncate text-ink-dim text-meta",children:O.map((S,V)=>t.jsxs("span",{children:[V>0?" · ":null,S.startsWith("Imported from")&&e.source.path?t.jsx(Fe,{content:Pn(e.source.path),children:t.jsx("span",{className:"underline decoration-dotted underline-offset-2",children:S})}):S]},S))})]}),Vt[C.label]?t.jsx(Fe,{content:Vt[C.label],children:t.jsx("span",{className:oe("shrink-0 text-body-sm",H),children:C.label})}):t.jsx("span",{className:oe("shrink-0 text-body-sm",H),children:C.label}),_?t.jsxs($,{ref:d,variant:_.variant??"secondary",size:"sm","aria-label":`${_.label} ${e.name}`,disabled:m,"data-integration-action":_.kind,onClick:()=>w(_),children:[m?t.jsx(re,{size:"xs"}):null,_.label]}):null,t.jsxs(Hs,{children:[t.jsx(Bs,{asChild:!0,children:t.jsx($,{ref:c,variant:"ghost",size:"icon-sm","aria-label":`More actions for ${e.name}`,disabled:m,children:t.jsx(Kn,{"aria-hidden":"true"})})}),t.jsx(Vs,{align:"end",className:"min-w-48",children:U.map((S,V)=>t.jsx(_i,{item:S,separated:V===A&&V>0,onSelect:()=>h(S)},S.kind))})]})]}),C.detail?t.jsx("p",{className:oe("pl-7 text-body-sm",C.tone==="danger"?"text-ink-muted":"text-ink-dim"),children:C.detail}):null,y?t.jsx("p",{className:oe("pl-7 text-body-sm",r?"text-ink":"text-danger"),role:"alert",children:y}):null,v?t.jsxs("div",{className:"flex flex-wrap items-center gap-2 pl-7",children:[t.jsx("span",{className:"text-body-sm text-ink",children:v.kind==="remove"?`Remove ${e.name}?`:`Sign out of ${e.name}?`}),t.jsx("span",{className:"text-body-sm text-ink-muted",children:v.kind==="remove"?`Agents in every chat lose access to ${e.name}.`:e.auth.kind==="oauth"?"The saved sign-in is removed too.":"Its saved credential is removed too."}),t.jsx($,{variant:"danger",size:"sm",onClick:k,"data-integration-confirm":v.kind,children:v.kind==="remove"?"Remove":"Sign out"}),t.jsx($,{variant:"ghost",size:"sm",onClick:R,children:"Keep"})]}):null]})},_i=({item:e,separated:s,onSelect:n})=>t.jsxs(t.Fragment,{children:[s?t.jsx(Gs,{}):null,e.kind==="remove_elsewhere"?t.jsxs(Ot,{disabled:!0,className:"flex-col items-start gap-0.5",children:[t.jsx("span",{children:e.label}),t.jsx("span",{className:"text-meta text-ink-dim",children:e.hint})]}):t.jsx(Ot,{destructive:e.kind==="remove",onSelect:n,"data-integration-menu":e.kind,children:e.label})]});function Ni(e,s,n){return!s||s.status==="running"?s?.browser_opened===!0?{message:`Your browser opened. Approve access to ${e} there, then come back here.`,tone:"progress",link:s.authorization_url??null}:s?.browser_opened===!1?{message:s.authorization_url?"Your browser didn't open. Open this link to approve access:":"Your browser didn't open, and no link was provided. Cancel and try again.",tone:"progress",link:s.authorization_url??null}:{message:`Waiting for you to approve access to ${e}…`,tone:"progress",link:s?.authorization_url??null}:s.status==="complete"?{message:`Signed in to ${e}. Agents can use it now.`,tone:"success",link:null}:s.status==="cancelled"?{message:"Sign-in cancelled.",tone:"failure",link:null,reason:null,nextStep:"Press Try again when you are ready."}:{message:"Sign-in didn't finish.",tone:"failure",link:null,reason:Ur(s.message,n)??"The server didn't say why.",nextStep:Si(s.message??null,n)}}function Si(e,s){const n=(e??"").toLowerCase();return n.includes("redirect")?s?"This server may not accept sign-ins from Local Operator. Check the server's settings, or add a key instead.":"This server may not accept sign-ins from Local Operator. Check the server's settings, then try again.":n.includes("no oauth")||n.includes("authorization server")?s?"This server doesn't publish a browser sign-in. Add its key instead.":"This server doesn't publish a browser sign-in. Check the server's settings, then try again.":n.includes("network")||n.includes("connect")?"Check the server's URL and your network, then try again.":"Check the server's settings, then try again."}function Ci(e,s){return e.kind==="ready"?"ready":e.kind==="running"&&s&&s.tone!=="progress"?s.tone==="success"?"success":"failure":"running"}const Mi=({name:e,action:s,keyRoute:n,phase:a,onStart:o,onCancel:r,onOpenLink:u,onClose:d})=>{const c=a.kind==="running"?a.operation:null,m=a.kind==="running"?Ni(e,c,n):null,y=a.kind==="starting"||a.kind==="running"&&m?.tone==="progress",v=m&&m.tone!=="progress",w=i.useRef(null),h=i.useRef(!1),k=Ci(a,m);i.useEffect(()=>{if(!h.current){h.current=!0;return}k&&w.current?.focus()},[k]);const R=()=>d(m?.tone==="success"?"signed-in":"dismissed");return t.jsx(en,{open:!0,onClose:R,maxWidth:"xs",fullWidth:!0,title:`Sign in to ${e}`,dialogProps:{onOpenAutoFocus:C=>{C.preventDefault(),w.current?.focus()}},actions:t.jsxs(t.Fragment,{children:[y&&c?t.jsx(it,{ref:w,onClick:()=>r(c.id),children:"Cancel sign-in"}):t.jsx(it,{ref:a.kind==="ready"?void 0:w,onClick:R,children:m?.tone==="success"?"Done":"Close"}),a.kind==="ready"?t.jsx(ct,{ref:w,onClick:o,children:"Continue in browser"}):null,a.kind==="refused"||m?.tone==="failure"?t.jsx(ct,{ref:m?.tone==="failure"?w:void 0,onClick:o,children:"Try again"}):null]}),children:t.jsxs("div",{className:"flex flex-col gap-3 p-1.5 text-body text-ink-muted","aria-live":"polite",children:[a.kind==="ready"?t.jsxs("p",{className:"-mx-1.5",children:["Local Operator opens your browser so you can approve access to"," ",e,".",s==="reauth"?" This replaces the sign-in it has now.":""]}):null,a.kind==="starting"?t.jsxs("p",{className:"-mx-1.5 flex items-center gap-2",children:[t.jsx(re,{size:"xs"}),"Starting sign-in…"]}):null,m?t.jsxs("div",{className:"flex flex-col gap-1",role:v?"status":void 0,children:[t.jsxs("p",{className:(m.tone==="success","-mx-1.5 flex items-start gap-2 text-ink"),children:[m.tone==="progress"?t.jsx(re,{size:"xs",className:"mt-0.5"}):null,m.tone==="failure"?t.jsx(qs,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-danger"}):null,t.jsx("span",{children:m.message})]}),m.reason?t.jsx("p",{className:"-mx-1.5 text-ink-muted",children:m.reason}):null,m.nextStep?t.jsx("p",{className:"-mx-1.5 text-ink-muted",children:m.nextStep}):null]}):null,m?.link&&m.tone==="progress"?t.jsxs("div",{className:"flex flex-col items-start gap-1",children:[t.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[t.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-ink-dim text-mono-sm",title:m.link,children:m.link}),t.jsx($,{variant:"ghost",size:"icon-sm","aria-label":"Copy the sign-in link",title:"Copy the sign-in link",onClick:()=>{navigator.clipboard.writeText(m.link??"").then(()=>lt("Sign-in link copied.")).catch(()=>{})},children:t.jsx(Hn,{"aria-hidden":"true"})})]}),t.jsx($,{variant:"link",size:"sm",onClick:()=>u(m.link??""),children:"Open the sign-in page"})]}):null,a.kind==="refused"?t.jsx("p",{className:"text-danger",role:"alert",children:a.message}):null]})})},Ai=e=>e.reduce((s,n)=>s?(n.updated_at??0)>(s.updated_at??0)?n:s:n,null),Ri=/^[A-Za-z]:[\\/]/,qe=e=>{const s=e?.trim();return s&&(s.startsWith("/")||Ri.test(s))?s:null};function Ti(e){const o=e?.payload?.frontend?.snapshot?.cwd;return typeof o=="string"&&o.trim()?o:null}const De="local-operator.settings.integrations.last-cwd";function Ii(e,s,n=typeof localStorage>"u"?null:localStorage){const a=qe(s);if(!(!e||!a||!n))try{const o=n.getItem(De),r=o?JSON.parse(o):{};if(r[e]===a)return;n.setItem(De,JSON.stringify({...r,[e]:a}))}catch{}}const jn=()=>typeof localStorage>"u"?null:localStorage;function _n(e=jn()){if(!e)return{};try{const s=e.getItem(ht);if(!s)return{};const n=JSON.parse(s);return!n||typeof n!="object"||Array.isArray(n)?{}:n}catch{return{}}}const Gt=256;function Ei(e,s=jn()){if(s)try{const n={..._n(s),...e},a=Object.keys(n);if(a.length>Gt){const o={};for(const r of a.slice(-Gt))o[r]=n[r];s.setItem(ht,JSON.stringify(o));return}s.setItem(ht,JSON.stringify(n))}catch{}}function qt(e,s,n){return e==="saved"?null:e==="replace_confirmation_required"?`A saved value already exists for this key. Tick “${fn(Object.keys(n).length)}” to overwrite it.`:e==="invalid_target"?"That header can't carry this key. It may already be set on the server, or belong to the transport - try a different header name. Nothing was saved.":`Not saved: ${(s.length?s:Object.keys(n)).join(", ")}. The encrypted store may be locked.`}function Li(e,s=typeof localStorage>"u"?null:localStorage){if(!(!e||!s))try{const n=s.getItem(De);if(!n)return;const a=JSON.parse(n);if(!(e in a))return;const o={...a};delete o[e],s.setItem(De,JSON.stringify(o))}catch{}}const Oi=e=>!!(e&&typeof e=="object"&&"code"in e&&e.code==="invalid_cwd"),Fi=(e,s)=>s!==null&&e===s?null:e;function Di(e,s=typeof localStorage>"u"?null:localStorage){if(!e||!s)return null;try{const n=s.getItem(De);if(!n)return null;const o=JSON.parse(n)[e];return typeof o=="string"?o:null}catch{return null}}const $i=e=>e.action==="disconnect"?"disconnected":"connected";function Ui(e){switch(e.action){case"cancel":return{action:"cancel",operation_id:e.operationId};case"connect":case"disconnect":case"reload":return null;case"test":return{action:"test",name:e.name};default:return{...e,confirmed:!0}}}function zi(e){switch(e.action){case"cancel":return{action:"cancel",operation_id:e.operationId};case"test":case"connect":return{action:"connect",name:e.name};case"reload":return{action:"reload",name:e.name};case"add":return e;case"remove":return{...e,confirmed:!0};default:return{action:e.action,name:e.name,confirmed:!0}}}function Pi({sessionId:e}){const s=Bn(),n=Rt(s.data,"mcp_catalog"),a=Rt(s.data,"mcp"),o=n?"catalog":a?"session":null,[r,u]=i.useState(null),d=Zt(),c=Be(g=>g.sessions),m=Be(g=>g.fetchSessions),y=Be(g=>g.loading),v=i.useMemo(()=>c.find(g=>g.session_id===e)??null,[c,e]),w=i.useMemo(()=>o==="session"&&!e?Ai(c):null,[o,e,c]),h=o==="session"?e??w?.session_id??null:null;i.useEffect(()=>{o!=="session"||e||c.length>0||m(Vn)},[o,e,c.length,m]);const k=o==="catalog"?qe(v?.cwd):null,R=o==="catalog"&&!!e&&k===null,C=Ce({queryKey:["desktop","session-cwd",e??""],queryFn:()=>Ke({op:"sessions.get",sessionId:e??""}),enabled:R,staleTime:Number.POSITIVE_INFINITY,retry:!1}),H=R&&!C.isFetched,_=k??qe(Ti(C.data))??(C.isFetched?qe(Di(e)):null),U=Fi(_,r),O=o==="catalog"?U:null,A=o==="catalog"?e??null:null,S=Gn.catalog(O,A);i.useEffect(()=>{o!=="catalog"||!e||!O||Ii(e,O)},[o,e,O]);const V=i.useRef(0),[B,Y]=i.useState(0),G=i.useRef(null),W=i.useCallback((g,N)=>{const p=Date.now()+zt;V.current=p,G.current={name:g,expect:N},Y(p)},[]),I=i.useCallback(g=>Date.now()<V.current?bn:ei(g),[]),L=Ce({queryKey:S,queryFn:()=>Wn(O,A),enabled:o==="catalog"&&!H,staleTime:1e4,refetchInterval:g=>I(g.state.data)}),F=Oi(L.error);i.useEffect(()=>{!F||!_||r===_||(u(_),Li(e))},[F,_,r,e]);const z=Ce({queryKey:dt.list(h??""),queryFn:()=>Qn(h??""),enabled:o==="session"&&!!h,staleTime:1e4,refetchInterval:g=>I(g.state.data?pt(g.state.data,h??""):void 0)}),D=i.useMemo(()=>{if(o==="catalog")return L.data;if(o==="session"&&z.data&&h)return pt(z.data,h)},[o,L.data,z.data,h]),te=i.useCallback(()=>Ki({queryClient:d,route:o,catalogKey:S,sessionId:h}),[o,S,d,h]);i.useEffect(()=>{if(!B)return;const g=G.current;if(!g)return;const N=D?.servers.find(T=>T.name===g.name);!N||!(g.expect==="connected"?N.status==="connected":N.status_basis==="live"&&N.status!=="connected")||(V.current=0,G.current=null,Y(0))},[D,B]);const P=i.useRef({}),[ee,j]=i.useState(0),Q=i.useMemo(()=>(P.current=qr(Qr(P.current,D,_n()),D),P.current),[D,ee]),J=i.useRef("");i.useEffect(()=>{const g=Wr(Q,D);if(!Object.keys(g).length)return;const N=JSON.stringify(g);N!==J.current&&(J.current=N,Ei(g))},[Q,D]);const ue=i.useCallback(g=>{const N=_e(P.current,g);N.needsKey||(P.current={...P.current,[g]:{...N,needsKey:!0}},j(p=>p+1))},[]),Z=i.useCallback(g=>{if(g.action!=="disconnect"&&g.action!=="connect"&&g.action!=="reload")return;const N=_e(P.current,g.name),p=Date.now()+zt,T=g.action==="disconnect"?{...N,connectedAt:null,disconnectedAt:Date.now(),holdUntil:p}:{...N,disconnectedAt:null,holdUntil:p};P.current={...P.current,[g.name]:T},W(g.name,$i(g)),j(M=>M+1)},[W]),q=i.useCallback(async g=>{if(o==="catalog"){const N=Ui(g);if(!N)return null;try{const p=await qn(O,N);return d.setQueryData(S,p),Z(g),p.operation?.id??null}catch(p){throw p instanceof xt&&p.status===409&&d.invalidateQueries({queryKey:S}),p}}if(o==="session"&&h){const N=await Ke({op:"mcp.control",sessionId:h,control:zi(g)});Z(g);const p=dt.list(h),T=N?.data;return T&&"servers"in T&&Array.isArray(T.servers)?(d.setQueryData(p,T),null):(d.invalidateQueries({queryKey:p}),T&&"id"in T&&typeof T.id=="string"?T.id:null)}return null},[o,O,S,d,h,Z]),fe=i.useCallback(async g=>{if(o==="catalog"&&A&&(g.action==="connect"||g.action==="disconnect"||g.action==="reload")){try{await Ke({op:"mcp.control",sessionId:A,control:{action:g.action,name:g.name,...g.action==="disconnect"?{confirmed:!0}:{}}})}catch(N){throw d.invalidateQueries({queryKey:S}),N}return Z(g),await d.invalidateQueries({queryKey:S}),null}return q(g)},[o,A,d,S,q,Z]),xe=i.useCallback(async(g,N,p,T)=>{if(o==="catalog"){const M=await Yn(O,g,N,p,T);if(M.catalog&&d.setQueryData(S,M.catalog),M.code!=="saved")return{saved:!1,message:qt(M.code,M.failed_ids,N)};try{await q({action:"test",name:g})}catch{}return{saved:!0,message:null}}if(o==="session"&&h){const M=await Ke({op:"mcp.credentials.store",sessionId:h,name:g,values:N,confirmedReplace:p});if(M.data?.code!=="saved")return{saved:!1,message:qt(M.data?.code,M.data?.failed_ids??[],N)};try{await q({action:"connect",name:g})}catch{}return{saved:!0,message:null}}return{saved:!1,message:null}},[o,O,S,d,q,h]),me=o==="catalog"?L:z,Ne=i.useCallback(()=>{me.refetch()},[me]);return{enabled:o!==null,route:o,sessionId:o==="catalog"?A:h,borrowed:w,noConversation:o==="session"&&!h&&!y,document:D,isLoading:s.isLoading||o==="catalog"&&(H||L.isLoading)||o==="session"&&(h?z.isLoading:y),isError:me.isError,folderUnavailable:Yr(r,_),refetch:Ne,readDocument:te,control:fe,storeKeys:xe,memories:Q,markNeedsKey:ue}}function Ki(e){if(e.route==="catalog")return e.queryClient.getQueryData(e.catalogKey);if(e.route==="session"&&e.sessionId){const s=e.queryClient.getQueryData(dt.list(e.sessionId));return s?pt(s,e.sessionId):void 0}}const Hi=(e,s)=>{const n=e?.trim();if(!n)return null;const a=es(n,s);return a.kind==="auth"?{kind:"matched",name:a.name,unresolved:null}:{kind:"miss",asked:n}},Bi=6,ot="Integrations",Vi="Let agents use your tools and accounts, like Notion, Linear or GitHub.",Gi={test:"test",connect:"reconnect",disconnect:"disconnect",reload:"reload",remove:"remove",sign_out:"disconnect",cancel:"cancel",login:"grant",reauth:"grant"},qi=({sessionId:e,sectionRef:s,highlightServer:n})=>{const a=Pi({sessionId:e}),{document:o,control:r,readDocument:u}=a,d=Zn(),c=o?.servers??[],m=o?.operations??[],y=o?.project_scope_available??!1,[v,w]=i.useState(!1),[h,k]=i.useState(""),[R,C]=i.useState(null),[H,_]=i.useState({}),[U,O]=i.useState(null),[A,S]=i.useState(null),[V,B]=i.useState({kind:"ready"}),[Y,G]=i.useState(null),[W,I]=i.useState(null),[L,F]=i.useState(!1),z=i.useRef({}),D=i.useRef({}),te=i.useRef({}),P=i.useRef(0),ee=i.useRef(null),j=i.useRef(null),Q=i.useRef(null),[J,ue]=i.useState(null),[Z,q]=i.useState(null),[fe,xe]=i.useState(null),me=i.useCallback(()=>{const l=Q.current;Q.current=null,S(null),G(null),window.setTimeout(()=>{l?.isConnected&&l.focus()},0)},[]),Ne=i.useCallback(l=>{const f=window.document.activeElement;Q.current=f instanceof HTMLElement?f:null,S(l)},[]),g=i.useCallback((l,f)=>{q({name:l,waitForSignIn:f==="signed-in",until:Date.now()+Ie,reanchors:0}),me()},[me]),N=i.useMemo(()=>Hi(n,c.map(l=>l.name)),[n,c]),p=N?.kind==="matched"?N.name:null,T=i.useRef(null),M=i.useRef(null),ce=h.trim().toLowerCase(),K=i.useMemo(()=>ce?c.filter(l=>l.name.toLowerCase().includes(ce)):c,[c,ce]),le=i.useMemo(()=>Gr(K,m,a.memories),[K,m,a.memories]),ne=A?.kind==="sign_in"?c.find(l=>l.name===A.name)??null:null;i.useEffect(()=>{!p||M.current===p||!h||k("")},[p,h]),i.useEffect(()=>{!p||M.current===p||K.some(l=>l.name===p)&&(M.current=p,T.current?.scrollIntoView({block:"center",behavior:"smooth"}))},[p,K]),i.useEffect(()=>{if(!Y)return;const l=m.find(f=>f.id===Y)??null;B({kind:"running",operation:l})},[m,Y]);const ke=m.some(l=>l.status==="running"),he=l=>{const f=window.document.activeElement;f&&f!==window.document.body&&f.isConnected||q({name:l,waitForSignIn:!1,until:Date.now()+Ie,reanchors:0})},X=async(l,f,b)=>{C(l),_(({[l]:be,...we})=>we);let E=null,de=!1;try{E=await b()}catch(be){de=!0,_(we=>({...we,[l]:He(Gi[f]??"status",be,ke)}))}finally{C(null),f!=="sign_out"&&(f!=="remove"||de)&&he(l)}return{operationId:E,failed:de}},ve=l=>c.find(f=>f.name===l),pe=l=>{l.source.path&&ts(l.source.path)},Ze=async(l,f)=>{B({kind:"starting"}),G(null);try{const b=await r({action:f,name:l});b?G(b):B({kind:"running",operation:null})}catch(b){b instanceof xt&&b.code==="oauth_unsupported"&&a.markNeedsKey(l),B({kind:"refused",message:He("grant",b,ke)})}},ze=(l,f)=>{switch(f.kind){case"sign_in":case"reauth":{const b=m.find(E=>E.name===l.name&&E.status==="running");b&&Ue(b)?(B({kind:"running",operation:b}),G(b.id)):(B({kind:"ready"}),G(null)),Ne({kind:"sign_in",name:l.name,action:f.kind==="reauth"?"reauth":"login"});return}case"set_key":I(null),Ne({kind:"key",name:l.name,keyNames:l.auth.secret_refs.map(b=>b.id)});return;case"fix":pe(l);return;case"sign_out":O({name:l.name,kind:"sign_out"});return;default:{const b=f.kind;X(l.name,b,()=>r({action:b,name:l.name}))}}},Je=(l,f)=>{switch(f.kind){case"remove":case"sign_out":O({name:l.name,kind:f.kind});return;case"sign_in":case"reauth":case"set_key":ze(l,{kind:f.kind,label:f.label});return;case"open_config":pe(l);return;case"copy_setup":navigator.clipboard.writeText(l.setup_prompt??"").then(()=>lt("Setup steps copied. Paste them into a chat.")).catch(()=>{});return;case"cancel":{const b=m.find(E=>E.name===l.name&&E.status==="running");b&&X(l.name,"cancel",()=>r({action:"cancel",operationId:b.id}));return}case"test":case"connect":case"disconnect":case"reload":{const b=f.kind;X(l.name,b,()=>r({action:b,name:l.name}));return}default:return}},Xe=(l,f)=>{if(O(null),f==="remove"){const b=l.source.owned_scope;if(!b)return;const E=K.findIndex(de=>de.name===l.name);X(l.name,"remove",()=>r({action:"remove",name:l.name,scope:b})).then(({operationId:de,failed:be})=>{be||de!==null||(lt(`Removed ${l.name}.`),E>=0&&xe({index:E}))});return}X(l.name,"sign_out",()=>r({action:"logout",name:l.name})).then(()=>{q({name:l.name,waitForSignIn:!1,until:Date.now()+Ie,reanchors:0})})},Nt=async l=>{try{return await r({action:"add",name:l.name,scope:l.scope,...l.mode==="command"?{command:l.command,args:l.args}:{url:l.url}}),w(!1),ue(l.name),null}catch(f){return He("add",f,!1)}},Re=t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("h2",{className:"text-heading text-ink",children:ot}),t.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:Vi})]}),a.enabled&&c.length>0&&!v?t.jsxs($,{ref:ee,variant:"secondary",size:"sm",onClick:()=>w(!0),"data-tour-tag":"mcp-add-server",children:[t.jsx(Tt,{"aria-hidden":"true"}),"Add integration"]}):null]});if(!a.enabled&&!a.isLoading)return t.jsx(se,{title:ot,titleComponent:Re,sectionRef:s,children:t.jsx(ie,{variant:"warning",children:"Integrations need a newer Local Operator backend. Update it and restart the app to manage them here."})});const Te=t.jsx(di,{existingNames:c.map(l=>l.name),projectScopeAvailable:y,projectLabel:o?.cwd?Wi(o.cwd):null,onSubmit:Nt,onCancel:()=>{w(!1),window.setTimeout(()=>ee.current?.focus(),0)}}),St=A?ve(A.name):void 0,Nn=Object.entries(H).filter(([l])=>!c.some(f=>f.name===l)),Sn=l=>_(({[l]:f,...b})=>b);i.useEffect(()=>{if(!J)return;const l=z.current[J];if(!l){c.some(f=>f.name===J)&&(D.current[J]?.focus(),ue(null));return}l.focus(),ue(null)},[J,c]),i.useEffect(()=>{if(!fe)return;const f=K[Math.min(fe.index,K.length-1)]??K.at(-1);if(f){const b=z.current[f.name]??D.current[f.name];if(!b)return;b.focus()}else ee.current?.focus();xe(null)},[fe,K]);const et=i.useCallback((l,f)=>{const b=u()??o,E=b?.servers.find(Cn=>Cn.name===l.name),de=b?.operations??[],be=E?E.status==="connecting"||Ae(E.name,de)!==null:!1;be&&E&&(P.current=f);const we=E?wt(E,de,a.memories):null;if(E&&l.waitForSignIn&&(we?.kind==="sign_in"||we?.kind==="reauth"))return"kept";const Se=pi({hold:l,now:f,windowMs:Ie,rowMoving:be,lastMovingAt:P.current,candidate:E?gi({primary:we?z.current[E.name]:null,overflow:D.current[E.name]}):void 0,active:window.document.activeElement,body:window.document.body});if(!Se.hold)return q(null),"finished";if(!Se.land)return"kept";q({name:l.name,waitForSignIn:!1,until:Se.hold.until,landedOn:Se.land,reanchors:Se.hold.reanchors});const Ct=Se.land;return window.setTimeout(()=>{Ct.isConnected&&Ct.focus()},0),"landed"},[u,o,a.memories]);return i.useEffect(()=>{if(!Z)return;et(Z,Date.now());let l=0,f=!1;const b=()=>{if(f)return;const E=yi({verdict:et(Z,Date.now()),watchMs:Kt});E!==null&&(l=window.setTimeout(b,E))};return l=window.setTimeout(b,Kt),()=>{f=!0,window.clearTimeout(l)}},[Z,et]),i.useEffect(()=>{if(!Z)return;const l=f=>{fi({target:f.target,row:te.current[Z.name]})&&q(null)};return window.document.addEventListener("pointerdown",l,!0),()=>{window.document.removeEventListener("pointerdown",l,!0)}},[Z]),t.jsxs(se,{title:ot,titleComponent:Re,sectionRef:s,children:[t.jsxs("div",{className:"flex flex-col gap-4",children:[a.route==="session"&&a.borrowed?t.jsxs("p",{className:"text-body-sm text-ink-muted",children:["Showing the integrations for"," ",a.borrowed.title?.trim()||a.borrowed.session_id.slice(0,6),", your most recent chat."]}):null,a.noConversation?t.jsxs("div",{className:"flex flex-col items-start gap-2",children:[t.jsx("p",{className:"text-body-sm text-ink-muted",children:"Integrations can be managed here once a chat has started."}),t.jsx($,{variant:"primary",size:"sm",onClick:()=>d("/chat"),children:"Start a chat"}),t.jsx("p",{className:"text-ink-dim text-meta",children:"Updating Local Operator removes this step."})]}):null,a.isLoading?t.jsx("div",{className:"flex h-24 items-center justify-center",children:t.jsx(re,{size:"lg",label:"Loading integrations"})}):null,a.folderUnavailable?t.jsx(ie,{variant:"warning",children:t.jsx("span",{children:"This chat's folder no longer exists, so only global integrations are shown."})}):null,a.isError?t.jsx(ie,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:"Integrations couldn't be loaded."}),t.jsx($,{variant:"secondary",size:"sm",onClick:a.refetch,children:"Retry"})]})}):null,Nn.map(([l,f])=>t.jsx(ie,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:f}),t.jsx($,{variant:"ghost",size:"sm",onClick:()=>Sn(l),children:"Dismiss"})]})},l)),v&&c.length>0?Te:null,c.length>=Bi?t.jsxs("div",{className:"relative",children:[t.jsx(Jn,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-ink-dim"}),t.jsx(Me,{ref:j,value:h,onChange:l=>k(l.target.value),onKeyDown:l=>{l.key!=="Escape"||!h||(l.preventDefault(),k(""))},placeholder:`Search ${Cr(c.length)}`,"aria-label":"Search integrations",className:"pl-9"})]}):null,N?.kind==="miss"&&c.length>0?t.jsx("p",{className:"text-body-sm text-ink-muted",children:`No integration matches "${N.asked}".`}):null,N?.kind==="matched"&&N.unresolved?t.jsx("p",{className:"text-body-sm text-ink-muted",children:`Showing "${N.name}" — "${N.unresolved}" is not one of your integrations.`}):null,o&&c.length===0&&!a.isLoading?v?Te:t.jsxs("div",{className:"flex flex-col items-start gap-3 rounded-lg bg-surface p-6",children:[t.jsx(tn,{"aria-hidden":"true",className:"size-5 text-ink-muted"}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("h3",{className:"text-heading text-ink",children:"No integrations yet"}),t.jsx("p",{className:"max-w-xl text-body-sm text-ink-muted",children:"Integrations let agents read and act in your other tools, like Notion or Linear. Add one with a command that runs on this computer, or a server's URL."})]}),t.jsxs($,{variant:"primary",size:"md",onClick:()=>w(!0),"data-tour-tag":"mcp-add-server",children:[t.jsx(Tt,{"aria-hidden":"true"}),"Add integration"]})]}):null,c.length>0&&K.length===0?t.jsxs("div",{className:"flex flex-col items-start gap-2",children:[t.jsx("p",{className:"text-body-sm text-ink-muted",children:"No integrations match this search."}),t.jsx($,{variant:"secondary",size:"sm",onClick:()=>{k(""),window.setTimeout(()=>{(j.current??ee.current)?.focus()},0)},children:"Clear search"})]}):null,le.map(l=>t.jsxs("section",{"aria-labelledby":`integrations-group-${l.id}`,className:"flex flex-col gap-1.5",children:[t.jsxs("h3",{id:`integrations-group-${l.id}`,className:"px-1 text-ink-dim text-meta",children:[l.title," · ",l.rows.length]}),t.jsx("ul",{className:"flex flex-col divide-y divide-hairline overflow-hidden rounded-lg bg-surface",children:l.rows.map(f=>t.jsx(ji,{row:f,operations:m,memories:a.memories,projectScopeAvailable:y,highlighted:f.name===p,rowRef:b=>{te.current[f.name]=b,f.name===p&&(T.current=b)},primaryRef:b=>{z.current[f.name]=b},overflowRef:b=>{D.current[f.name]=b},pending:R===f.name,failure:H[f.name]??null,confirm:U?.name===f.name?{kind:U.kind}:null,onPrimary:b=>ze(f,b),onOverflow:b=>Je(f,b),onConfirm:()=>U&&Xe(f,U.kind),onCancelConfirm:()=>{O(null),window.setTimeout(()=>{D.current[f.name]?.focus()},0)}},f.id))})]},l.id))]}),A?.kind==="sign_in"?t.jsx(Mi,{name:A.name,action:A.action,keyRoute:ne?We(ne):!1,phase:V,onStart:()=>void Ze(A.name,A.action),onCancel:l=>void r({action:"cancel",operationId:l}).catch(()=>{}),onOpenLink:l=>void Xn(l),onClose:l=>g(A.name,l)}):null,A?.kind==="key"?t.jsx(vi,{name:A.name,keyNames:A.keyNames.length?A.keyNames:St?.auth.secret_refs.map(l=>l.id)??[],keyless:A.keyNames.length===0,savedKeys:St?.auth.secret_refs.filter(l=>l.state==="encrypted").map(l=>l.id),saving:L,failure:W,onClose:me,onSave:(l,f,b)=>{F(!0),I(null),a.storeKeys(A.name,l,f,b).then(E=>{if(!E.saved){I(E.message);return}S(null),q({name:A.name,waitForSignIn:!1,until:Date.now()+Ie,reanchors:0})}).catch(E=>I(He("key",E,!1))).finally(()=>F(!1))}}):null]})},Ie=4e3,Yi=/^\/(?:Users|home)\/[^/]+(?=\/|$)/,Wi=e=>e.replace(Yi,"~"),Qi=e=>typeof e!="number"||!Number.isFinite(e)?"your free credits":`$${e.toFixed(2)} in free credits`,Zi="https://console.radienthq.com/dashboard/verification",Ji=(e,s)=>e==="pending"?{sentence:`Verify your email to claim ${s}. Check your inbox for the link Radient sent.`,action:"Open verification page"}:e==="expired"?{sentence:`The link to claim ${s} has expired. Request a new one from the verification page.`,action:"Request a new link"}:{sentence:"No signup grant is attached to this account. Open the verification page to check the account.",action:"Open verification page"},Xi=({verification:e})=>{const{prices:s}=vs(),n=e.grant_amount??s?.default_new_credits,{sentence:a,action:o}=Ji(e.signup_grant,Qi(n)),r=e.claim_url||Zi;return t.jsxs("div",{className:"mt-8 flex items-start gap-3 rounded-sm border border-hairline bg-surface p-3",children:[t.jsx(Ye,{className:"mt-0.5 size-4 shrink-0 text-ink-muted","aria-hidden":"true"}),t.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-2",children:[t.jsx("p",{className:"text-body-sm text-ink",children:a}),t.jsx($,{variant:"secondary",size:"sm",onClick:()=>{window.api?.openExternal?window.api.openExternal(r):window.open(r,"_blank")},children:o})]})]})},ec=({onAfterCredentialUpdate:e})=>{const{isAuthenticated:s,user:n,isLoading:a,accountRead:o,signOut:r}=ns(),u=nn(v=>v.isSigningOut),d=i.useCallback(async()=>{try{await r()}catch(v){console.error("Error signing out:",v)}},[r]),c=i.useMemo(()=>{if(!s||!n?.radientUser)return null;const{account:v,identity:w,verification:h}=n.radientUser,k=h!=null&&!h.email_verified&&h.signup_grant!=="claimed";return t.jsxs(t.Fragment,{children:[t.jsxs(kt,{children:[t.jsx(ae,{label:"Status",value:t.jsxs("span",{className:"inline-flex items-center gap-2",children:["Connected",t.jsx(Ys,{variant:"success",className:"capitalize",children:v.status})]})}),t.jsx(ae,{label:"Name",value:v.name||"Not provided"}),t.jsx(ae,{label:"Email",value:v.email}),t.jsx(ae,{label:"Account ID",value:t.jsx("span",{className:"text-mono-sm",children:v.id})}),t.jsx(ae,{label:"Tenant ID",value:t.jsx("span",{className:"text-mono-sm",children:v.tenant_id})}),t.jsx(ae,{label:"Provider",value:t.jsx("span",{className:"capitalize",children:w.provider})}),t.jsx(ae,{label:"Created",value:sn(v.created_at)})]}),k&&h?t.jsx(Xi,{verification:h}):null,t.jsxs("div",{className:"mt-8",children:[t.jsx("p",{className:"text-body-sm text-ink-muted",children:"Need to sign out or switch accounts?"}),t.jsxs($,{variant:"danger",className:"mt-3",onClick:d,children:[t.jsx(ks,{}),"Sign out from Radient"]})]})]})},[s,n?.radientUser,d]),m=i.useMemo(()=>o==="refused"?"Radient refused the sign-in this app is holding, so your account details could not be read. Signing in again below replaces it.":an(o)?"Your Radient account could not be read, so this app cannot show your account details.":"You are not currently signed in to Radient.",[o]),y=i.useMemo(()=>s&&n?null:t.jsxs("div",{children:[t.jsxs("p",{className:"text-body-sm text-ink-muted",children:[m," Sign in to access your account details or sign up to get free credits and unified access to models, tools, and more with Radient Pass. Radient's automatic model router will automatically select the best model for your agents to balance cost and performance. It is often cheaper to use Radient Pass than to use single AI providers due to automatic cost optimization."]}),t.jsx("div",{className:"mt-6",children:t.jsx(Js,{titleText:"",onAfterCredentialUpdate:e,descriptionText:"",onSignInSuccess:()=>{}})})]}),[s,n,m,e]);return a||u?t.jsxs("div",{className:"flex min-h-36 flex-col items-center justify-center gap-3",children:[t.jsx(re,{size:"lg",label:"Loading account"}),!u&&t.jsx("p",{className:"text-meta text-ink-dim",children:"Loading your Radient account details…"})]}):s&&n?.radientUser?c:t.jsx("div",{className:"flex flex-col gap-4",children:y})};function tc({metric:e,data:s}){return t.jsx(ss,{title:"",heightClassName:"h-62",yAxisWidth:48,unit:e==="credits"?"credits":"tokens",srSummary:`${e==="credits"?"Credits consumed":"Tokens used"} over the last 30 days, plotted per day across ${s.length} days.`,xTickFormatter:n=>n,yTickFormatter:n=>e==="credits"?`$${n.toFixed(2)}`:as(n),children:t.jsx(yr,{data:s,children:t.jsx(Jt,{type:"monotone",dataKey:"value",strokeWidth:2,dot:!1,activeDot:{r:4,strokeWidth:0},name:e==="credits"?"Credits consumed":"Tokens used"})})})}const nc=()=>{const{data:e,isLoading:s,error:n,refetch:a}=hr(),o=pr(),[r,u]=i.useState(""),[d,c]=i.useState(!1);i.useEffect(()=>{u(e?.content??""),c(!1)},[e]);const m=k=>{const R=k.target.value;u(R),c(R!==(e?.content??""))},y=async()=>{if(!(!d||o.isPending))try{const k={content:r};await o.mutateAsync(k),await a(),c(!1)}catch(k){console.error("Error updating system prompt:",k)}},v=()=>{u(e?.content??""),c(!1)},w=o.isPending,h=()=>t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(ye,{htmlFor:"app-system-prompt",children:"Instructions"}),t.jsx(ln,{id:"app-system-prompt",name:"systemPrompt",value:r,onChange:m,placeholder:"Enter instructions for how all agents should behave and respond to your requests...",className:"min-h-50"})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsxs($,{variant:"primary",onClick:y,disabled:!d||w,children:[w?t.jsx(re,{size:"sm"}):t.jsx(bs,{}),w?"Saving...":"Save changes"]}),t.jsx($,{onClick:v,disabled:!d||w,children:"Cancel"})]}),e?.last_modified&&t.jsxs("p",{className:"text-ink-dim text-meta",children:["Last modified:"," ",t.jsx("span",{className:"font-mono text-mono-sm",children:on(e.last_modified)})]})]});return t.jsx(se,{title:"System prompt",icon:Zs,description:"Every Local Operator agent receives this prompt in addition to its own instructions, so it is the place for baseline expectations and for details you want every agent to know about you, such as your name, location, or preferences. It is sent to your selected hosting provider.",children:s?t.jsx("div",{className:"flex min-h-50 items-center justify-center",children:t.jsx(re,{size:"lg",label:"Loading system prompt"})}):n?t.jsxs(ie,{variant:"danger",children:["Failed to load system prompt:"," ",n instanceof Error?n.message:"Unknown error"]}):h()})},sc=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"],ac=e=>sc.includes(e),oc=e=>{const s=[];let n=0;for(const a of e){const o=Math.max(0,Math.floor(a.count)),r=Math.max(1,Math.floor(a.columns));for(let u=0;u<o;u+=r)s.push({start:n+u,count:Math.min(r,o-u)});n+=o}return s},rc=({index:e,key:s,groups:n})=>{const a=oc(n),o=a.reduce((r,u)=>r+u.count,0);if(!Number.isInteger(e)||e<0||e>=o)return e;switch(s){case"Home":return 0;case"End":return o-1;case"ArrowLeft":return Math.max(0,e-1);case"ArrowRight":return Math.min(o-1,e+1);case"ArrowUp":case"ArrowDown":{const r=a.findIndex(c=>e>=c.start&&e<c.start+c.count),u=a[r+(s==="ArrowDown"?1:-1)];if(!u)return e;const d=e-a[r].start;return u.start+Math.min(d,u.count-1)}default:return e}},ic={localOperatorDark:jo,localOperatorLight:Ho,dracula:Oo,dune:Qa,sage:fo,monokai:_s,tokyoNight:Co,iceberg:Do,radient:co,neon:os,obsidian:un,synth:la,catppuccinMocha:Oa,catppuccinLatte:ko,tokyoNightStorm:Ca,gruvbox:ya,nord:ur,oneDark:ia,solarizedDark:Po,rosePine:eo,rosePineMoon:bo,rosePineDawn:Ea,alucard:no,gruvboxLight:Ka,tokyoNightDay:No,oneLight:yo,catppuccinFrappe:za,catppuccinMacchiato:uo,palenight:js,everforest:sr,everforestLight:tr,kanagawaWave:ir,kanagawaLotus:Ja,ayuDark:Ba,ayuMirage:Ga,ayuLight:To,nightfox:Aa,duskfox:qo,synthwave:Ao,matrix:ua,tron:Na,cyberpunk:ws,vaporwave:Xo,outrun:fa,neonNoir:or,arcade:ho,forest:Zo,ocean:Ya,desert:Wo,autumn:lr,lavender:Uo,arctic:Ta,rosewood:ro,solarizedLight:Vo,githubLight:ao,paper:Xs,linen:Eo,highContrastLight:oa,mintLight:ha},Yt="bg-[color-mix(in_srgb,var(--color-accent)_8%,var(--color-accent-wash))]",cc=({id:e})=>t.jsxs("div",{"data-theme":e,"aria-hidden":"true",className:"flex h-full bg-canvas",children:[t.jsxs("div",{className:"flex w-1/4 flex-col gap-1 bg-sunken p-1",children:[t.jsx("span",{className:"flex h-2.5 items-center rounded-xs bg-accent-wash px-1",children:t.jsx("span",{className:"h-1 w-full rounded-xs bg-accent"})}),t.jsx("span",{className:"mx-1 h-1 w-2/3 rounded-xs bg-ink-dim"}),t.jsx("span",{className:"mx-1 h-1 w-1/2 rounded-xs bg-ink-dim"})]}),t.jsxs("div",{className:"flex flex-1 flex-col justify-between p-1",children:[t.jsxs("div",{className:"flex flex-col gap-1 rounded-xs bg-surface p-1",children:[t.jsx("span",{className:"h-1 w-3/5 rounded-xs bg-ink"}),t.jsx("span",{className:"h-1 w-full rounded-xs bg-ink-dim"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"h-2.5 w-6 rounded-xs bg-elevated"}),t.jsx("span",{className:"h-2.5 w-5 rounded-xs bg-accent"}),t.jsx("span",{className:"h-2.5 w-4 rounded-xs bg-accent-alt"}),t.jsx("span",{className:"h-2.5 w-4 rounded-xs border border-control"})]})]})]}),lc=({id:e,name:s,description:n,isSelected:a,isTabStop:o,onSelect:r,onFocusTile:u})=>{const d=ic[e];return t.jsx(Fe,{side:"bottom",align:"start",content:n,children:t.jsxs("button",{type:"button","data-theme-tile":e,"aria-pressed":a,tabIndex:o?0:-1,onFocus:u,onClick:r,className:oe("relative flex flex-col gap-1.5 rounded-md p-1 text-left transition-colors duration-fast ease-out-quart",a?Yt:"hover:bg-surface"),children:[t.jsxs("span",{className:oe("relative block h-10 overflow-hidden rounded-sm border transition-colors duration-fast ease-out-quart",a?"border-accent":"border-hairline"),children:[t.jsx(cc,{id:e}),a&&t.jsx("span",{className:oe("pointer-events-none absolute top-0.5 right-0.5 flex h-4 w-4 items-center justify-center rounded-full",Yt),children:t.jsx(Qs,{size:12,className:"text-accent","aria-hidden":"true"})})]}),t.jsxs("span",{className:"flex items-center gap-1.5",children:[t.jsx(d,{size:12,className:"shrink-0 text-ink-dim","aria-hidden":"true"}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-meta text-ink",children:s})]})]})})},dc=e=>[...e.querySelectorAll("[data-theme-grid]")].map(s=>{const n=[...s.querySelectorAll("[data-theme-tile]")],a=n[0]?.getBoundingClientRect().top??0;return{count:n.length,columns:Math.max(1,n.filter(o=>Math.abs(o.getBoundingClientRect().top-a)<1).length)}}),uc=()=>{const{themeName:e,setTheme:s}=Ee(),n=i.useMemo(()=>{const d=Object.values(Mn);return[{label:"Dark",items:d.filter(c=>c.theme.palette.mode==="dark")},{label:"Light",items:d.filter(c=>c.theme.palette.mode==="light")}].filter(c=>c.items.length>0)},[]),[a,o]=i.useState(null),r=i.useMemo(()=>{const d=n.flatMap(c=>c.items.map(m=>m.id));return a&&d.includes(a)?a:d.includes(e)?e:d[0]},[n,a,e]),u=d=>{if(!ac(d.key))return;const c=[...d.currentTarget.querySelectorAll("[data-theme-tile]")],m=c.indexOf(d.target);if(m<0)return;d.preventDefault();const y=rc({index:m,key:d.key,groups:dc(d.currentTarget)});y!==m&&c[y]?.focus()};return t.jsx(Ws,{children:t.jsx("div",{onKeyDown:u,className:"flex flex-col gap-6",children:n.map(d=>t.jsxs("div",{children:[t.jsx("h3",{className:"px-1 pb-2 text-meta text-ink-dim",children:d.label}),t.jsx("div",{"data-theme-grid":d.label,className:"grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-2",children:d.items.map(({id:c,name:m,description:y})=>t.jsx(lc,{id:c,name:m,description:y,isSelected:c===e,isTabStop:c===r,onSelect:()=>s(c),onFocusTile:()=>o(c)},c))})]},d.label))})})},mc=({value:e,onChange:s})=>{const n=i.useId();return t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("span",{id:n,className:"flex min-h-6 items-center text-body text-ink",children:"Transcript display"}),t.jsx("p",{className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:"By turn condenses each turn to its answer. By response keeps every settled response on screen, with the turn's final answer still marked."})]}),t.jsx("div",{className:"flex h-6 shrink-0 items-center",children:t.jsx(ut,{value:e,onValueChange:a=>s(rn(a)),children:t.jsx(mt,{"aria-labelledby":n,children:gs.map(a=>t.jsx(Le,{value:a.value,children:a.label},a.value))})})})]})},hc=()=>{const{data:e,isLoading:s,error:n}=kr({enabled:!0});return t.jsxs("div",{children:[t.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-heading text-ink",children:[t.jsx($a,{size:16,className:"shrink-0 text-ink-dim"}),"Radient Pass"]}),s&&t.jsx(dn,{className:"h-6 w-36"}),n&&t.jsxs(ie,{variant:"warning",children:["Could not load your credit balance. ",n.message]}),e&&!s&&!n&&t.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[t.jsxs("p",{className:"flex-1 text-body-sm text-ink-muted",children:["Available credits"," ",t.jsx("span",{className:"font-medium text-ink",children:e.balance.toFixed(2)})]}),t.jsx($,{variant:"secondary",size:"sm",asChild:!0,children:t.jsxs("a",{href:"https://console.radienthq.com/dashboard/billing",target:"_blank",rel:"noopener noreferrer",children:[t.jsx(ja,{}),"Add credits"]})})]})]})},pc=[{id:"credits",label:"Credits"},{id:"tokens",label:"Tokens"}],fc=()=>{const[e,s]=i.useState("credits"),n=i.useMemo(()=>{const d=new Date,c=gr(d);return{start_date:Ft(c),end_date:Ft(d),rollup:"daily"}},[]),{data:a,isLoading:o,error:r}=br(n,{enabled:!0}),u=i.useMemo(()=>a?.data_points?[...a.data_points].sort((c,m)=>tt(c.timestamp).getTime()-tt(m.timestamp).getTime()).map(c=>({bucket:ps(na(tt(c.timestamp),"yyyy-MM-dd")),value:e==="credits"?Number.parseFloat(c.total_cost.toFixed(2)):c.total_tokens})):[],[a,e]);return t.jsxs("div",{children:[t.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[t.jsxs("h3",{className:"flex items-center gap-2 text-heading text-ink",children:[t.jsx(ka,{size:16,className:"shrink-0 text-ink-dim"}),"Usage (last 30 days)"]}),t.jsxs("fieldset",{className:"m-0 w-fit border-0 p-0",children:[t.jsx("legend",{className:"sr-only",children:"Usage metric"}),t.jsx("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:pc.map(({id:d,label:c})=>t.jsx($,{variant:"ghost",size:"sm","aria-pressed":e===d,onClick:()=>s(d),className:oe(e===d&&"bg-surface text-ink hover:bg-surface"),children:c},d))})]})]}),o&&t.jsx(dn,{className:"h-62 w-full"}),r&&t.jsxs(ie,{variant:"warning",children:["Could not load your usage data. ",r.message]}),!o&&!r&&a&&u.length>0&&t.jsx(tc,{metric:e,data:u}),!o&&!r&&(!a||u.length===0)&&t.jsx("p",{className:"text-body-sm text-ink-muted",children:"No usage recorded in the last 30 days."})]})},gc=()=>t.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[t.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[t.jsx(Ls,{size:16,className:"shrink-0 text-ink-dim"}),"Radient account"]}),t.jsx($,{variant:"secondary",size:"sm",className:"self-start sm:self-center",asChild:!0,children:t.jsxs("a",{href:"https://console.radienthq.com",target:"_blank",rel:"noopener noreferrer",children:["Go to Radient console",t.jsx(fs,{})]})})]}),Rc=()=>{const e=rs("surface"),s=Ee(p=>p.showAgentReasoning),n=Ee(p=>p.setShowAgentReasoning),a=Ee(p=>p.transcriptDisplayMode),o=Ee(p=>p.setTranscriptDisplayMode),{data:r,isLoading:u,isFetching:d,error:c,refetch:m}=is(),y=cs(),{sentence:v,remedy:w}=ls(y??null,"Your settings could not be loaded.",c),h=Ns(),[k,R]=i.useState(null),C=nn(),{isAuthenticated:H,accountRead:_,isFetching:U,isRefreshing:O,refreshUser:A}=yt(),S=Be(p=>p.activeSessionId),[V,B]=i.useState("general"),[Y,G]=i.useState(!1),W=i.useRef(null),I=i.useRef(null),{startTour:L}=Ss(),F=ds(),{data:z,refetch:D}=us(),{refreshModels:te}=ms(),P=i.useMemo(()=>z?.keys?[...z.keys].sort():[],[z?.keys]),ee=i.useRef({keys:"",hosting:void 0});i.useEffect(()=>{const p=P.join(","),T=r?.values?.hosting;(ee.current.keys!==p||ee.current.hosting!==T)&&(ee.current={keys:p,hosting:T},te().catch(M=>{console.error("Failed to refresh models after credentials or hosting change:",M)}))},[P,r?.values?.hosting,te]);const j=i.useRef({general:i.useRef(null),radient:i.useRef(null),integrations:i.useRef(null),appearance:i.useRef(null),providers:i.useRef(null),backend:i.useRef(null),updates:i.useRef(null)}).current,Q=i.useMemo(()=>new URLSearchParams(F.search).get("setting"),[F.search]),J=i.useMemo(()=>new URLSearchParams(F.search).get("filter")??"",[F.search]),ue=i.useMemo(()=>new URLSearchParams(F.search).get("mcp")??void 0,[F.search]),Z=i.useMemo(()=>new URLSearchParams(F.search).get("provider"),[F.search]),q=i.useCallback(p=>{B(p),G(!0);const T=j[p],M=I.current;if(T?.current&&M){const K=T.current.getBoundingClientRect().top-M.getBoundingClientRect().top;M.scrollHeight>M.clientHeight?M.scrollTo({top:Math.max(0,M.scrollTop+K-80),behavior:"smooth"}):window.scrollTo({top:Math.max(0,T.current.getBoundingClientRect().top+window.scrollY-80),behavior:"smooth"}),clearTimeout(W.current??void 0),W.current=setTimeout(()=>{G(!1),W.current=null},800)}else G(!1)},[j]);i.useEffect(()=>{const p=setTimeout(()=>{const T=I.current;if(!T)return;const M=()=>{if(Y)return;const ce=T.getBoundingClientRect(),K=ce.height;let le="",ne=0;for(const[ke,he]of Object.entries(j))if(he.current){const X=he.current.getBoundingClientRect(),ve=ce.top,pe=X.top-ve,Ze=X.bottom-ve,ze=X.height,Je=Math.max(0,pe),Xe=Math.min(K,Ze),Re=Math.max(0,Xe-Je)/ze,Te=Re+(pe<K*.3?.1:0);Te>ne&&Re>.1&&(ne=Te,le=ke)}le&&le!==V&&B(le)};return M(),T.addEventListener("scroll",M,{passive:!0}),()=>{T.removeEventListener("scroll",M),clearTimeout(W.current??void 0)}},100);return()=>clearTimeout(p)},[j,V,Y]),i.useEffect(()=>{const p=new URLSearchParams(F.search),T=p.get("section"),M=p.get("setting")?"backend":T,ce=M?j[M]:void 0;if(!M||!ce)return;let K=!1,le=Number.NaN,ne=0;const ke=window.setTimeout(()=>{K||(K=!0,X.disconnect(),q(M))},2e3),he=()=>{if(K)return;const ve=ce.current;if(!ve){ne=requestAnimationFrame(he);return}const pe=Math.round(ve.getBoundingClientRect().top+window.scrollY);if(pe===le&&pe>0){K=!0,X.disconnect(),window.clearTimeout(ke),q(M);return}le=pe,ne=requestAnimationFrame(he)},X=new ResizeObserver(()=>{K||(cancelAnimationFrame(ne),ne=requestAnimationFrame(he))});return I.current&&X.observe(I.current),ne=requestAnimationFrame(he),()=>{K=!0,cancelAnimationFrame(ne),X.disconnect(),window.clearTimeout(ke)}},[F.search,j,q]);const fe=async(p,T)=>{R(p);try{await h.mutateAsync({[p]:T}),await m()}catch(M){console.error(`Error updating ${p}:`,M)}finally{R(null)}},xe=u,me=_==="checking",Ne=an(_),g=_==="ready"||_==="checking"||U,N=cn(xe,4e3);return c?t.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:t.jsx(ie,{variant:"warning",className:"w-full max-w-xl",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{children:v}),w&&t.jsx($,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>void m(),disabled:d,children:d?"Retrying":"Retry"})]})})}):xe?t.jsxs("div",{role:"status",className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-canvas",children:[t.jsx(re,{size:"lg",label:N?void 0:"Loading settings"}),N&&t.jsx("p",{className:"max-w-sm text-center text-body-sm text-ink-muted",children:"The Local Operator server is taking longer than usual to answer. If it does not respond, you will be able to retry from here."})]}):r?t.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-canvas",children:[t.jsx("div",{ref:e,className:"w-12 shrink-0 overflow-y-auto min-[1040px]:w-55",children:t.jsx(Cs,{activeSection:V,onSelectSection:q,sections:Ms})}),t.jsx("div",{ref:I,"data-settings-content":!0,"data-tour-tag":"settings-general-section",className:"flex-1 overflow-y-auto overflow-x-hidden p-4 sm:p-6 md:p-8",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[t.jsx(Os,{title:"Settings",icon:It}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{ref:j.general,className:"flex flex-col gap-8",children:[t.jsxs(se,{title:"User profile",icon:As,description:`Your user profile information displayed in the application. This information is not provided to the agents. ${H?"These details are provided through your Radient account.":""}`,children:[me&&t.jsx("p",{className:"text-meta text-ink-dim",children:"Checking your Radient account…"}),Ne&&t.jsx(ie,{variant:"warning",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("span",{children:["Your Radient account could not be read, so the name and email below are placeholders rather than your account details.",_==="refused"?" Retry, or sign in to Radient again.":" Retry."]}),t.jsx($,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>A(),disabled:O,children:O?"Retrying":"Retry"})]})}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(Et,{value:C.profile.name,label:"Display name",placeholder:"Enter your name...",isSaving:k==="user_name",onSave:async p=>{R("user_name");try{C.updateName(p)}finally{R(null)}},readOnly:g}),t.jsx(Et,{value:C.profile.email,label:"Email address",placeholder:"Enter your email...",isSaving:k==="user_email",onSave:async p=>{R("user_email");try{C.updateEmail(p)}finally{R(null)}},readOnly:g})]})]}),t.jsx(se,{title:"Application tour",description:"Missed the application onboarding tour or want a refresher? Start it again here.",children:t.jsxs($,{variant:"secondary",onClick:()=>{L({forceModalCompleted:!0})},children:[t.jsx(ba,{}),"Take the tour"]})}),t.jsx(se,{id:"model-settings",title:"Model settings",icon:Rs,description:"Configure the default AI model and hosting providers used for generating responses. This will be used for all agents that don't have a specific model or hosting provider configured. You can override these settings for individual agents in the agent settings.",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(Ts,{value:r.values.hosting,isSaving:k==="hosting",onSave:p=>fe("hosting",p),filterByCredentials:!0,allowCustom:!0,allowDefault:!1,emptyHelperText:"No hosting providers available. Sign in to a provider, or add a provider's API key below, under Providers."}),t.jsx(Is,{value:r.values.model_name,hostingId:r.values.hosting,isSaving:k==="model_name",onSave:p=>fe("model_name",p),allowCustom:!0,allowDefault:!1}),t.jsx(ie,{variant:"neutral",icon:t.jsx(Ye,{className:"size-4","aria-hidden":"true"}),children:"You need a Radient account or your own API keys to reach cloud providers. If you don't see more hosting providers and models here, sign in to Radient, or add a provider's API key below, under Providers."})]})}),t.jsx(nc,{}),t.jsx(se,{title:"Configuration information",icon:Ye,description:"System information about the current configuration.",children:t.jsxs(kt,{children:[t.jsx(ae,{label:"Version",value:t.jsx("span",{className:"text-mono-sm",children:r.version})}),t.jsx(ae,{label:"Created",value:sn(r.metadata.created_at)}),t.jsx(ae,{label:"Last modified",value:on(r.metadata.last_modified)}),t.jsx(ae,{label:"Description",value:r.metadata.description||"No description available"})]})})]}),t.jsx(se,{title:"Appearance",icon:un,description:"Customize the look and feel of Local Operator",sectionRef:j.appearance,dataTourTag:"settings-appearance-section",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(uc,{}),t.jsx(fr,{value:s,label:"Show agent reasoning",description:"Adds the agent's Reasoning and Thinking rows to conversations. They stay closed until you open one. Reasoning only: narration the agent writes as prose mid-turn is transcript content, not reasoning — never removed by either display mode (by turn folds it behind the turn's bars, by response keeps it on screen).",onChange:async p=>n(p)}),t.jsx(mc,{value:rn(a),onChange:p=>o(p)})]})}),t.jsx(se,{title:"Model providers",icon:tn,description:"Sign in to the services your agents think with. New chats use your default model.",sectionRef:j.providers,children:t.jsx(Es,{initialProviderId:Z,onChangeModel:()=>q("general")})}),t.jsx(qi,{sessionId:S??void 0,sectionRef:j.integrations,highlightServer:ue}),t.jsx(se,{title:"Radient account",titleComponent:t.jsx(gc,{}),description:"Your Radient account, Radient Pass details and credits. To use Radient models, sign in under Model providers.",sectionRef:j.radient,dataTourTag:"settings-radient-account-section",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsx(ec,{onAfterCredentialUpdate:()=>{te(),D()}}),H&&t.jsxs(t.Fragment,{children:[t.jsx(hc,{}),t.jsx(fc,{})]})]})}),t.jsx(se,{title:"Backend settings",icon:It,description:"Every setting the backend registry owns, searchable, with typed editors and scopes.",sectionRef:j.backend,children:t.jsx(hs,{focusKey:Q,initialFilter:J})}),t.jsx("div",{ref:j.updates,children:t.jsx(Nr,{})})]})]})})]}):t.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:t.jsx(ie,{variant:"warning",className:"w-full max-w-xl",children:"Your settings could not be loaded."})})};export{Rc as SettingsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-Br1voKIL.js";import{_ as i}from"./mermaid.core-w9t0zfcx.js";import"./chunk-RZ5BOZE2-bSGVs_Tb.js";import"./conversation-input-sync-QxTZG_kn.js";import"./ui-preferences-store-ClQPCzID.js";import"./index-DvjcW_EJ.js";import"./error-boundary-BCN3_4Dn.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
|