local-operator-ui 0.30.24 → 0.30.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/out/renderer/assets/{_basePickBy-qHSBhlOy.js → _basePickBy-qcJkFkzo.js} +1 -1
  2. package/out/renderer/assets/{_baseUniq-CSJPgB01.js → _baseUniq-Db7jq2Cm.js} +1 -1
  3. package/out/renderer/assets/{agent-details-page-BXuosXRP.js → agent-details-page-sShS8OQY.js} +1 -1
  4. package/out/renderer/assets/{agent-hub-page-3NcsQiWU.js → agent-hub-page-BTUPrZ7i.js} +1 -1
  5. package/out/renderer/assets/{agents-page-BCMNoQLv.js → agents-page-yLjCPdYX.js} +2 -2
  6. package/out/renderer/assets/{arc-CO6Fg02B.js → arc-CLW2kD4z.js} +1 -1
  7. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-DXKxt2u4.js → architectureDiagram-IEHRJDOE-CEEiXLhZ.js} +1 -1
  8. package/out/renderer/assets/{blockDiagram-JOT3LUYC-DZqoGYwB.js → blockDiagram-JOT3LUYC-CamL5YS9.js} +1 -1
  9. package/out/renderer/assets/browser-page-E-JU0rmx.js +1 -0
  10. package/out/renderer/assets/{browser-webauthn-prompt-DtVq0fU-.js → browser-webauthn-prompt-BAoam_2W.js} +1 -1
  11. package/out/renderer/assets/{c4Diagram-VJAJSXHY-C_JT_PcU.js → c4Diagram-VJAJSXHY-066aC-Ma.js} +1 -1
  12. package/out/renderer/assets/channel-CFJYith2.js +1 -0
  13. package/out/renderer/assets/{chunk-4BMEZGHF-C_rC3TIm.js → chunk-4BMEZGHF-CGC19sAo.js} +1 -1
  14. package/out/renderer/assets/{chunk-A2AXSNBT-D-s9OpGv.js → chunk-A2AXSNBT-JpCLJ7wx.js} +1 -1
  15. package/out/renderer/assets/{chunk-AEK57VVT-B-zQGtHr.js → chunk-AEK57VVT-hbt8Nk5r.js} +1 -1
  16. package/out/renderer/assets/{chunk-D6G4REZN-JRF_dMg9.js → chunk-D6G4REZN-D61PzmpL.js} +1 -1
  17. package/out/renderer/assets/{chunk-RZ5BOZE2-CmigPcIV.js → chunk-RZ5BOZE2-D3Izr4Db.js} +1 -1
  18. package/out/renderer/assets/{chunk-XZIHB7SX-J7acbl0r.js → chunk-XZIHB7SX-C_dM_Phf.js} +1 -1
  19. package/out/renderer/assets/classDiagram-GIVACNV2-DgZj3BLw.js +1 -0
  20. package/out/renderer/assets/classDiagram-v2-COTLJTTW-DgZj3BLw.js +1 -0
  21. package/out/renderer/assets/clone-BoGH3WqR.js +1 -0
  22. package/out/renderer/assets/{compact-pagination-DIHiMRKz.js → compact-pagination-DqkhgNUi.js} +1 -1
  23. package/out/renderer/assets/{console-mirror-1jR6vtMD.js → console-mirror-HQug5xyB.js} +1 -1
  24. package/out/renderer/assets/{consoleCapture-KoMcCsW1.js → consoleCapture-DuREQRZJ.js} +1 -1
  25. package/out/renderer/assets/{dagre-OKDRZEBW-Ckx4W32Z.js → dagre-OKDRZEBW-B4GriiWw.js} +1 -1
  26. package/out/renderer/assets/{diagram-SSKATNLV-4rTD0ANs.js → diagram-SSKATNLV-gEQ7zL5E.js} +1 -1
  27. package/out/renderer/assets/{diagram-VNBRO52H-C4kHlXpB.js → diagram-VNBRO52H-CumuPXOR.js} +1 -1
  28. package/out/renderer/assets/{erDiagram-Q7BY3M3F-Cd_YppJn.js → erDiagram-Q7BY3M3F-E6YyZmko.js} +1 -1
  29. package/out/renderer/assets/{flowDiagram-4HSFHLVR-DpjnCle7.js → flowDiagram-4HSFHLVR-DgNNLxez.js} +1 -1
  30. package/out/renderer/assets/{ganttDiagram-APWFNJXF-CnbnYSl-.js → ganttDiagram-APWFNJXF-CoXsGfo9.js} +1 -1
  31. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-BmKageka.js → gitGraphDiagram-7IBYFJ6S-BKrNYVMc.js} +1 -1
  32. package/out/renderer/assets/{graph-FtaZdF-e.js → graph-BaGPYTnF.js} +1 -1
  33. package/out/renderer/assets/{icon-nNqBZrxh.js → icon-B46ywhM0.js} +1 -1
  34. package/out/renderer/assets/{index-0z4_pZbu.js → index-B94qgciR.js} +1 -1
  35. package/out/renderer/assets/{index-hCbuKxTs.js → index-DRrOR59K.js} +309 -309
  36. package/out/renderer/assets/{index-B7mEOtqJ.js → index-DbgwJjvR.js} +1 -1
  37. package/out/renderer/assets/index-weZJ06uN.css +1 -0
  38. package/out/renderer/assets/{infoDiagram-PH2N3AL5-B0w7vAcS.js → infoDiagram-PH2N3AL5-CBoKKNbj.js} +1 -1
  39. package/out/renderer/assets/{installer-D2HR3cx6.js → installer-DcrwTpxp.js} +1 -1
  40. package/out/renderer/assets/{journeyDiagram-U35MCT3I-S1_uNRQi.js → journeyDiagram-U35MCT3I-DLkwGEBK.js} +1 -1
  41. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BQHwCD-s.js → kanban-definition-NDS4AKOZ-B-2HkFWm.js} +1 -1
  42. package/out/renderer/assets/{layout-DpHUdIko.js → layout-Dofuk1HW.js} +1 -1
  43. package/out/renderer/assets/{legacy-agents-page-QE44eRCx.js → legacy-agents-page-C_3w8mfH.js} +1 -1
  44. package/out/renderer/assets/{mermaid.core-vkOx0j8k.js → mermaid.core-dom5xpUX.js} +5 -5
  45. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-BJmniUkT.js → mindmap-definition-ALO5MXBD-B730hjbl.js} +1 -1
  46. package/out/renderer/assets/{page-header-B2fsxFNK.js → page-header-ChCGo_Jj.js} +1 -1
  47. package/out/renderer/assets/{parseISO--wKN9S70.js → parseISO-Cn2TP8Ms.js} +1 -1
  48. package/out/renderer/assets/{pieDiagram-IB7DONF6-Cv-ByprF.js → pieDiagram-IB7DONF6-C8fMIrBK.js} +1 -1
  49. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-Di-F_L2d.js → quadrantDiagram-7GDLP6J5-BtsuqKx_.js} +1 -1
  50. package/out/renderer/assets/{radar-MK3ICKWK-D2bYB_Kx.js → radar-MK3ICKWK-DyoCm-Ob.js} +1 -1
  51. package/out/renderer/assets/{radient-auth-buttons-D6FFmTRs.js → radient-auth-buttons-DMogHToX.js} +1 -1
  52. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-BhNVhdDc.js → requirementDiagram-KVF5MWMF-B9lRSOmW.js} +1 -1
  53. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-D0OawA8a.js → sankeyDiagram-QLVOVGJD-P87k0cOO.js} +1 -1
  54. package/out/renderer/assets/{schedules-page-Coxlr5I5.js → schedules-page-BRN30YJ1.js} +1 -1
  55. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DsMKPMKf.js → sequenceDiagram-X6HHIX6F-CU0VuQbW.js} +1 -1
  56. package/out/renderer/assets/{settings-page-C9X5ngsU.js → settings-page-D4dcXG3z.js} +66 -66
  57. package/out/renderer/assets/{stateDiagram-DGXRK772-BvoF6ZU9.js → stateDiagram-DGXRK772-DcxJfVki.js} +1 -1
  58. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CJjM8Xg8.js +1 -0
  59. package/out/renderer/assets/{timeline-definition-BDJGKUSR-D5Rg_OJx.js → timeline-definition-BDJGKUSR-CLdUOAVc.js} +1 -1
  60. package/out/renderer/assets/{use-agent-like-mutation-CpajbQZW.js → use-agent-like-mutation-DKHuqLPn.js} +1 -1
  61. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-FPM-GJEp.js → xychartDiagram-VJFVF3MP-DpL4bgw8.js} +1 -1
  62. package/out/renderer/console-capture.html +4 -4
  63. package/out/renderer/index.html +5 -5
  64. package/out/renderer/installer.html +4 -4
  65. package/package.json +2 -2
  66. package/out/renderer/assets/browser-page-Bg3NCSll.js +0 -1
  67. package/out/renderer/assets/channel-BCzqDaWR.js +0 -1
  68. package/out/renderer/assets/classDiagram-GIVACNV2-CiyGtiir.js +0 -1
  69. package/out/renderer/assets/classDiagram-v2-COTLJTTW-CiyGtiir.js +0 -1
  70. package/out/renderer/assets/clone-D6WiPnml.js +0 -1
  71. package/out/renderer/assets/index-BZxW-iGF.css +0 -1
  72. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DJwSPhY6.js +0 -1
  73. /package/out/renderer/assets/{index-CShNMNxP.js → index-D5KQ7zd3.js} +0 -0
@@ -1,312 +1,312 @@
1
- import{r as o,j as e,c as ee,t as bt}from"./index-CShNMNxP.js";import{bU as jt,bV as Be,bW as He,bX as wt,bp as Nt,g as ye,bq as et,br as $e,ar as tt,f as at,a6 as _t,at as St,bY as Mt,bZ as Ct,b_ as At,b$ as Rt,c0 as st,b8 as Et,c1 as Fe,c2 as nt,aH as Tt,c3 as Ve,c4 as Lt,b as Oe,d as Me,ac as zt,c5 as It,ap as $t,j as xe,c6 as rt,c7 as Ft,bw as ot,c8 as it,i as Ne,c9 as Ot,ca as Dt,cb as Ae,cc as ct,cd as Pt,ce as Ut,cf as lt,cg as qt,aA as Bt,ch as Ht,ci as Vt,cj as Gt,a4 as Zt,ck as dt,aJ as ut,cl as Kt,cm as mt,cn as Yt,co as Qt,ax as Wt,cp as ht,cq as Jt,bC as Xt,cr as ea,cs as ta,bz as aa,ct as sa,cu as na,bt as ra,cv as oa,cw as ia,cx as ca,cy as la,bl as Ge,cz as da,by as Ze,cA as ua,bA as ma,bB as ha,bx as Re,cB as pa,cC as fa,cD as xa,cE as ga,cF as ya,cG as va,cH as ka}from"./index-hCbuKxTs.js";import{P as ba}from"./page-header-B2fsxFNK.js";import{c as f,B as _,S as se,F as pt,m as Te,u as Le,G as ja,I as le,T as ze,a as wa,b as Na,d as _a,e as Sa,f as Ma,A as K,X as Ca,v as Ce,R as Aa,L as ke,z as Ra,o as Ea,g as ft}from"./icon-nNqBZrxh.js";import{u as Ie}from"./console-mirror-1jR6vtMD.js";import{S as Z,I as De,a as Q,R as Ta,N as La}from"./radient-auth-buttons-D6FFmTRs.js";import{i as za,a as me,b as Ia,H as $a,p as Ee,f as Fa}from"./parseISO--wKN9S70.js";/**
1
+ import{r as o,j as e,c as ee,t as bt}from"./index-D5KQ7zd3.js";import{bU as jt,bV as Be,bW as He,bX as wt,bp as Nt,g as ye,bq as et,br as $e,ar as tt,f as at,a6 as _t,at as St,bY as Mt,bZ as Ct,b_ as At,b$ as Rt,c0 as st,b8 as Et,c1 as Fe,c2 as nt,aH as Tt,c3 as Ve,c4 as Lt,b as Oe,d as Me,ac as zt,c5 as It,c6 as $t,ap as Ft,j as xe,c7 as rt,c8 as Ot,bw as ot,c9 as it,i as Ne,ca as Dt,cb as Pt,cc as Ae,cd as ct,ce as Ut,cf as qt,cg as lt,ch as Bt,aA as Ht,ci as Vt,cj as Gt,ck as Zt,a4 as Kt,cl as dt,aJ as ut,cm as Yt,cn as mt,co as Qt,cp as Wt,ax as Jt,cq as ht,cr as Xt,bC as ea,cs as ta,ct as aa,bz as sa,cu as na,cv as ra,bt as oa,cw as ia,cx as ca,cy as la,cz as da,bl as Ge,cA as ua,by as Ze,cB as ma,bA as ha,bB as pa,bx as Re,cC as fa,cD as xa,cE as ga,cF as ya,cG as va,cH as ka,cI as ba}from"./index-DRrOR59K.js";import{P as ja}from"./page-header-ChCGo_Jj.js";import{c as f,B as _,S as se,F as pt,m as Te,u as Le,G as wa,I as le,T as ze,a as Na,b as _a,d as Sa,e as Ma,f as Ca,A as K,X as Aa,v as Ce,R as Ra,L as ke,z as Ea,o as Ta,g as ft}from"./icon-B46ywhM0.js";import{u as Ie}from"./console-mirror-HQug5xyB.js";import{S as Z,I as De,a as Q,R as La,N as za}from"./radient-auth-buttons-DMogHToX.js";import{i as Ia,a as me,b as $a,H as Fa,p as Ee,f as Oa}from"./parseISO-Cn2TP8Ms.js";/**
2
2
  * @license lucide-react v0.507.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Oa=[["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"}]],Da=f("aperture",Oa);/**
6
+ */const Da=[["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"}]],Pa=f("aperture",Da);/**
7
7
  * @license lucide-react v0.507.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const Pa=[["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"}]],Ua=f("atom",Pa);/**
11
+ */const Ua=[["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"}]],qa=f("atom",Ua);/**
12
12
  * @license lucide-react v0.507.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const qa=[["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"}]],Ba=f("audio-waveform",qa);/**
16
+ */const Ba=[["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"}]],Ha=f("audio-waveform",Ba);/**
17
17
  * @license lucide-react v0.507.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const Ha=[["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"}]],Va=f("binary",Ha);/**
21
+ */const Va=[["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"}]],Ga=f("binary",Va);/**
22
22
  * @license lucide-react v0.507.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const Ga=[["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"}]],Za=f("candy",Ga);/**
26
+ */const Za=[["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"}]],Ka=f("candy",Za);/**
27
27
  * @license lucide-react v0.507.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Ka=[["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"}]],Ya=f("car-front",Ka);/**
31
+ */const Ya=[["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"}]],Qa=f("car-front",Ya);/**
32
32
  * @license lucide-react v0.507.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Qa=[["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"}]],Wa=f("cassette-tape",Qa);/**
36
+ */const Wa=[["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"}]],Ja=f("cassette-tape",Wa);/**
37
37
  * @license lucide-react v0.507.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const Ja=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Xa=f("chart-line",Ja);/**
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"}]],es=f("chart-line",Xa);/**
42
42
  * @license lucide-react v0.507.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const es=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]],ts=f("circle-play",es);/**
46
+ */const ts=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]],as=f("circle-play",ts);/**
47
47
  * @license lucide-react v0.507.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const as=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],ss=f("circle-plus",as);/**
51
+ */const ss=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],ns=f("circle-plus",ss);/**
52
52
  * @license lucide-react v0.507.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const ns=[["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"}]],rs=f("circuit-board",ns);/**
56
+ */const rs=[["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"}]],os=f("circuit-board",rs);/**
57
57
  * @license lucide-react v0.507.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const os=[["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"}]],is=f("cloud-lightning",os);/**
61
+ */const is=[["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"}]],cs=f("cloud-lightning",is);/**
62
62
  * @license lucide-react v0.507.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const cs=[["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"}]],ls=f("cloud-moon",cs);/**
66
+ */const ls=[["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"}]],ds=f("cloud-moon",ls);/**
67
67
  * @license lucide-react v0.507.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const ds=[["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"}]],us=f("cloud-snow",ds);/**
71
+ */const us=[["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"}]],ms=f("cloud-snow",us);/**
72
72
  * @license lucide-react v0.507.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const ms=[["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"}]],hs=f("cloud-sun",ms);/**
76
+ */const hs=[["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"}]],ps=f("cloud-sun",hs);/**
77
77
  * @license lucide-react v0.507.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const ps=[["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"}]],fs=f("coffee",ps);/**
81
+ */const fs=[["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"}]],xs=f("coffee",fs);/**
82
82
  * @license lucide-react v0.507.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const xs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 18a6 6 0 0 0 0-12v12z",key:"j4l70d"}]],xt=f("contrast",xs);/**
86
+ */const gs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 18a6 6 0 0 0 0-12v12z",key:"j4l70d"}]],xt=f("contrast",gs);/**
87
87
  * @license lucide-react v0.507.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const gs=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],ys=f("credit-card",gs);/**
91
+ */const ys=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],vs=f("credit-card",ys);/**
92
92
  * @license lucide-react v0.507.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const vs=[["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"}]],ks=f("cup-soda",vs);/**
96
+ */const ks=[["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"}]],bs=f("cup-soda",ks);/**
97
97
  * @license lucide-react v0.507.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const bs=[["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"}]],js=f("disc-3",bs);/**
101
+ */const js=[["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"}]],ws=f("disc-3",js);/**
102
102
  * @license lucide-react v0.507.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const ws=[["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"}]],Ns=f("droplet",ws);/**
106
+ */const Ns=[["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"}]],_s=f("droplet",Ns);/**
107
107
  * @license lucide-react v0.507.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const _s=[["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"}]],Ss=f("droplets",_s);/**
111
+ */const Ss=[["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"}]],Ms=f("droplets",Ss);/**
112
112
  * @license lucide-react v0.507.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const Ms=[["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"}]],Cs=f("fish",Ms);/**
116
+ */const Cs=[["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"}]],As=f("fish",Cs);/**
117
117
  * @license lucide-react v0.507.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const As=[["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"}]],Rs=f("flame",As);/**
121
+ */const Rs=[["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"}]],Es=f("flame",Rs);/**
122
122
  * @license lucide-react v0.507.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const Es=[["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"}]],Ts=f("flower-2",Es);/**
126
+ */const Ts=[["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"}]],Ls=f("flower-2",Ts);/**
127
127
  * @license lucide-react v0.507.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const Ls=[["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"}]],zs=f("flower",Ls);/**
131
+ */const zs=[["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"}]],Is=f("flower",zs);/**
132
132
  * @license lucide-react v0.507.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const Is=[["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"}]],$s=f("ghost",Is);/**
136
+ */const $s=[["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"}]],Fs=f("ghost",$s);/**
137
137
  * @license lucide-react v0.507.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const Fs=[["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"}]],Os=f("github",Fs);/**
141
+ */const Os=[["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"}]],Ds=f("github",Os);/**
142
142
  * @license lucide-react v0.507.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const Ds=[["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"}]],Ps=f("guitar",Ds);/**
146
+ */const Ps=[["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"}]],Us=f("guitar",Ps);/**
147
147
  * @license lucide-react v0.507.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const Us=[["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"}]],qs=f("hexagon",Us);/**
151
+ */const qs=[["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"}]],Bs=f("hexagon",qs);/**
152
152
  * @license lucide-react v0.507.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const Bs=[["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"}]],Hs=f("ice-cream-bowl",Bs);/**
156
+ */const Hs=[["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"}]],Vs=f("ice-cream-bowl",Hs);/**
157
157
  * @license lucide-react v0.507.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const Vs=[["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"}]],Gs=f("joystick",Vs);/**
161
+ */const Gs=[["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"}]],Zs=f("joystick",Gs);/**
162
162
  * @license lucide-react v0.507.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const Zs=[["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"}]],Ks=f("leaf",Zs);/**
166
+ */const Ks=[["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"}]],Ys=f("leaf",Ks);/**
167
167
  * @license lucide-react v0.507.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const Ys=[["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"}]],Qs=f("lightbulb",Ys);/**
171
+ */const Qs=[["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"}]],Ws=f("lightbulb",Qs);/**
172
172
  * @license lucide-react v0.507.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const Ws=[["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"}]],Js=f("milk",Ws);/**
176
+ */const Js=[["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"}]],Xs=f("milk",Js);/**
177
177
  * @license lucide-react v0.507.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const Xs=[["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"}]],en=f("moon-star",Xs);/**
181
+ */const en=[["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"}]],tn=f("moon-star",en);/**
182
182
  * @license lucide-react v0.507.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const tn=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],an=f("moon",tn);/**
186
+ */const an=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],sn=f("moon",an);/**
187
187
  * @license lucide-react v0.507.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const sn=[["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"}]],nn=f("mountain-snow",sn);/**
191
+ */const nn=[["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"}]],rn=f("mountain-snow",nn);/**
192
192
  * @license lucide-react v0.507.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const rn=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],on=f("mountain",rn);/**
196
+ */const on=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],cn=f("mountain",on);/**
197
197
  * @license lucide-react v0.507.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const cn=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],ln=f("plug-zap",cn);/**
201
+ */const ln=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],dn=f("plug-zap",ln);/**
202
202
  * @license lucide-react v0.507.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const dn=[["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"}]],un=f("radio",dn);/**
206
+ */const un=[["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"}]],mn=f("radio",un);/**
207
207
  * @license lucide-react v0.507.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const mn=[["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"}]],hn=f("sailboat",mn);/**
211
+ */const hn=[["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"}]],pn=f("sailboat",hn);/**
212
212
  * @license lucide-react v0.507.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const pn=[["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"}]],fn=f("shirt",pn);/**
216
+ */const fn=[["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"}]],xn=f("shirt",fn);/**
217
217
  * @license lucide-react v0.507.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
220
220
  * See the LICENSE file in the root directory of this source tree.
221
- */const xn=[["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"}]],gn=f("skull",xn);/**
221
+ */const gn=[["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"}]],yn=f("skull",gn);/**
222
222
  * @license lucide-react v0.507.0 - ISC
223
223
  *
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
- */const yn=[["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"}]],vn=f("snowflake",yn);/**
226
+ */const vn=[["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"}]],kn=f("snowflake",vn);/**
227
227
  * @license lucide-react v0.507.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
- */const kn=[["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"}]],bn=f("sparkle",kn);/**
231
+ */const bn=[["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"}]],jn=f("sparkle",bn);/**
232
232
  * @license lucide-react v0.507.0 - ISC
233
233
  *
234
234
  * This source code is licensed under the ISC license.
235
235
  * See the LICENSE file in the root directory of this source tree.
236
- */const jn=[["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"}]],wn=f("sun-dim",jn);/**
236
+ */const wn=[["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"}]],Nn=f("sun-dim",wn);/**
237
237
  * @license lucide-react v0.507.0 - ISC
238
238
  *
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
- */const Nn=[["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"}]],_n=f("sun",Nn);/**
241
+ */const _n=[["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"}]],Sn=f("sun",_n);/**
242
242
  * @license lucide-react v0.507.0 - ISC
243
243
  *
244
244
  * This source code is licensed under the ISC license.
245
245
  * See the LICENSE file in the root directory of this source tree.
246
- */const Sn=[["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"}]],Mn=f("sunrise",Sn);/**
246
+ */const Mn=[["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"}]],Cn=f("sunrise",Mn);/**
247
247
  * @license lucide-react v0.507.0 - ISC
248
248
  *
249
249
  * This source code is licensed under the ISC license.
250
250
  * See the LICENSE file in the root directory of this source tree.
251
- */const Cn=[["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"}]],An=f("sunset",Cn);/**
251
+ */const An=[["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"}]],Rn=f("sunset",An);/**
252
252
  * @license lucide-react v0.507.0 - ISC
253
253
  *
254
254
  * This source code is licensed under the ISC license.
255
255
  * See the LICENSE file in the root directory of this source tree.
256
- */const Rn=[["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"}]],En=f("tent",Rn);/**
256
+ */const En=[["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"}]],Tn=f("tent",En);/**
257
257
  * @license lucide-react v0.507.0 - ISC
258
258
  *
259
259
  * This source code is licensed under the ISC license.
260
260
  * See the LICENSE file in the root directory of this source tree.
261
- */const Tn=[["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"}]],Ln=f("tree-deciduous",Tn);/**
261
+ */const Ln=[["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"}]],zn=f("tree-deciduous",Ln);/**
262
262
  * @license lucide-react v0.507.0 - ISC
263
263
  *
264
264
  * This source code is licensed under the ISC license.
265
265
  * See the LICENSE file in the root directory of this source tree.
266
- */const zn=[["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"}]],In=f("tree-palm",zn);/**
266
+ */const In=[["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"}]],$n=f("tree-palm",In);/**
267
267
  * @license lucide-react v0.507.0 - ISC
268
268
  *
269
269
  * This source code is licensed under the ISC license.
270
270
  * See the LICENSE file in the root directory of this source tree.
271
- */const $n=[["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"}]],Fn=f("tree-pine",$n);/**
271
+ */const Fn=[["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"}]],On=f("tree-pine",Fn);/**
272
272
  * @license lucide-react v0.507.0 - ISC
273
273
  *
274
274
  * This source code is licensed under the ISC license.
275
275
  * See the LICENSE file in the root directory of this source tree.
276
- */const On=[["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"}]],Dn=f("trees",On);/**
276
+ */const Dn=[["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"}]],Pn=f("trees",Dn);/**
277
277
  * @license lucide-react v0.507.0 - ISC
278
278
  *
279
279
  * This source code is licensed under the ISC license.
280
280
  * See the LICENSE file in the root directory of this source tree.
281
- */const Pn=[["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"}]],Un=f("umbrella",Pn);/**
281
+ */const Un=[["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"}]],qn=f("umbrella",Un);/**
282
282
  * @license lucide-react v0.507.0 - ISC
283
283
  *
284
284
  * This source code is licensed under the ISC license.
285
285
  * See the LICENSE file in the root directory of this source tree.
286
- */const qn=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Bn=f("undo-2",qn);/**
286
+ */const Bn=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Hn=f("undo-2",Bn);/**
287
287
  * @license lucide-react v0.507.0 - ISC
288
288
  *
289
289
  * This source code is licensed under the ISC license.
290
290
  * See the LICENSE file in the root directory of this source tree.
291
- */const Hn=[["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"}]],Vn=f("waves",Hn);/**
291
+ */const Vn=[["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"}]],Gn=f("waves",Vn);/**
292
292
  * @license lucide-react v0.507.0 - ISC
293
293
  *
294
294
  * This source code is licensed under the ISC license.
295
295
  * See the LICENSE file in the root directory of this source tree.
296
- */const Gn=[["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"}]],Zn=f("wheat",Gn);/**
296
+ */const Zn=[["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"}]],Kn=f("wheat",Zn);/**
297
297
  * @license lucide-react v0.507.0 - ISC
298
298
  *
299
299
  * This source code is licensed under the ISC license.
300
300
  * See the LICENSE file in the root directory of this source tree.
301
- */const Kn=[["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"}]],Yn=f("wind",Kn);/**
301
+ */const Yn=[["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"}]],Qn=f("wind",Yn);/**
302
302
  * @license lucide-react v0.507.0 - ISC
303
303
  *
304
304
  * This source code is licensed under the ISC license.
305
305
  * See the LICENSE file in the root directory of this source tree.
306
- */const Qn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Wn=f("zap",Qn),Jn=({appVersion:t=null})=>{const s="https://local-operator.com/download",[a,n]=o.useState(!1),[r,c]=o.useState(!1),[d,l]=o.useState(null),[u,m]=o.useState("info"),[h,x]=o.useState(null),[v,k]=o.useState(null),w=t?.trim()?t.trim():null,S=o.useRef(!1),R=o.useRef(!1),z=o.useRef(0),$=o.useRef(!1),L=o.useCallback((C,D)=>{R.current=!1,l(C),m(D),c(!0)},[]),q=o.useCallback(C=>{R.current=!0,l(C),m("success"),c(!0)},[]),H=o.useCallback(()=>{R.current&&(R.current=!1,c(!1),l(null))},[]),{clearDeferredUpdate:P}=jt();o.useEffect(()=>{const C=window.api.updater.onUpdateError(B=>{S.current&&B.includes("manually")&&(x({message:"The server is installed outside the app, so use the tool you installed it with - uv, pipx or pip.",command:""}),R.current=!1,l(null),m("warning"),c(!0))}),D=window.api.updater.onBackendUpdateDevMode(B=>{S.current&&L(B,"info")}),A=()=>{$.current=!0,H()},N=window.api.updater.onUpdateAvailable(A),V=window.api.updater.onUpdateNpxAvailable(A),W=window.api.updater.onBackendUpdateAvailable(A);return()=>{C(),D(),N(),V(),W()}},[H,L]),o.useEffect(()=>{let C=!1;const D=()=>{window.api.updater.getLastInstallAttempt().then(N=>{C||k(N)}).catch(()=>{})};D();const A=window.api.updater.onUpdateInstallFailed(()=>D());return()=>{C=!0,A()}},[]);const O=async()=>{const C=++z.current;H(),$.current=!1;try{n(!0),S.current=!0,P(He.UI),P(He.BACKEND);const D=await window.api.updater.checkForAllUpdates({manual:!0});if(C!==z.current)return;D?.affirmation&&!$.current?q(D.affirmation):H()}catch(D){if(C!==z.current)return;console.warn(`Update check failed; the app-level alert owns the report: ${wt(D)}`)}finally{C===z.current&&n(!1),setTimeout(()=>{S.current=!1},2e3)}},M=()=>{R.current=!1,c(!1),l(null)};return e.jsxs(e.Fragment,{children:[v&&e.jsxs("div",{className:"mb-3 rounded-sm bg-sunken p-3",children:[e.jsxs("p",{className:"text-body-sm text-ink",children:["The last update to version ",v.targetVersion," didn't finish",v.attempts>1?` (${v.attempts} attempts)`:"",".",w?` Version ${w} is running.`:null]}),e.jsxs("p",{className:"mt-1 text-meta text-ink-dim",children:["Detected"," ",v.detectedAt?new Date(v.detectedAt).toLocaleString():"at an unknown time",". ",v.detail]}),e.jsx(_,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>void window.api.openExternal(s),children:"Download a fresh copy"})]}),e.jsxs(_,{variant:"outline",onClick:()=>void O(),disabled:a,children:[a?e.jsx(se,{size:"sm"}):null,a?"Checking...":"Check for updates"]}),h&&e.jsxs(Be,{open:r,autoHideDuration:1e4,onClose:M,variant:"warning",children:[e.jsx("p",{className:"text-body-sm",children:h.message}),h.command&&e.jsx("code",{className:"mt-2 block rounded-sm bg-sunken p-2 text-mono-sm text-ink",children:h.command})]}),d&&u!=="danger"&&e.jsx(Be,{open:r,autoHideDuration:6e3,onClose:M,variant:u,children:d})]})},_e=["system-prompt"],Xn=()=>{const{shouldEnableQuery:t}=Nt();return ye({enabled:t({bypassInternetCheck:!0}),queryKey:_e,queryFn:async()=>{try{const a=await et($e.baseUrl).config.getSystemPrompt();if(a===null)return null;if(a.status>=400)throw new Error(a.message||"Failed to fetch system prompt");return a.result}catch(s){const a=s instanceof Error?s.message:"An unknown error occurred while fetching system prompt";throw tt(a),s}},refetchOnWindowFocus:!1,staleTime:5e3})},er=()=>{const t=at(),s=et($e.baseUrl);return _t({mutationFn:async a=>{try{const n=await s.config.updateSystemPrompt(a);if(n.status>=400)throw new Error(n.message||"Failed to update system prompt");return n.result}catch(n){const r=n instanceof Error?n.message:"An unknown error occurred while updating system prompt";throw tt(r),n}},onSuccess:async a=>{await t.invalidateQueries({queryKey:_e,refetchType:"none"}),t.setQueryData(_e,n=>n&&{...n,...a}),await t.refetchQueries({queryKey:_e,type:"all"}),St("System prompt updated")},onError:a=>{console.error("Error updating system prompt:",a)}})},tr=({value:t,label:s,description:a,onChange:n,icon:r,isSaving:c=!1})=>{const[d,l]=o.useState(t),u=o.useId(),m=`${u}-label`,h=`${u}-description`,x=async v=>{if(!c){l(v);try{await n(v)}catch(k){l(!v),console.error("Error toggling setting:",k)}}};return e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("span",{id:m,className:"flex min-h-6 items-center gap-2 text-body text-ink",children:[r&&e.jsx(r,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim"}),s]}),a&&e.jsx("p",{id:h,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:a})]}),e.jsx("div",{className:"flex h-6 shrink-0 items-center",children:c?e.jsx(se,{size:"md",label:`Saving ${s}`}):e.jsx(pt,{checked:d,onCheckedChange:x,"aria-labelledby":m,"aria-describedby":a?h:void 0})})]})};var ar=Mt({chartName:"LineChart",GraphicalChild:st,axisComponents:[{axisType:"xAxis",AxisComp:Ct},{axisType:"yAxis",AxisComp:At}],formatAxisMap:Rt});function Ke(t,s){const a=Et(t,s?.in);if(!za(a))throw new RangeError("Invalid time value");const n=me(a.getDate(),2),r=me(a.getMonth()+1,2),c=a.getFullYear(),d=me(a.getHours(),2),l=me(a.getMinutes(),2),u=me(a.getSeconds(),2);let m="",h="";const x=a.getTimezoneOffset();if(x!==0){const v=Math.abs(x),k=me(Math.trunc(v/60),2),w=me(v%60,2);h=`${x<0?"+":"-"}${k}:${w}`}else h="Z";return`${c}-${r}-${n}T${d}:${l}:${u}${m}${h}`}function sr(t,s,a){return Ia(t,-30,a)}const nr=["radient","creditBalance"],rr=t=>{const{user:s,isAuthenticated:a}=Fe(),n=s?.account?.tenant_id,r=a&&!!n&&t?.enabled;return ye({queryKey:[nr,n],queryFn:async()=>{if(!n)throw new Error("Tenant ID not available");const c=await nt({operation:"credits",tenantId:n});if(!c||typeof c.balance!="number")throw new Error("Invalid credit balance response format");return c},enabled:r,staleTime:5*60*1e3,refetchOnWindowFocus:!0})};function or(t,s){const[a,n]=o.useState(!1);return o.useEffect(()=>{if(!t){n(!1);return}const r=setTimeout(()=>n(!0),s);return()=>clearTimeout(r)},[t,s]),a}function gt(){const[t,s]=o.useState(null);return o.useEffect(()=>{const a=window.api?.backend;if(!a?.getStatus)return;let n=!0;const r=async()=>{try{const d=await a.getStatus();if(!n)return;const l=d?.pairing;s(l&&!l.available?l.cause??"unpaired":null)}catch{}};r();const c=a.onStatusChange?.(()=>void r());return()=>{n=!1,c?.()}},[]),t}const ir=["radient","usageRollup"],cr=(t,s)=>{const{user:a,isAuthenticated:n}=Fe(),r=a?.account?.tenant_id,c=n&&!!r&&s?.enabled;return ye({queryKey:[...ir,r,t],queryFn:async()=>{if(!r)throw new Error("Tenant ID not available");const d={};for(const[u,m]of Object.entries(t))m!=null&&(d[u]=String(m));const l=await nt({operation:"usage",tenantId:r,query:d});if(!l)throw new Error("Invalid usage rollup response format");return l},enabled:c,staleTime:5*60*1e3,refetchOnWindowFocus:!0})},lr=({appVersion:t})=>e.jsx(Jn,{appVersion:t}),dr=t=>{if(!t)return null;try{return new URL(t).host}catch{return null}},ur=()=>{const[t,s]=o.useState(null),[a,n]=o.useState({value:"Loading...",detail:null,degraded:!1}),[r,c]=o.useState({platform:"Loading...",arch:"...",nodeVersion:"Loading...",electronVersion:"Loading...",chromeVersion:"Loading..."});o.useEffect(()=>{let l=!0;const u=k=>{if(!l)return;const w=dr(k.url);if(k.state==="connecting"){n({value:"Loading...",detail:null,degraded:!1});return}if(k.state==="detached"){n({value:"Not connected",detail:k.detail||null,degraded:!1});return}if(k.state==="wedged"){n({value:"Not attached",detail:k.detail||null,degraded:!1});return}const S=k.version||"Version unknown";n({value:w?`${S} · ${w}`:S,detail:k.detail||null,degraded:k.state==="degraded"})};let m=!1;const h=window.api?.backend?.onStatusChange(k=>{m=!0,u(k)}),x=async()=>{try{const[k,w]=await Promise.all([window.api.systemInfo.getAppVersion(),window.api.systemInfo.getPlatformInfo()]);l&&(s(k),c(w))}catch(k){console.error("Error fetching app information:",k)}},v=async()=>{try{const k=window.api?.backend;if(k){const R=await k.getStatus();m||u(R);return}const w=await Ve.healthCheck($e.baseUrl),S=Ve.getServerVersion(w);l&&n({value:S,detail:null,degraded:!1})}catch(k){console.error("Error fetching server version:",k),l&&n({value:"Unavailable",detail:null,degraded:!1})}};return x(),v(),()=>{l=!1,h?.()}},[]);const d=(l,u,m,h={})=>e.jsx(Q,{label:e.jsx(Te,{content:m,children:e.jsxs("span",{className:"inline-flex cursor-help items-center gap-1.5",children:[e.jsx(Le,{size:12,className:"shrink-0"}),l]})}),valueClassName:h.valueClassName,value:e.jsxs(e.Fragment,{children:[h.valueTooltip?e.jsx(Te,{content:h.valueTooltip,children:e.jsx("span",{"data-backend-version":h.valueHoverTarget?"":void 0,className:"cursor-help",children:u})}):u,h.statusNote?e.jsx("span",{className:"mt-0.5 block text-meta text-ink-dim",children:h.statusNote}):null]})});return e.jsx(Z,{title:"Application updates and info",icon:Tt,description:"Check for updates and view information about your Local Operator installation.",dataTourTag:"settings-app-updates-section",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs(De,{children:[d("Application version",t??"Loading...","The version of the Local Operator user interface application."),d("Server version",a.value,"The version of the Local Operator API server backend, and the address of the daemon it was read from.",{valueTooltip:a.detail,valueHoverTarget:!0,statusNote:a.degraded?"Not answering":void 0,valueClassName:a.degraded?"text-ink-muted":void 0}),d("Platform",`${r.platform} (${r.arch})`,"The operating system and architecture your application is running on."),d("Node.js version",r.nodeVersion,"The JavaScript runtime environment version."),d("Electron version",r.electronVersion,"The framework version enabling this desktop application.")]}),e.jsx(lr,{appVersion:t})]})})},mr={hosting:"core",model_name:"core",model_effort:"core","providers.openai.use_max_context_window":"advanced","providers.openai.api":"advanced","providers.anthropic.cache_ttl_1h_min_context_tokens":"advanced","providers.openrouter.provider_affinity":"advanced","providers.openrouter.sort":"advanced","providers.openrouter.order":"advanced","providers.openrouter.only":"advanced","providers.openrouter.ignore":"advanced","providers.openrouter.allow_fallbacks":"advanced","providers.openrouter.require_parameters":"advanced","providers.openrouter.data_collection":"advanced","providers.openrouter.zdr":"advanced","providers.openrouter.enforce_distillable_text":"advanced","providers.openrouter.quantizations":"advanced","providers.openrouter.max_price":"advanced","providers.openrouter.preferred_min_throughput":"advanced","providers.openrouter.preferred_max_latency":"advanced","retry.enabled":"core","retry.maxRetries":"advanced","retry.baseDelayMs":"advanced","retry.connectivityMaxRetries":"advanced","retry.connectivityBackoffCapMs":"advanced","retry.modelFallback":"advanced","retry.usageAwareFallback":"advanced","retry.usageAwareAccountPick":"advanced","retry.usageReservePercent":"advanced","retry.fallbackChains":"advanced","tui.theme":"advanced","display.shimmer":"advanced","display.comfortable_rows":"advanced","display.nerd_icons":"advanced","display.heading_markers":"advanced","display.terminal_title":"advanced","display.images":"advanced","display.notifications":"core","display.notification_session_name":"advanced","display.time_format":"advanced","display.dock":"advanced","tui.sidebar_visible":"advanced","tui.sidebar_position":"advanced","keymap.new_session":"advanced","keymap.resume":"advanced",tool_approval_mode:"core",auto_save_conversation:"core","session.cleanup.enabled":"core","session.cleanup.max_sessions":"advanced","session.cleanup.max_inactive_days":"advanced","session.cleanup.max_total_bytes":"advanced","session.cleanup.remove_empty":"advanced","runtime.background_on_resume":"advanced","runtime.unattended_gate_timeout":"advanced","subagents.max_running":"advanced","subagents.model_choice":"advanced","subagents.models.lo":"advanced","subagents.models.med":"advanced","subagents.models.hi":"advanced","fork.mode":"core","fork.cmux_placement":"advanced","compaction.enabled":"core","compaction.strategy":"advanced","compaction.threshold_percent":"advanced","compaction.threshold_tokens":"advanced","compaction.keep_recent_tokens":"advanced","compaction.auto_continue":"advanced","compaction.mid_turn_enabled":"advanced","compaction.wire_bytes_budget":"advanced","compaction.wire_bytes_trigger":"advanced","web_search.enabled":"core","web_fetch.enabled":"core","web_search.strategy":"advanced","web_search.providers":"advanced","web_search.timeout_seconds":"advanced","web_search.searxng_endpoint":"advanced","web_search.deepseek_evidence":"advanced","web_search.read_enabled":"advanced","web_fetch.timeout_seconds":"advanced","web_fetch.max_bytes":"advanced","web_fetch.max_redirects":"advanced","web_fetch.cache_ttl_seconds":"advanced","web_fetch.allow_private":"advanced","web_fetch.render_backend":"advanced","web_fetch.enrich":"advanced","web_fetch.max_attempts":"advanced","web_fetch.blocked_retry":"advanced","bash.shell":"advanced","providers.lmstudio.base_url":"advanced","providers.lmstudio.models":"advanced","providers.ollama.base_url":"advanced","providers.ollama.models":"advanced","providers.vllm.base_url":"advanced","providers.vllm.models":"advanced","providers.llamacpp.base_url":"advanced","providers.llamacpp.models":"advanced","providers.openai-compatible.base_url":"advanced","providers.openai-compatible.models":"advanced",conversation_length:"advanced",detail_length:"advanced",max_learnings_history:"advanced","desktop.launch_command":"advanced"},hr={model:"core",approvals:"core",web_tools:"core",desktop:"advanced"};function he(t){return t.tier==="core"||t.tier==="advanced"?t.tier:mr[t.key]??hr[t.section]??"advanced"}function pr(t){return t.length===0?!1:t.filter(a=>he(a)==="core").length*2>=t.length}function fr(t,s,a){return s?{layout:null,filter:t?[]:[...a]}:{layout:{opened:t?[...a]:[],closed:t?[]:[...a]},filter:[]}}const yt="__cascade__";function ge(t){return t==null?"":typeof t=="object"?JSON.stringify(t):String(t)}function ce(t){return{value:t.kind==="list"?(t.value??[]).join(`
306
+ */const Wn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Jn=f("zap",Wn),Xn=({appVersion:t=null})=>{const s="https://local-operator.com/download",[a,n]=o.useState(!1),[r,c]=o.useState(!1),[d,l]=o.useState(null),[u,m]=o.useState("info"),[h,x]=o.useState(null),[v,k]=o.useState(null),w=t?.trim()?t.trim():null,S=o.useRef(!1),R=o.useRef(!1),z=o.useRef(0),$=o.useRef(!1),L=o.useCallback((C,D)=>{R.current=!1,l(C),m(D),c(!0)},[]),q=o.useCallback(C=>{R.current=!0,l(C),m("success"),c(!0)},[]),H=o.useCallback(()=>{R.current&&(R.current=!1,c(!1),l(null))},[]),{clearDeferredUpdate:P}=jt();o.useEffect(()=>{const C=window.api.updater.onUpdateError(B=>{S.current&&B.includes("manually")&&(x({message:"The server is installed outside the app, so use the tool you installed it with - uv, pipx or pip.",command:""}),R.current=!1,l(null),m("warning"),c(!0))}),D=window.api.updater.onBackendUpdateDevMode(B=>{S.current&&L(B,"info")}),A=()=>{$.current=!0,H()},N=window.api.updater.onUpdateAvailable(A),V=window.api.updater.onUpdateNpxAvailable(A),W=window.api.updater.onBackendUpdateAvailable(A);return()=>{C(),D(),N(),V(),W()}},[H,L]),o.useEffect(()=>{let C=!1;const D=()=>{window.api.updater.getLastInstallAttempt().then(N=>{C||k(N)}).catch(()=>{})};D();const A=window.api.updater.onUpdateInstallFailed(()=>D());return()=>{C=!0,A()}},[]);const O=async()=>{const C=++z.current;H(),$.current=!1;try{n(!0),S.current=!0,P(He.UI),P(He.BACKEND);const D=await window.api.updater.checkForAllUpdates({manual:!0});if(C!==z.current)return;D?.affirmation&&!$.current?q(D.affirmation):H()}catch(D){if(C!==z.current)return;console.warn(`Update check failed; the app-level alert owns the report: ${wt(D)}`)}finally{C===z.current&&n(!1),setTimeout(()=>{S.current=!1},2e3)}},M=()=>{R.current=!1,c(!1),l(null)};return e.jsxs(e.Fragment,{children:[v&&e.jsxs("div",{className:"mb-3 rounded-sm bg-sunken p-3",children:[e.jsxs("p",{className:"text-body-sm text-ink",children:["The last update to version ",v.targetVersion," didn't finish",v.attempts>1?` (${v.attempts} attempts)`:"",".",w?` Version ${w} is running.`:null]}),e.jsxs("p",{className:"mt-1 text-meta text-ink-dim",children:["Detected"," ",v.detectedAt?new Date(v.detectedAt).toLocaleString():"at an unknown time",". ",v.detail]}),e.jsx(_,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>void window.api.openExternal(s),children:"Download a fresh copy"})]}),e.jsxs(_,{variant:"outline",onClick:()=>void O(),disabled:a,children:[a?e.jsx(se,{size:"sm"}):null,a?"Checking...":"Check for updates"]}),h&&e.jsxs(Be,{open:r,autoHideDuration:1e4,onClose:M,variant:"warning",children:[e.jsx("p",{className:"text-body-sm",children:h.message}),h.command&&e.jsx("code",{className:"mt-2 block rounded-sm bg-sunken p-2 text-mono-sm text-ink",children:h.command})]}),d&&u!=="danger"&&e.jsx(Be,{open:r,autoHideDuration:6e3,onClose:M,variant:u,children:d})]})},_e=["system-prompt"],er=()=>{const{shouldEnableQuery:t}=Nt();return ye({enabled:t({bypassInternetCheck:!0}),queryKey:_e,queryFn:async()=>{try{const a=await et($e.baseUrl).config.getSystemPrompt();if(a===null)return null;if(a.status>=400)throw new Error(a.message||"Failed to fetch system prompt");return a.result}catch(s){const a=s instanceof Error?s.message:"An unknown error occurred while fetching system prompt";throw tt(a),s}},refetchOnWindowFocus:!1,staleTime:5e3})},tr=()=>{const t=at(),s=et($e.baseUrl);return _t({mutationFn:async a=>{try{const n=await s.config.updateSystemPrompt(a);if(n.status>=400)throw new Error(n.message||"Failed to update system prompt");return n.result}catch(n){const r=n instanceof Error?n.message:"An unknown error occurred while updating system prompt";throw tt(r),n}},onSuccess:async a=>{await t.invalidateQueries({queryKey:_e,refetchType:"none"}),t.setQueryData(_e,n=>n&&{...n,...a}),await t.refetchQueries({queryKey:_e,type:"all"}),St("System prompt updated")},onError:a=>{console.error("Error updating system prompt:",a)}})},ar=({value:t,label:s,description:a,onChange:n,icon:r,isSaving:c=!1})=>{const[d,l]=o.useState(t),u=o.useId(),m=`${u}-label`,h=`${u}-description`,x=async v=>{if(!c){l(v);try{await n(v)}catch(k){l(!v),console.error("Error toggling setting:",k)}}};return e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("span",{id:m,className:"flex min-h-6 items-center gap-2 text-body text-ink",children:[r&&e.jsx(r,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim"}),s]}),a&&e.jsx("p",{id:h,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:a})]}),e.jsx("div",{className:"flex h-6 shrink-0 items-center",children:c?e.jsx(se,{size:"md",label:`Saving ${s}`}):e.jsx(pt,{checked:d,onCheckedChange:x,"aria-labelledby":m,"aria-describedby":a?h:void 0})})]})};var sr=Mt({chartName:"LineChart",GraphicalChild:st,axisComponents:[{axisType:"xAxis",AxisComp:Ct},{axisType:"yAxis",AxisComp:At}],formatAxisMap:Rt});function Ke(t,s){const a=Et(t,s?.in);if(!Ia(a))throw new RangeError("Invalid time value");const n=me(a.getDate(),2),r=me(a.getMonth()+1,2),c=a.getFullYear(),d=me(a.getHours(),2),l=me(a.getMinutes(),2),u=me(a.getSeconds(),2);let m="",h="";const x=a.getTimezoneOffset();if(x!==0){const v=Math.abs(x),k=me(Math.trunc(v/60),2),w=me(v%60,2);h=`${x<0?"+":"-"}${k}:${w}`}else h="Z";return`${c}-${r}-${n}T${d}:${l}:${u}${m}${h}`}function nr(t,s,a){return $a(t,-30,a)}const rr=["radient","creditBalance"],or=t=>{const{user:s,isAuthenticated:a}=Fe(),n=s?.account?.tenant_id,r=a&&!!n&&t?.enabled;return ye({queryKey:[rr,n],queryFn:async()=>{if(!n)throw new Error("Tenant ID not available");const c=await nt({operation:"credits",tenantId:n});if(!c||typeof c.balance!="number")throw new Error("Invalid credit balance response format");return c},enabled:r,staleTime:5*60*1e3,refetchOnWindowFocus:!0})};function ir(t,s){const[a,n]=o.useState(!1);return o.useEffect(()=>{if(!t){n(!1);return}const r=setTimeout(()=>n(!0),s);return()=>clearTimeout(r)},[t,s]),a}function gt(){const[t,s]=o.useState(null);return o.useEffect(()=>{const a=window.api?.backend;if(!a?.getStatus)return;let n=!0;const r=async()=>{try{const d=await a.getStatus();if(!n)return;const l=d?.pairing;s(l&&!l.available?l.cause??"unpaired":null)}catch{}};r();const c=a.onStatusChange?.(()=>void r());return()=>{n=!1,c?.()}},[]),t}const cr=["radient","usageRollup"],lr=(t,s)=>{const{user:a,isAuthenticated:n}=Fe(),r=a?.account?.tenant_id,c=n&&!!r&&s?.enabled;return ye({queryKey:[...cr,r,t],queryFn:async()=>{if(!r)throw new Error("Tenant ID not available");const d={};for(const[u,m]of Object.entries(t))m!=null&&(d[u]=String(m));const l=await nt({operation:"usage",tenantId:r,query:d});if(!l)throw new Error("Invalid usage rollup response format");return l},enabled:c,staleTime:5*60*1e3,refetchOnWindowFocus:!0})},dr=({appVersion:t})=>e.jsx(Xn,{appVersion:t}),ur=t=>{if(!t)return null;try{return new URL(t).host}catch{return null}},mr=()=>{const[t,s]=o.useState(null),[a,n]=o.useState({value:"Loading...",detail:null,degraded:!1}),[r,c]=o.useState({platform:"Loading...",arch:"...",nodeVersion:"Loading...",electronVersion:"Loading...",chromeVersion:"Loading..."});o.useEffect(()=>{let l=!0;const u=k=>{if(!l)return;const w=ur(k.url);if(k.state==="connecting"){n({value:"Loading...",detail:null,degraded:!1});return}if(k.state==="detached"){n({value:"Not connected",detail:k.detail||null,degraded:!1});return}if(k.state==="wedged"){n({value:"Not attached",detail:k.detail||null,degraded:!1});return}const S=k.version||"Version unknown";n({value:w?`${S} · ${w}`:S,detail:k.detail||null,degraded:k.state==="degraded"})};let m=!1;const h=window.api?.backend?.onStatusChange(k=>{m=!0,u(k)}),x=async()=>{try{const[k,w]=await Promise.all([window.api.systemInfo.getAppVersion(),window.api.systemInfo.getPlatformInfo()]);l&&(s(k),c(w))}catch(k){console.error("Error fetching app information:",k)}},v=async()=>{try{const k=window.api?.backend;if(k){const R=await k.getStatus();m||u(R);return}const w=await Ve.healthCheck($e.baseUrl),S=Ve.getServerVersion(w);l&&n({value:S,detail:null,degraded:!1})}catch(k){console.error("Error fetching server version:",k),l&&n({value:"Unavailable",detail:null,degraded:!1})}};return x(),v(),()=>{l=!1,h?.()}},[]);const d=(l,u,m,h={})=>e.jsx(Q,{label:e.jsx(Te,{content:m,children:e.jsxs("span",{className:"inline-flex cursor-help items-center gap-1.5",children:[e.jsx(Le,{size:12,className:"shrink-0"}),l]})}),valueClassName:h.valueClassName,value:e.jsxs(e.Fragment,{children:[h.valueTooltip?e.jsx(Te,{content:h.valueTooltip,children:e.jsx("span",{"data-backend-version":h.valueHoverTarget?"":void 0,className:"cursor-help",children:u})}):u,h.statusNote?e.jsx("span",{className:"mt-0.5 block text-meta text-ink-dim",children:h.statusNote}):null]})});return e.jsx(Z,{title:"Application updates and info",icon:Tt,description:"Check for updates and view information about your Local Operator installation.",dataTourTag:"settings-app-updates-section",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs(De,{children:[d("Application version",t??"Loading...","The version of the Local Operator user interface application."),d("Server version",a.value,"The version of the Local Operator API server backend, and the address of the daemon it was read from.",{valueTooltip:a.detail,valueHoverTarget:!0,statusNote:a.degraded?"Not answering":void 0,valueClassName:a.degraded?"text-ink-muted":void 0}),d("Platform",`${r.platform} (${r.arch})`,"The operating system and architecture your application is running on."),d("Node.js version",r.nodeVersion,"The JavaScript runtime environment version."),d("Electron version",r.electronVersion,"The framework version enabling this desktop application.")]}),e.jsx(dr,{appVersion:t})]})})},hr={hosting:"core",model_name:"core",model_effort:"core","providers.openai.use_max_context_window":"advanced","providers.openai.api":"advanced","providers.anthropic.cache_ttl_1h_min_context_tokens":"advanced","providers.openrouter.provider_affinity":"advanced","providers.openrouter.sort":"advanced","providers.openrouter.order":"advanced","providers.openrouter.only":"advanced","providers.openrouter.ignore":"advanced","providers.openrouter.allow_fallbacks":"advanced","providers.openrouter.require_parameters":"advanced","providers.openrouter.data_collection":"advanced","providers.openrouter.zdr":"advanced","providers.openrouter.enforce_distillable_text":"advanced","providers.openrouter.quantizations":"advanced","providers.openrouter.max_price":"advanced","providers.openrouter.preferred_min_throughput":"advanced","providers.openrouter.preferred_max_latency":"advanced","retry.enabled":"core","retry.maxRetries":"advanced","retry.baseDelayMs":"advanced","retry.connectivityMaxRetries":"advanced","retry.connectivityBackoffCapMs":"advanced","retry.modelFallback":"advanced","retry.usageAwareFallback":"advanced","retry.usageAwareAccountPick":"advanced","retry.usageReservePercent":"advanced","retry.fallbackChains":"advanced","tui.theme":"advanced","display.shimmer":"advanced","display.comfortable_rows":"advanced","display.nerd_icons":"advanced","display.heading_markers":"advanced","display.terminal_title":"advanced","display.images":"advanced","display.notifications":"core","display.notification_session_name":"advanced","display.time_format":"advanced","display.dock":"advanced","tui.sidebar_visible":"advanced","tui.sidebar_position":"advanced","keymap.new_session":"advanced","keymap.resume":"advanced",tool_approval_mode:"core",auto_save_conversation:"core","session.cleanup.enabled":"core","session.cleanup.max_sessions":"advanced","session.cleanup.max_inactive_days":"advanced","session.cleanup.max_total_bytes":"advanced","session.cleanup.remove_empty":"advanced","runtime.background_on_resume":"advanced","runtime.unattended_gate_timeout":"advanced","subagents.max_running":"advanced","subagents.model_choice":"advanced","subagents.models.lo":"advanced","subagents.models.med":"advanced","subagents.models.hi":"advanced","fork.mode":"core","fork.cmux_placement":"advanced","compaction.enabled":"core","compaction.strategy":"advanced","compaction.threshold_percent":"advanced","compaction.threshold_tokens":"advanced","compaction.keep_recent_tokens":"advanced","compaction.auto_continue":"advanced","compaction.mid_turn_enabled":"advanced","compaction.wire_bytes_budget":"advanced","compaction.wire_bytes_trigger":"advanced","web_search.enabled":"core","web_fetch.enabled":"core","web_search.strategy":"advanced","web_search.providers":"advanced","web_search.timeout_seconds":"advanced","web_search.searxng_endpoint":"advanced","web_search.deepseek_evidence":"advanced","web_search.read_enabled":"advanced","web_fetch.timeout_seconds":"advanced","web_fetch.max_bytes":"advanced","web_fetch.max_redirects":"advanced","web_fetch.cache_ttl_seconds":"advanced","web_fetch.allow_private":"advanced","web_fetch.render_backend":"advanced","web_fetch.enrich":"advanced","web_fetch.max_attempts":"advanced","web_fetch.blocked_retry":"advanced","bash.shell":"advanced","providers.lmstudio.base_url":"advanced","providers.lmstudio.models":"advanced","providers.ollama.base_url":"advanced","providers.ollama.models":"advanced","providers.vllm.base_url":"advanced","providers.vllm.models":"advanced","providers.llamacpp.base_url":"advanced","providers.llamacpp.models":"advanced","providers.openai-compatible.base_url":"advanced","providers.openai-compatible.models":"advanced",conversation_length:"advanced",detail_length:"advanced",max_learnings_history:"advanced","desktop.launch_command":"advanced"},pr={model:"core",approvals:"core",web_tools:"core",desktop:"advanced"};function he(t){return t.tier==="core"||t.tier==="advanced"?t.tier:hr[t.key]??pr[t.section]??"advanced"}function fr(t){return t.length===0?!1:t.filter(a=>he(a)==="core").length*2>=t.length}function xr(t,s,a){return s?{layout:null,filter:t?[]:[...a]}:{layout:{opened:t?[...a]:[],closed:t?[]:[...a]},filter:[]}}const yt="__cascade__";function ge(t){return t==null?"":typeof t=="object"?JSON.stringify(t):String(t)}function ce(t){return{value:t.kind==="list"?(t.value??[]).join(`
307
307
  `):t.kind==="cascade"?yt:ge(t.value),cascadeBase:null}}function Se(t,s){return s.cascadeBase!==null?!0:t.kind==="cascade"?s.value!==yt:t.kind==="list"?s.value!==t.value?.join(`
308
- `):s.value!==ge(t.value)}function xr(t,s){let a=null,n;switch(t.kind){case"bool":a=s.value==="true";break;case"int":{const r=Number.parseInt(s.value,10);if(Number.isNaN(r))return{ok:!1,error:"Enter a whole number."};a=r;break}case"float":{const r=Number.parseFloat(s.value);if(!Number.isFinite(r))return{ok:!1,error:"Enter a finite number."};a=r;break}case"enum":{const r=t.choices.find(c=>ge(c.value)===s.value);a=r?r.value:s.value;break}case"list":a=s.value.split(`
309
- `).map(r=>r.trim()).filter(Boolean);break;case"cascade":{if(!s.cascadeBase)return{ok:!1,error:"Nothing has been edited yet."};const r={};for(const[c,d]of Object.entries(s.cascadeBase))r[c]=d;a=r,n=t.value??void 0;break}default:t.empty_unsets&&s.value.trim()===""?a="":a=s.value}return{ok:!0,request:{op:"settings.edit",key:t.key,value:a,...n?{base:n}:{}}}}const gr={hosting:"provider",model_name:"model","subagents.models.lo":"provider-model","subagents.models.med":"provider-model","subagents.models.hi":"provider-model"};function yr(t){return gr[t]??null}const vr={provider:"Search providers",model:"Search models","provider-model":"Search models"},kr="Sign-in state unknown",br="Current value",jr="Signed in",wr="Needs sign-in",Pe=t=>t&&t.charAt(0).toUpperCase()+t.slice(1),Ye=["Ready to use","Needs a running server","Needs sign-in"];function Nr(t){const s=new Map(Ye.map(a=>[a,[]]));for(const a of t){const n=Lt(a),r=s.get(n.group);r&&r.push({id:a.id,name:a.name,description:n.label,group:n.group})}return Ye.flatMap(a=>s.get(a)??[])}function Qe(t,s,a){if(t.connected!==s.connected)return t.connected?-1:1;const n=a!==""&&t.provider===a,r=a!==""&&s.provider===a;return n!==r?n?-1:1:0}function _r(t,s){const a=new Map;for(const n of t){const r=s(n),c=a.get(r);c?c.push(n):a.set(r,[n])}return a}function Sr(t,s){const a=[...t?.models??[]];if(s.kind!=="model")return a;const n=s.hosting.trim();if(!n)return a;const r=a.filter(c=>c.provider===n);return r.length>0?r:a}function Mr(t,s){const a=t?.credentials_known!==!1,n=Sr(t,s),r=u=>a?u.connected?jr:wr:kr,c=u=>s.kind==="provider-model"?u.provider:r(u),d=s.kind==="provider-model"?n:[...n].sort((u,m)=>Qe(u,m,s.hosting)),l=[];for(const[,u]of _r(d,c)){const m=s.kind==="provider-model"?[...u].sort((h,x)=>Qe(h,x,s.hosting)):u;for(const h of m)l.push({id:s.kind==="model"?h.model_id:h.selector,name:h.selector,description:s.kind==="provider-model"?a?h.connected?"Signed in":"Needs sign-in":void 0:`${s.providerNames?.[h.provider]??Pe(h.provider)}${h.aggregated?", aggregated":""}${a&&!h.connected?", no credential":""}`,group:c(h)})}return l.push(...Ar(n,t,s)),l}function Cr(t,s){if(t.kind!=="model")return null;const a=t.hosting.trim();if(!a)return null;const n=s?.models??[];if(n.length===0)return null;const r=t.hostingLabel??Pe(a);return n.some(d=>d.provider===a)?`Models for ${r}`:`No models listed for ${r}. Showing all models.`}function Ar(t,s,a){const n=a.current.trim();if(!n)return[];const r=d=>a.kind==="model"?d.model_id:d.selector;if(t.some(d=>r(d)===n))return[];const c=(s?.models??[]).find(d=>r(d)===n);return[{id:n,name:c?.selector??n,description:c?`${a.providerNames?.[c.provider]??Pe(c.provider)}${s?.credentials_known===!1?"":c.connected?", signed in":", no credential"}`:a.kind==="model"?"Custom model":"Custom value",group:br}]}function Rr(t,s,a){const n=s.trim();if(!n)return null;const r=t.filter(c=>c.id===n);if(a){const c=r.find(d=>d.name===a);if(c)return c}return r[0]??{id:n,name:n}}const We=t=>`setting-help-${t}`,Er=({setting:t,kind:s,value:a,disabled:n=!1,onValueChange:r,effectiveHosting:c,helpId:d})=>{const l=Oe(),u=Me(l.data,"auth"),m=zt(u),h=s!=="provider"&&Me(l.data,"catalogues"),[x,v]=o.useState(!1),[k,w]=o.useState(void 0),S=ye({queryKey:["desktop","models",!1],queryFn:()=>xe({op:"models.catalogue",live:!1}),enabled:h&&x,staleTime:6e4}),R=o.useMemo(()=>Object.fromEntries((m.data??[]).map(M=>[M.id,M.name])),[m.data]),z=o.useMemo(()=>s==="provider"?m.data?Nr(m.data):[]:Mr(S.data,{kind:s,hosting:s==="model"?c:"",current:a,providerNames:R}),[s,m.data,S.data,c,a,R]),$=It(S.data,S,M=>$t("Could not list models.",M)),L=$.loadError?e.jsx("span",{className:"text-danger",children:$.loadError}):$.notice,q=$.noticeDetail?{title:$.noticeDetail}:{},H=Rr(z,a,k),P=o.useMemo(()=>s==="provider"?null:Cr({kind:s,hosting:s==="model"?c:"",hostingLabel:m.data?.find(M=>M.id===c)?.name},S.data),[s,c,m.data,S.data]),O=o.useMemo(()=>s==="provider"?m.isError?"Could not list providers":u?"No providers":"Provider list unavailable":$.loadError?"Could not list models":h?"Nothing matches that model":"Model list unavailable",[s,m.isError,u,$.loadError,h]);return e.jsx(ja,{showLabel:!1,ariaLabel:t.label,ariaDescribedBy:d,label:t.label,placeholder:vr[s],options:z,selected:H,disabled:n,busy:s==="provider"?m.isFetching:S.isFetching,busyLabel:s==="provider"?"Loading providers":"Loading models",onOpenChange:M=>{M&&v(!0)},onSelect:M=>{w(M.name),r(M.id)},onCustomSubmit:M=>r(M),customRowLabel:M=>`Use "${M}"`,listNotice:P,onClear:()=>r(""),emptyText:O,helperText:L?e.jsx("span",{...q,children:L}):void 0})},Je={bool:"w-9",int:"w-28",float:"w-28",enum:"w-64",text:"w-96",hotkey:"w-56",list:"w-full min-w-0",cascade:"w-full min-w-0",readonly:"w-40"};function Tr(t){return Je[t]??Je.text}const Lr={" ":"space",Spacebar:"space",Escape:"escape",Esc:"escape",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown"},zr=new Set(["Control","Shift","Alt","Meta","AltGraph"]),Ir=new Set(["Escape","Esc","Enter"]);function $r(t){if(zr.has(t.key)||t.nativeEvent.isComposing)return"";const s=[];t.ctrlKey&&s.push("ctrl"),t.altKey&&s.push("alt"),t.shiftKey&&s.push("shift"),t.metaKey&&s.push("meta");const a=Lr[t.key]??t.key.toLowerCase();return a?[...s,a].join("+"):""}const Fr=({value:t,label:s,disabled:a,onChange:n})=>e.jsxs("span",{className:"flex w-full flex-col gap-0.5",children:[e.jsx(le,{readOnly:!0,value:t,disabled:a,"aria-label":`${s}: press the key you want`,className:"font-mono text-body-sm",onKeyDown:r=>{if(Ir.has(r.key)){r.currentTarget.blur();return}const c=$r(r);c&&(r.preventDefault(),n(c))}}),e.jsx("span",{className:"text-meta text-ink-dim",children:"Press the keys you want; Esc cancels."})]}),Or=({setting:t,value:s,chains:a,disabled:n=!1,onValueChange:r,onChainsChange:c,effectiveHosting:d="",helpId:l})=>{const u=yr(t.key);if(u)return e.jsx(Er,{setting:t,kind:u,value:s,disabled:n,onValueChange:r,effectiveHosting:d,helpId:l});switch(t.kind){case"bool":return e.jsx(pt,{checked:s==="true",disabled:n,onCheckedChange:m=>r(m?"true":"false"),"aria-label":t.label});case"enum":return e.jsxs(wa,{value:s,disabled:n,onValueChange:r,children:[e.jsx(Na,{"aria-label":t.label,className:"w-full",children:e.jsx(_a,{})}),e.jsx(Sa,{children:t.choices.map(m=>e.jsx(Ma,{value:ge(m.value),title:m.description||void 0,children:m.label},ge(m.value)))})]});case"int":case"float":return e.jsx(le,{type:"number",value:s,disabled:n,min:t.minimum??void 0,max:t.maximum??void 0,step:t.kind==="int"?1:"any",onChange:m=>r(m.target.value),"aria-label":t.label});case"hotkey":return e.jsx(Fr,{value:s,label:t.label,disabled:n,onChange:r});case"list":return e.jsx(ze,{value:s,disabled:n,rows:Math.min(6,t.members.length+2),onChange:m=>r(m.target.value),"aria-label":t.label,placeholder:t.placeholder,className:"font-mono text-body-sm"});case"cascade":{const m=a??t.value??{};return e.jsxs("div",{className:"flex flex-col gap-3",children:[Object.entries(m).map(([h,x])=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"font-mono text-meta text-ink-dim",children:h}),e.jsx(ze,{value:x.join(`
308
+ `):s.value!==ge(t.value)}function gr(t,s){let a=null,n;switch(t.kind){case"bool":a=s.value==="true";break;case"int":{const r=Number.parseInt(s.value,10);if(Number.isNaN(r))return{ok:!1,error:"Enter a whole number."};a=r;break}case"float":{const r=Number.parseFloat(s.value);if(!Number.isFinite(r))return{ok:!1,error:"Enter a finite number."};a=r;break}case"enum":{const r=t.choices.find(c=>ge(c.value)===s.value);a=r?r.value:s.value;break}case"list":a=s.value.split(`
309
+ `).map(r=>r.trim()).filter(Boolean);break;case"cascade":{if(!s.cascadeBase)return{ok:!1,error:"Nothing has been edited yet."};const r={};for(const[c,d]of Object.entries(s.cascadeBase))r[c]=d;a=r,n=t.value??void 0;break}default:t.empty_unsets&&s.value.trim()===""?a="":a=s.value}return{ok:!0,request:{op:"settings.edit",key:t.key,value:a,...n?{base:n}:{}}}}const yr={hosting:"provider",model_name:"model","subagents.models.lo":"provider-model","subagents.models.med":"provider-model","subagents.models.hi":"provider-model"};function vr(t){return yr[t]??null}const kr={provider:"Search providers",model:"Search models","provider-model":"Search models"},br="Sign-in state unknown",jr="Current value",wr="Signed in",Nr="Needs sign-in",Pe=t=>t&&t.charAt(0).toUpperCase()+t.slice(1),Ye=["Ready to use","Needs a running server","Needs sign-in"];function _r(t){const s=new Map(Ye.map(a=>[a,[]]));for(const a of t){const n=Lt(a),r=s.get(n.group);r&&r.push({id:a.id,name:a.name,description:n.label,group:n.group})}return Ye.flatMap(a=>s.get(a)??[])}function Qe(t,s,a){if(t.connected!==s.connected)return t.connected?-1:1;const n=a!==""&&t.provider===a,r=a!==""&&s.provider===a;return n!==r?n?-1:1:0}function Sr(t,s){const a=new Map;for(const n of t){const r=s(n),c=a.get(r);c?c.push(n):a.set(r,[n])}return a}function Mr(t,s){const a=[...t?.models??[]];if(s.kind!=="model")return a;const n=s.hosting.trim();if(!n)return a;const r=a.filter(c=>c.provider===n);return r.length>0?r:a}function Cr(t,s){const a=t?.credentials_known!==!1,n=Mr(t,s),r=u=>a?u.connected?wr:Nr:br,c=u=>s.kind==="provider-model"?u.provider:r(u),d=s.kind==="provider-model"?n:[...n].sort((u,m)=>Qe(u,m,s.hosting)),l=[];for(const[,u]of Sr(d,c)){const m=s.kind==="provider-model"?[...u].sort((h,x)=>Qe(h,x,s.hosting)):u;for(const h of m)l.push({id:s.kind==="model"?h.model_id:h.selector,name:h.selector,description:s.kind==="provider-model"?a?h.connected?"Signed in":"Needs sign-in":void 0:`${s.providerNames?.[h.provider]??Pe(h.provider)}${h.aggregated?", aggregated":""}${a&&!h.connected?", no credential":""}`,group:c(h)})}return l.push(...Rr(n,t,s)),l}function Ar(t,s){if(t.kind!=="model")return null;const a=t.hosting.trim();if(!a)return null;const n=s?.models??[];if(n.length===0)return null;const r=t.hostingLabel??Pe(a);return n.some(d=>d.provider===a)?`Models for ${r}`:`No models listed for ${r}. Showing all models.`}function Rr(t,s,a){const n=a.current.trim();if(!n)return[];const r=d=>a.kind==="model"?d.model_id:d.selector;if(t.some(d=>r(d)===n))return[];const c=(s?.models??[]).find(d=>r(d)===n);return[{id:n,name:c?.selector??n,description:c?`${a.providerNames?.[c.provider]??Pe(c.provider)}${s?.credentials_known===!1?"":c.connected?", signed in":", no credential"}`:a.kind==="model"?"Custom model":"Custom value",group:jr}]}function Er(t,s,a){const n=s.trim();if(!n)return null;const r=t.filter(c=>c.id===n);if(a){const c=r.find(d=>d.name===a);if(c)return c}return r[0]??{id:n,name:n}}const We=t=>`setting-help-${t}`,Tr=({setting:t,kind:s,value:a,disabled:n=!1,onValueChange:r,effectiveHosting:c,helpId:d})=>{const l=Oe(),u=Me(l.data,"auth"),m=zt(u),h=s!=="provider"&&Me(l.data,"catalogues"),[x,v]=o.useState(!1),[k,w]=o.useState(void 0),S=ye({queryKey:[...It.catalogue,!1],queryFn:()=>xe({op:"models.catalogue",live:!1}),enabled:h&&x,staleTime:6e4}),R=o.useMemo(()=>Object.fromEntries((m.data??[]).map(M=>[M.id,M.name])),[m.data]),z=o.useMemo(()=>s==="provider"?m.data?_r(m.data):[]:Cr(S.data,{kind:s,hosting:s==="model"?c:"",current:a,providerNames:R}),[s,m.data,S.data,c,a,R]),$=$t(S.data,S,M=>Ft("Could not list models.",M),!1),L=$.loadError?e.jsx("span",{className:"text-danger",children:$.loadError}):$.notice,q=$.noticeDetail?{title:$.noticeDetail}:{},H=Er(z,a,k),P=o.useMemo(()=>s==="provider"?null:Ar({kind:s,hosting:s==="model"?c:"",hostingLabel:m.data?.find(M=>M.id===c)?.name},S.data),[s,c,m.data,S.data]),O=o.useMemo(()=>s==="provider"?m.isError?"Could not list providers":u?"No providers":"Provider list unavailable":$.loadError?"Could not list models":h?"Nothing matches that model":"Model list unavailable",[s,m.isError,u,$.loadError,h]);return e.jsx(wa,{showLabel:!1,ariaLabel:t.label,ariaDescribedBy:d,label:t.label,placeholder:kr[s],options:z,selected:H,disabled:n,busy:s==="provider"?m.isFetching:S.isFetching,busyLabel:s==="provider"?"Loading providers":"Loading models",onOpenChange:M=>{M&&v(!0)},onSelect:M=>{w(M.name),r(M.id)},onCustomSubmit:M=>r(M),customRowLabel:M=>`Use "${M}"`,listNotice:P,onClear:()=>r(""),emptyText:O,helperText:L?e.jsx("span",{...q,children:L}):void 0})},Je={bool:"w-9",int:"w-28",float:"w-28",enum:"w-64",text:"w-96",hotkey:"w-56",list:"w-full min-w-0",cascade:"w-full min-w-0",readonly:"w-40"};function Lr(t){return Je[t]??Je.text}const zr={" ":"space",Spacebar:"space",Escape:"escape",Esc:"escape",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown"},Ir=new Set(["Control","Shift","Alt","Meta","AltGraph"]),$r=new Set(["Escape","Esc","Enter"]);function Fr(t){if(Ir.has(t.key)||t.nativeEvent.isComposing)return"";const s=[];t.ctrlKey&&s.push("ctrl"),t.altKey&&s.push("alt"),t.shiftKey&&s.push("shift"),t.metaKey&&s.push("meta");const a=zr[t.key]??t.key.toLowerCase();return a?[...s,a].join("+"):""}const Or=({value:t,label:s,disabled:a,onChange:n})=>e.jsxs("span",{className:"flex w-full flex-col gap-0.5",children:[e.jsx(le,{readOnly:!0,value:t,disabled:a,"aria-label":`${s}: press the key you want`,className:"font-mono text-body-sm",onKeyDown:r=>{if($r.has(r.key)){r.currentTarget.blur();return}const c=Fr(r);c&&(r.preventDefault(),n(c))}}),e.jsx("span",{className:"text-meta text-ink-dim",children:"Press the keys you want; Esc cancels."})]}),Dr=({setting:t,value:s,chains:a,disabled:n=!1,onValueChange:r,onChainsChange:c,effectiveHosting:d="",helpId:l})=>{const u=vr(t.key);if(u)return e.jsx(Tr,{setting:t,kind:u,value:s,disabled:n,onValueChange:r,effectiveHosting:d,helpId:l});switch(t.kind){case"bool":return e.jsx(pt,{checked:s==="true",disabled:n,onCheckedChange:m=>r(m?"true":"false"),"aria-label":t.label});case"enum":return e.jsxs(Na,{value:s,disabled:n,onValueChange:r,children:[e.jsx(_a,{"aria-label":t.label,className:"w-full",children:e.jsx(Sa,{})}),e.jsx(Ma,{children:t.choices.map(m=>e.jsx(Ca,{value:ge(m.value),title:m.description||void 0,children:m.label},ge(m.value)))})]});case"int":case"float":return e.jsx(le,{type:"number",value:s,disabled:n,min:t.minimum??void 0,max:t.maximum??void 0,step:t.kind==="int"?1:"any",onChange:m=>r(m.target.value),"aria-label":t.label});case"hotkey":return e.jsx(Or,{value:s,label:t.label,disabled:n,onChange:r});case"list":return e.jsx(ze,{value:s,disabled:n,rows:Math.min(6,t.members.length+2),onChange:m=>r(m.target.value),"aria-label":t.label,placeholder:t.placeholder,className:"font-mono text-body-sm"});case"cascade":{const m=a??t.value??{};return e.jsxs("div",{className:"flex flex-col gap-3",children:[Object.entries(m).map(([h,x])=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"font-mono text-meta text-ink-dim",children:h}),e.jsx(ze,{value:x.join(`
310
310
  `),disabled:n,rows:Math.max(2,x.length+1),onChange:v=>c?.({...m,[h]:v.target.value.split(`
311
- `).map(k=>k.trim()).filter(Boolean)}),"aria-label":`${t.label}: ${h}`,className:"font-mono text-body-sm"})]},h)),e.jsx("p",{className:"text-meta text-ink-dim",children:"One hop per line, as provider/model (effort). An empty chain moves to the next provider."})]})}default:return e.jsx(le,{value:s,disabled:n,onChange:m=>r(m.target.value),"aria-label":t.label,placeholder:t.placeholder})}},vt=({className:t})=>e.jsx("span",{role:"img","aria-label":"Changed from the default",title:"Changed from the default",className:ee("size-1.5 shrink-0 rounded-full bg-accent",t)}),Dr=({title:t,rowCount:s,advancedCount:a,scope:n,modified:r,onOpenChange:c,defaultOpen:d=!1})=>e.jsx("div",{"data-section-header":t,className:"flex w-full flex-col",children:e.jsx(rt,{defaultOpen:d,onOpenChange:c,triggerClassName:"text-ink hover:bg-row-hover hover:text-ink",chevronClassName:"text-ink-dim",rowClassName:"min-h-10 py-0",className:"w-full",summary:e.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate text-heading text-ink",children:t}),s>0&&e.jsx("span",{className:"shrink-0 text-meta text-ink-dim",children:s===1?"1 setting":`${s} settings`}),n&&e.jsx("span",{className:"shrink-0 text-meta text-ink-dim",children:n}),a>0&&e.jsxs("span",{className:"shrink-0 text-meta text-ink-dim",children:[a," advanced"]})]}),r&&e.jsx(vt,{className:"ml-auto"})]})})}),Pr="size-3.5 shrink-0",Ur=({setting:t,draft:s,tier:a,gate:n,saving:r,error:c,onDraftChange:d,onSave:l,onReset:u,effectiveHosting:m=""})=>{const h=!!(n&&!n.on),x=Se(t,s),v=r||h,k=t.kind==="list"||t.kind==="cascade",w=e.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-body-sm text-ink",children:t.label}),t.kind==="readonly"&&e.jsx("span",{className:"text-meta text-ink-dim",children:"Read-only"}),t.warning&&e.jsx("span",{className:"text-meta text-danger",children:t.warning})]}),S=h&&n&&e.jsxs("p",{className:"text-meta text-ink-dim",children:["Needs ",n.label," on. Nothing here is saved while it is off."]});return e.jsx("div",{"data-setting-key":t.key,"data-tier":a,className:"border-b border-hairline",children:e.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-1 px-1 py-2.5",children:[e.jsxs("div",{className:ee("flex min-w-44 flex-col gap-0.5",k?"shrink-0 basis-2/5":"flex-1"),children:[a==="advanced"&&t.help?e.jsx(rt,{summary:w,triggerClassName:"min-h-5 py-0 px-0 text-body-sm text-ink hover:text-ink",chevronClassName:"text-ink-dim",summaryAlign:"firstLine",rowClassName:"min-h-5 py-0",className:"w-full",children:e.jsx("span",{className:"text-meta text-ink-dim",children:t.help})}):e.jsxs("span",{className:"flex min-h-5 items-center gap-1.5",children:[e.jsx("span",{"aria-hidden":!0,className:Pr}),w]}),a==="core"&&t.help&&e.jsx("p",{id:We(t.key),className:"ml-5 text-meta text-ink-dim",children:t.help}),S]}),e.jsxs("div",{className:ee("flex shrink-0 items-center gap-2 self-center",k&&"min-w-0 flex-1 items-start"),children:[(!t.is_default||x)&&e.jsx(vt,{}),!t.is_default&&t.kind!=="readonly"&&e.jsxs(_,{variant:"ghost",size:"sm",disabled:v,onClick:u,"aria-label":`Use default for ${t.label}`,children:[e.jsx(Bn,{"aria-hidden":"true"}),"Use default"]}),x&&e.jsx(_,{variant:"primary",size:"sm",disabled:v,onClick:l,children:r?"Saving":"Save"}),e.jsx("div",{className:Tr(t.kind),"data-setting-control":"",children:t.redacted?e.jsx("span",{className:"text-meta text-ink-dim",children:"Set in the credential manager: this value carries inline credentials or query parameters."}):t.kind==="readonly"?e.jsx("span",{className:"text-body-sm text-ink-muted",children:ge(t.value)||"Not set"}):e.jsx(Or,{setting:t,value:s.value,chains:s.cascadeBase??void 0,disabled:v,effectiveHosting:m,helpId:a==="core"&&t.help?We(t.key):void 0,onValueChange:R=>d({...s,value:R}),onChainsChange:R=>d({...s,cascadeBase:R})})})]}),c&&e.jsx(K,{variant:"danger",role:"alert",className:"w-full",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:c}),e.jsxs(_,{variant:"secondary",size:"sm",disabled:r,onClick:l,children:[e.jsx(Ft,{"aria-hidden":"true"}),"Retry"]})]})})]})})},qr="w-full max-w-[400px]",Br=({query:t,onQueryChange:s,matchCount:a,matchSections:n,coreCount:r,advancedCount:c,modifiedCount:d,modifiedOnly:l,onModifiedOnlyChange:u,showAdvanced:m,onShowAdvancedChange:h,onExpandAll:x,onCollapseAll:v,unsavedCount:k,savingAll:w,onSaveAll:S,onDiscardAll:R})=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:ee("relative",qr),children:[e.jsx(ot,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-ink-dim","aria-hidden":"true"}),e.jsx(le,{value:t,onChange:z=>s(z.target.value),onKeyDown:z=>{z.key==="Escape"&&t&&s("")},placeholder:"Search settings by name, description or key","aria-label":"Search settings",className:"pl-9"}),t&&e.jsx(_,{variant:"ghost",size:"icon-sm",className:"absolute top-1/2 right-1 -translate-y-1/2",onClick:()=>s(""),"aria-label":"Clear search",children:e.jsx(Ca,{"aria-hidden":"true"})})]}),e.jsxs("fieldset",{className:"m-0 border-0 p-0",children:[e.jsx("legend",{className:"sr-only",children:"Settings filters"}),e.jsxs("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:[e.jsxs(_,{variant:"ghost",size:"sm","aria-pressed":l,onClick:()=>u(!l),className:ee(l&&"bg-surface text-ink hover:bg-surface"),children:["Modified",e.jsx(Ce,{variant:"neutral",children:d})]}),e.jsx(_,{variant:"ghost",size:"sm","aria-pressed":m,onClick:()=>h(!m),className:ee(m&&"bg-surface text-ink hover:bg-surface"),children:"Show advanced"})]})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[k>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-meta text-ink-dim",children:k===1?"1 unsaved change":`${k} unsaved changes`}),e.jsx(_,{variant:"primary",size:"sm",disabled:w,onClick:S,children:w?"Saving":"Save all"}),e.jsx(_,{variant:"ghost",size:"sm",disabled:w,onClick:R,children:"Discard all"})]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:x,children:"Expand all"}),e.jsx(_,{variant:"ghost",size:"sm",onClick:v,children:"Collapse all"})]})]}),e.jsx("p",{className:"text-meta text-ink-dim","aria-live":"polite",children:a!==null?`${a} ${a===1?"result":"results"} in ${n} ${n===1?"section":"sections"}`:l?`${d} modified ${d===1?"setting":"settings"}`:m?`${c} advanced settings shown — Expand all to see them`:`${r} core settings, ${c} advanced`})]}),Hr={all:["desktop","settings"]},Vr={live:"Takes effect immediately","new launch":"Takes effect the next time the app starts","new sessions":"Takes effect for new conversations"},Gr=40,fe=t=>t.toLowerCase().replace(/[-_.]/g," "),Zr=({focusKey:t,initialFilter:s=""})=>{const a=Oe(),n=gt(),r=Me(a.data,"settings"),[c,d]=o.useState(s),[l,u]=o.useState(!1),[m,h]=o.useState(!1),[x,v]=o.useState({}),[k,w]=o.useState({}),[S,R]=o.useState({}),[z,$]=o.useState(!1),[L,q]=o.useState(new Set),[H,P]=o.useState(new Set),[O,M]=o.useState(new Set),C=o.useRef(null),D=o.useRef(null),A=ye({queryKey:Hr.all,queryFn:()=>xe({op:"settings.list"}),enabled:r,staleTime:1e4}),N=A.data;o.useEffect(()=>{N&&v(i=>{let p=!1;const y={...i};for(const b of N.settings){const E=i[b.key];if(!E){y[b.key]=ce(b),p=!0;continue}if(Se(b,E))continue;const T=ce(b);(T.value!==E.value||T.cascadeBase!==E.cascadeBase)&&(y[b.key]=T,p=!0)}return p?y:i})},[N]);const V=o.useCallback(i=>!i.is_default||Se(i,x[i.key]??ce(i)),[x]),W=o.useMemo(()=>{const i=(N?.settings??[]).find(p=>p.key==="hosting");return i?(x.hosting??ce(i)).value:""},[N,x]),B=o.useMemo(()=>{if(!N)return[];const i=fe(c.trim()),p=i.length>0||m;return N.settings.filter(y=>!p&&he(y)==="advanced"&&!l||m&&!V(y)?!1:i?fe([y.label,y.help,y.key,y.section,y.warning??""].join(" ")).includes(i):!0)},[N,c,l,m,V]),g=c.trim().length>0||m,F=o.useMemo(()=>N?.sections??[],[N]),ne=o.useCallback(i=>(N?.settings??[]).filter(p=>p.section===i),[N]),Y=i=>B.filter(p=>p.section===i),de=i=>L.has(i)?!0:H.has(i)?!1:pr(ne(i)),pe=(i,p)=>{q(y=>{const b=new Set(y);return p?b.add(i):b.delete(i),b}),P(y=>{const b=new Set(y);return p?b.delete(i):b.add(i),b})},re=(i,p)=>{M(y=>{const b=new Set(y);return p?b.delete(i):b.add(i),b})},te=i=>{const p=F.filter(b=>i||Y(b.name).length>0).map(b=>b.name),y=fr(i,g,p);y.layout&&(q(new Set(y.layout.opened)),P(new Set(y.layout.closed))),M(new Set(y.filter))};o.useEffect(()=>{c.trim()||M(new Set)},[c]);const be=o.useCallback(i=>{const p=i.gated_by;if(!p||!N)return null;const y=N.settings.find(b=>b.key===p);return{key:p,label:y?.label??p,on:y?.value===!0||y?.value==="true"}},[N]),ae=o.useCallback((i,p)=>w(y=>({...y,[i]:p})),[]),oe=o.useCallback((i,p)=>R(y=>({...y,[i]:p})),[]),ve=o.useCallback(async i=>{const p=x[i.key];if(!p)return!1;const y=xr(i,p);if(!y.ok)return oe(i.key,y.error),!1;ae(i.key,!0),oe(i.key,null);try{await xe(y.request),ae(i.key,!1);const E=(await A.refetch()).data?.settings.find(T=>T.key===i.key);return E&&v(T=>{const ue=T[i.key];return ue&&ue.value===p.value&&ue.cascadeBase===p.cascadeBase?{...T,[i.key]:ce(E)}:T}),!0}catch(b){return ae(i.key,!1),oe(i.key,b instanceof Error?b.message:"The setting could not be saved."),!1}},[x,A,ae,oe]),je=o.useCallback(async i=>{ae(i.key,!0),oe(i.key,null);try{await xe({op:"settings.reset",key:i.key}),v(p=>({...p,[i.key]:ce({...i,value:i.default,is_default:!0})})),ae(i.key,!1),await A.refetch()}catch(p){ae(i.key,!1),oe(i.key,p instanceof Error?p.message:"The setting could not be reset.")}},[A,ae,oe]),j=o.useMemo(()=>(N?.settings??[]).filter(i=>Se(i,x[i.key]??ce(i))),[N,x]),U=async()=>{$(!0);for(const i of j)await ve(i);$(!1)},I=()=>{N&&(v(i=>{const p={...i};for(const y of N.settings)p[y.key]=ce(y);return p}),R({}))};o.useEffect(()=>{if(!t||!N||C.current===t)return;const i=N.settings.find(b=>b.key===t);if(!i)return;C.current=t,he(i)==="advanced"&&u(!0);const p=fe(c.trim());!p||fe([i.label,i.help,i.key,i.section].join(" ")).includes(p)||d(""),h(!1),q(b=>new Set(b).add(i.section)),P(b=>{const E=new Set(b);return E.delete(i.section),E})},[t,N,c]);const ie=o.useMemo(()=>{if(!t||!N)return!1;const i=N.settings.find(y=>y.key===t);if(!i||he(i)==="advanced"&&!l)return!1;const p=fe(c.trim());return p?fe([i.label,i.help,i.key,i.section].join(" ")).includes(p):!0},[t,N,c,l]);if(o.useEffect(()=>{if(!ie||!t||D.current===t)return;let i=0,p=0;const y=()=>{const b=document.querySelector(`[data-setting-key="${CSS.escape(t)}"]`),E=b?.querySelector('[data-setting-control] :is(input, textarea, select, button[role="switch"], button)')??b;if(E){E===b&&(E.tabIndex=-1),E.focus(),E.scrollIntoView({block:"center"}),D.current=t;return}p+=1,p<Gr&&(i=requestAnimationFrame(y))};return i=requestAnimationFrame(y),()=>cancelAnimationFrame(i)},[ie,t]),a.data&&!r)return e.jsx(K,{variant:"warning",children:"Searchable settings need a newer Local Operator server. Update the server and restart the app to manage these settings here."});if(A.isLoading||a.isLoading)return e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading settings"})});const G=(a.data?null:a.error)??A.error;if(G||!N){const i=a.isFetching||A.isFetching,{sentence:p,remedy:y}=it(n,"Your settings could not be loaded.",G);return e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:p}),y&&e.jsx(_,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>{a.isError?a.refetch():A.refetch()},disabled:i,children:i?"Retrying":"Retry"})]})})}const J=N.settings.reduce((i,p)=>(i[he(p)]+=1,i),{core:0,advanced:0}),X=new Set(B.map(i=>i.section)).size;return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Br,{query:c,onQueryChange:d,matchCount:c.trim()?B.length:null,matchSections:X,coreCount:J.core,advancedCount:J.advanced,modifiedCount:N.settings.filter(V).length,modifiedOnly:m,onModifiedOnlyChange:h,showAdvanced:l,onShowAdvancedChange:u,onExpandAll:()=>te(!0),onCollapseAll:()=>te(!1),unsavedCount:j.length,savingAll:z,onSaveAll:()=>void U(),onDiscardAll:I}),g&&B.length===0&&e.jsx("div",{className:"flex flex-col items-center py-6 text-center",children:e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No settings match this search. Clear the search field to see every setting again."})}),e.jsx("div",{className:"flex flex-col gap-1",children:F.map(i=>{const p=Y(i.name),y=ne(i.name),b=g?0:y.filter(T=>he(T)==="advanced").length;if(g&&p.length===0)return null;const E=g?p.length>0&&!O.has(i.name):de(i.name);return e.jsxs("section",{"data-settings-section":i.name,"data-open":E,className:"flex flex-col",children:[e.jsx(Dr,{title:i.title,rowCount:p.length,advancedCount:b,scope:Vr[i.scope],modified:y.some(V),defaultOpen:E,onOpenChange:T=>g?re(i.name,T):pe(i.name,T)},`${i.name}:${E?"open":"closed"}`),e.jsxs("div",{hidden:!E,className:"flex flex-col pb-3",children:[i.description&&e.jsx("p",{className:"px-1 pb-1 text-meta text-ink-dim",children:i.description}),p.length===0?e.jsxs("div",{className:"flex items-center gap-2 px-1 py-2",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:b>0?"Advanced settings are hidden here.":"Nothing in this section matches."}),b>0&&e.jsxs(_,{variant:"secondary",size:"sm",onClick:()=>u(!0),children:["Show ",b," advanced"]})]}):p.map(T=>e.jsx(Ur,{setting:T,draft:x[T.key]??ce(T),tier:he(T),gate:be(T),effectiveHosting:W,saving:!!k[T.key],error:S[T.key]??null,onDraftChange:ue=>v(we=>({...we,[T.key]:ue})),onSave:()=>void ve(T),onReset:()=>void je(T)},T.key))]})]},i.name)})})]})},Kr=[[[".claude.json"],"Claude Code"],[[".claude",".mcp.json"],"Claude Code"],[[".cursor","mcp.json"],"Cursor"],[[".vscode","mcp.json"],"VS Code"],[[".codex","config.toml"],"Codex CLI"]];function Yr(t){if(!t)return null;const s=t.split("\\").join("/").split("/").filter(Boolean);for(const[a,n]of Kr)if(!(s.length<a.length)&&s.slice(-a.length).join("/")===a.join("/"))return n;return null}const Qr={list:"status",add:"add",remove:"remove",reload:"reload",connect:"reconnect",probe:"probe",disconnect:"disconnect",login:"grant",logout:"disconnect",reauth:"grant",status:"status",cancel:"cancel"},Wr=(t,s)=>{const a=t?.trim();if(!a)return null;const n=Vt(a,s);return n.kind==="auth"?{kind:"matched",name:n.name,unresolved:null}:{kind:"miss",asked:a}},Jr=t=>t.reduce((s,a)=>s?(a.updated_at??0)>(s.updated_at??0)?a:s:a,null),Xr=({sessionId:t,onAdded:s})=>{const[a,n]=o.useState(""),[r,c]=o.useState("command"),[d,l]=o.useState(""),[u,m]=o.useState(""),[h,x]=o.useState(""),[v,k]=o.useState("global"),[w,S]=o.useState(null),[R,z]=o.useState(!1),$=async()=>{z(!0),S(null);try{await xe({op:"mcp.control",sessionId:t,control:{action:"add",name:a,scope:v,...r==="command"?{command:d,args:u.split(`
312
- `).map(L=>L.trim()).filter(Boolean)}:{url:h}}}),n(""),l(""),m(""),x(""),s()}catch(L){S(ct("add",L,!1))}finally{z(!1)}};return e.jsxs("form",{className:"flex flex-col gap-3 rounded-md border border-control bg-surface p-4",onSubmit:L=>{L.preventDefault(),$()},children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-name",children:"Name"}),e.jsx(le,{id:"mcp-add-name",value:a,onChange:L=>n(L.target.value),required:!0})]}),e.jsxs("fieldset",{className:"flex gap-2",children:[e.jsx("legend",{className:"sr-only",children:"Server transport"}),e.jsx(_,{type:"button",variant:r==="command"?"secondary":"ghost",size:"sm",onClick:()=>c("command"),children:"Local command"}),e.jsx(_,{type:"button",variant:r==="url"?"secondary":"ghost",size:"sm",onClick:()=>c("url"),children:"Remote URL"})]}),r==="command"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-command",children:"Command"}),e.jsx(le,{id:"mcp-add-command",value:d,onChange:L=>l(L.target.value),className:"font-mono",required:!0})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-args",children:"Arguments, one per line"}),e.jsx("textarea",{id:"mcp-add-args",value:u,onChange:L=>m(L.target.value),rows:2,className:"rounded-sm border border-control bg-surface p-2 font-mono text-body-sm text-ink"})]})]}):e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-url",children:"URL"}),e.jsx(le,{id:"mcp-add-url",type:"url",value:h,onChange:L=>x(L.target.value),className:"font-mono",required:!0}),e.jsx("p",{className:"text-meta text-ink-dim",children:"No inline credentials or query parameters; secrets are referenced from the credential manager."})]}),e.jsxs("fieldset",{className:"flex gap-2",children:[e.jsx("legend",{className:"sr-only",children:"Configuration scope"}),e.jsx(_,{type:"button",variant:v==="global"?"secondary":"ghost",size:"sm",onClick:()=>k("global"),children:"Global"}),e.jsx(_,{type:"button",variant:v==="project"?"secondary":"ghost",size:"sm",onClick:()=>k("project"),children:"This project"})]}),w&&e.jsxs(K,{variant:"danger",children:[e.jsx("p",{children:w.message}),w.detail?e.jsx("p",{className:"font-mono text-ink-dim text-mono-sm",title:w.detail,children:w.detail}):null]}),e.jsx("div",{children:e.jsxs(_,{type:"submit",variant:"primary",size:"sm",disabled:R||!a||!(r==="command"?d:h),children:[R?e.jsx(se,{size:"sm"}):null,"Add server"]})})]})},eo=({sessionId:t,sectionRef:s,highlightServer:a})=>{const n=Oe(),r=Me(n.data,"mcp"),c=at(),d=Ne(g=>g.sessions),l=Ne(g=>g.fetchSessions),u=Ne(g=>g.loading),m=o.useMemo(()=>t?null:Jr(d),[t,d]),h=t??m?.session_id,[x,v]=o.useState(null),[k,w]=o.useState(null),[S,R]=o.useState(!1),[z,$]=o.useState(null),L=Ot({sessionId:h}),[q,H]=o.useState("");o.useEffect(()=>{t||!r||d.length>0||l()},[t,r,d.length,l]);const P=ye({queryKey:Ae.list(h??""),queryFn:()=>{if(!h)throw new Error("No conversation selected.");return Gt(h)},enabled:r&&!!h,staleTime:1e4}),O=Dt(P.data),M=o.useMemo(()=>Wr(a,O.map(g=>g.name)),[a,O]),C=M?.kind==="matched"?M.name:null,D=o.useRef(null),A=o.useRef(null),N=q.trim().toLowerCase(),V=o.useMemo(()=>N?O.filter(g=>g.name.toLowerCase().includes(N)):O,[O,N]);o.useEffect(()=>{!C||A.current===C||!q||H("")},[C,q]),o.useEffect(()=>{C&&A.current!==C&&V.some(g=>g.name===C)&&(A.current=C,D.current?.scrollIntoView({block:"center",behavior:"smooth"}))},[C,V]);const W=o.useCallback(()=>{h&&c.invalidateQueries({queryKey:Ae.list(h)})},[c,h]),B=o.useCallback(async(g,F,ne={})=>{if(h){w(null);try{await xe({op:"mcp.control",sessionId:h,control:{action:g,name:F,...ne}}),W()}catch(Y){const de=c.getQueryData(Ae.list(h));w(ct(Qr[g],Y,Pt(de?.operations)))}}},[c,h,W]);return r?h?e.jsx(Z,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts. A connected server is a working transport; the account behind it may still need its own sign-in.",sectionRef:s,children:e.jsxs("div",{className:"flex flex-col gap-4",children:[k&&e.jsxs(K,{variant:"danger",children:[e.jsx("p",{children:k.message}),k.detail?e.jsx("p",{className:"font-mono text-ink-dim text-mono-sm",title:k.detail,children:k.detail}):null]}),m&&e.jsxs("p",{className:"text-body-sm text-ink-muted",children:["Showing MCP servers for"," ",m.title?.trim()||m.session_id.slice(0,6),", your most recent conversation. Open a conversation to see its own list."]}),P.isLoading&&e.jsx("div",{className:"flex h-24 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading MCP servers"})}),P.isError&&e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:"MCP servers could not be loaded."}),e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>void P.refetch(),children:"Retry"})]})}),O.length>0&&e.jsxs("div",{className:"relative",children:[e.jsx(ot,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-ink-dim"}),e.jsx(le,{value:q,onChange:g=>H(g.target.value),placeholder:"Search MCP servers","aria-label":"Search MCP servers",className:"pl-9"})]}),M?.kind==="miss"&&O.length>0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:`No MCP server matches "${M.asked}".`}),M?.kind==="matched"&&M.unresolved&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:`Showing "${M.name}" — "${M.unresolved}" is not one of your servers.`}),P.isSuccess&&O.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers configured yet. Add one below."}),O.length>0&&V.length===0&&e.jsxs("div",{className:"flex flex-col items-start gap-2",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers match this search."}),e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>H(""),children:"Clear search"})]}),V.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:V.map(g=>{const F=g.status==="connected",ne=g.name===C,Y=g.owned_scope,de=g.transport==="http"&&g.transport_oauth_supported!==!1,pe=Yr(g.source);return e.jsxs("li",{ref:ne?D:void 0,className:ee("flex flex-col gap-2 rounded-md border border-control bg-surface p-3",ne&&"border-accent bg-elevated"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:g.name}),Y&&e.jsx(Ce,{variant:"outline",children:Y==="project"?"This project":"Global"}),g.transport&&e.jsx("span",{className:"text-meta text-ink-dim",children:g.transport})]}),e.jsx(Ce,{variant:F?"success":g.status==="connecting"?"info":g.status==="auth-required"?"warning":"neutral",children:g.status??"unknown"})]}),typeof g.tool_count=="number"&&e.jsxs("p",{className:"text-meta text-ink-dim",children:[g.tool_count," tools available"]}),g.status==="auth-required"&&!de&&e.jsx("p",{className:"text-meta text-ink-dim",children:g.setup?.text?"This server needs credentials local-operator cannot collect. Copy the setup prompt to have an agent walk you through it.":"This server needs credentials local-operator cannot collect."}),!Y&&e.jsxs("p",{className:"text-meta text-ink-dim",children:[pe?`Imported from ${pe}.`:"Imported from a configuration local-operator does not write."," ",g.source?e.jsxs(e.Fragment,{children:["Remove it in"," ",e.jsx("span",{className:"font-mono text-mono-sm text-ink-dim",children:Ut(g.source)}),"."]}):e.jsx(e.Fragment,{children:"Remove it wherever it is defined."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[F?e.jsxs(_,{variant:"secondary",size:"sm",onClick:()=>{v(null),B("disconnect",g.name,{confirmed:!0})},children:[e.jsx(lt,{"aria-hidden":"true"}),"Disconnect"]}):e.jsxs(_,{variant:"secondary",size:"sm",onClick:()=>void B("connect",g.name),children:[e.jsx(ln,{"aria-hidden":"true"}),"Connect"]}),e.jsxs(_,{variant:"ghost",size:"sm",onClick:()=>void B("reload",g.name),children:[e.jsx(Aa,{"aria-hidden":"true"}),"Reload"]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>{const re=qt(P.data?.servers??[]).find(te=>te.name===g.name);re&&$({row:re,sessionId:h})},children:"Sign in"}),g.setup?.text?e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(g.setup?.text??"").catch(()=>{})},children:"Copy setup prompt"}):null,Y?x===g.name?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-body-sm text-ink",children:["Remove ",g.name,"?"]}),e.jsx(_,{variant:"danger",size:"sm",onClick:()=>{v(null),B("remove",g.name,{confirmed:!0,scope:Y})},children:"Confirm removal"}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>v(null),children:"Keep"})]}):e.jsxs(_,{variant:"ghost",size:"sm",className:"text-danger",onClick:()=>v(g.name),children:[e.jsx(Bt,{"aria-hidden":"true"}),"Remove"]}):null]})]},g.name)})}),z?.sessionId===h?e.jsx(Ht,{row:z.row,remedy:L,onClose:()=>$(null)},h):null,S?e.jsx(Xr,{sessionId:h,onAdded:()=>{R(!1),W()}}):e.jsx("div",{children:e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>R(!0),"data-tour-tag":"mcp-add-server",children:"Add server"})})]})}):e.jsx(Z,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:s,children:u?e.jsx("div",{className:"flex h-24 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading MCP servers"})}):e.jsx("p",{className:"text-body-sm text-ink-muted",children:"Open a conversation to manage its MCP servers."})}):e.jsx(Z,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:s,children:e.jsx(K,{variant:"warning",children:"Integration management needs a newer Local Operator backend. Update the backend and restart the app to manage MCP servers here."})})},to=({onAfterCredentialUpdate:t})=>{const{isAuthenticated:s,user:a,isLoading:n,accountRead:r,signOut:c}=Zt(),d=dt(x=>x.isSigningOut),l=o.useCallback(async()=>{try{await c()}catch(x){console.error("Error signing out:",x)}},[c]),u=o.useMemo(()=>{if(!s||!a?.radientUser)return null;const{account:x,identity:v}=a.radientUser;return e.jsxs(e.Fragment,{children:[e.jsxs(De,{children:[e.jsx(Q,{label:"Status",value:e.jsxs("span",{className:"inline-flex items-center gap-2",children:["Connected",e.jsx(Ce,{variant:"success",className:"capitalize",children:x.status})]})}),e.jsx(Q,{label:"Name",value:x.name||"Not provided"}),e.jsx(Q,{label:"Email",value:x.email}),e.jsx(Q,{label:"Account ID",value:e.jsx("span",{className:"text-mono-sm",children:x.id})}),e.jsx(Q,{label:"Tenant ID",value:e.jsx("span",{className:"text-mono-sm",children:x.tenant_id})}),e.jsx(Q,{label:"Provider",value:e.jsx("span",{className:"capitalize",children:v.provider})}),e.jsx(Q,{label:"Created",value:ut(x.created_at)})]}),e.jsxs("div",{className:"mt-8",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:"Need to sign out or switch accounts?"}),e.jsxs(_,{variant:"danger",className:"mt-3",onClick:l,children:[e.jsx(Kt,{}),"Sign out from Radient"]})]})]})},[s,a?.radientUser,l]),m=o.useMemo(()=>r==="refused"?"Radient refused the sign-in this app is holding, so your account details could not be read. Signing in again below replaces it.":mt(r)?"Your Radient account could not be read, so this app cannot show your account details.":"You are not currently signed in to Radient.",[r]),h=o.useMemo(()=>s&&a?null:e.jsxs("div",{children:[e.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."]}),e.jsx("div",{className:"mt-6",children:e.jsx(Ta,{titleText:"",onAfterCredentialUpdate:t,descriptionText:"",onSignInSuccess:()=>{}})})]}),[s,a,m,t]);return n||d?e.jsxs("div",{className:"flex min-h-36 flex-col items-center justify-center gap-3",children:[e.jsx(se,{size:"lg",label:"Loading account"}),!d&&e.jsx("p",{className:"text-meta text-ink-dim",children:"Loading your Radient account details…"})]}):s&&a?.radientUser?u:e.jsx("div",{className:"flex flex-col gap-4",children:h})};function ao({metric:t,data:s}){return e.jsx(Yt,{title:"",heightClassName:"h-62",yAxisWidth:48,unit:t==="credits"?"credits":"tokens",srSummary:`${t==="credits"?"Credits consumed":"Tokens used"} over the last 30 days, plotted per day across ${s.length} days.`,xTickFormatter:a=>a,yTickFormatter:a=>t==="credits"?`$${a.toFixed(2)}`:Qt(a),children:e.jsx(ar,{data:s,children:e.jsx(st,{type:"monotone",dataKey:"value",strokeWidth:2,dot:!1,activeDot:{r:4,strokeWidth:0},name:t==="credits"?"Credits consumed":"Tokens used"})})})}const so=()=>{const{data:t,isLoading:s,error:a,refetch:n}=Xn(),r=er(),[c,d]=o.useState(""),[l,u]=o.useState(!1);o.useEffect(()=>{d(t?.content??""),u(!1)},[t]);const m=w=>{const S=w.target.value;d(S),u(S!==(t?.content??""))},h=async()=>{if(!(!l||r.isPending))try{const w={content:c};await r.mutateAsync(w),await n(),u(!1)}catch(w){console.error("Error updating system prompt:",w)}},x=()=>{d(t?.content??""),u(!1)},v=r.isPending,k=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(ke,{htmlFor:"app-system-prompt",children:"Instructions"}),e.jsx(ze,{id:"app-system-prompt",name:"systemPrompt",value:c,onChange:m,placeholder:"Enter instructions for how all agents should behave and respond to your requests...",className:"min-h-50"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(_,{variant:"primary",onClick:h,disabled:!l||v,children:[v?e.jsx(se,{size:"sm"}):e.jsx(Wt,{}),v?"Saving...":"Save changes"]}),e.jsx(_,{onClick:x,disabled:!l||v,children:"Cancel"})]}),t?.last_modified&&e.jsxs("p",{className:"text-ink-dim text-meta",children:["Last modified:"," ",e.jsx("span",{className:"font-mono text-mono-sm",children:ht(t.last_modified)})]})]});return e.jsx(Z,{title:"System prompt",icon:La,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?e.jsx("div",{className:"flex min-h-50 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading system prompt"})}):a?e.jsxs(K,{variant:"danger",children:["Failed to load system prompt:"," ",a instanceof Error?a.message:"Unknown error"]}):k()})},no=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"],ro=t=>no.includes(t),oo=t=>{const s=[];let a=0;for(const n of t){const r=Math.max(0,Math.floor(n.count)),c=Math.max(1,Math.floor(n.columns));for(let d=0;d<r;d+=c)s.push({start:a+d,count:Math.min(c,r-d)});a+=r}return s},io=({index:t,key:s,groups:a})=>{const n=oo(a),r=n.reduce((c,d)=>c+d.count,0);if(!Number.isInteger(t)||t<0||t>=r)return t;switch(s){case"Home":return 0;case"End":return r-1;case"ArrowLeft":return Math.max(0,t-1);case"ArrowRight":return Math.min(r-1,t+1);case"ArrowUp":case"ArrowDown":{const c=n.findIndex(u=>t>=u.start&&t<u.start+u.count),d=n[c+(s==="ArrowDown"?1:-1)];if(!d)return t;const l=t-n[c].start;return d.start+Math.min(l,d.count-1)}default:return t}},co={localOperatorDark:an,localOperatorLight:_n,dracula:gn,dune:Rs,sage:Ks,monokai:ta,tokyoNight:on,iceberg:vn,radient:qs,neon:Wn,obsidian:xt,synth:Ba,catppuccinMocha:fs,catppuccinLatte:Js,tokyoNightStorm:is,gruvbox:Wa,nord:Yn,oneDark:Ua,solarizedDark:wn,rosePine:zs,rosePineMoon:en,rosePineDawn:hs,alucard:$s,gruvboxLight:js,tokyoNightDay:nn,oneLight:Qs,catppuccinFrappe:ks,catppuccinMacchiato:Hs,palenight:ea,everforest:Dn,everforestLight:Fn,kanagawaWave:Vn,kanagawaLotus:Ts,ayuDark:Ns,ayuMirage:Ss,ayuLight:hn,nightfox:ls,duskfox:An,synthwave:un,matrix:Va,tron:rs,cyberpunk:Xt,vaporwave:In,outrun:Ya,neonNoir:Un,arcade:Gs,forest:Ln,ocean:Cs,desert:En,autumn:Zn,lavender:bn,arctic:us,rosewood:Ps,solarizedLight:Mn,githubLight:Os,paper:Jt,linen:fn,highContrastLight:Da,mintLight:Za},Xe="bg-[color-mix(in_srgb,var(--color-accent)_8%,var(--color-accent-wash))]",lo=({id:t})=>e.jsxs("div",{"data-theme":t,"aria-hidden":"true",className:"flex h-full bg-canvas",children:[e.jsxs("div",{className:"flex w-1/4 flex-col gap-1 bg-sunken p-1",children:[e.jsx("span",{className:"flex h-2.5 items-center rounded-xs bg-accent-wash px-1",children:e.jsx("span",{className:"h-1 w-full rounded-xs bg-accent"})}),e.jsx("span",{className:"mx-1 h-1 w-2/3 rounded-xs bg-ink-dim"}),e.jsx("span",{className:"mx-1 h-1 w-1/2 rounded-xs bg-ink-dim"})]}),e.jsxs("div",{className:"flex flex-1 flex-col justify-between p-1",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-xs bg-surface p-1",children:[e.jsx("span",{className:"h-1 w-3/5 rounded-xs bg-ink"}),e.jsx("span",{className:"h-1 w-full rounded-xs bg-ink-dim"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"h-2.5 w-6 rounded-xs bg-elevated"}),e.jsx("span",{className:"h-2.5 w-5 rounded-xs bg-accent"}),e.jsx("span",{className:"h-2.5 w-4 rounded-xs bg-accent-alt"}),e.jsx("span",{className:"h-2.5 w-4 rounded-xs border border-control"})]})]})]}),uo=({id:t,name:s,description:a,isSelected:n,isTabStop:r,onSelect:c,onFocusTile:d})=>{const l=co[t];return e.jsx(Te,{side:"bottom",align:"start",content:a,children:e.jsxs("button",{type:"button","data-theme-tile":t,"aria-pressed":n,tabIndex:r?0:-1,onFocus:d,onClick:c,className:ee("relative flex flex-col gap-1.5 rounded-md p-1 text-left transition-colors duration-fast ease-out-quart",n?Xe:"hover:bg-surface"),children:[e.jsxs("span",{className:ee("relative block h-10 overflow-hidden rounded-sm border transition-colors duration-fast ease-out-quart",n?"border-accent":"border-hairline"),children:[e.jsx(lo,{id:t}),n&&e.jsx("span",{className:ee("pointer-events-none absolute top-0.5 right-0.5 flex h-4 w-4 items-center justify-center rounded-full",Xe),children:e.jsx(Ea,{size:12,className:"text-accent","aria-hidden":"true"})})]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(l,{size:12,className:"shrink-0 text-ink-dim","aria-hidden":"true"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-meta text-ink",children:s})]})]})})},mo=t=>[...t.querySelectorAll("[data-theme-grid]")].map(s=>{const a=[...s.querySelectorAll("[data-theme-tile]")],n=a[0]?.getBoundingClientRect().top??0;return{count:a.length,columns:Math.max(1,a.filter(r=>Math.abs(r.getBoundingClientRect().top-n)<1).length)}}),ho=()=>{const{themeName:t,setTheme:s}=Ie(),a=o.useMemo(()=>{const l=Object.values(bt);return[{label:"Dark",items:l.filter(u=>u.theme.palette.mode==="dark")},{label:"Light",items:l.filter(u=>u.theme.palette.mode==="light")}].filter(u=>u.items.length>0)},[]),[n,r]=o.useState(null),c=o.useMemo(()=>{const l=a.flatMap(u=>u.items.map(m=>m.id));return n&&l.includes(n)?n:l.includes(t)?t:l[0]},[a,n,t]),d=l=>{if(!ro(l.key))return;const u=[...l.currentTarget.querySelectorAll("[data-theme-tile]")],m=u.indexOf(l.target);if(m<0)return;l.preventDefault();const h=io({index:m,key:l.key,groups:mo(l.currentTarget)});h!==m&&u[h]?.focus()};return e.jsx(Ra,{children:e.jsx("div",{onKeyDown:d,className:"flex flex-col gap-6",children:a.map(l=>e.jsxs("div",{children:[e.jsx("h3",{className:"px-1 pb-2 text-meta text-ink-dim",children:l.label}),e.jsx("div",{"data-theme-grid":l.label,className:"grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-2",children:l.items.map(({id:u,name:m,description:h})=>e.jsx(uo,{id:u,name:m,description:h,isSelected:u===t,isTabStop:u===c,onSelect:()=>s(u),onFocusTile:()=>r(u)},u))})]},l.label))})})},po=()=>{const{data:t,isLoading:s,error:a}=rr({enabled:!0});return e.jsxs("div",{children:[e.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-heading text-ink",children:[e.jsx(ys,{size:16,className:"shrink-0 text-ink-dim"}),"Radient Pass"]}),s&&e.jsx(ft,{className:"h-6 w-36"}),a&&e.jsxs(K,{variant:"warning",children:["Could not load your credit balance. ",a.message]}),t&&!s&&!a&&e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("p",{className:"flex-1 text-body-sm text-ink-muted",children:["Available credits"," ",e.jsx("span",{className:"font-medium text-ink",children:t.balance.toFixed(2)})]}),e.jsx(_,{variant:"secondary",size:"sm",asChild:!0,children:e.jsxs("a",{href:"https://console.radienthq.com/dashboard/billing",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ss,{}),"Add credits"]})})]})]})},fo=[{id:"credits",label:"Credits"},{id:"tokens",label:"Tokens"}],xo=()=>{const[t,s]=o.useState("credits"),a=o.useMemo(()=>{const l=new Date,u=sr(l);return{start_date:Ke(u),end_date:Ke(l),rollup:"daily"}},[]),{data:n,isLoading:r,error:c}=cr(a,{enabled:!0}),d=o.useMemo(()=>n?.data_points?[...n.data_points].sort((u,m)=>Ee(u.timestamp).getTime()-Ee(m.timestamp).getTime()).map(u=>({bucket:ya(Fa(Ee(u.timestamp),"yyyy-MM-dd")),value:t==="credits"?Number.parseFloat(u.total_cost.toFixed(2)):u.total_tokens})):[],[n,t]);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(Xa,{size:16,className:"shrink-0 text-ink-dim"}),"Usage (last 30 days)"]}),e.jsxs("fieldset",{className:"m-0 w-fit border-0 p-0",children:[e.jsx("legend",{className:"sr-only",children:"Usage metric"}),e.jsx("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:fo.map(({id:l,label:u})=>e.jsx(_,{variant:"ghost",size:"sm","aria-pressed":t===l,onClick:()=>s(l),className:ee(t===l&&"bg-surface text-ink hover:bg-surface"),children:u},l))})]})]}),r&&e.jsx(ft,{className:"h-62 w-full"}),c&&e.jsxs(K,{variant:"warning",children:["Could not load your usage data. ",c.message]}),!r&&!c&&n&&d.length>0&&e.jsx(ao,{metric:t,data:d}),!r&&!c&&(!n||d.length===0)&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No usage recorded in the last 30 days."})]})},go=()=>e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(va,{size:16,className:"shrink-0 text-ink-dim"}),"Radient account"]}),e.jsx(_,{variant:"secondary",size:"sm",className:"self-start sm:self-center",asChild:!0,children:e.jsxs("a",{href:"https://console.radienthq.com",target:"_blank",rel:"noopener noreferrer",children:["Go to Radient console",e.jsx(ka,{})]})})]}),So=()=>{const t=Ie(j=>j.showAgentReasoning),s=Ie(j=>j.setShowAgentReasoning),{data:a,isLoading:n,isFetching:r,error:c,refetch:d}=aa(),l=gt(),{sentence:u,remedy:m}=it(l,"Your settings could not be loaded.",c),h=sa(),[x,v]=o.useState(null),k=dt(),{isAuthenticated:w,accountRead:S,isFetching:R,isRefreshing:z,refreshUser:$}=Fe(),L=Ne(j=>j.activeSessionId),[q,H]=o.useState("general"),[P,O]=o.useState(!1),M=o.useRef(null),C=o.useRef(null),{startTour:D}=na(),A=ra(),{data:N,refetch:V}=oa(),{refreshModels:W}=ia(),B=o.useMemo(()=>N?.keys?[...N.keys].sort():[],[N?.keys]),g=o.useRef({keys:"",hosting:void 0});o.useEffect(()=>{const j=B.join(","),U=a?.values?.hosting;(g.current.keys!==j||g.current.hosting!==U)&&(g.current={keys:j,hosting:U},W().catch(I=>{console.error("Failed to refresh models after credentials or hosting change:",I)}))},[B,a?.values?.hosting,W]);const F=o.useRef({general:o.useRef(null),radient:o.useRef(null),integrations:o.useRef(null),appearance:o.useRef(null),providers:o.useRef(null),backend:o.useRef(null),updates:o.useRef(null)}).current,ne=o.useMemo(()=>new URLSearchParams(A.search).get("setting"),[A.search]),Y=o.useMemo(()=>new URLSearchParams(A.search).get("filter")??"",[A.search]),de=o.useMemo(()=>new URLSearchParams(A.search).get("mcp")??void 0,[A.search]),pe=o.useMemo(()=>new URLSearchParams(A.search).get("provider"),[A.search]),re=o.useCallback(j=>{H(j),O(!0);const U=F[j],I=C.current;if(U?.current&&I){const G=U.current.getBoundingClientRect().top-I.getBoundingClientRect().top;I.scrollHeight>I.clientHeight?I.scrollTo({top:Math.max(0,I.scrollTop+G-80),behavior:"smooth"}):window.scrollTo({top:Math.max(0,U.current.getBoundingClientRect().top+window.scrollY-80),behavior:"smooth"}),clearTimeout(M.current??void 0),M.current=setTimeout(()=>{O(!1),M.current=null},800)}else O(!1)},[F]);o.useEffect(()=>{const j=setTimeout(()=>{const U=C.current;if(!U)return;const I=()=>{if(P)return;const ie=U.getBoundingClientRect(),G=ie.height;let J="",X=0;for(const[i,p]of Object.entries(F))if(p.current){const y=p.current.getBoundingClientRect(),b=ie.top,E=y.top-b,T=y.bottom-b,ue=y.height,we=Math.max(0,E),kt=Math.min(G,T),Ue=Math.max(0,kt-we)/ue,qe=Ue+(E<G*.3?.1:0);qe>X&&Ue>.1&&(X=qe,J=i)}J&&J!==q&&H(J)};return I(),U.addEventListener("scroll",I,{passive:!0}),()=>{U.removeEventListener("scroll",I),clearTimeout(M.current??void 0)}},100);return()=>clearTimeout(j)},[F,q,P]),o.useEffect(()=>{const j=new URLSearchParams(A.search),U=j.get("section"),I=j.get("setting")?"backend":U,ie=I?F[I]:void 0;if(!I||!ie)return;let G=!1,J=Number.NaN,X=0;const i=window.setTimeout(()=>{G||(G=!0,y.disconnect(),re(I))},2e3),p=()=>{if(G)return;const b=ie.current;if(!b){X=requestAnimationFrame(p);return}const E=Math.round(b.getBoundingClientRect().top+window.scrollY);if(E===J&&E>0){G=!0,y.disconnect(),window.clearTimeout(i),re(I);return}J=E,X=requestAnimationFrame(p)},y=new ResizeObserver(()=>{G||(cancelAnimationFrame(X),X=requestAnimationFrame(p))});return C.current&&y.observe(C.current),X=requestAnimationFrame(p),()=>{G=!0,cancelAnimationFrame(X),y.disconnect(),window.clearTimeout(i)}},[A.search,F,re]);const te=async(j,U)=>{v(j);try{await h.mutateAsync({[j]:U}),await d()}catch(I){console.error(`Error updating ${j}:`,I)}finally{v(null)}},be=n,ae=S==="checking",oe=mt(S),ve=S==="ready"||S==="checking"||R,je=or(be,4e3);return c?e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:e.jsx(K,{variant:"warning",className:"w-full max-w-xl",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:u}),m&&e.jsx(_,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>void d(),disabled:r,children:r?"Retrying":"Retry"})]})})}):be?e.jsxs("div",{role:"status",className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-canvas",children:[e.jsx(se,{size:"lg",label:je?void 0:"Loading settings"}),je&&e.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."})]}):a?e.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-canvas",children:[e.jsx("div",{className:"w-12 shrink-0 overflow-y-auto border-r border-hairline min-[1040px]:w-55",children:e.jsx(ca,{activeSection:q,onSelectSection:re,sections:la})}),e.jsx("div",{ref:C,"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:e.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[e.jsx(ba,{title:"Settings",icon:Ge}),e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsxs("div",{ref:F.general,className:"flex flex-col gap-8",children:[e.jsxs(Z,{title:"User profile",icon:da,description:`Your user profile information displayed in the application. This information is not provided to the agents. ${w?"These details are provided through your Radient account.":""}`,children:[ae&&e.jsx("p",{className:"text-meta text-ink-dim",children:"Checking your Radient account…"}),oe&&e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("span",{children:["Your Radient account could not be read, so the name and email below are placeholders rather than your account details.",S==="refused"?" Retry, or sign in to Radient again.":" Retry."]}),e.jsx(_,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>$(),disabled:z,children:z?"Retrying":"Retry"})]})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Ze,{value:k.profile.name,label:"Display name",placeholder:"Enter your name...",isSaving:x==="user_name",onSave:async j=>{v("user_name");try{k.updateName(j)}finally{v(null)}},readOnly:ve}),e.jsx(Ze,{value:k.profile.email,label:"Email address",placeholder:"Enter your email...",isSaving:x==="user_email",onSave:async j=>{v("user_email");try{k.updateEmail(j)}finally{v(null)}},readOnly:ve})]})]}),e.jsx(Z,{title:"Application tour",description:"Missed the application onboarding tour or want a refresher? Start it again here.",children:e.jsxs(_,{variant:"secondary",onClick:()=>{D({forceModalCompleted:!0})},children:[e.jsx(ts,{}),"Take the tour"]})}),e.jsx(Z,{title:"Model settings",icon:ua,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:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ma,{value:a.values.hosting,isSaving:x==="hosting",onSave:j=>te("hosting",j),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."}),e.jsx(ha,{value:a.values.model_name,hostingId:a.values.hosting,isSaving:x==="model_name",onSave:j=>te("model_name",j),allowCustom:!0,allowDefault:!1}),e.jsx(K,{variant:"neutral",icon:e.jsx(Le,{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."})]})}),e.jsx(so,{}),e.jsx(Z,{title:"History settings",icon:$a,description:"Configure how much conversation history is retained and displayed. These are tools to help balance cost and performance by controlling the amount of data used by the agents.",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Re,{value:a.values.conversation_length,label:"Maximum conversation history",description:"Number of messages to keep in conversation history for context. More messages will make the agents have longer memory but more expensive to run. Recommended: 100",min:10,max:500,step:10,unit:"msgs",icon:pa,isSaving:x==="conversation_length",onChange:j=>te("conversation_length",j)}),e.jsx(Re,{value:a.values.detail_length,label:"Detail view length",description:"Maximum number of messages to show in the detailed conversation view. Messages beyond this limit will be summarized. Shortening this will decrease costs but some important details could get lost from earlier messages. Recommended: 15",min:10,max:500,step:5,unit:"msgs",icon:fa,isSaving:x==="detail_length",onChange:j=>te("detail_length",j)}),e.jsx(Re,{value:a.values.max_learnings_history,label:"Maximum learnings history",description:"Agents note down specific insights and key learnings in memory which persist beyond the maximum conversation history and summarization. This setting controls the maximum number of learning items to retain. More items will make the agents acquire a longer history of knowledge from your conversations but more expensive to run. Recommended: 50",min:10,max:200,step:10,unit:"notes",icon:xa,isSaving:x==="max_learnings_history",onChange:j=>te("max_learnings_history",j)})]})}),e.jsx(Z,{title:"Configuration information",icon:Le,description:"System information about the current configuration.",children:e.jsxs(De,{children:[e.jsx(Q,{label:"Version",value:e.jsx("span",{className:"text-mono-sm",children:a.version})}),e.jsx(Q,{label:"Created",value:ut(a.metadata.created_at)}),e.jsx(Q,{label:"Last modified",value:ht(a.metadata.last_modified)}),e.jsx(Q,{label:"Description",value:a.metadata.description||"No description available"})]})})]}),e.jsx(Z,{title:"Appearance",icon:xt,description:"Customize the look and feel of Local Operator",sectionRef:F.appearance,dataTourTag:"settings-appearance-section",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ho,{}),e.jsx(tr,{value:t,label:"Show agent reasoning",description:"Adds the agent's Reasoning and Thinking rows to conversations. They stay closed until you open one.",onChange:async j=>s(j)})]})}),e.jsx(Z,{title:"Radient account",titleComponent:e.jsx(go,{}),description:"Manage your Radient account, Radient Pass details, and credits.",sectionRef:F.radient,dataTourTag:"settings-radient-account-section",children:e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsx(to,{onAfterCredentialUpdate:()=>{W(),V()}}),w&&e.jsxs(e.Fragment,{children:[e.jsx(po,{}),e.jsx(xo,{})]})]})}),e.jsx(Z,{title:"Providers",icon:lt,description:"Model providers, how you sign in to each, and which are connected.",sectionRef:F.providers,children:e.jsx(ga,{initialProviderId:pe})}),e.jsx(Z,{title:"Backend settings",icon:Ge,description:"Every setting the backend registry owns, searchable, with typed editors and scopes.",sectionRef:F.backend,children:e.jsx(Zr,{focusKey:ne,initialFilter:Y})}),e.jsx(eo,{sessionId:L??void 0,sectionRef:F.integrations,highlightServer:de}),e.jsx("div",{ref:F.updates,children:e.jsx(ur,{})})]})]})})]}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:e.jsx(K,{variant:"warning",className:"w-full max-w-xl",children:"Your settings could not be loaded."})})};export{So as SettingsPage};
311
+ `).map(k=>k.trim()).filter(Boolean)}),"aria-label":`${t.label}: ${h}`,className:"font-mono text-body-sm"})]},h)),e.jsx("p",{className:"text-meta text-ink-dim",children:"One hop per line, as provider/model (effort). An empty chain moves to the next provider."})]})}default:return e.jsx(le,{value:s,disabled:n,onChange:m=>r(m.target.value),"aria-label":t.label,placeholder:t.placeholder})}},vt=({className:t})=>e.jsx("span",{role:"img","aria-label":"Changed from the default",title:"Changed from the default",className:ee("size-1.5 shrink-0 rounded-full bg-accent",t)}),Pr=({title:t,rowCount:s,advancedCount:a,scope:n,modified:r,onOpenChange:c,defaultOpen:d=!1})=>e.jsx("div",{"data-section-header":t,className:"flex w-full flex-col",children:e.jsx(rt,{defaultOpen:d,onOpenChange:c,triggerClassName:"text-ink hover:bg-row-hover hover:text-ink",chevronClassName:"text-ink-dim",rowClassName:"min-h-10 py-0",className:"w-full",summary:e.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate text-heading text-ink",children:t}),s>0&&e.jsx("span",{className:"shrink-0 text-meta text-ink-dim",children:s===1?"1 setting":`${s} settings`}),n&&e.jsx("span",{className:"shrink-0 text-meta text-ink-dim",children:n}),a>0&&e.jsxs("span",{className:"shrink-0 text-meta text-ink-dim",children:[a," advanced"]})]}),r&&e.jsx(vt,{className:"ml-auto"})]})})}),Ur="size-3.5 shrink-0",qr=({setting:t,draft:s,tier:a,gate:n,saving:r,error:c,onDraftChange:d,onSave:l,onReset:u,effectiveHosting:m=""})=>{const h=!!(n&&!n.on),x=Se(t,s),v=r||h,k=t.kind==="list"||t.kind==="cascade",w=e.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-body-sm text-ink",children:t.label}),t.kind==="readonly"&&e.jsx("span",{className:"text-meta text-ink-dim",children:"Read-only"}),t.warning&&e.jsx("span",{className:"text-meta text-danger",children:t.warning})]}),S=h&&n&&e.jsxs("p",{className:"text-meta text-ink-dim",children:["Needs ",n.label," on. Nothing here is saved while it is off."]});return e.jsx("div",{"data-setting-key":t.key,"data-tier":a,className:"border-b border-hairline",children:e.jsxs("div",{className:"flex flex-wrap items-start gap-x-4 gap-y-1 px-1 py-2.5",children:[e.jsxs("div",{className:ee("flex min-w-44 flex-col gap-0.5",k?"shrink-0 basis-2/5":"flex-1"),children:[a==="advanced"&&t.help?e.jsx(rt,{summary:w,triggerClassName:"min-h-5 py-0 px-0 text-body-sm text-ink hover:text-ink",chevronClassName:"text-ink-dim",summaryAlign:"firstLine",rowClassName:"min-h-5 py-0",className:"w-full",children:e.jsx("span",{className:"text-meta text-ink-dim",children:t.help})}):e.jsxs("span",{className:"flex min-h-5 items-center gap-1.5",children:[e.jsx("span",{"aria-hidden":!0,className:Ur}),w]}),a==="core"&&t.help&&e.jsx("p",{id:We(t.key),className:"ml-5 text-meta text-ink-dim",children:t.help}),S]}),e.jsxs("div",{className:ee("flex shrink-0 items-center gap-2 self-center",k&&"min-w-0 flex-1 items-start"),children:[(!t.is_default||x)&&e.jsx(vt,{}),!t.is_default&&t.kind!=="readonly"&&e.jsxs(_,{variant:"ghost",size:"sm",disabled:v,onClick:u,"aria-label":`Use default for ${t.label}`,children:[e.jsx(Hn,{"aria-hidden":"true"}),"Use default"]}),x&&e.jsx(_,{variant:"primary",size:"sm",disabled:v,onClick:l,children:r?"Saving":"Save"}),e.jsx("div",{className:Lr(t.kind),"data-setting-control":"",children:t.redacted?e.jsx("span",{className:"text-meta text-ink-dim",children:"Set in the credential manager: this value carries inline credentials or query parameters."}):t.kind==="readonly"?e.jsx("span",{className:"text-body-sm text-ink-muted",children:ge(t.value)||"Not set"}):e.jsx(Dr,{setting:t,value:s.value,chains:s.cascadeBase??void 0,disabled:v,effectiveHosting:m,helpId:a==="core"&&t.help?We(t.key):void 0,onValueChange:R=>d({...s,value:R}),onChainsChange:R=>d({...s,cascadeBase:R})})})]}),c&&e.jsx(K,{variant:"danger",role:"alert",className:"w-full",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:c}),e.jsxs(_,{variant:"secondary",size:"sm",disabled:r,onClick:l,children:[e.jsx(Ot,{"aria-hidden":"true"}),"Retry"]})]})})]})})},Br="w-full max-w-[400px]",Hr=({query:t,onQueryChange:s,matchCount:a,matchSections:n,coreCount:r,advancedCount:c,modifiedCount:d,modifiedOnly:l,onModifiedOnlyChange:u,showAdvanced:m,onShowAdvancedChange:h,onExpandAll:x,onCollapseAll:v,unsavedCount:k,savingAll:w,onSaveAll:S,onDiscardAll:R})=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:ee("relative",Br),children:[e.jsx(ot,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-ink-dim","aria-hidden":"true"}),e.jsx(le,{value:t,onChange:z=>s(z.target.value),onKeyDown:z=>{z.key==="Escape"&&t&&s("")},placeholder:"Search settings by name, description or key","aria-label":"Search settings",className:"pl-9"}),t&&e.jsx(_,{variant:"ghost",size:"icon-sm",className:"absolute top-1/2 right-1 -translate-y-1/2",onClick:()=>s(""),"aria-label":"Clear search",children:e.jsx(Aa,{"aria-hidden":"true"})})]}),e.jsxs("fieldset",{className:"m-0 border-0 p-0",children:[e.jsx("legend",{className:"sr-only",children:"Settings filters"}),e.jsxs("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:[e.jsxs(_,{variant:"ghost",size:"sm","aria-pressed":l,onClick:()=>u(!l),className:ee(l&&"bg-surface text-ink hover:bg-surface"),children:["Modified",e.jsx(Ce,{variant:"neutral",children:d})]}),e.jsx(_,{variant:"ghost",size:"sm","aria-pressed":m,onClick:()=>h(!m),className:ee(m&&"bg-surface text-ink hover:bg-surface"),children:"Show advanced"})]})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[k>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-meta text-ink-dim",children:k===1?"1 unsaved change":`${k} unsaved changes`}),e.jsx(_,{variant:"primary",size:"sm",disabled:w,onClick:S,children:w?"Saving":"Save all"}),e.jsx(_,{variant:"ghost",size:"sm",disabled:w,onClick:R,children:"Discard all"})]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:x,children:"Expand all"}),e.jsx(_,{variant:"ghost",size:"sm",onClick:v,children:"Collapse all"})]})]}),e.jsx("p",{className:"text-meta text-ink-dim","aria-live":"polite",children:a!==null?`${a} ${a===1?"result":"results"} in ${n} ${n===1?"section":"sections"}`:l?`${d} modified ${d===1?"setting":"settings"}`:m?`${c} advanced settings shown — Expand all to see them`:`${r} core settings, ${c} advanced`})]}),Vr={all:["desktop","settings"]},Gr={live:"Takes effect immediately","new launch":"Takes effect the next time the app starts","new sessions":"Takes effect for new conversations"},Zr=40,fe=t=>t.toLowerCase().replace(/[-_.]/g," "),Kr=({focusKey:t,initialFilter:s=""})=>{const a=Oe(),n=gt(),r=Me(a.data,"settings"),[c,d]=o.useState(s),[l,u]=o.useState(!1),[m,h]=o.useState(!1),[x,v]=o.useState({}),[k,w]=o.useState({}),[S,R]=o.useState({}),[z,$]=o.useState(!1),[L,q]=o.useState(new Set),[H,P]=o.useState(new Set),[O,M]=o.useState(new Set),C=o.useRef(null),D=o.useRef(null),A=ye({queryKey:Vr.all,queryFn:()=>xe({op:"settings.list"}),enabled:r,staleTime:1e4}),N=A.data;o.useEffect(()=>{N&&v(i=>{let p=!1;const y={...i};for(const b of N.settings){const E=i[b.key];if(!E){y[b.key]=ce(b),p=!0;continue}if(Se(b,E))continue;const T=ce(b);(T.value!==E.value||T.cascadeBase!==E.cascadeBase)&&(y[b.key]=T,p=!0)}return p?y:i})},[N]);const V=o.useCallback(i=>!i.is_default||Se(i,x[i.key]??ce(i)),[x]),W=o.useMemo(()=>{const i=(N?.settings??[]).find(p=>p.key==="hosting");return i?(x.hosting??ce(i)).value:""},[N,x]),B=o.useMemo(()=>{if(!N)return[];const i=fe(c.trim()),p=i.length>0||m;return N.settings.filter(y=>!p&&he(y)==="advanced"&&!l||m&&!V(y)?!1:i?fe([y.label,y.help,y.key,y.section,y.warning??""].join(" ")).includes(i):!0)},[N,c,l,m,V]),g=c.trim().length>0||m,F=o.useMemo(()=>N?.sections??[],[N]),ne=o.useCallback(i=>(N?.settings??[]).filter(p=>p.section===i),[N]),Y=i=>B.filter(p=>p.section===i),de=i=>L.has(i)?!0:H.has(i)?!1:fr(ne(i)),pe=(i,p)=>{q(y=>{const b=new Set(y);return p?b.add(i):b.delete(i),b}),P(y=>{const b=new Set(y);return p?b.delete(i):b.add(i),b})},re=(i,p)=>{M(y=>{const b=new Set(y);return p?b.delete(i):b.add(i),b})},te=i=>{const p=F.filter(b=>i||Y(b.name).length>0).map(b=>b.name),y=xr(i,g,p);y.layout&&(q(new Set(y.layout.opened)),P(new Set(y.layout.closed))),M(new Set(y.filter))};o.useEffect(()=>{c.trim()||M(new Set)},[c]);const be=o.useCallback(i=>{const p=i.gated_by;if(!p||!N)return null;const y=N.settings.find(b=>b.key===p);return{key:p,label:y?.label??p,on:y?.value===!0||y?.value==="true"}},[N]),ae=o.useCallback((i,p)=>w(y=>({...y,[i]:p})),[]),oe=o.useCallback((i,p)=>R(y=>({...y,[i]:p})),[]),ve=o.useCallback(async i=>{const p=x[i.key];if(!p)return!1;const y=gr(i,p);if(!y.ok)return oe(i.key,y.error),!1;ae(i.key,!0),oe(i.key,null);try{await xe(y.request),ae(i.key,!1);const E=(await A.refetch()).data?.settings.find(T=>T.key===i.key);return E&&v(T=>{const ue=T[i.key];return ue&&ue.value===p.value&&ue.cascadeBase===p.cascadeBase?{...T,[i.key]:ce(E)}:T}),!0}catch(b){return ae(i.key,!1),oe(i.key,b instanceof Error?b.message:"The setting could not be saved."),!1}},[x,A,ae,oe]),je=o.useCallback(async i=>{ae(i.key,!0),oe(i.key,null);try{await xe({op:"settings.reset",key:i.key}),v(p=>({...p,[i.key]:ce({...i,value:i.default,is_default:!0})})),ae(i.key,!1),await A.refetch()}catch(p){ae(i.key,!1),oe(i.key,p instanceof Error?p.message:"The setting could not be reset.")}},[A,ae,oe]),j=o.useMemo(()=>(N?.settings??[]).filter(i=>Se(i,x[i.key]??ce(i))),[N,x]),U=async()=>{$(!0);for(const i of j)await ve(i);$(!1)},I=()=>{N&&(v(i=>{const p={...i};for(const y of N.settings)p[y.key]=ce(y);return p}),R({}))};o.useEffect(()=>{if(!t||!N||C.current===t)return;const i=N.settings.find(b=>b.key===t);if(!i)return;C.current=t,he(i)==="advanced"&&u(!0);const p=fe(c.trim());!p||fe([i.label,i.help,i.key,i.section].join(" ")).includes(p)||d(""),h(!1),q(b=>new Set(b).add(i.section)),P(b=>{const E=new Set(b);return E.delete(i.section),E})},[t,N,c]);const ie=o.useMemo(()=>{if(!t||!N)return!1;const i=N.settings.find(y=>y.key===t);if(!i||he(i)==="advanced"&&!l)return!1;const p=fe(c.trim());return p?fe([i.label,i.help,i.key,i.section].join(" ")).includes(p):!0},[t,N,c,l]);if(o.useEffect(()=>{if(!ie||!t||D.current===t)return;let i=0,p=0;const y=()=>{const b=document.querySelector(`[data-setting-key="${CSS.escape(t)}"]`),E=b?.querySelector('[data-setting-control] :is(input, textarea, select, button[role="switch"], button)')??b;if(E){E===b&&(E.tabIndex=-1),E.focus(),E.scrollIntoView({block:"center"}),D.current=t;return}p+=1,p<Zr&&(i=requestAnimationFrame(y))};return i=requestAnimationFrame(y),()=>cancelAnimationFrame(i)},[ie,t]),a.data&&!r)return e.jsx(K,{variant:"warning",children:"Searchable settings need a newer Local Operator server. Update the server and restart the app to manage these settings here."});if(A.isLoading||a.isLoading)return e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading settings"})});const G=(a.data?null:a.error)??A.error;if(G||!N){const i=a.isFetching||A.isFetching,{sentence:p,remedy:y}=it(n,"Your settings could not be loaded.",G);return e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:p}),y&&e.jsx(_,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>{a.isError?a.refetch():A.refetch()},disabled:i,children:i?"Retrying":"Retry"})]})})}const J=N.settings.reduce((i,p)=>(i[he(p)]+=1,i),{core:0,advanced:0}),X=new Set(B.map(i=>i.section)).size;return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Hr,{query:c,onQueryChange:d,matchCount:c.trim()?B.length:null,matchSections:X,coreCount:J.core,advancedCount:J.advanced,modifiedCount:N.settings.filter(V).length,modifiedOnly:m,onModifiedOnlyChange:h,showAdvanced:l,onShowAdvancedChange:u,onExpandAll:()=>te(!0),onCollapseAll:()=>te(!1),unsavedCount:j.length,savingAll:z,onSaveAll:()=>void U(),onDiscardAll:I}),g&&B.length===0&&e.jsx("div",{className:"flex flex-col items-center py-6 text-center",children:e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No settings match this search. Clear the search field to see every setting again."})}),e.jsx("div",{className:"flex flex-col gap-1",children:F.map(i=>{const p=Y(i.name),y=ne(i.name),b=g?0:y.filter(T=>he(T)==="advanced").length;if(g&&p.length===0)return null;const E=g?p.length>0&&!O.has(i.name):de(i.name);return e.jsxs("section",{"data-settings-section":i.name,"data-open":E,className:"flex flex-col",children:[e.jsx(Pr,{title:i.title,rowCount:p.length,advancedCount:b,scope:Gr[i.scope],modified:y.some(V),defaultOpen:E,onOpenChange:T=>g?re(i.name,T):pe(i.name,T)},`${i.name}:${E?"open":"closed"}`),e.jsxs("div",{hidden:!E,className:"flex flex-col pb-3",children:[i.description&&e.jsx("p",{className:"px-1 pb-1 text-meta text-ink-dim",children:i.description}),p.length===0?e.jsxs("div",{className:"flex items-center gap-2 px-1 py-2",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:b>0?"Advanced settings are hidden here.":"Nothing in this section matches."}),b>0&&e.jsxs(_,{variant:"secondary",size:"sm",onClick:()=>u(!0),children:["Show ",b," advanced"]})]}):p.map(T=>e.jsx(qr,{setting:T,draft:x[T.key]??ce(T),tier:he(T),gate:be(T),effectiveHosting:W,saving:!!k[T.key],error:S[T.key]??null,onDraftChange:ue=>v(we=>({...we,[T.key]:ue})),onSave:()=>void ve(T),onReset:()=>void je(T)},T.key))]})]},i.name)})})]})},Yr=[[[".claude.json"],"Claude Code"],[[".claude",".mcp.json"],"Claude Code"],[[".cursor","mcp.json"],"Cursor"],[[".vscode","mcp.json"],"VS Code"],[[".codex","config.toml"],"Codex CLI"]];function Qr(t){if(!t)return null;const s=t.split("\\").join("/").split("/").filter(Boolean);for(const[a,n]of Yr)if(!(s.length<a.length)&&s.slice(-a.length).join("/")===a.join("/"))return n;return null}const Wr={list:"status",add:"add",remove:"remove",reload:"reload",connect:"reconnect",probe:"probe",disconnect:"disconnect",login:"grant",logout:"disconnect",reauth:"grant",status:"status",cancel:"cancel"},Jr=(t,s)=>{const a=t?.trim();if(!a)return null;const n=Gt(a,s);return n.kind==="auth"?{kind:"matched",name:n.name,unresolved:null}:{kind:"miss",asked:a}},Xr=t=>t.reduce((s,a)=>s?(a.updated_at??0)>(s.updated_at??0)?a:s:a,null),eo=({sessionId:t,onAdded:s})=>{const[a,n]=o.useState(""),[r,c]=o.useState("command"),[d,l]=o.useState(""),[u,m]=o.useState(""),[h,x]=o.useState(""),[v,k]=o.useState("global"),[w,S]=o.useState(null),[R,z]=o.useState(!1),$=async()=>{z(!0),S(null);try{await xe({op:"mcp.control",sessionId:t,control:{action:"add",name:a,scope:v,...r==="command"?{command:d,args:u.split(`
312
+ `).map(L=>L.trim()).filter(Boolean)}:{url:h}}}),n(""),l(""),m(""),x(""),s()}catch(L){S(ct("add",L,!1))}finally{z(!1)}};return e.jsxs("form",{className:"flex flex-col gap-3 rounded-md border border-control bg-surface p-4",onSubmit:L=>{L.preventDefault(),$()},children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-name",children:"Name"}),e.jsx(le,{id:"mcp-add-name",value:a,onChange:L=>n(L.target.value),required:!0})]}),e.jsxs("fieldset",{className:"flex gap-2",children:[e.jsx("legend",{className:"sr-only",children:"Server transport"}),e.jsx(_,{type:"button",variant:r==="command"?"secondary":"ghost",size:"sm",onClick:()=>c("command"),children:"Local command"}),e.jsx(_,{type:"button",variant:r==="url"?"secondary":"ghost",size:"sm",onClick:()=>c("url"),children:"Remote URL"})]}),r==="command"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-command",children:"Command"}),e.jsx(le,{id:"mcp-add-command",value:d,onChange:L=>l(L.target.value),className:"font-mono",required:!0})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-args",children:"Arguments, one per line"}),e.jsx("textarea",{id:"mcp-add-args",value:u,onChange:L=>m(L.target.value),rows:2,className:"rounded-sm border border-control bg-surface p-2 font-mono text-body-sm text-ink"})]})]}):e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(ke,{htmlFor:"mcp-add-url",children:"URL"}),e.jsx(le,{id:"mcp-add-url",type:"url",value:h,onChange:L=>x(L.target.value),className:"font-mono",required:!0}),e.jsx("p",{className:"text-meta text-ink-dim",children:"No inline credentials or query parameters; secrets are referenced from the credential manager."})]}),e.jsxs("fieldset",{className:"flex gap-2",children:[e.jsx("legend",{className:"sr-only",children:"Configuration scope"}),e.jsx(_,{type:"button",variant:v==="global"?"secondary":"ghost",size:"sm",onClick:()=>k("global"),children:"Global"}),e.jsx(_,{type:"button",variant:v==="project"?"secondary":"ghost",size:"sm",onClick:()=>k("project"),children:"This project"})]}),w&&e.jsxs(K,{variant:"danger",children:[e.jsx("p",{children:w.message}),w.detail?e.jsx("p",{className:"font-mono text-ink-dim text-mono-sm",title:w.detail,children:w.detail}):null]}),e.jsx("div",{children:e.jsxs(_,{type:"submit",variant:"primary",size:"sm",disabled:R||!a||!(r==="command"?d:h),children:[R?e.jsx(se,{size:"sm"}):null,"Add server"]})})]})},to=({sessionId:t,sectionRef:s,highlightServer:a})=>{const n=Oe(),r=Me(n.data,"mcp"),c=at(),d=Ne(g=>g.sessions),l=Ne(g=>g.fetchSessions),u=Ne(g=>g.loading),m=o.useMemo(()=>t?null:Xr(d),[t,d]),h=t??m?.session_id,[x,v]=o.useState(null),[k,w]=o.useState(null),[S,R]=o.useState(!1),[z,$]=o.useState(null),L=Dt({sessionId:h}),[q,H]=o.useState("");o.useEffect(()=>{t||!r||d.length>0||l()},[t,r,d.length,l]);const P=ye({queryKey:Ae.list(h??""),queryFn:()=>{if(!h)throw new Error("No conversation selected.");return Zt(h)},enabled:r&&!!h,staleTime:1e4}),O=Pt(P.data),M=o.useMemo(()=>Jr(a,O.map(g=>g.name)),[a,O]),C=M?.kind==="matched"?M.name:null,D=o.useRef(null),A=o.useRef(null),N=q.trim().toLowerCase(),V=o.useMemo(()=>N?O.filter(g=>g.name.toLowerCase().includes(N)):O,[O,N]);o.useEffect(()=>{!C||A.current===C||!q||H("")},[C,q]),o.useEffect(()=>{C&&A.current!==C&&V.some(g=>g.name===C)&&(A.current=C,D.current?.scrollIntoView({block:"center",behavior:"smooth"}))},[C,V]);const W=o.useCallback(()=>{h&&c.invalidateQueries({queryKey:Ae.list(h)})},[c,h]),B=o.useCallback(async(g,F,ne={})=>{if(h){w(null);try{await xe({op:"mcp.control",sessionId:h,control:{action:g,name:F,...ne}}),W()}catch(Y){const de=c.getQueryData(Ae.list(h));w(ct(Wr[g],Y,Ut(de?.operations)))}}},[c,h,W]);return r?h?e.jsx(Z,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts. A connected server is a working transport; the account behind it may still need its own sign-in.",sectionRef:s,children:e.jsxs("div",{className:"flex flex-col gap-4",children:[k&&e.jsxs(K,{variant:"danger",children:[e.jsx("p",{children:k.message}),k.detail?e.jsx("p",{className:"font-mono text-ink-dim text-mono-sm",title:k.detail,children:k.detail}):null]}),m&&e.jsxs("p",{className:"text-body-sm text-ink-muted",children:["Showing MCP servers for"," ",m.title?.trim()||m.session_id.slice(0,6),", your most recent conversation. Open a conversation to see its own list."]}),P.isLoading&&e.jsx("div",{className:"flex h-24 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading MCP servers"})}),P.isError&&e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:"MCP servers could not be loaded."}),e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>void P.refetch(),children:"Retry"})]})}),O.length>0&&e.jsxs("div",{className:"relative",children:[e.jsx(ot,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-ink-dim"}),e.jsx(le,{value:q,onChange:g=>H(g.target.value),placeholder:"Search MCP servers","aria-label":"Search MCP servers",className:"pl-9"})]}),M?.kind==="miss"&&O.length>0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:`No MCP server matches "${M.asked}".`}),M?.kind==="matched"&&M.unresolved&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:`Showing "${M.name}" — "${M.unresolved}" is not one of your servers.`}),P.isSuccess&&O.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers configured yet. Add one below."}),O.length>0&&V.length===0&&e.jsxs("div",{className:"flex flex-col items-start gap-2",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers match this search."}),e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>H(""),children:"Clear search"})]}),V.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:V.map(g=>{const F=g.status==="connected",ne=g.name===C,Y=g.owned_scope,de=g.transport==="http"&&g.transport_oauth_supported!==!1,pe=Qr(g.source);return e.jsxs("li",{ref:ne?D:void 0,className:ee("flex flex-col gap-2 rounded-md border border-control bg-surface p-3",ne&&"border-accent bg-elevated"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:g.name}),Y&&e.jsx(Ce,{variant:"outline",children:Y==="project"?"This project":"Global"}),g.transport&&e.jsx("span",{className:"text-meta text-ink-dim",children:g.transport})]}),e.jsx(Ce,{variant:F?"success":g.status==="connecting"?"info":g.status==="auth-required"?"warning":"neutral",children:g.status??"unknown"})]}),typeof g.tool_count=="number"&&e.jsxs("p",{className:"text-meta text-ink-dim",children:[g.tool_count," tools available"]}),g.status==="auth-required"&&!de&&e.jsx("p",{className:"text-meta text-ink-dim",children:g.setup?.text?"This server needs credentials local-operator cannot collect. Copy the setup prompt to have an agent walk you through it.":"This server needs credentials local-operator cannot collect."}),!Y&&e.jsxs("p",{className:"text-meta text-ink-dim",children:[pe?`Imported from ${pe}.`:"Imported from a configuration local-operator does not write."," ",g.source?e.jsxs(e.Fragment,{children:["Remove it in"," ",e.jsx("span",{className:"font-mono text-mono-sm text-ink-dim",children:qt(g.source)}),"."]}):e.jsx(e.Fragment,{children:"Remove it wherever it is defined."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[F?e.jsxs(_,{variant:"secondary",size:"sm",onClick:()=>{v(null),B("disconnect",g.name,{confirmed:!0})},children:[e.jsx(lt,{"aria-hidden":"true"}),"Disconnect"]}):e.jsxs(_,{variant:"secondary",size:"sm",onClick:()=>void B("connect",g.name),children:[e.jsx(dn,{"aria-hidden":"true"}),"Connect"]}),e.jsxs(_,{variant:"ghost",size:"sm",onClick:()=>void B("reload",g.name),children:[e.jsx(Ra,{"aria-hidden":"true"}),"Reload"]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>{const re=Bt(P.data?.servers??[]).find(te=>te.name===g.name);re&&$({row:re,sessionId:h})},children:"Sign in"}),g.setup?.text?e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(g.setup?.text??"").catch(()=>{})},children:"Copy setup prompt"}):null,Y?x===g.name?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-body-sm text-ink",children:["Remove ",g.name,"?"]}),e.jsx(_,{variant:"danger",size:"sm",onClick:()=>{v(null),B("remove",g.name,{confirmed:!0,scope:Y})},children:"Confirm removal"}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>v(null),children:"Keep"})]}):e.jsxs(_,{variant:"ghost",size:"sm",className:"text-danger",onClick:()=>v(g.name),children:[e.jsx(Ht,{"aria-hidden":"true"}),"Remove"]}):null]})]},g.name)})}),z?.sessionId===h?e.jsx(Vt,{row:z.row,remedy:L,onClose:()=>$(null)},h):null,S?e.jsx(eo,{sessionId:h,onAdded:()=>{R(!1),W()}}):e.jsx("div",{children:e.jsx(_,{variant:"secondary",size:"sm",onClick:()=>R(!0),"data-tour-tag":"mcp-add-server",children:"Add server"})})]})}):e.jsx(Z,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:s,children:u?e.jsx("div",{className:"flex h-24 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading MCP servers"})}):e.jsx("p",{className:"text-body-sm text-ink-muted",children:"Open a conversation to manage its MCP servers."})}):e.jsx(Z,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:s,children:e.jsx(K,{variant:"warning",children:"Integration management needs a newer Local Operator backend. Update the backend and restart the app to manage MCP servers here."})})},ao=({onAfterCredentialUpdate:t})=>{const{isAuthenticated:s,user:a,isLoading:n,accountRead:r,signOut:c}=Kt(),d=dt(x=>x.isSigningOut),l=o.useCallback(async()=>{try{await c()}catch(x){console.error("Error signing out:",x)}},[c]),u=o.useMemo(()=>{if(!s||!a?.radientUser)return null;const{account:x,identity:v}=a.radientUser;return e.jsxs(e.Fragment,{children:[e.jsxs(De,{children:[e.jsx(Q,{label:"Status",value:e.jsxs("span",{className:"inline-flex items-center gap-2",children:["Connected",e.jsx(Ce,{variant:"success",className:"capitalize",children:x.status})]})}),e.jsx(Q,{label:"Name",value:x.name||"Not provided"}),e.jsx(Q,{label:"Email",value:x.email}),e.jsx(Q,{label:"Account ID",value:e.jsx("span",{className:"text-mono-sm",children:x.id})}),e.jsx(Q,{label:"Tenant ID",value:e.jsx("span",{className:"text-mono-sm",children:x.tenant_id})}),e.jsx(Q,{label:"Provider",value:e.jsx("span",{className:"capitalize",children:v.provider})}),e.jsx(Q,{label:"Created",value:ut(x.created_at)})]}),e.jsxs("div",{className:"mt-8",children:[e.jsx("p",{className:"text-body-sm text-ink-muted",children:"Need to sign out or switch accounts?"}),e.jsxs(_,{variant:"danger",className:"mt-3",onClick:l,children:[e.jsx(Yt,{}),"Sign out from Radient"]})]})]})},[s,a?.radientUser,l]),m=o.useMemo(()=>r==="refused"?"Radient refused the sign-in this app is holding, so your account details could not be read. Signing in again below replaces it.":mt(r)?"Your Radient account could not be read, so this app cannot show your account details.":"You are not currently signed in to Radient.",[r]),h=o.useMemo(()=>s&&a?null:e.jsxs("div",{children:[e.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."]}),e.jsx("div",{className:"mt-6",children:e.jsx(La,{titleText:"",onAfterCredentialUpdate:t,descriptionText:"",onSignInSuccess:()=>{}})})]}),[s,a,m,t]);return n||d?e.jsxs("div",{className:"flex min-h-36 flex-col items-center justify-center gap-3",children:[e.jsx(se,{size:"lg",label:"Loading account"}),!d&&e.jsx("p",{className:"text-meta text-ink-dim",children:"Loading your Radient account details…"})]}):s&&a?.radientUser?u:e.jsx("div",{className:"flex flex-col gap-4",children:h})};function so({metric:t,data:s}){return e.jsx(Qt,{title:"",heightClassName:"h-62",yAxisWidth:48,unit:t==="credits"?"credits":"tokens",srSummary:`${t==="credits"?"Credits consumed":"Tokens used"} over the last 30 days, plotted per day across ${s.length} days.`,xTickFormatter:a=>a,yTickFormatter:a=>t==="credits"?`$${a.toFixed(2)}`:Wt(a),children:e.jsx(sr,{data:s,children:e.jsx(st,{type:"monotone",dataKey:"value",strokeWidth:2,dot:!1,activeDot:{r:4,strokeWidth:0},name:t==="credits"?"Credits consumed":"Tokens used"})})})}const no=()=>{const{data:t,isLoading:s,error:a,refetch:n}=er(),r=tr(),[c,d]=o.useState(""),[l,u]=o.useState(!1);o.useEffect(()=>{d(t?.content??""),u(!1)},[t]);const m=w=>{const S=w.target.value;d(S),u(S!==(t?.content??""))},h=async()=>{if(!(!l||r.isPending))try{const w={content:c};await r.mutateAsync(w),await n(),u(!1)}catch(w){console.error("Error updating system prompt:",w)}},x=()=>{d(t?.content??""),u(!1)},v=r.isPending,k=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(ke,{htmlFor:"app-system-prompt",children:"Instructions"}),e.jsx(ze,{id:"app-system-prompt",name:"systemPrompt",value:c,onChange:m,placeholder:"Enter instructions for how all agents should behave and respond to your requests...",className:"min-h-50"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(_,{variant:"primary",onClick:h,disabled:!l||v,children:[v?e.jsx(se,{size:"sm"}):e.jsx(Jt,{}),v?"Saving...":"Save changes"]}),e.jsx(_,{onClick:x,disabled:!l||v,children:"Cancel"})]}),t?.last_modified&&e.jsxs("p",{className:"text-ink-dim text-meta",children:["Last modified:"," ",e.jsx("span",{className:"font-mono text-mono-sm",children:ht(t.last_modified)})]})]});return e.jsx(Z,{title:"System prompt",icon:za,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?e.jsx("div",{className:"flex min-h-50 items-center justify-center",children:e.jsx(se,{size:"lg",label:"Loading system prompt"})}):a?e.jsxs(K,{variant:"danger",children:["Failed to load system prompt:"," ",a instanceof Error?a.message:"Unknown error"]}):k()})},ro=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"],oo=t=>ro.includes(t),io=t=>{const s=[];let a=0;for(const n of t){const r=Math.max(0,Math.floor(n.count)),c=Math.max(1,Math.floor(n.columns));for(let d=0;d<r;d+=c)s.push({start:a+d,count:Math.min(c,r-d)});a+=r}return s},co=({index:t,key:s,groups:a})=>{const n=io(a),r=n.reduce((c,d)=>c+d.count,0);if(!Number.isInteger(t)||t<0||t>=r)return t;switch(s){case"Home":return 0;case"End":return r-1;case"ArrowLeft":return Math.max(0,t-1);case"ArrowRight":return Math.min(r-1,t+1);case"ArrowUp":case"ArrowDown":{const c=n.findIndex(u=>t>=u.start&&t<u.start+u.count),d=n[c+(s==="ArrowDown"?1:-1)];if(!d)return t;const l=t-n[c].start;return d.start+Math.min(l,d.count-1)}default:return t}},lo={localOperatorDark:sn,localOperatorLight:Sn,dracula:yn,dune:Es,sage:Ys,monokai:aa,tokyoNight:cn,iceberg:kn,radient:Bs,neon:Jn,obsidian:xt,synth:Ha,catppuccinMocha:xs,catppuccinLatte:Xs,tokyoNightStorm:cs,gruvbox:Ja,nord:Qn,oneDark:qa,solarizedDark:Nn,rosePine:Is,rosePineMoon:tn,rosePineDawn:ps,alucard:Fs,gruvboxLight:ws,tokyoNightDay:rn,oneLight:Ws,catppuccinFrappe:bs,catppuccinMacchiato:Vs,palenight:ta,everforest:Pn,everforestLight:On,kanagawaWave:Gn,kanagawaLotus:Ls,ayuDark:_s,ayuMirage:Ms,ayuLight:pn,nightfox:ds,duskfox:Rn,synthwave:mn,matrix:Ga,tron:os,cyberpunk:ea,vaporwave:$n,outrun:Qa,neonNoir:qn,arcade:Zs,forest:zn,ocean:As,desert:Tn,autumn:Kn,lavender:jn,arctic:ms,rosewood:Us,solarizedLight:Cn,githubLight:Ds,paper:Xt,linen:xn,highContrastLight:Pa,mintLight:Ka},Xe="bg-[color-mix(in_srgb,var(--color-accent)_8%,var(--color-accent-wash))]",uo=({id:t})=>e.jsxs("div",{"data-theme":t,"aria-hidden":"true",className:"flex h-full bg-canvas",children:[e.jsxs("div",{className:"flex w-1/4 flex-col gap-1 bg-sunken p-1",children:[e.jsx("span",{className:"flex h-2.5 items-center rounded-xs bg-accent-wash px-1",children:e.jsx("span",{className:"h-1 w-full rounded-xs bg-accent"})}),e.jsx("span",{className:"mx-1 h-1 w-2/3 rounded-xs bg-ink-dim"}),e.jsx("span",{className:"mx-1 h-1 w-1/2 rounded-xs bg-ink-dim"})]}),e.jsxs("div",{className:"flex flex-1 flex-col justify-between p-1",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-xs bg-surface p-1",children:[e.jsx("span",{className:"h-1 w-3/5 rounded-xs bg-ink"}),e.jsx("span",{className:"h-1 w-full rounded-xs bg-ink-dim"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"h-2.5 w-6 rounded-xs bg-elevated"}),e.jsx("span",{className:"h-2.5 w-5 rounded-xs bg-accent"}),e.jsx("span",{className:"h-2.5 w-4 rounded-xs bg-accent-alt"}),e.jsx("span",{className:"h-2.5 w-4 rounded-xs border border-control"})]})]})]}),mo=({id:t,name:s,description:a,isSelected:n,isTabStop:r,onSelect:c,onFocusTile:d})=>{const l=lo[t];return e.jsx(Te,{side:"bottom",align:"start",content:a,children:e.jsxs("button",{type:"button","data-theme-tile":t,"aria-pressed":n,tabIndex:r?0:-1,onFocus:d,onClick:c,className:ee("relative flex flex-col gap-1.5 rounded-md p-1 text-left transition-colors duration-fast ease-out-quart",n?Xe:"hover:bg-surface"),children:[e.jsxs("span",{className:ee("relative block h-10 overflow-hidden rounded-sm border transition-colors duration-fast ease-out-quart",n?"border-accent":"border-hairline"),children:[e.jsx(uo,{id:t}),n&&e.jsx("span",{className:ee("pointer-events-none absolute top-0.5 right-0.5 flex h-4 w-4 items-center justify-center rounded-full",Xe),children:e.jsx(Ta,{size:12,className:"text-accent","aria-hidden":"true"})})]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(l,{size:12,className:"shrink-0 text-ink-dim","aria-hidden":"true"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-meta text-ink",children:s})]})]})})},ho=t=>[...t.querySelectorAll("[data-theme-grid]")].map(s=>{const a=[...s.querySelectorAll("[data-theme-tile]")],n=a[0]?.getBoundingClientRect().top??0;return{count:a.length,columns:Math.max(1,a.filter(r=>Math.abs(r.getBoundingClientRect().top-n)<1).length)}}),po=()=>{const{themeName:t,setTheme:s}=Ie(),a=o.useMemo(()=>{const l=Object.values(bt);return[{label:"Dark",items:l.filter(u=>u.theme.palette.mode==="dark")},{label:"Light",items:l.filter(u=>u.theme.palette.mode==="light")}].filter(u=>u.items.length>0)},[]),[n,r]=o.useState(null),c=o.useMemo(()=>{const l=a.flatMap(u=>u.items.map(m=>m.id));return n&&l.includes(n)?n:l.includes(t)?t:l[0]},[a,n,t]),d=l=>{if(!oo(l.key))return;const u=[...l.currentTarget.querySelectorAll("[data-theme-tile]")],m=u.indexOf(l.target);if(m<0)return;l.preventDefault();const h=co({index:m,key:l.key,groups:ho(l.currentTarget)});h!==m&&u[h]?.focus()};return e.jsx(Ea,{children:e.jsx("div",{onKeyDown:d,className:"flex flex-col gap-6",children:a.map(l=>e.jsxs("div",{children:[e.jsx("h3",{className:"px-1 pb-2 text-meta text-ink-dim",children:l.label}),e.jsx("div",{"data-theme-grid":l.label,className:"grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-2",children:l.items.map(({id:u,name:m,description:h})=>e.jsx(mo,{id:u,name:m,description:h,isSelected:u===t,isTabStop:u===c,onSelect:()=>s(u),onFocusTile:()=>r(u)},u))})]},l.label))})})},fo=()=>{const{data:t,isLoading:s,error:a}=or({enabled:!0});return e.jsxs("div",{children:[e.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-heading text-ink",children:[e.jsx(vs,{size:16,className:"shrink-0 text-ink-dim"}),"Radient Pass"]}),s&&e.jsx(ft,{className:"h-6 w-36"}),a&&e.jsxs(K,{variant:"warning",children:["Could not load your credit balance. ",a.message]}),t&&!s&&!a&&e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("p",{className:"flex-1 text-body-sm text-ink-muted",children:["Available credits"," ",e.jsx("span",{className:"font-medium text-ink",children:t.balance.toFixed(2)})]}),e.jsx(_,{variant:"secondary",size:"sm",asChild:!0,children:e.jsxs("a",{href:"https://console.radienthq.com/dashboard/billing",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ns,{}),"Add credits"]})})]})]})},xo=[{id:"credits",label:"Credits"},{id:"tokens",label:"Tokens"}],go=()=>{const[t,s]=o.useState("credits"),a=o.useMemo(()=>{const l=new Date,u=nr(l);return{start_date:Ke(u),end_date:Ke(l),rollup:"daily"}},[]),{data:n,isLoading:r,error:c}=lr(a,{enabled:!0}),d=o.useMemo(()=>n?.data_points?[...n.data_points].sort((u,m)=>Ee(u.timestamp).getTime()-Ee(m.timestamp).getTime()).map(u=>({bucket:va(Oa(Ee(u.timestamp),"yyyy-MM-dd")),value:t==="credits"?Number.parseFloat(u.total_cost.toFixed(2)):u.total_tokens})):[],[n,t]);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(es,{size:16,className:"shrink-0 text-ink-dim"}),"Usage (last 30 days)"]}),e.jsxs("fieldset",{className:"m-0 w-fit border-0 p-0",children:[e.jsx("legend",{className:"sr-only",children:"Usage metric"}),e.jsx("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:xo.map(({id:l,label:u})=>e.jsx(_,{variant:"ghost",size:"sm","aria-pressed":t===l,onClick:()=>s(l),className:ee(t===l&&"bg-surface text-ink hover:bg-surface"),children:u},l))})]})]}),r&&e.jsx(ft,{className:"h-62 w-full"}),c&&e.jsxs(K,{variant:"warning",children:["Could not load your usage data. ",c.message]}),!r&&!c&&n&&d.length>0&&e.jsx(so,{metric:t,data:d}),!r&&!c&&(!n||d.length===0)&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:"No usage recorded in the last 30 days."})]})},yo=()=>e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[e.jsx(ka,{size:16,className:"shrink-0 text-ink-dim"}),"Radient account"]}),e.jsx(_,{variant:"secondary",size:"sm",className:"self-start sm:self-center",asChild:!0,children:e.jsxs("a",{href:"https://console.radienthq.com",target:"_blank",rel:"noopener noreferrer",children:["Go to Radient console",e.jsx(ba,{})]})})]}),Mo=()=>{const t=Ie(j=>j.showAgentReasoning),s=Ie(j=>j.setShowAgentReasoning),{data:a,isLoading:n,isFetching:r,error:c,refetch:d}=sa(),l=gt(),{sentence:u,remedy:m}=it(l,"Your settings could not be loaded.",c),h=na(),[x,v]=o.useState(null),k=dt(),{isAuthenticated:w,accountRead:S,isFetching:R,isRefreshing:z,refreshUser:$}=Fe(),L=Ne(j=>j.activeSessionId),[q,H]=o.useState("general"),[P,O]=o.useState(!1),M=o.useRef(null),C=o.useRef(null),{startTour:D}=ra(),A=oa(),{data:N,refetch:V}=ia(),{refreshModels:W}=ca(),B=o.useMemo(()=>N?.keys?[...N.keys].sort():[],[N?.keys]),g=o.useRef({keys:"",hosting:void 0});o.useEffect(()=>{const j=B.join(","),U=a?.values?.hosting;(g.current.keys!==j||g.current.hosting!==U)&&(g.current={keys:j,hosting:U},W().catch(I=>{console.error("Failed to refresh models after credentials or hosting change:",I)}))},[B,a?.values?.hosting,W]);const F=o.useRef({general:o.useRef(null),radient:o.useRef(null),integrations:o.useRef(null),appearance:o.useRef(null),providers:o.useRef(null),backend:o.useRef(null),updates:o.useRef(null)}).current,ne=o.useMemo(()=>new URLSearchParams(A.search).get("setting"),[A.search]),Y=o.useMemo(()=>new URLSearchParams(A.search).get("filter")??"",[A.search]),de=o.useMemo(()=>new URLSearchParams(A.search).get("mcp")??void 0,[A.search]),pe=o.useMemo(()=>new URLSearchParams(A.search).get("provider"),[A.search]),re=o.useCallback(j=>{H(j),O(!0);const U=F[j],I=C.current;if(U?.current&&I){const G=U.current.getBoundingClientRect().top-I.getBoundingClientRect().top;I.scrollHeight>I.clientHeight?I.scrollTo({top:Math.max(0,I.scrollTop+G-80),behavior:"smooth"}):window.scrollTo({top:Math.max(0,U.current.getBoundingClientRect().top+window.scrollY-80),behavior:"smooth"}),clearTimeout(M.current??void 0),M.current=setTimeout(()=>{O(!1),M.current=null},800)}else O(!1)},[F]);o.useEffect(()=>{const j=setTimeout(()=>{const U=C.current;if(!U)return;const I=()=>{if(P)return;const ie=U.getBoundingClientRect(),G=ie.height;let J="",X=0;for(const[i,p]of Object.entries(F))if(p.current){const y=p.current.getBoundingClientRect(),b=ie.top,E=y.top-b,T=y.bottom-b,ue=y.height,we=Math.max(0,E),kt=Math.min(G,T),Ue=Math.max(0,kt-we)/ue,qe=Ue+(E<G*.3?.1:0);qe>X&&Ue>.1&&(X=qe,J=i)}J&&J!==q&&H(J)};return I(),U.addEventListener("scroll",I,{passive:!0}),()=>{U.removeEventListener("scroll",I),clearTimeout(M.current??void 0)}},100);return()=>clearTimeout(j)},[F,q,P]),o.useEffect(()=>{const j=new URLSearchParams(A.search),U=j.get("section"),I=j.get("setting")?"backend":U,ie=I?F[I]:void 0;if(!I||!ie)return;let G=!1,J=Number.NaN,X=0;const i=window.setTimeout(()=>{G||(G=!0,y.disconnect(),re(I))},2e3),p=()=>{if(G)return;const b=ie.current;if(!b){X=requestAnimationFrame(p);return}const E=Math.round(b.getBoundingClientRect().top+window.scrollY);if(E===J&&E>0){G=!0,y.disconnect(),window.clearTimeout(i),re(I);return}J=E,X=requestAnimationFrame(p)},y=new ResizeObserver(()=>{G||(cancelAnimationFrame(X),X=requestAnimationFrame(p))});return C.current&&y.observe(C.current),X=requestAnimationFrame(p),()=>{G=!0,cancelAnimationFrame(X),y.disconnect(),window.clearTimeout(i)}},[A.search,F,re]);const te=async(j,U)=>{v(j);try{await h.mutateAsync({[j]:U}),await d()}catch(I){console.error(`Error updating ${j}:`,I)}finally{v(null)}},be=n,ae=S==="checking",oe=mt(S),ve=S==="ready"||S==="checking"||R,je=ir(be,4e3);return c?e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:e.jsx(K,{variant:"warning",className:"w-full max-w-xl",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{children:u}),m&&e.jsx(_,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>void d(),disabled:r,children:r?"Retrying":"Retry"})]})})}):be?e.jsxs("div",{role:"status",className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-canvas",children:[e.jsx(se,{size:"lg",label:je?void 0:"Loading settings"}),je&&e.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."})]}):a?e.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-canvas",children:[e.jsx("div",{className:"w-12 shrink-0 overflow-y-auto border-r border-hairline min-[1040px]:w-55",children:e.jsx(la,{activeSection:q,onSelectSection:re,sections:da})}),e.jsx("div",{ref:C,"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:e.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[e.jsx(ja,{title:"Settings",icon:Ge}),e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsxs("div",{ref:F.general,className:"flex flex-col gap-8",children:[e.jsxs(Z,{title:"User profile",icon:ua,description:`Your user profile information displayed in the application. This information is not provided to the agents. ${w?"These details are provided through your Radient account.":""}`,children:[ae&&e.jsx("p",{className:"text-meta text-ink-dim",children:"Checking your Radient account…"}),oe&&e.jsx(K,{variant:"warning",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("span",{children:["Your Radient account could not be read, so the name and email below are placeholders rather than your account details.",S==="refused"?" Retry, or sign in to Radient again.":" Retry."]}),e.jsx(_,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>$(),disabled:z,children:z?"Retrying":"Retry"})]})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Ze,{value:k.profile.name,label:"Display name",placeholder:"Enter your name...",isSaving:x==="user_name",onSave:async j=>{v("user_name");try{k.updateName(j)}finally{v(null)}},readOnly:ve}),e.jsx(Ze,{value:k.profile.email,label:"Email address",placeholder:"Enter your email...",isSaving:x==="user_email",onSave:async j=>{v("user_email");try{k.updateEmail(j)}finally{v(null)}},readOnly:ve})]})]}),e.jsx(Z,{title:"Application tour",description:"Missed the application onboarding tour or want a refresher? Start it again here.",children:e.jsxs(_,{variant:"secondary",onClick:()=>{D({forceModalCompleted:!0})},children:[e.jsx(as,{}),"Take the tour"]})}),e.jsx(Z,{title:"Model settings",icon:ma,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:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ha,{value:a.values.hosting,isSaving:x==="hosting",onSave:j=>te("hosting",j),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."}),e.jsx(pa,{value:a.values.model_name,hostingId:a.values.hosting,isSaving:x==="model_name",onSave:j=>te("model_name",j),allowCustom:!0,allowDefault:!1}),e.jsx(K,{variant:"neutral",icon:e.jsx(Le,{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."})]})}),e.jsx(no,{}),e.jsx(Z,{title:"History settings",icon:Fa,description:"Configure how much conversation history is retained and displayed. These are tools to help balance cost and performance by controlling the amount of data used by the agents.",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Re,{value:a.values.conversation_length,label:"Maximum conversation history",description:"Number of messages to keep in conversation history for context. More messages will make the agents have longer memory but more expensive to run. Recommended: 100",min:10,max:500,step:10,unit:"msgs",icon:fa,isSaving:x==="conversation_length",onChange:j=>te("conversation_length",j)}),e.jsx(Re,{value:a.values.detail_length,label:"Detail view length",description:"Maximum number of messages to show in the detailed conversation view. Messages beyond this limit will be summarized. Shortening this will decrease costs but some important details could get lost from earlier messages. Recommended: 15",min:10,max:500,step:5,unit:"msgs",icon:xa,isSaving:x==="detail_length",onChange:j=>te("detail_length",j)}),e.jsx(Re,{value:a.values.max_learnings_history,label:"Maximum learnings history",description:"Agents note down specific insights and key learnings in memory which persist beyond the maximum conversation history and summarization. This setting controls the maximum number of learning items to retain. More items will make the agents acquire a longer history of knowledge from your conversations but more expensive to run. Recommended: 50",min:10,max:200,step:10,unit:"notes",icon:ga,isSaving:x==="max_learnings_history",onChange:j=>te("max_learnings_history",j)})]})}),e.jsx(Z,{title:"Configuration information",icon:Le,description:"System information about the current configuration.",children:e.jsxs(De,{children:[e.jsx(Q,{label:"Version",value:e.jsx("span",{className:"text-mono-sm",children:a.version})}),e.jsx(Q,{label:"Created",value:ut(a.metadata.created_at)}),e.jsx(Q,{label:"Last modified",value:ht(a.metadata.last_modified)}),e.jsx(Q,{label:"Description",value:a.metadata.description||"No description available"})]})})]}),e.jsx(Z,{title:"Appearance",icon:xt,description:"Customize the look and feel of Local Operator",sectionRef:F.appearance,dataTourTag:"settings-appearance-section",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(po,{}),e.jsx(ar,{value:t,label:"Show agent reasoning",description:"Adds the agent's Reasoning and Thinking rows to conversations. They stay closed until you open one.",onChange:async j=>s(j)})]})}),e.jsx(Z,{title:"Radient account",titleComponent:e.jsx(yo,{}),description:"Manage your Radient account, Radient Pass details, and credits.",sectionRef:F.radient,dataTourTag:"settings-radient-account-section",children:e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsx(ao,{onAfterCredentialUpdate:()=>{W(),V()}}),w&&e.jsxs(e.Fragment,{children:[e.jsx(fo,{}),e.jsx(go,{})]})]})}),e.jsx(Z,{title:"Providers",icon:lt,description:"Model providers, how you sign in to each, and which are connected.",sectionRef:F.providers,children:e.jsx(ya,{initialProviderId:pe})}),e.jsx(Z,{title:"Backend settings",icon:Ge,description:"Every setting the backend registry owns, searchable, with typed editors and scopes.",sectionRef:F.backend,children:e.jsx(Kr,{focusKey:ne,initialFilter:Y})}),e.jsx(to,{sessionId:L??void 0,sectionRef:F.integrations,highlightServer:de}),e.jsx("div",{ref:F.updates,children:e.jsx(mr,{})})]})]})})]}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:e.jsx(K,{variant:"warning",className:"w-full max-w-xl",children:"Your settings could not be loaded."})})};export{Mo as SettingsPage};