@kaitranntt/ccs 7.63.0 → 7.63.1-dev.2

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 (171) hide show
  1. package/README.md +10 -3
  2. package/dist/api/services/profile-lifecycle-service.js +4 -4
  3. package/dist/api/services/profile-lifecycle-service.js.map +1 -1
  4. package/dist/api/services/profile-writer.d.ts.map +1 -1
  5. package/dist/api/services/profile-writer.js +3 -5
  6. package/dist/api/services/profile-writer.js.map +1 -1
  7. package/dist/ccs.js +21 -9
  8. package/dist/ccs.js.map +1 -1
  9. package/dist/cliproxy/accounts/email-account-identity.d.ts +12 -0
  10. package/dist/cliproxy/accounts/email-account-identity.d.ts.map +1 -0
  11. package/dist/cliproxy/accounts/email-account-identity.js +124 -0
  12. package/dist/cliproxy/accounts/email-account-identity.js.map +1 -0
  13. package/dist/cliproxy/accounts/query.d.ts.map +1 -1
  14. package/dist/cliproxy/accounts/query.js +15 -8
  15. package/dist/cliproxy/accounts/query.js.map +1 -1
  16. package/dist/cliproxy/accounts/registry.d.ts +6 -0
  17. package/dist/cliproxy/accounts/registry.d.ts.map +1 -1
  18. package/dist/cliproxy/accounts/registry.js +136 -42
  19. package/dist/cliproxy/accounts/registry.js.map +1 -1
  20. package/dist/cliproxy/auth/token-manager.d.ts.map +1 -1
  21. package/dist/cliproxy/auth/token-manager.js +45 -11
  22. package/dist/cliproxy/auth/token-manager.js.map +1 -1
  23. package/dist/cliproxy/executor/index.d.ts.map +1 -1
  24. package/dist/cliproxy/executor/index.js +25 -12
  25. package/dist/cliproxy/executor/index.js.map +1 -1
  26. package/dist/cliproxy/quota-fetcher-codex.d.ts +0 -3
  27. package/dist/cliproxy/quota-fetcher-codex.d.ts.map +1 -1
  28. package/dist/cliproxy/quota-fetcher-codex.js +46 -17
  29. package/dist/cliproxy/quota-fetcher-codex.js.map +1 -1
  30. package/dist/cliproxy/services/variant-settings.d.ts.map +1 -1
  31. package/dist/cliproxy/services/variant-settings.js +4 -6
  32. package/dist/cliproxy/services/variant-settings.js.map +1 -1
  33. package/dist/cliproxy/stats-transformer.d.ts.map +1 -1
  34. package/dist/cliproxy/stats-transformer.js +26 -3
  35. package/dist/cliproxy/stats-transformer.js.map +1 -1
  36. package/dist/commands/cliproxy/quota-subcommand.d.ts.map +1 -1
  37. package/dist/commands/cliproxy/quota-subcommand.js +25 -22
  38. package/dist/commands/cliproxy/quota-subcommand.js.map +1 -1
  39. package/dist/commands/cliproxy/variant-subcommand.d.ts.map +1 -1
  40. package/dist/commands/cliproxy/variant-subcommand.js +14 -6
  41. package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
  42. package/dist/commands/install-command.d.ts.map +1 -1
  43. package/dist/commands/install-command.js +8 -2
  44. package/dist/commands/install-command.js.map +1 -1
  45. package/dist/copilot/copilot-executor.d.ts.map +1 -1
  46. package/dist/copilot/copilot-executor.js +11 -2
  47. package/dist/copilot/copilot-executor.js.map +1 -1
  48. package/dist/delegation/executor/result-aggregator.d.ts +2 -1
  49. package/dist/delegation/executor/result-aggregator.d.ts.map +1 -1
  50. package/dist/delegation/executor/result-aggregator.js +21 -1
  51. package/dist/delegation/executor/result-aggregator.js.map +1 -1
  52. package/dist/delegation/executor/types.d.ts +6 -0
  53. package/dist/delegation/executor/types.d.ts.map +1 -1
  54. package/dist/delegation/headless-executor.d.ts.map +1 -1
  55. package/dist/delegation/headless-executor.js +69 -4
  56. package/dist/delegation/headless-executor.js.map +1 -1
  57. package/dist/management/instance-manager.d.ts +1 -1
  58. package/dist/management/instance-manager.d.ts.map +1 -1
  59. package/dist/management/instance-manager.js +10 -2
  60. package/dist/management/instance-manager.js.map +1 -1
  61. package/dist/shared/compatible-cli-contracts.d.ts +4 -0
  62. package/dist/shared/compatible-cli-contracts.d.ts.map +1 -1
  63. package/dist/targets/codex-adapter.d.ts.map +1 -1
  64. package/dist/targets/codex-adapter.js +78 -3
  65. package/dist/targets/codex-adapter.js.map +1 -1
  66. package/dist/targets/codex-detector.d.ts.map +1 -1
  67. package/dist/targets/codex-detector.js +28 -7
  68. package/dist/targets/codex-detector.js.map +1 -1
  69. package/dist/ui/assets/{accounts-DkxZnPJE.js → accounts-CUUJb7DN.js} +1 -1
  70. package/dist/ui/assets/{alert-dialog-CiYMglgR.js → alert-dialog-B3irFOWw.js} +1 -1
  71. package/dist/ui/assets/{api-DaOtMRT4.js → api-D-Qqy1yz.js} +2 -2
  72. package/dist/ui/assets/{auth-section-BMaKBRA_.js → auth-section-DIo3G68G.js} +1 -1
  73. package/dist/ui/assets/{backups-section-DOpSADoH.js → backups-section-AFO82gIq.js} +1 -1
  74. package/dist/ui/assets/{channels-zDFV-BlC.js → channels-BCTKZ7gt.js} +1 -1
  75. package/dist/ui/assets/{checkbox-Cb5AZBZL.js → checkbox-jPTeVbcz.js} +1 -1
  76. package/dist/ui/assets/{claude-extension-B5RngGem.js → claude-extension-BNiAud6L.js} +1 -1
  77. package/dist/ui/assets/cliproxy-CoYvAxcj.js +3 -0
  78. package/dist/ui/assets/{cliproxy-ai-providers-DVaaS-CT.js → cliproxy-ai-providers-C9jXuZcV.js} +1 -1
  79. package/dist/ui/assets/cliproxy-control-panel-DRSjNcrR.js +1 -0
  80. package/dist/ui/assets/codex-DSAAz_k8.js +27 -0
  81. package/dist/ui/assets/{confirm-dialog-B9vRgowr.js → confirm-dialog-Dn7GsgSZ.js} +1 -1
  82. package/dist/ui/assets/{copilot-HvsOp6hu.js → copilot-Ddvc59py.js} +2 -2
  83. package/dist/ui/assets/{cursor-C1XOjAWS.js → cursor-CPLxNsYY.js} +1 -1
  84. package/dist/ui/assets/{droid-DshEfT1H.js → droid-C5ArrKfL.js} +1 -1
  85. package/dist/ui/assets/{globalenv-section-CmcMkb6z.js → globalenv-section-CddBw-9L.js} +1 -1
  86. package/dist/ui/assets/{health-CE0VQs6K.js → health-7Wp3Ar7n.js} +1 -1
  87. package/dist/ui/assets/icons-C7Np5k44.js +1 -0
  88. package/dist/ui/assets/{index-CmKclBR1.js → index-1GqjYVWP.js} +1 -1
  89. package/dist/ui/assets/{index-CmtSgCxo.js → index-BPIA8mAF.js} +1 -1
  90. package/dist/ui/assets/index-BsTZB-Im.css +1 -0
  91. package/dist/ui/assets/{index-DAtuJuGe.js → index-C7OpByHy.js} +36 -36
  92. package/dist/ui/assets/index-CBwOAp7P.js +1 -0
  93. package/dist/ui/assets/{index-CesVGA6m.js → index-DSgKWnG8.js} +1 -1
  94. package/dist/ui/assets/{masked-input-B2tcbvAj.js → masked-input-BlP9jFt5.js} +1 -1
  95. package/dist/ui/assets/{proxy-status-widget-BnJD49TF.js → proxy-status-widget-CFyrt5Yw.js} +1 -1
  96. package/dist/ui/assets/{raw-json-settings-editor-panel-DnUbq1__.js → raw-json-settings-editor-panel-CfcTOhs4.js} +1 -1
  97. package/dist/ui/assets/{searchable-select-ULayr5K1.js → searchable-select-CcCH2Ug3.js} +1 -1
  98. package/dist/ui/assets/{separator--ZH5ZM-3.js → separator-DRULo1eG.js} +1 -1
  99. package/dist/ui/assets/shared-ByRk7nxS.js +8 -0
  100. package/dist/ui/assets/{switch-DmDIWykO.js → switch-BO_9wSB8.js} +1 -1
  101. package/dist/ui/assets/{table-E5IxHhrW.js → table-84HxfWMM.js} +1 -1
  102. package/dist/ui/assets/tanstack-CkjseTWE.js +4 -0
  103. package/dist/ui/assets/updates-BgPdUQoA.js +1 -0
  104. package/dist/ui/index.html +4 -4
  105. package/dist/utils/claude-config-path.d.ts +2 -0
  106. package/dist/utils/claude-config-path.d.ts.map +1 -1
  107. package/dist/utils/claude-config-path.js +6 -1
  108. package/dist/utils/claude-config-path.js.map +1 -1
  109. package/dist/utils/websearch/claude-tool-args.d.ts +5 -0
  110. package/dist/utils/websearch/claude-tool-args.d.ts.map +1 -0
  111. package/dist/utils/websearch/claude-tool-args.js +125 -0
  112. package/dist/utils/websearch/claude-tool-args.js.map +1 -0
  113. package/dist/utils/websearch/hook-env.d.ts.map +1 -1
  114. package/dist/utils/websearch/hook-env.js +8 -0
  115. package/dist/utils/websearch/hook-env.js.map +1 -1
  116. package/dist/utils/websearch/hook-installer.d.ts +3 -2
  117. package/dist/utils/websearch/hook-installer.d.ts.map +1 -1
  118. package/dist/utils/websearch/hook-installer.js +3 -2
  119. package/dist/utils/websearch/hook-installer.js.map +1 -1
  120. package/dist/utils/websearch/index.d.ts +3 -0
  121. package/dist/utils/websearch/index.d.ts.map +1 -1
  122. package/dist/utils/websearch/index.js +23 -2
  123. package/dist/utils/websearch/index.js.map +1 -1
  124. package/dist/utils/websearch/mcp-installer.d.ts +14 -0
  125. package/dist/utils/websearch/mcp-installer.d.ts.map +1 -0
  126. package/dist/utils/websearch/mcp-installer.js +351 -0
  127. package/dist/utils/websearch/mcp-installer.js.map +1 -0
  128. package/dist/utils/websearch/profile-hook-injector.d.ts +5 -3
  129. package/dist/utils/websearch/profile-hook-injector.d.ts.map +1 -1
  130. package/dist/utils/websearch/profile-hook-injector.js +5 -3
  131. package/dist/utils/websearch/profile-hook-injector.js.map +1 -1
  132. package/dist/utils/websearch/status.d.ts.map +1 -1
  133. package/dist/utils/websearch/status.js +67 -1
  134. package/dist/utils/websearch/status.js.map +1 -1
  135. package/dist/utils/websearch/trace.d.ts +23 -0
  136. package/dist/utils/websearch/trace.d.ts.map +1 -0
  137. package/dist/utils/websearch/trace.js +206 -0
  138. package/dist/utils/websearch/trace.js.map +1 -0
  139. package/dist/utils/websearch-manager.d.ts +11 -11
  140. package/dist/utils/websearch-manager.d.ts.map +1 -1
  141. package/dist/utils/websearch-manager.js +32 -17
  142. package/dist/utils/websearch-manager.js.map +1 -1
  143. package/dist/web-server/index.d.ts.map +1 -1
  144. package/dist/web-server/index.js +3 -0
  145. package/dist/web-server/index.js.map +1 -1
  146. package/dist/web-server/routes/account-routes.d.ts.map +1 -1
  147. package/dist/web-server/routes/account-routes.js +2 -1
  148. package/dist/web-server/routes/account-routes.js.map +1 -1
  149. package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
  150. package/dist/web-server/routes/cliproxy-auth-routes.js +1 -1
  151. package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
  152. package/dist/web-server/routes/cliproxy-local-proxy.d.ts +20 -0
  153. package/dist/web-server/routes/cliproxy-local-proxy.d.ts.map +1 -0
  154. package/dist/web-server/routes/cliproxy-local-proxy.js +117 -0
  155. package/dist/web-server/routes/cliproxy-local-proxy.js.map +1 -0
  156. package/dist/web-server/services/codex-dashboard-service.d.ts.map +1 -1
  157. package/dist/web-server/services/codex-dashboard-service.js +27 -8
  158. package/dist/web-server/services/codex-dashboard-service.js.map +1 -1
  159. package/lib/hooks/websearch-transformer.cjs +660 -96
  160. package/lib/mcp/ccs-websearch-server.cjs +339 -0
  161. package/package.json +2 -1
  162. package/scripts/github/normalize-ai-review-output.mjs +328 -0
  163. package/dist/ui/assets/cliproxy-VYe0Qov1.js +0 -3
  164. package/dist/ui/assets/cliproxy-control-panel-FVIQcFti.js +0 -1
  165. package/dist/ui/assets/codex-D2yIwOs4.js +0 -27
  166. package/dist/ui/assets/icons-EMBHZkGo.js +0 -1
  167. package/dist/ui/assets/index-6dNBcNC3.js +0 -1
  168. package/dist/ui/assets/index-BAuT6yuc.css +0 -1
  169. package/dist/ui/assets/shared-qizFb9Ye.js +0 -8
  170. package/dist/ui/assets/tanstack-B8i0evp-.js +0 -4
  171. package/dist/ui/assets/updates-2Uu4Mgtg.js +0 -1
@@ -1,3 +0,0 @@
1
- import{j as e}from"./radix-ui-Dt3edmE5.js";import{r as c}from"./react-vendor-CNOkPC89.js";import{a as Je,u as ws,b as Ys}from"./tanstack-B8i0evp-.js";import{a8 as Zs,d as I,C as bs,b as ys,c as B,P as Ee,a as ee,a9 as se,L as Z,I as de,r as Cs,s as ks,t as As,v as Ps,w as Ge,aa as Ss,ab as et,ac as st,ad as tt,u as Ms,ae as We,af as Xe,ag as Ye,ah as Ze,ai as Ds,aj as rs,ak as at,al as nt,W as Ts,am as Ve,an as Es,Y as Me,B as G,ao as Be,ap as os,aq as it,ar as rt,as as ot,at as lt,au as ct,av as ls,aw as dt,x as Rs,n as es,ax as ss,ay as cs,az as ut,m as mt,aA as pt,aB as xt,aC as ht,aD as gt,aE as ft,aF as vt,aG as jt,aH as Nt,aI as fe,T as ve,p as je,q as Ne,aJ as wt,aK as bt,aL as yt,aM as ds,aN as Ct,aO as kt,aP as At,aQ as Pt,aR as St,aS as Mt,aT as Dt,Q as Tt,R as Et,U as us,V as ms,aU as Rt,aV as _t,aW as Ot,aX as It,aY as Lt,aZ as Ft,a_ as Ut,a$ as qt,b0 as Ht,b1 as Kt,b2 as Gt,b3 as Vt,S as Bt}from"./index-DAtuJuGe.js";import{C as $e}from"./default-ports-1QQSffYX.js";import{t as H}from"./notifications-B2HqRBj7.js";import{C as _s,L as W,o as me,Q as $t,l as ue,n as Os,au as ts,R as as,p as pe,a4 as ye,T as Re,a2 as zt,av as Is,at as Qt,aw as _e,Z as Ce,O as Ls,h as Jt,t as Fs,ax as Wt,ak as Xt,X as ns,a3 as Us,m as Yt,x as Zt,y as qs,z as ze,ay as ea,u as ps,az as sa,aj as Hs,v as ta,aA as xs,an as aa,aB as Ks}from"./icons-EMBHZkGo.js";import{R as De,A as hs,D as qe,i as na,a as ia}from"./antigravity-responsibility-constants-Bvh4Ybz0.js";import{C as Te}from"./checkbox-Cb5AZBZL.js";import{C as ra}from"./confirm-dialog-B9vRgowr.js";import{S as is}from"./separator--ZH5ZM-3.js";import{S as oa}from"./searchable-select-ULayr5K1.js";import{S as Gs}from"./switch-DmDIWykO.js";import{P as la}from"./proxy-status-widget-BnJD49TF.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-CiYMglgR.js";const Vs=Object.freeze({"gemini-3-pro-preview":"gemini-3.1-pro-preview","gemini-3.1-pro-preview":"gemini-3-pro-preview","gemini-3-flash-preview":"gemini-3.1-flash-preview","gemini-3.1-flash-preview":"gemini-3-flash-preview"}),ca=/^gemini-(\d+(?:[.-]\d+)*)-(pro|flash)-preview(-customtools)?$/i;function be(s){return Zs(s).toLowerCase()}function Oe(s){const t=be(s),a=t.match(ca);if(!a)return null;const[,n,i,l]=a;return{normalizedId:t,version:n.split(/[.-]/).map(d=>Number(d)),family:i,customtools:!!l,dottedVersion:n.includes(".")}}function Bs(s,t){const a=Math.max(s.length,t.length);for(let n=0;n<a;n+=1){const i=s[n]??0,l=t[n]??0;if(i!==l)return i>l?1:-1}return 0}function da(s,t,a){if(s.customtools!==t.customtools)return s.customtools?1:-1;const n=Bs(s.version,t.version);if(n!==0)return n>0?-1:1;const i=+(s.dottedVersion===a.dottedVersion),l=+(t.dottedVersion===a.dottedVersion);return i!==l?l-i:s.normalizedId.localeCompare(t.normalizedId)}function gs(s,t){const a=be(t);return s.find(n=>be(n.id)===a)?.id}function ua(s,t){const a=Oe(s);return!a||t.length===0?void 0:t.map(i=>{const l=Oe(i.id);return!l||l.family!==a.family?null:{id:i.id,info:l}}).filter(i=>!!i).sort((i,l)=>da(i.info,l.info,a))[0]?.id}const xe={agy:{provider:"agy",displayName:"Antigravity",defaultModel:"claude-opus-4-6-thinking",models:[{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",description:"Latest flagship, extended thinking",extendedContext:!1,presetMapping:{default:"claude-opus-4-6-thinking",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6",haiku:"claude-sonnet-4-6"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Latest Sonnet with thinking budget support",presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6-thinking",sonnet:"claude-sonnet-4-6",haiku:"claude-sonnet-4-6"}},{id:"gemini-3.1-pro-preview",name:"Gemini Pro",description:"Resolves to the best advertised Gemini Pro preview via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3.1-pro-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini Flash",description:"Resolves to the best advertised Gemini Flash preview via Antigravity",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-flash-preview"}}]},gemini:{provider:"gemini",displayName:"Gemini",defaultModel:"gemini-2.5-pro",models:[{id:"gemini-3.1-pro-preview",name:"Gemini Pro",tier:"paid",description:"Uses the best advertised Gemini Pro preview when Google exposes one",extendedContext:!0,presetMapping:{default:"gemini-3.1-pro-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-3-flash-preview",name:"Gemini Flash",tier:"paid",description:"Uses the best advertised Gemini Flash preview when Google exposes one",extendedContext:!0,presetMapping:{default:"gemini-3-flash-preview",opus:"gemini-3.1-pro-preview",sonnet:"gemini-3.1-pro-preview",haiku:"gemini-3-flash-preview"}},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",description:"Stable, works with free Google account",extendedContext:!0,presetMapping:{default:"gemini-2.5-pro",opus:"gemini-2.5-pro",sonnet:"gemini-2.5-pro",haiku:"gemini-2.5-flash"}}]},codex:{provider:"codex",displayName:"Codex",defaultModel:"gpt-5-codex",models:[{id:"gpt-5-codex",name:"GPT-5 Codex",description:"Cross-plan safe Codex default",presetMapping:{default:"gpt-5-codex",opus:"gpt-5-codex",sonnet:"gpt-5-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5-codex-mini",name:"GPT-5 Codex Mini",description:"Faster and cheaper Codex option",presetMapping:{default:"gpt-5-codex-mini",opus:"gpt-5-codex",sonnet:"gpt-5-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"Legacy mini model ID kept for backwards compatibility",presetMapping:{default:"gpt-5-mini",opus:"gpt-5-codex",sonnet:"gpt-5-mini",haiku:"gpt-5-mini"}},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini",description:"Legacy fast Codex mini model",presetMapping:{default:"gpt-5.1-codex-mini",opus:"gpt-5.1-codex-max",sonnet:"gpt-5.1-codex-max",haiku:"gpt-5.1-codex-mini"}},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max",description:"Higher-effort Codex model with xhigh support",presetMapping:{default:"gpt-5.1-codex-max",opus:"gpt-5.1-codex-max",sonnet:"gpt-5.1-codex-max",haiku:"gpt-5.1-codex-mini"}},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",description:"Cross-plan Codex model with xhigh support",presetMapping:{default:"gpt-5.2-codex",opus:"gpt-5.2-codex",sonnet:"gpt-5.2-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",tier:"paid",description:"Paid Codex plans only",presetMapping:{default:"gpt-5.3-codex",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",tier:"paid",description:"Paid Codex plans only, ultra-fast coding model",presetMapping:{default:"gpt-5.3-codex-spark",opus:"gpt-5.3-codex",sonnet:"gpt-5.3-codex",haiku:"gpt-5-codex-mini"}},{id:"gpt-5.4",name:"GPT-5.4",tier:"paid",description:"Paid Codex plans only, latest GPT-5 family model",presetMapping:{default:"gpt-5.4",opus:"gpt-5.4",sonnet:"gpt-5.4",haiku:"gpt-5-codex-mini"}}]},qwen:{provider:"qwen",displayName:"Qwen",defaultModel:"qwen3-coder-plus",models:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus",description:"Code-focused model (1M context)",presetMapping:{default:"qwen3-coder-plus",opus:"qwen3-max",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-flash"}},{id:"qwen3-max",name:"Qwen3 Max",description:"Flagship model (256K context)",presetMapping:{default:"qwen3-max",opus:"qwen3-max",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-flash"}},{id:"qwen3-max-preview",name:"Qwen3 Max Preview",description:"Preview with thinking support (256K)",presetMapping:{default:"qwen3-max-preview",opus:"qwen3-max-preview",sonnet:"qwen3-max",haiku:"qwen3-coder-flash"}},{id:"qwen3-235b",name:"Qwen3 235B",description:"Large 235B A22B model",presetMapping:{default:"qwen3-235b",opus:"qwen3-max",sonnet:"qwen3-235b",haiku:"qwen3-coder-flash"}},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus",description:"Vision-language multimodal"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash",description:"Fast code generation"},{id:"qwen3-32b",name:"Qwen3 32B",description:"Qwen3 32B model"}]},iflow:{provider:"iflow",displayName:"iFlow",defaultModel:"qwen3-coder-plus",models:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus",description:"Recommended default for iFlow accounts",presetMapping:{default:"qwen3-coder-plus",opus:"qwen3-coder-plus",sonnet:"qwen3-coder-plus",haiku:"qwen3-coder-plus"}},{id:"qwen3-max",name:"Qwen3 Max",description:"Flagship Qwen model via iFlow"},{id:"kimi-k2",name:"Kimi K2",description:"Kimi model currently available via iFlow"},{id:"deepseek-v3.2",name:"DeepSeek V3.2",description:"Current DeepSeek V3.2 model via iFlow"},{id:"deepseek-r1",name:"DeepSeek R1",description:"Reasoning-focused DeepSeek model"},{id:"glm-4.6",name:"GLM 4.6",description:"Zhipu GLM 4.6 via iFlow"},{id:"qwen3-vl-plus",name:"Qwen3 VL Plus",description:"Vision-language model"}]},kimi:{provider:"kimi",displayName:"Kimi (Moonshot)",defaultModel:"kimi-k2.5",models:[{id:"kimi-k2.5",name:"Kimi K2.5",description:"Latest multimodal model (262K context)",presetMapping:{default:"kimi-k2.5",opus:"kimi-k2.5",sonnet:"kimi-k2-thinking",haiku:"kimi-k2"}},{id:"kimi-k2-thinking",name:"Kimi K2 Thinking",description:"Extended reasoning model",presetMapping:{default:"kimi-k2-thinking",opus:"kimi-k2.5",sonnet:"kimi-k2-thinking",haiku:"kimi-k2"}},{id:"kimi-k2",name:"Kimi K2",description:"Flagship coding model"}]},kiro:{provider:"kiro",displayName:"Kiro (AWS)",defaultModel:"kiro-claude-sonnet-4-5",models:[{id:"kiro-claude-opus-4-5",name:"Kiro Claude Opus 4.5",description:"Claude Opus 4.5 via Kiro (2.2x credit)",presetMapping:{default:"kiro-claude-opus-4-5",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4-5",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4-5",name:"Kiro Claude Sonnet 4.5",description:"Claude Sonnet 4.5 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4-5",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4-5",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-sonnet-4",name:"Kiro Claude Sonnet 4",description:"Claude Sonnet 4 via Kiro (1.3x credit)",presetMapping:{default:"kiro-claude-sonnet-4",opus:"kiro-claude-opus-4-5",sonnet:"kiro-claude-sonnet-4",haiku:"kiro-claude-haiku-4-5"}},{id:"kiro-claude-haiku-4-5",name:"Kiro Claude Haiku 4.5",description:"Claude Haiku 4.5 via Kiro (0.4x credit)"}]},ghcp:{provider:"ghcp",displayName:"GitHub Copilot (OAuth)",defaultModel:"claude-sonnet-4.5",models:[{id:"claude-opus-4.5",name:"Claude Opus 4.5",description:"Anthropic Claude Opus 4.5 via GitHub Copilot",presetMapping:{default:"claude-opus-4.5",opus:"claude-opus-4.5",sonnet:"claude-sonnet-4.5",haiku:"claude-haiku-4.5"}},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",description:"Anthropic Claude Sonnet 4.5 via GitHub Copilot",presetMapping:{default:"claude-sonnet-4.5",opus:"claude-opus-4.5",sonnet:"claude-sonnet-4.5",haiku:"claude-haiku-4.5"}},{id:"claude-sonnet-4",name:"Claude Sonnet 4",description:"Anthropic Claude Sonnet 4 via GitHub Copilot"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",description:"Anthropic Claude Haiku 4.5 via GitHub Copilot"},{id:"gpt-5.2",name:"GPT-5.2",description:"OpenAI GPT-5.2 via GitHub Copilot",presetMapping:{default:"gpt-5.2",opus:"gpt-5.2",sonnet:"gpt-5.1",haiku:"gpt-5-mini"}},{id:"gpt-5.1",name:"GPT-5.1",description:"OpenAI GPT-5.1 via GitHub Copilot"},{id:"gpt-5",name:"GPT-5",description:"OpenAI GPT-5 via GitHub Copilot"},{id:"gpt-5-mini",name:"GPT-5 Mini",description:"OpenAI GPT-5 Mini via GitHub Copilot"},{id:"gemini-3-pro",name:"Gemini 3 Pro",description:"Google Gemini 3 Pro via GitHub Copilot"}]},claude:{provider:"claude",displayName:"Claude (Anthropic)",defaultModel:"claude-sonnet-4-6",models:[{id:"claude-opus-4-6",name:"Claude Opus 4.6",description:"Latest flagship model",extendedContext:!0,presetMapping:{default:"claude-opus-4-6",opus:"claude-opus-4-6",sonnet:"claude-sonnet-4-6",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",description:"Balanced performance and speed",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-6",opus:"claude-opus-4-6",sonnet:"claude-sonnet-4-6",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",description:"Most capable Claude model",extendedContext:!0,presetMapping:{default:"claude-opus-4-5-20251101",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",description:"Balanced performance and speed",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-5-20250929",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-5-20250929",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4",description:"Previous generation Sonnet",extendedContext:!0,presetMapping:{default:"claude-sonnet-4-20250514",opus:"claude-opus-4-5-20251101",sonnet:"claude-sonnet-4-20250514",haiku:"claude-haiku-4-5-20251001"}},{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",description:"Fast and efficient"}]}};function $s(s,t){const a=xe[s.toLowerCase()];if(!a)return;const n=be(t),i=Vs[n.toLowerCase()],l=a.models.find(r=>r.id===n||r.id===i);if(l)return l;const d=Oe(n);if(d)return a.models.map(r=>({model:r,info:Oe(r.id)})).filter(r=>!!(r.info&&r.info.family===d.family)).sort((r,o)=>Bs(o.info.version,r.info.version))[0]?.model}function we(s,t=[]){const a=be(s),n=ua(a,t);if(n)return n;const i=gs(t,a);if(i)return i;const l=Vs[a];return(l?gs(t,l):void 0)??a}function ma(s,t=[]){return{default:we(s.default,t),opus:we(s.opus,t),sonnet:we(s.sonnet,t),haiku:we(s.haiku,t)}}function zs(s,t=[]){if(!s)return[];const a=new Set;return s.models.map(n=>{const i=we(n.id,t),l=n.presetMapping?ma(n.presetMapping,t):void 0;return{...n,id:i,presetMapping:l}}).filter(n=>a.has(n.id)?!1:(a.add(n.id),!0))}function pa(s,t){return $s(s,t)?.extendedContext===!0}const He="ccs-internal-managed";async function xa(){try{const s=await fetch("/api/settings/auth/tokens/raw");return s.ok?(await s.json())?.apiKey?.value??He:He}catch{return He}}async function Qe(s,t){const a=xe[s];if(!a)return{success:!1};const n=a.models.find(o=>o.id===a.defaultModel)||a.models[0],i=n?.presetMapping||{default:a.defaultModel,opus:a.defaultModel,sonnet:a.defaultModel,haiku:a.defaultModel},l=await xa(),r={env:{ANTHROPIC_BASE_URL:`http://127.0.0.1:${$e}/api/provider/${s}`,ANTHROPIC_AUTH_TOKEN:l,ANTHROPIC_MODEL:i.default,ANTHROPIC_DEFAULT_OPUS_MODEL:i.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:i.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:i.haiku}};try{return{success:(await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:r})})).ok,presetName:n?.name||a.defaultModel}}catch{return{success:!1}}}function ha({currentProgress:s,allSteps:t}){return e.jsx("div",{className:"flex justify-center gap-1 pt-2",children:t.map((a,n)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${s>=n?"bg-primary":"bg-muted"}`},a))})}function ga({providers:s,onSelect:t}){return e.jsx("div",{className:"grid gap-2",children:s.map(a=>e.jsxs("button",{onClick:()=>t(a.id),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:a.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:a.description})]}),e.jsx(_s,{className:"w-4 h-4 text-muted-foreground"})]},a.id))})}function fa({selectedProvider:s,providers:t,authCommand:a,isRefreshing:n,isPending:i,onBack:l,onStartAuth:d,onRefresh:r}){const[o,u]=c.useState(!1),N=async w=>{await navigator.clipboard.writeText(w),u(!0),setTimeout(()=>u(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Authenticate with ",t.find(w=>w.id===s)?.name," to add an account"]}),e.jsx(I,{onClick:d,disabled:i,className:"w-full gap-2",size:"lg",children:i?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-4 h-4 animate-spin"}),"Authenticating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-4 h-4"}),"Authenticate in Browser"]})}),i&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Complete the OAuth flow in your browser..."})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or use terminal"})})]}),e.jsx(bs,{children:e.jsxs(ys,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx($t,{className:"w-4 h-4"}),"Run this command in your terminal:"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 px-3 py-2 bg-muted rounded-md font-mono text-sm",children:a}),e.jsx(I,{variant:"outline",size:"icon",onClick:()=>N(a),children:o?e.jsx(ue,{className:"w-4 h-4 text-green-500"}):e.jsx(Os,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(I,{variant:"ghost",onClick:l,disabled:i,children:[e.jsx(ts,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs(I,{variant:"outline",onClick:r,disabled:n||i,children:[e.jsx(as,{className:`w-4 h-4 mr-2 ${n?"animate-spin":""}`}),n?"Checking...":"Refresh Status"]})]})]})}function va({accounts:s,privacyMode:t,onSelect:a,onAddNew:n,onBack:i}){return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Select an account (",s.length,")"]}),e.jsx("div",{className:"grid gap-2 max-h-[320px] overflow-y-auto pr-1",children:s.map(l=>e.jsxs("button",{type:"button",onClick:()=>a(l),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center",children:e.jsx(pe,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsx("div",{className:B("font-medium",t&&Ee),children:l.email||l.id}),l.isDefault&&e.jsx("div",{className:"text-xs text-muted-foreground",children:"Default account"})]})]}),e.jsx(_s,{className:"w-4 h-4 text-muted-foreground"})]},l.id))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or"})})]}),e.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 p-3 border-2 border-dashed border-primary/50 rounded-lg hover:border-primary hover:bg-primary/5 transition-colors text-left",onClick:n,children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(me,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-primary",children:"Add new account"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Authenticate with a different account"})]})]}),e.jsx("div",{className:"flex items-center justify-between pt-2",children:e.jsxs(I,{variant:"ghost",onClick:i,children:[e.jsx(ts,{className:"w-4 h-4 mr-2"}),"Back"]})})]})}const fs="__custom__";function ja({selectedProvider:s,selectedAccount:t,variantName:a,modelName:n,isPending:i,privacyMode:l,onVariantNameChange:d,onModelChange:r,onBack:o,onSkip:u,onCreate:N}){const{t:w}=ee(),f=xe[s]?.models||[],O=n&&!f.some(g=>g.id===n),[j,k]=c.useState(O),A=s==="agy"&&n.trim().length>0?se(n):!1,P=g=>{g===fs?(k(!0),r("")):(k(!1),r(g))};return e.jsxs("div",{className:"space-y-4",children:[t&&e.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted/50 rounded-md text-sm",children:[e.jsx(pe,{className:"w-4 h-4"}),e.jsxs("span",{children:[w("setupVariant.using")," ",e.jsx("span",{className:B(l&&Ee),children:t.email||t.id})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"variant-name",children:w("setupVariant.variantNameRequired")}),e.jsx(de,{id:"variant-name",value:a,onChange:g=>d(g.target.value),placeholder:w("setupVariant.variantNamePlaceholder")}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[w("setupVariant.invokeHintPrefix")," ccs ",a||"<name>",' "prompt"']})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:w("setupVariant.model")}),j?e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{value:n,onChange:g=>r(g.target.value),placeholder:w("setupVariant.modelPlaceholder")}),A&&e.jsx("p",{className:"text-xs text-destructive",children:"Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated."}),e.jsx("button",{type:"button",className:"text-xs text-primary hover:underline",onClick:()=>{k(!1),s==="agy"&&se(n)&&r("")},children:w("setupVariant.choosePresetInstead")})]}):e.jsxs(Cs,{value:f.some(g=>g.id===n)?n:"",onValueChange:P,children:[e.jsx(ks,{children:e.jsx(As,{placeholder:w("setupVariant.selectModel")})}),e.jsxs(Ps,{children:[f.map(g=>e.jsx(Ge,{value:g.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:g.name}),g.description&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["- ",g.description]})]})},g.id)),e.jsx(Ge,{value:fs,children:e.jsx("span",{className:"text-primary",children:w("setupVariant.customModelName")})})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:j?w("setupVariant.enterAnyModel"):w("setupVariant.defaultModel",{model:xe[s]?.defaultModel||w("setupVariant.providerDefault")})})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs(I,{variant:"ghost",onClick:o,children:[e.jsx(ts,{className:"w-4 h-4 mr-2"}),w("setupVariant.back")]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{variant:"ghost",onClick:u,children:w("setupVariant.skip")}),e.jsx(I,{onClick:N,disabled:!a||i||A,children:w(i?"setupVariant.creating":"setupVariant.createVariant")})]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:w("setupVariant.skipHint")})]})}function Na({variantName:s,onClose:t}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-16 h-16 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center",children:e.jsx(ue,{className:"w-8 h-8 text-green-600 dark:text-green-400"})})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-lg",children:"Variant Created!"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Your custom variant is ready to use"})]}),e.jsx(bs,{children:e.jsxs(ys,{className:"p-4 space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Usage:"}),e.jsxs("code",{className:"block px-3 py-2 bg-muted rounded-md font-mono text-sm",children:["ccs ",s,' "your prompt here"']})]})}),e.jsx(I,{onClick:t,className:"w-full",children:"Done"})]})}function wa({open:s,onClose:t}){const[a,n]=c.useState("provider"),[i,l]=c.useState(""),[d,r]=c.useState(null),[o,u]=c.useState(""),[N,w]=c.useState(""),[f,O]=c.useState(!1),[j,k]=c.useState(!1),{data:A,refetch:P}=Ss(),g=et(),p=st(),y=tt(),{privacyMode:C}=Ms(),M=A?.authStatus.find(E=>E.provider===i),m=c.useMemo(()=>M?.accounts||[],[M?.accounts]);c.useEffect(()=>{if(!s){const E=setTimeout(()=>{n("provider"),l(""),r(null),u(""),w(""),k(!1)},0);return()=>clearTimeout(E)}},[s]),c.useEffect(()=>{if(a==="auth"&&m.length>0&&!j){const E=setTimeout(()=>{n("account")},0);return()=>clearTimeout(E)}},[a,m,j]);const S=async()=>{O(!0),await P(),O(!1)},T=()=>{const E=(M?.accounts?.length||0)===0;p.mutate({provider:i},{onSuccess:async _=>{if(E){const K=await Qe(i);K.success&&K.presetName?H.success(`Applied "${K.presetName}" preset`):K.success||H.warning(Ts.t("commonToast.accountAddedPresetFailed"))}_.account&&(r(_.account),n("variant")),P()}})},U=E=>{l(E),(A?.authStatus.find(V=>V.provider===E)?.accounts||[]).length===0?n("auth"):n("account")},h=E=>{r(E),n("variant")},v=async()=>{if(!(!o||!i))try{await g.mutateAsync({name:o,provider:i,model:N||void 0,account:d?.id}),n("success")}catch(E){console.error("Failed to create variant:",E)}},b=`ccs ${i} --auth --add`,q=nt(a),L=E=>{if(!E&&(p.isPending&&i&&y.mutate(i),a==="success"||a==="provider")){t();return}};return e.jsx(We,{open:s,onOpenChange:L,children:e.jsxs(Xe,{className:"sm:max-w-lg",onPointerDownOutside:E=>{a!=="success"&&a!=="provider"&&E.preventDefault()},onEscapeKeyDown:E=>{(p.isPending||g.isPending)&&E.preventDefault()},children:[e.jsxs(Ye,{children:[e.jsxs(Ze,{className:"flex items-center gap-2",children:[e.jsx(ye,{className:"w-5 h-5 text-primary"}),"Quick Setup Wizard"]}),e.jsxs(Ds,{children:[a==="provider"&&"Select a provider to get started",a==="auth"&&"Authenticate with your provider",a==="account"&&"Select which account to use",a==="variant"&&"Create your custom variant",a==="success"&&"Setup complete!"]})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[a==="provider"&&e.jsx(ga,{providers:rs,onSelect:U}),a==="auth"&&e.jsx(fa,{selectedProvider:i,providers:rs,authCommand:b,isRefreshing:f,isPending:p.isPending,onBack:()=>n("provider"),onStartAuth:T,onRefresh:S}),a==="account"&&e.jsx(va,{accounts:m,privacyMode:C,onSelect:h,onAddNew:()=>{k(!0),n("auth")},onBack:()=>n("provider")}),a==="variant"&&e.jsx(ja,{selectedProvider:i,selectedAccount:d,variantName:o,modelName:N,isPending:g.isPending,privacyMode:C,onVariantNameChange:u,onModelChange:w,onBack:()=>m.length>0?n("account"):n("provider"),onSkip:t,onCreate:v}),a==="success"&&e.jsx(Na,{variantName:o,onClose:t})]}),e.jsx(ha,{currentProgress:q,allSteps:at})]})})}const ba=3e3,ya=300*1e3,Ca=3;async function Ke(s){const t=await s.text();if(!t)return{};try{return JSON.parse(t)}catch{const a=s.status>=400?`Request failed with status ${s.status}`:void 0;return a?{error:a}:{}}}const ce={provider:null,isAuthenticating:!1,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:!1};function ka(){const[s,t]=c.useState(ce),a=c.useRef(0),n=c.useRef(null),i=c.useRef(null),l=c.useRef(0),d=c.useRef(0),r=c.useRef(!1),o=Je(),u=c.useCallback(k=>k===a.current,[]),N=c.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),d.current=0},[]);c.useEffect(()=>()=>{n.current?.abort(),N(),r.current=!1},[N]);const w=c.useCallback(async(k,A,P)=>{if(u(P)){if(Date.now()-l.current>ya){N(),u(P)&&t(g=>({...g,isAuthenticating:!1,error:"Authentication timed out. Please try again."}));return}try{const g=await fetch(`/api/cliproxy/auth/${k}/status?state=${encodeURIComponent(A)}`);if(!u(P))return;const p=await g.json();if(d.current=0,p.status==="ok"){if(!(typeof p.account=="object"&&p.account!==null)){N();const C="Authenticated account could not be registered";H.error(C),t(M=>({...M,isAuthenticating:!1,error:C}));return}N(),o.invalidateQueries({queryKey:["cliproxy-auth"]}),o.invalidateQueries({queryKey:["cliproxy-accounts"]}),o.invalidateQueries({queryKey:["account-quota"]}),H.success(`${k} authentication successful`),r.current=!1,t(ce)}else if(p.status==="auth_url"){const y=p.url||p.auth_url;y&&(t(C=>({...C,authUrl:y})),r.current||(r.current=!0,window.open(y,"_blank")))}else if(p.status==="device_code"){N();const y=p.user_code&&p.verification_url?`Open ${p.verification_url} and enter code: ${p.user_code}`:"Switch to Device Code method and try again.";H.error("Provider returned Device Code flow in callback mode"),t(C=>({...C,isAuthenticating:!1,error:y}))}else if(p.status==="error"){N();const y=p.error||"Authentication failed";H.error(y),t(C=>({...C,isAuthenticating:!1,error:y}))}}catch(g){if(!u(P)||(d.current+=1,d.current<Ca))return;N();const p=g instanceof Error&&g.message.trim().length>0?g.message:"Lost contact with the auth status endpoint";H.error(p),t(y=>({...y,isAuthenticating:!1,error:p}))}}},[u,o,N]),f=c.useCallback(async(k,A)=>{if(!Ve(k)){t({...ce,error:`Unknown provider: ${k}`});return}n.current?.abort(),N(),r.current=!1,d.current=0;const P=new AbortController,g=a.current+1;a.current=g,n.current=P;const y=(A?.flowType||(Es(k)?"device_code":"authorization_code"))==="device_code",C=A?.startEndpoint||(y?"start":"start-url"),M={nickname:A?.nickname,kiroMethod:A?.kiroMethod,riskAcknowledgement:A?.riskAcknowledgement};t({provider:k,isAuthenticating:!0,error:null,authUrl:null,oauthState:null,isSubmittingCallback:!1,isDeviceCodeFlow:y});try{if(C==="start")fetch(`/api/cliproxy/auth/${k}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M),signal:P.signal}).then(async m=>{if(!u(g))return;const S=await Ke(m);if(!u(g))return;const T=S.success===!0,U=typeof S.account=="object"&&S.account!==null;if(m.ok&&T&&U)o.invalidateQueries({queryKey:["cliproxy-auth"]}),o.invalidateQueries({queryKey:["cliproxy-accounts"]}),o.invalidateQueries({queryKey:["account-quota"]}),r.current=!1,t(ce);else{const h=typeof S.error=="string"?S.error:T?"Authenticated account could not be registered":"Authentication failed";H.error(h),t(v=>({...v,isAuthenticating:!1,error:h}))}}).catch(m=>{if(!u(g)||m instanceof Error&&m.name==="AbortError")return;const S=m instanceof Error?m.message:"Authentication failed";H.error(S),t(T=>({...T,isAuthenticating:!1,error:S}))});else{const m=await fetch(`/api/cliproxy/auth/${k}/start-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M),signal:P.signal});if(!u(g))return;const S=await Ke(m);if(!u(g))return;const T=S.success===!0;if(!m.ok||!T){const v=typeof S.error=="string"?S.error:"Failed to start OAuth";throw new Error(v)}const U=typeof S.authUrl=="string"?S.authUrl:null,h=typeof S.state=="string"?S.state:null;t(v=>({...v,authUrl:U,oauthState:h})),U&&(r.current=!0,window.open(U,"_blank")),h&&(l.current=Date.now(),i.current=setInterval(()=>{w(k,h,g)},ba))}}catch(m){if(!u(g))return;if(m instanceof Error&&m.name==="AbortError"){r.current=!1,t(ce);return}const S=m instanceof Error?m.message:"Authentication failed";H.error(S),t(T=>({...T,isAuthenticating:!1,error:S}))}},[u,w,N,o]),O=c.useCallback(()=>{const k=s.provider;a.current+=1,n.current?.abort(),N(),r.current=!1,t(ce),k&&Me.cliproxy.auth.cancel(k).catch(()=>{})},[s.provider,N]),j=c.useCallback(async k=>{if(!s.provider)return;const A=a.current,P=s.provider;t(g=>({...g,isSubmittingCallback:!0,error:null}));try{const g=await fetch(`/api/cliproxy/auth/${P}/submit-callback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirectUrl:k})});if(!u(A))return;const p=await Ke(g);if(!u(A))return;const y=p.success===!0,C=typeof p.account=="object"&&p.account!==null;if(g.ok&&y&&C)N(),o.invalidateQueries({queryKey:["cliproxy-auth"]}),o.invalidateQueries({queryKey:["cliproxy-accounts"]}),o.invalidateQueries({queryKey:["account-quota"]}),H.success(`${P} authentication successful`),t(ce);else{const M=typeof p.error=="string"?p.error:y?"Authenticated account could not be registered":"Callback submission failed";throw new Error(M)}}catch(g){if(!u(A))return;const p=g instanceof Error?g.message:"Failed to submit callback";H.error(p),t(y=>({...y,isSubmittingCallback:!1,error:p}))}},[u,s.provider,o,N]);return c.useMemo(()=>({...s,startAuth:f,cancelAuth:O,submitCallback:j}),[s,f,O,j])}function Qs({className:s,showAcknowledgement:t=!1,acknowledgementPhrase:a=De,acknowledgementText:n="",onAcknowledgementTextChange:i,disabled:l=!1,showProxySettingsLink:d=!1}){const{t:r}=ee(),o=r("accountSafetyWarning.title"),u=r("accountSafetyWarning.subtitle"),N=r("accountSafetyWarning.firstLine"),w=r("accountSafetyWarning.secondLine"),f="https://github.com/kaitranntt/ccs/issues/509",O=r("accountSafetyWarning.issueLabel"),j=r("accountSafetyWarning.proxySettingsLabel");return e.jsxs("section",{role:"alert",className:B("relative overflow-hidden rounded-xl border border-amber-500/30 bg-gradient-to-br from-amber-50 via-background to-rose-50/70 shadow-sm dark:from-amber-950/20 dark:to-rose-950/20",s),children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-0.5 bg-gradient-to-r from-amber-500 via-orange-500 to-rose-500"}),e.jsxs("div",{className:"space-y-3 p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"mt-0.5 inline-flex h-7 w-7 items-center justify-center rounded-md bg-amber-500/15 text-amber-700 dark:text-amber-400",children:e.jsx(Re,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:o}),e.jsx("p",{className:"text-xs text-muted-foreground",children:u})]})]}),e.jsx(G,{variant:"outline",className:"border-amber-500/40 text-amber-700 dark:text-amber-300",children:"High Risk"})]}),e.jsxs("div",{className:"space-y-2 text-sm leading-relaxed",children:[e.jsx("p",{children:N}),e.jsx("p",{className:"font-medium text-amber-900 dark:text-amber-200",children:w}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"CCS is provided as-is and does not take responsibility for suspension, bans, or access loss from upstream providers."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("a",{href:f,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-xs font-medium text-amber-800 transition-colors hover:bg-amber-500/15 dark:text-amber-200",children:[O,e.jsx(me,{className:"h-3.5 w-3.5"})]}),d&&e.jsxs("a",{href:"/settings?tab=proxy",className:"inline-flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-xs font-medium text-amber-800 transition-colors hover:bg-amber-500/15 dark:text-amber-200",children:[e.jsx(zt,{className:"h-3.5 w-3.5"}),j]}),e.jsx("span",{className:"rounded-md border border-border/70 bg-muted/60 px-2.5 py-1 text-xs text-muted-foreground",children:"Applies to CLI and dashboard auth"})]}),t&&i&&e.jsxs("div",{className:"rounded-lg border border-amber-500/25 bg-amber-500/5 p-2.5",children:[e.jsxs(Z,{htmlFor:"account-risk-ack-text",className:"text-xs leading-5",children:["Type exact phrase to continue:"," ",e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:a})]}),e.jsx(de,{id:"account-risk-ack-text",value:n,onChange:k=>i(k.target.value),placeholder:a,disabled:l,className:"mt-2 font-mono text-xs"})]})]})]})}function Aa({className:s,value:t,onChange:a,disabled:n=!1}){const{t:i}=ee(),l=[t.reviewedIssue509,t.understandsBanRisk,t.acceptsFullResponsibility,t.typedPhrase.trim().replace(/\s+/g," ").toUpperCase()===hs].filter(Boolean).length,d=l/4*100,r=o=>{a({...t,...o})};return e.jsxs("section",{role:"alert",className:B("relative overflow-hidden rounded-xl border border-rose-500/35 bg-gradient-to-br from-rose-50 via-background to-amber-50/70 p-4 shadow-sm dark:from-rose-950/20 dark:to-amber-950/20",s),children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-0.5 bg-gradient-to-r from-rose-500 via-orange-500 to-amber-500"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"mt-0.5 inline-flex h-7 w-7 items-center justify-center rounded-md bg-rose-500/15 text-rose-700 dark:text-rose-300",children:e.jsx(Re,{className:"h-4 w-4"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-semibold leading-5",children:i("antigravityChecklist.title")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i("antigravityChecklist.subtitle")})]})]}),e.jsx(G,{variant:"outline",className:"border-rose-500/40 text-rose-700 dark:text-rose-300",children:i("antigravityChecklist.mandatory")})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:i("antigravityChecklist.completion")}),e.jsx("span",{children:i("antigravityChecklist.stepsCount",{current:l})})]}),e.jsx(Be,{value:d,className:"h-2"})]}),e.jsxs("div",{className:"space-y-3 rounded-lg border border-rose-500/20 bg-rose-500/5 p-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Te,{id:"agy-step-reviewed-issue",checked:t.reviewedIssue509,onCheckedChange:o=>r({reviewedIssue509:!!o}),disabled:n}),e.jsx(Z,{htmlFor:"agy-step-reviewed-issue",className:"text-xs leading-5",children:"Step 1: I reviewed issue #509 and understand AGY OAuth can trigger account bans/suspensions."})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Te,{id:"agy-step-understands-risk",checked:t.understandsBanRisk,onCheckedChange:o=>r({understandsBanRisk:!!o}),disabled:n}),e.jsx(Z,{htmlFor:"agy-step-understands-risk",className:"text-xs leading-5",children:"Step 2: I understand this OAuth action is my own decision and I accept the upstream risk."})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Te,{id:"agy-step-accept-responsibility",checked:t.acceptsFullResponsibility,onCheckedChange:o=>r({acceptsFullResponsibility:!!o}),disabled:n}),e.jsx(Z,{htmlFor:"agy-step-accept-responsibility",className:"text-xs leading-5",children:"Step 3: I accept full responsibility. CCS is not liable for suspension, bans, or access loss."})]})]}),e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/25 bg-amber-500/5 p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-amber-800 dark:text-amber-200",children:[e.jsx(Is,{className:"h-3.5 w-3.5"}),"Step 4: Type exact phrase to continue"]}),e.jsx(de,{value:t.typedPhrase,onChange:o=>r({typedPhrase:o.target.value}),placeholder:hs,disabled:n,className:"font-mono text-xs"})]}),e.jsx("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:e.jsxs("a",{href:"https://github.com/kaitranntt/ccs/issues/509",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border border-rose-500/30 bg-rose-500/10 px-2.5 py-1 font-medium text-rose-800 transition-colors hover:bg-rose-500/15 dark:text-rose-200",children:["Read issue #509",e.jsx(me,{className:"h-3.5 w-3.5"})]})})]})]})}function Pa(s){return s.trim().replace(/\s+/g," ").toUpperCase()}function Sa({open:s,onClose:t,provider:a,displayName:n,isFirstAccount:i=!1}){const[l,d]=c.useState(""),[r,o]=c.useState(""),[u,N]=c.useState(!1),[w,f]=c.useState(null),[O,j]=c.useState(""),[k,A]=c.useState(qe),[P,g]=c.useState(!1),[p,y]=c.useState(!1),[C,M]=c.useState(os),{t:m}=ee(),S=c.useRef(!1),T=c.useRef(0),U=c.useRef(!1),h=ka(),v=it(),b=a==="kiro",q=a==="agy"||a==="gemini",L=a==="gemini"&&!P,E=a==="agy"&&!P,_=q&&p,K=na(k),V=Pa(O)===De,te=Es(a),X=rt(C),ae=b?X.flowType==="device_code":te,Q=h.isAuthenticating||v.isPending,x=l.trim(),R=w||h.error,$=c.useCallback(async()=>{const D=await fetch("/api/settings/auth/antigravity-risk");if(!D.ok)throw new Error("Failed to load power user mode setting");return(await D.json()).antigravityAckBypass===!0},[]),ne=c.useCallback(async({pendingMessage:D=null,disabledMessage:Y=null}={})=>{const ge=++T.current;y(!0),D!==null&&f(D);try{const le=await $();return T.current!==ge||(g(le),Y?f(le?null:Y):D!==null&&f(null)),le}catch{return T.current!==ge||(g(!1),f(Y??m("addAccountDialog.powerUserLoadFailed")),U.current||(U.current=!0,H.error(m("addAccountDialog.powerUserLoadFailed")))),!1}finally{T.current===ge&&y(!1)}},[$,m]),he=()=>{d(""),o(""),N(!1),f(null),j(""),A(qe),g(!1),y(!1),M(os),T.current+=1,U.current=!1,S.current=!1,t()};c.useEffect(()=>{s&&(j(""),A(qe),f(null))},[a,s]),c.useEffect(()=>()=>{T.current+=1},[]),c.useEffect(()=>{if(!s||!q){T.current+=1,g(!1),y(!1);return}ne()},[s,a,q,ne]),c.useEffect(()=>{if(!s||a!=="agy"||!h.error||!P)return;const D=h.error.toLowerCase();(D.includes("agy_risk_ack_required")||D.includes("responsibility acknowledgement")||D.includes("responsibility checklist"))&&ne({pendingMessage:m("addAccountDialog.powerUserLoading"),disabledMessage:m("addAccountDialog.powerUserUnavailableRetry")})},[h.error,s,P,a,ne,m]),c.useEffect(()=>{!h.isAuthenticating&&!h.error&&h.provider===null&&s&&S.current&&(S.current=!1,(async()=>{try{const Y=await Qe(a);Y.success&&Y.presetName&&i&&H.success(`Applied "${Y.presetName}" preset`)}catch{}he()})())},[h.isAuthenticating,h.error,h.provider]);const ke=()=>{h.cancelAuth(),he()},Ie=async()=>{h.authUrl&&(await navigator.clipboard.writeText(h.authUrl),N(!0),setTimeout(()=>N(!1),2e3))},Le=()=>{r.trim()&&h.submitCallback(r.trim())},Ae=()=>{if(_){f(m("addAccountDialog.powerUserLoading"));return}if(E&&!K){f("Complete all Antigravity responsibility steps before authenticating this provider.");return}if(L&&!V){f(`Type "${De}" to acknowledge the account safety warning before authenticating this provider.`);return}f(null),S.current=!0,h.startAuth(a,{nickname:x||void 0,kiroMethod:b?C:void 0,flowType:b?X.flowType:void 0,startEndpoint:b?X.startEndpoint:void 0,riskAcknowledgement:E?{version:ia,reviewedIssue509:k.reviewedIssue509,understandsBanRisk:k.understandsBanRisk,acceptsFullResponsibility:k.acceptsFullResponsibility,typedPhrase:k.typedPhrase}:void 0})},Pe=()=>{S.current=!0,v.mutate(void 0,{onSuccess:async()=>{const D=await Qe("kiro");D.success&&D.presetName&&i&&H.success(`Applied "${D.presetName}" preset`),he()}})},Fe=D=>{D||ke()},J=h.isAuthenticating;return e.jsx(We,{open:s,onOpenChange:Fe,children:e.jsxs(Xe,{className:"sm:max-w-md",onInteractOutside:D=>{J&&D.preventDefault()},children:[e.jsxs(Ye,{children:[e.jsx(Ze,{children:m("addAccountDialog.title",{displayName:n})}),e.jsx(Ds,{children:m(b?"addAccountDialog.descKiro":ae?"addAccountDialog.descDeviceCode":"addAccountDialog.descOauth")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[E&&!J&&e.jsx(Aa,{value:k,onChange:D=>{A(D),f(null)},disabled:Q}),q&&P&&!J&&e.jsxs("div",{className:"rounded-lg border border-amber-400/35 bg-amber-50/70 p-3 text-xs text-amber-900 dark:border-amber-800/60 dark:bg-amber-950/25 dark:text-amber-100",children:[e.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 font-semibold",children:[e.jsx(Is,{className:"h-3.5 w-3.5"}),m("addAccountDialog.powerUserEnabled")]}),m("addAccountDialog.powerUserSkipped")]}),L&&!J&&e.jsx(Qs,{showAcknowledgement:!0,acknowledgementPhrase:De,acknowledgementText:O,onAcknowledgementTextChange:D=>{j(D),f(null)},disabled:Q}),b&&!J&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"kiro-auth-method",children:m("addAccountDialog.authMethod")}),e.jsxs(Cs,{value:C,onValueChange:D=>{M(D),f(null)},children:[e.jsx(ks,{id:"kiro-auth-method",children:e.jsx(As,{placeholder:m("addAccountDialog.selectKiroAuthMethod")})}),e.jsx(Ps,{children:ot.map(D=>e.jsx(Ge,{value:D.id,children:D.label},D.id))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:X.description})]}),!J&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"nickname",children:m("addAccountDialog.nicknameOptional")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(de,{id:"nickname",value:l,onChange:D=>{d(D.target.value),f(null)},placeholder:m("addAccountDialog.nicknamePlaceholder"),disabled:Q,className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:m("addAccountDialog.nicknameOptionalHint")})]}),J&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx(W,{className:"w-4 h-4 inline mr-2 animate-spin"}),m("addAccountDialog.waitingForAuth")]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:h.isDeviceCodeFlow?m("addAccountDialog.deviceCodeHint"):m("addAccountDialog.browserHint")})]}),h.authUrl&&!h.isDeviceCodeFlow&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{className:"text-xs",children:m("addAccountDialog.openUrlLabel")}),e.jsxs("div",{className:"p-3 bg-muted rounded-md",children:[e.jsx("p",{className:"text-xs text-muted-foreground break-all font-mono line-clamp-3",children:h.authUrl}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(I,{variant:"outline",size:"sm",onClick:Ie,children:u?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"w-3 h-3 mr-1"}),m("addAccountDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(Os,{className:"w-3 h-3 mr-1"}),m("addAccountDialog.copy")]})}),e.jsxs(I,{variant:"outline",size:"sm",onClick:()=>{if(!h.authUrl)return;const D=window.open(h.authUrl,"_blank");(!D||D.closed||typeof D.closed>"u")&&H.warning(m("addAccountDialog.popupBlocked"),{duration:5e3})},children:[e.jsx(me,{className:"w-3 h-3 mr-1"}),m("addAccountDialog.open")]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"callback-url",className:"text-xs",children:m("addAccountDialog.redirectPasteLabel")}),e.jsx(de,{id:"callback-url",value:r,onChange:D=>o(D.target.value),placeholder:m("addAccountDialog.callbackPlaceholder"),className:"font-mono text-xs"}),e.jsx(I,{variant:"secondary",size:"sm",onClick:Le,disabled:!r.trim()||h.isSubmittingCallback,children:h.isSubmittingCallback?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-3 h-3 mr-1 animate-spin"}),m("addAccountDialog.submitting")]}):m("addAccountDialog.submitCallback")})]})]}),!h.authUrl&&!h.isDeviceCodeFlow&&e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:m("addAccountDialog.preparingUrl")})]}),R&&e.jsx("p",{className:"text-xs text-center text-destructive",children:R}),v.isPending&&e.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:[e.jsx(W,{className:"w-4 h-4 inline mr-2 animate-spin"}),m("addAccountDialog.importingToken")]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[e.jsx(I,{variant:"ghost",onClick:ke,children:m("addAccountDialog.cancel")}),b&&!J&&e.jsx(I,{variant:"outline",onClick:Pe,disabled:Q,children:v.isPending?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-4 h-4 mr-2 animate-spin"}),m("addAccountDialog.importing")]}):e.jsxs(e.Fragment,{children:[e.jsx(Qt,{className:"w-4 h-4 mr-2"}),m("addAccountDialog.importFromIde")]})}),!J&&e.jsxs(I,{onClick:Ae,disabled:Q||_||E&&!K||L&&!V,children:[e.jsx(me,{className:"w-4 h-4 mr-2"}),m("addAccountDialog.authenticate")]})]})]})]})})}const Ma=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"];function Da(s){const t=s?.env||{};return Ma.filter(a=>!t[a]?.trim())}function Ta(s){const[t,a]=c.useState(null),[n,i]=c.useState(!1),l=Je(),{data:d,isLoading:r,refetch:o}=ws({queryKey:["settings",s],queryFn:async()=>{const h=await fetch(`/api/settings/${s}/raw`);return h.ok?h.json():{profile:s,settings:{env:{}},mtime:Date.now(),path:`~/.ccs/profiles/${s}/settings.json`}}}),u=d?.settings,N=c.useMemo(()=>t!==null?t:u?JSON.stringify(u,null,2):`{
2
- "env": {}
3
- }`,[t,u]),w=c.useCallback(h=>{a(h)},[]),f=c.useMemo(()=>{try{return JSON.parse(N)}catch{return u||{env:{}}}},[N,u]),O=f?.env?.ANTHROPIC_MODEL,j=f?.env?.ANTHROPIC_DEFAULT_OPUS_MODEL,k=f?.env?.ANTHROPIC_DEFAULT_SONNET_MODEL,A=f?.env?.ANTHROPIC_DEFAULT_HAIKU_MODEL,P=c.useMemo(()=>lt(f?.env||{}),[f]),g=c.useCallback((h,v)=>ct(h,v,{supportsExtendedContext:b=>pa(s,b)}),[s]),p=c.useCallback((h,v)=>{const b={...f?.env||{},[h]:v},q=ls(h)?g(b,P):b;delete q.CCS_EXTENDED_CONTEXT;const L={...f,env:q};a(JSON.stringify(L,null,2))},[g,f,P]),y=c.useCallback(h=>{const v=f?.env||{},b=g(v,h);delete b.CCS_EXTENDED_CONTEXT;const q={...f,env:b};a(JSON.stringify(q,null,2))},[g,f]),C=c.useCallback(h=>{const v={...f?.env||{},...h},q=Object.keys(h).some(ls)?g(v,P):v;delete q.CCS_EXTENDED_CONTEXT;const L={...f,env:q};a(JSON.stringify(L,null,2))},[g,f,P]),M=c.useMemo(()=>{try{return JSON.parse(N),!0}catch{return!1}},[N]),m=c.useMemo(()=>t===null?!1:t!==JSON.stringify(u,null,2),[t,u]),S=c.useMemo(()=>Da(f),[f]),T=Ys({mutationFn:async()=>{const h=JSON.parse(N),v=await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:h,expectedMtime:d?.mtime})});if(v.status===409)throw new Error("CONFLICT");if(!v.ok)throw new Error("Failed to save");return v.json()},onSuccess:h=>{l.invalidateQueries({queryKey:["settings",s]}),a(null),h?.warning?H.success("Settings saved",{description:h.warning}):H.success("Settings saved")},onError:h=>{h.message==="CONFLICT"?i(!0):H.error(h.message)}}),U=async h=>{i(!1),h?(await o(),T.mutate()):a(null)};return{data:d,isLoading:r,refetch:o,rawJsonContent:N,rawJsonEdits:t,isRawJsonValid:M,hasChanges:m,currentSettings:f,currentModel:O,opusModel:j,sonnetModel:k,haikuModel:A,extendedContextEnabled:P,toggleExtendedContext:y,handleRawJsonChange:w,updateEnvValue:p,updateEnvValues:C,saveMutation:{mutate:()=>T.mutate(),isPending:T.isPending},conflictDialog:n,setConflictDialog:i,handleConflictResolve:U,missingRequiredFields:S}}const Ea=/-(medium|high|xhigh)$/i;function Ra(s){if(!s)return;const t=s.trim().match(Ea);if(t?.[1])return t[1].toLowerCase()}function _a(s){if(!s)return null;const t=Ra(s);return t?{label:`Pinned ${t}`,explicit:!0}:{label:"Auto effort",explicit:!1}}function Oa({label:s}){return e.jsx(G,{variant:"outline",className:"text-[9px] h-4 px-1",children:s})}function Se({modelId:s}){const t=_a(s);return t?e.jsx(G,{variant:t.explicit?"secondary":"outline",className:"text-[9px] h-4 px-1 uppercase",children:t.label}):null}function oe({label:s,description:t,value:a,onChange:n,catalog:i,allModels:l,disabled:d}){const{t:r}=ee(),o=i?.provider==="codex",u=c.useMemo(()=>zs(i,l),[l,i]),N=new Set(u.map(j=>j.id)),w=u.map(j=>({value:j.id,groupKey:"recommended",searchText:`${j.id} ${j.name}`,keywords:[j.tier??"",i?.provider??""],triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:j.id}),o&&e.jsx(Se,{modelId:j.id})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:j.id}),j.tier==="paid"&&e.jsx(Oa,{label:r("providerModelSelector.paid")}),o&&e.jsx(Se,{modelId:j.id})]})})),f=l.filter(j=>!N.has(j.id)).map(j=>({value:j.id,groupKey:"all",searchText:j.id,keywords:[j.owned_by],triggerContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:j.id}),o&&e.jsx(Se,{modelId:j.id})]}),itemContent:e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:j.id}),o&&e.jsx(Se,{modelId:j.id})]})})),O=w.length+f.length>0;return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium",children:s}),t&&e.jsx("p",{className:"text-[10px] text-muted-foreground",children:t})]}),e.jsx(oa,{value:a||void 0,onChange:n,disabled:d,placeholder:r("providerModelSelector.selectModel"),searchPlaceholder:r("searchableSelect.searchModels"),emptyText:r(O?"searchableSelect.noResults":"providerModelSelector.noModelsAvailable"),triggerClassName:"h-9",groups:[{key:"recommended",label:e.jsx("span",{className:"text-xs text-primary",children:r("providerModelSelector.recommended")})},{key:"all",label:e.jsx("span",{className:"text-xs text-muted-foreground",children:r("providerModelSelector.allModelsCount",{count:l.length})})}],options:[...w,...f]})]})}function Ia({open:s,onClose:t,currentValues:a,onApply:n,onSave:i,isSaving:l,catalog:d,allModels:r}){const{t:o}=ee(),[u,N]=c.useState(a),[w,f]=c.useState(""),O=j=>{j?(N(a),f("")):t()};return e.jsx(We,{open:s,onOpenChange:O,children:e.jsxs(Xe,{className:"sm:max-w-md",children:[e.jsx(Ye,{children:e.jsxs(Ze,{className:"flex items-center gap-2",children:[e.jsx(ye,{className:"w-4 h-4"}),o("customPresetDialog.title")]})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"preset-name",children:o("customPresetDialog.presetNameOptional")}),e.jsx(de,{id:"preset-name",value:w,onChange:j=>f(j.target.value),placeholder:o("customPresetDialog.presetNamePlaceholder"),className:"text-sm"})]}),e.jsx(is,{}),d?.provider==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground rounded-md border bg-muted/30 px-2.5 py-2",children:[o("customPresetDialog.codexTipPrefix")," ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and"," ",e.jsx("code",{children:"-xhigh"})," ",o("customPresetDialog.codexTipSuffix")]}),e.jsx(oe,{label:o("customPresetDialog.defaultModel"),description:o("customPresetDialog.defaultModelDesc"),value:u.default,onChange:j=>N({...u,default:j}),catalog:d,allModels:r}),e.jsx(oe,{label:o("customPresetDialog.opusModel"),description:o("customPresetDialog.opusModelDesc"),value:u.opus,onChange:j=>N({...u,opus:j}),catalog:d,allModels:r}),e.jsx(oe,{label:o("customPresetDialog.sonnetModel"),description:o("customPresetDialog.sonnetModelDesc"),value:u.sonnet,onChange:j=>N({...u,sonnet:j}),catalog:d,allModels:r}),e.jsx(oe,{label:o("customPresetDialog.haikuModel"),description:o("customPresetDialog.haikuModelDesc"),value:u.haiku,onChange:j=>N({...u,haiku:j}),catalog:d,allModels:r})]}),e.jsxs(dt,{className:"gap-2 sm:gap-0",children:[e.jsx(I,{variant:"outline",onClick:t,children:o("customPresetDialog.cancel")}),i&&e.jsxs(I,{variant:"secondary",onClick:()=>i(u,w||void 0),disabled:l||!w.trim(),children:[l?e.jsx(W,{className:"w-4 h-4 mr-1 animate-spin"}):e.jsx(_e,{className:"w-4 h-4 mr-1"}),o("customPresetDialog.savePreset")]}),e.jsxs(I,{onClick:()=>n(u,w||void 0),children:[e.jsx(Ce,{className:"w-4 h-4 mr-1"}),o("customPresetDialog.applyPreset")]})]})]})})}function re({label:s,command:t}){return e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:s}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsx("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:t}),e.jsx(Rs,{value:t,size:"icon",className:"h-6 w-6"})]})]})}function La({provider:s,displayName:t,defaultTarget:a,data:n,authStatus:i,supportsModelConfig:l=!1}){const d=a||"claude",r=d==="droid",o=s==="codex",u=d==="claude"?`ccs ${s}`:`ccs ${s} --target claude`,N=`${u} --config`,w=`${u} --auth --add`,f=`${u} --accounts`;return e.jsx(es,{className:"h-full",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2 mb-3",children:[e.jsx(Ls,{className:"w-4 h-4"}),"Provider Information"]}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Provider"}),e.jsx("span",{className:"font-mono",children:t})]}),n&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"File Path"}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-xs break-all",children:n.path}),e.jsx(Rs,{value:n.path,size:"icon",className:"h-5 w-5"})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Last Modified"}),e.jsx("span",{className:"text-xs",children:new Date(n.mtime).toLocaleString()})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Status"}),i.authenticated?e.jsxs(G,{variant:"outline",className:"w-fit text-green-600 border-green-200 bg-green-50",children:[e.jsx(Jt,{className:"w-3 h-3 mr-1"}),"Authenticated"]}):e.jsx(G,{variant:"outline",className:"w-fit text-muted-foreground",children:"Not connected"})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Default Target"}),e.jsx("span",{className:"font-mono",children:d})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:"Quick Usage"}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsx(re,{label:"Run with prompt",command:`ccs ${s} "your prompt"`}),o&&e.jsxs(e.Fragment,{children:[e.jsx(re,{label:"Run on native Codex (shortcut)",command:'ccsxp "your prompt"'}),e.jsx(re,{label:"Run on native Codex (--target)",command:`ccs ${s} --target codex "your prompt"`})]}),e.jsx(re,{label:r?"Droid alias (explicit)":"Run on Droid",command:`ccs-droid ${s} "your prompt"`}),e.jsx(re,{label:r?"Override to Claude":"Run on Droid (--target)",command:`ccs ${s} --target ${r?"claude":"droid"} "your prompt"`}),l&&e.jsx(re,{label:d==="claude"?"Change model":"Change model (Claude target)",command:N}),e.jsx(re,{label:d==="claude"?"Add account":"Add account (Claude target)",command:w}),e.jsx(re,{label:d==="claude"?"List accounts":"List accounts (Claude target)",command:f}),d!=="claude"&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Account and model-management flags stay on Claude target. Codex and Droid runtime launches reject those CLIProxy management commands."})]})]})]})})}function Fa({displayName:s,logoProvider:t,provider:a,data:n,isLoading:i,hasChanges:l,isRawJsonValid:d,isSaving:r,isRemoteMode:o,port:u,onRefetch:N,onSave:w}){return e.jsxs("div",{className:"px-6 py-4 border-b bg-background flex items-center justify-between shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ss,{provider:t||a,size:"lg"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),o&&e.jsxs(G,{variant:"secondary",className:"text-xs gap-1 bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:[e.jsx(Fs,{className:"w-3 h-3"}),"Remote"]}),u&&e.jsxs(G,{variant:"outline",className:"text-xs gap-1 font-mono",children:[e.jsx(Wt,{className:"w-3 h-3"}),":",u]}),!o&&n?.path&&e.jsx(G,{variant:"outline",className:"text-xs",children:n.path.replace(/^.*[\\/]/,"")})]}),o?e.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400 mt-0.5",children:"Traffic auto-routed to remote server"}):n&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Last modified: ",new Date(n.mtime).toLocaleString()]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{variant:"ghost",size:"sm",onClick:N,disabled:i,children:e.jsx(as,{className:`w-4 h-4 ${i?"animate-spin":""}`})}),e.jsx(I,{size:"sm",onClick:w,disabled:r||!l||!d,children:r?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Xt,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function Ua({models:s,provider:t,enabled:a,onToggle:n,disabled:i,className:l}){if(s.length===0)return null;const d=s.some(u=>cs(u.id)),r=s.some(u=>!cs(u.id));let o="Compatible mappings stay on standard context unless you turn this on.";return d&&r?o="Gemini-compatible mappings can use 1M automatically. Claude mappings stay plain unless you turn this on.":d&&(o="Gemini-compatible mappings can use 1M by default. Turn this off to keep standard context."),e.jsxs("div",{className:B("rounded-lg border p-3 space-y-2",a?"border-primary/50 bg-primary/5":"border-border bg-muted/30",l),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:B("w-4 h-4",a?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-sm font-medium",children:"Extended Context"}),e.jsx(G,{variant:a?"default":"secondary",className:"text-[10px] h-5 px-1.5",children:"1M tokens"})]}),e.jsx(Gs,{checked:a,onCheckedChange:n,disabled:i})]}),e.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[e.jsx(Ls,{className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{children:["Applies the explicit ",e.jsx("code",{children:"[1m]"})," long-context suffix to compatible saved mappings."]}),e.jsx("p",{className:"text-[10px]",children:o}),e.jsxs("p",{className:"text-amber-600 dark:text-amber-500",children:["CCS only saves ",e.jsx("code",{children:"[1m]"}),". Provider pricing and entitlement are separate, and some accounts can still return 429 extra-usage errors for long-context requests."]})]})]})]})}function qa(s){const t=s.presetMapping||{default:s.id,opus:s.id,sonnet:s.id,haiku:s.id};return{ANTHROPIC_MODEL:t.default,ANTHROPIC_DEFAULT_OPUS_MODEL:t.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:t.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:t.haiku}}function Ha({catalog:s,savedPresets:t,currentModel:a,opusModel:n,sonnetModel:i,haikuModel:l,providerModels:d,provider:r,extendedContextEnabled:o,onExtendedContextToggle:u,onApplyPreset:N,onUpdateEnvValue:w,onOpenCustomPreset:f,onDeletePreset:O,isDeletePending:j}){const k=c.useMemo(()=>{if(!s)return[];const p=[a,n,i,l].filter(C=>!!C).map(C=>ut(C));return[...new Set(p)].map(C=>$s(s.provider,C)).filter(C=>!!C?.extendedContext)},[s,a,n,i,l]),A=c.useMemo(()=>zs(s,d),[s,d]),P=c.useMemo(()=>{const p=A.filter(C=>C.presetMapping);return p.length===0?[]:p.some(C=>C.tier==="paid")?[{key:"free",label:"Free Tier",description:"Available on free or paid plans",badgeClassName:"text-[10px] bg-green-100 text-green-700 border-green-200",iconClassName:"text-green-600",models:p.filter(C=>C.tier!=="paid")},{key:"paid",label:"Paid Tier",description:"Requires paid access",badgeClassName:"text-[10px] bg-amber-100 text-amber-700 border-amber-200",iconClassName:"text-amber-700",models:p.filter(C=>C.tier==="paid")}].filter(C=>C.models.length>0):[{key:"default",models:p.slice(0,4)}]},[A]),g=P.length>0||t.length>0;return e.jsxs(e.Fragment,{children:[g&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[e.jsx(ye,{className:"w-4 h-4"}),"Presets"]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Apply pre-configured model mappings"}),e.jsxs("div",{className:"space-y-4",children:[P.map(p=>e.jsxs("div",{children:["label"in p&&p.label&&e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(G,{variant:"outline",className:p.badgeClassName,children:p.label}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:p.description})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:p.models.map(y=>e.jsxs(I,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1",onClick:()=>N(qa(y)),children:[e.jsx(Ce,{className:`w-3 h-3 ${"iconClassName"in p?p.iconClassName:""}`}),y.name]},y.id))})]},p.key)),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.map(p=>e.jsxs("div",{className:"group relative",children:[e.jsxs(I,{variant:"secondary",size:"sm",className:"text-xs h-7 gap-1 pr-6",onClick:()=>{N({ANTHROPIC_MODEL:p.default,ANTHROPIC_DEFAULT_OPUS_MODEL:p.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:p.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:p.haiku})},children:[e.jsx(_e,{className:"w-3 h-3 fill-current"}),p.name]}),e.jsx(I,{variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-7 w-5 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:y=>{y.stopPropagation(),O(p.name)},disabled:j,children:e.jsx(ns,{className:"w-3 h-3"})})]},p.name)),e.jsxs(I,{variant:"outline",size:"sm",className:"text-xs h-7 gap-1 border-primary/50 text-primary hover:bg-primary/10 hover:border-primary",onClick:f,children:[e.jsx(Us,{className:"w-3 h-3"}),"Custom"]})]})]})]}),e.jsx(is,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-2",children:"Model Mapping"}),e.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"Configure which models to use for each tier"}),r==="codex"&&e.jsxs("p",{className:"text-[11px] text-muted-foreground mb-3 rounded-md border bg-muted/30 px-2.5 py-2",children:["Codex tip: suffixes ",e.jsx("code",{children:"-medium"}),", ",e.jsx("code",{children:"-high"}),", and ",e.jsx("code",{children:"-xhigh"})," ","pin reasoning effort. Unsuffixed models use Thinking settings."]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(oe,{label:"Default Model",description:"Used when no specific tier is requested",value:a,onChange:p=>w("ANTHROPIC_MODEL",p),catalog:s,allModels:d}),k.length>0&&u&&e.jsx(Ua,{models:k,provider:r,enabled:o??!1,onToggle:u}),e.jsx(oe,{label:"Opus (Most capable)",description:"For complex reasoning tasks",value:n,onChange:p=>w("ANTHROPIC_DEFAULT_OPUS_MODEL",p),catalog:s,allModels:d}),e.jsx(oe,{label:"Sonnet (Balanced)",description:"Balance of speed and capability",value:i,onChange:p=>w("ANTHROPIC_DEFAULT_SONNET_MODEL",p),catalog:s,allModels:d}),e.jsx(oe,{label:"Haiku (Fast)",description:"Quick responses for simple tasks",value:l,onChange:p=>w("ANTHROPIC_DEFAULT_HAIKU_MODEL",p),catalog:s,allModels:d})]})]})]})}function vs(s){const t=Math.max(0,Math.min(100,s));return t<=20?"bg-destructive":t<=50?"bg-yellow-500":"bg-green-500"}function js(s){if(!s)return"";try{const t=new Date(s),n=new Date().getTime()-t.getTime();if(n<0)return"just now";const i=Math.floor(n/(1e3*60)),l=Math.floor(n/(1e3*60*60)),d=Math.floor(n/(1e3*60*60*24));return d>0?`${d}d ago`:l>0?`${l}h ago`:i>0?`${i}m ago`:"just now"}catch{return""}}function Ka(s){if(!s)return!1;try{const t=new Date(s);return new Date().getTime()-t.getTime()<3600*1e3}catch{return!1}}function Ga({account:s,onSetDefault:t,onRemove:a,onPauseToggle:n,isRemoving:i,isPausingAccount:l,privacyMode:d,showQuota:r,selectable:o,selected:u,onSelectChange:N}){const{t:w}=ee(),f=s.provider.toLowerCase(),O=f==="codex",j=f==="claude"||f==="anthropic",{data:k}=mt(r),{data:A,isLoading:P}=pt(f,s.id,r),g=xt(k,s)?.lastUsedAt,p=Ka(g),y=ht(s.provider,A),C=gt(s.provider,A),M=O&&A&&ft(A)?vt(A.windows):null,m=[{label:"5h",value:M?.fiveHourWindow?.remainingPercent??null},{label:"Weekly",value:M?.weeklyWindow?.remainingPercent??null}].filter(L=>L.value!==null),S=j&&A&&jt(A)?[{label:"5h",value:A.coreUsage?.fiveHour?.remainingPercent??A.windows.find(L=>L.rateLimitType==="five_hour")?.remainingPercent??null},{label:"Weekly",value:A.coreUsage?.weekly?.remainingPercent??A.windows.find(L=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(L.rateLimitType))?.remainingPercent??null}].filter(L=>L.value!==null):[],T=O?m:j?S:[],U=y!==null?Ct(y):null,h=U!==null?Number(U):null,v=Nt(A),b=v?.label==="Reauth"?Yt:v?.tone==="warning"?Re:Zt,q=v?.tone==="warning"?"border-amber-500/50 text-amber-600 dark:text-amber-400":v?.tone==="destructive"?"border-destructive/50 text-destructive":"border-muted-foreground/50 text-muted-foreground";return e.jsxs("div",{className:B("flex flex-col gap-2 p-3 rounded-lg border transition-colors overflow-hidden",s.isDefault?"border-primary/30 bg-primary/5":"border-border hover:bg-muted/30",s.paused&&"opacity-75",u&&"ring-2 ring-primary/50 bg-primary/5"),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[o&&e.jsx("button",{type:"button",onClick:()=>N?.(!u),className:B("flex items-center justify-center w-5 h-5 rounded border-2 transition-colors shrink-0",u?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),"aria-label":u?"Deselect account":"Select account",children:u&&e.jsx(ue,{className:"w-3 h-3"})}),n&&e.jsx(fe,{children:e.jsxs(ve,{children:[e.jsx(je,{asChild:!0,children:e.jsx(I,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>n(!s.paused),disabled:l,children:l?e.jsx(W,{className:"w-4 h-4 animate-spin"}):s.paused?e.jsx(qs,{className:"w-4 h-4 text-emerald-500"}):e.jsx(ze,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(Ne,{side:"top",children:s.paused?"Resume account":"Pause account"})]})}),e.jsxs("div",{className:"relative shrink-0",children:[e.jsx("div",{className:B("flex items-center justify-center w-8 h-8 rounded-full",s.isDefault?"bg-primary/10":"bg-muted"),children:e.jsx(pe,{className:"w-4 h-4"})}),s.tier&&s.tier!=="unknown"&&s.tier!=="free"&&e.jsx("span",{className:B("absolute -bottom-0.5 -right-0.5 text-[7px] font-bold uppercase px-1 py-px rounded","ring-1 ring-background",s.tier==="ultra"?"bg-violet-500/20 text-violet-600 dark:bg-violet-500/30 dark:text-violet-300":"bg-yellow-500/20 text-yellow-700 dark:bg-yellow-500/25 dark:text-yellow-400"),children:s.tier==="ultra"?"U":"P"})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:B("font-medium text-sm truncate",d&&Ee),children:s.email||s.id}),s.isDefault&&e.jsxs(G,{variant:"secondary",className:"text-[10px] h-4 px-1.5 gap-0.5",children:[e.jsx(_e,{className:"w-2.5 h-2.5 fill-current"}),"Default"]}),s.paused&&e.jsxs(G,{variant:"outline",className:"text-[10px] h-4 px-1.5 border-yellow-500 text-yellow-600",children:[e.jsx(ze,{className:"w-2 h-2 mr-0.5"}),"Paused"]})]}),s.provider==="agy"&&e.jsx("div",{className:"flex items-center gap-1.5 mt-1",children:s.projectId?e.jsx(fe,{children:e.jsxs(ve,{children:[e.jsx(je,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(ea,{className:"w-3 h-3","aria-hidden":"true"}),e.jsx("span",{className:B("font-mono max-w-[180px] truncate",d&&Ee),title:s.projectId,children:s.projectId})]})}),e.jsx(Ne,{side:"bottom",children:e.jsx("p",{className:"text-xs",children:"GCP Project ID (read-only)"})})]})}):e.jsx(fe,{children:e.jsxs(ve,{children:[e.jsx(je,{asChild:!0,children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-500",children:[e.jsx(Re,{className:"w-3 h-3","aria-label":"Warning"}),e.jsx("span",{children:"Project ID: N/A"})]})}),e.jsx(Ne,{side:"bottom",className:"max-w-[250px]",children:e.jsxs("div",{className:"text-xs space-y-1",children:[e.jsx("p",{className:"font-medium text-amber-600",children:"Missing Project ID"}),e.jsx("p",{children:"This may cause errors. Remove the account and re-add it to fetch the project ID."})]})})]})})}),s.lastUsedAt&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-0.5",children:[e.jsx(ps,{className:"w-3 h-3"}),"Last used: ",new Date(s.lastUsedAt).toLocaleDateString()]})]})]}),e.jsxs(wt,{children:[e.jsx(bt,{asChild:!0,children:e.jsx(I,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",children:e.jsx(sa,{className:"w-4 h-4"})})}),e.jsxs(yt,{align:"end",children:[!s.isDefault&&e.jsxs(ds,{onClick:t,children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Set as default"]}),e.jsxs(ds,{className:"text-destructive focus:text-destructive",onClick:a,disabled:i,children:[e.jsx(Hs,{className:"w-4 h-4 mr-2"}),i?"Removing...":"Remove account"]})]})]})]}),r&&e.jsx("div",{className:"pl-11",children:P?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(W,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Loading quota..."})]}):h!==null?e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:p?e.jsxs(e.Fragment,{children:[e.jsx(ta,{className:"w-3 h-3 text-emerald-500"}),e.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["Active · ",js(g)]})]}):g?e.jsxs(e.Fragment,{children:[e.jsx(ps,{className:"w-3 h-3 text-muted-foreground"}),e.jsxs("span",{className:"text-muted-foreground",children:["Last used ",js(g)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(xs,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Not used yet"})]})}),e.jsx(fe,{children:e.jsxs(ve,{children:[e.jsx(je,{asChild:!0,children:T.length>0?e.jsx("div",{className:"space-y-1.5",children:T.map(L=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-10 text-[10px] text-muted-foreground",children:L.label}),e.jsx(Be,{value:Math.max(0,Math.min(100,L.value)),className:"h-2 flex-1",indicatorClassName:vs(L.value)}),e.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[L.value,"%"]})]},L.label))}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Be,{value:Math.max(0,Math.min(100,h)),className:"h-2 flex-1",indicatorClassName:vs(h)}),e.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[U,"%"]})]})}),e.jsx(Ne,{side:"bottom",className:"max-w-xs",children:e.jsx(kt,{quota:A,resetTime:C})})]})})]}):A?.success?e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(G,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-muted-foreground/50 text-muted-foreground",children:[e.jsx(xs,{className:"w-3 h-3"}),w("accountCard.quotaUnavailable")]})}):v?e.jsx(fe,{children:e.jsxs(ve,{children:[e.jsx(je,{asChild:!0,children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(G,{variant:"outline",className:B("text-[10px] h-5 px-2 gap-1",q),children:[e.jsx(b,{className:"w-3 h-3"}),v.label]})})}),e.jsx(Ne,{side:"bottom",className:"max-w-[260px]",children:e.jsxs("div",{className:"space-y-1 text-xs",children:[e.jsx("p",{children:v.summary}),v.actionHint&&e.jsx("p",{className:"text-muted-foreground",children:v.actionHint}),v.technicalDetail&&e.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:v.technicalDetail}),v.rawDetail&&e.jsx("pre",{className:"whitespace-pre-wrap break-all rounded bg-muted/40 px-2 py-1 font-mono text-[10px] text-muted-foreground",children:v.rawDetail})]})})]})}):null})]})}function Va({selectedCount:s,onPauseSelected:t,onResumeSelected:a,onClearSelection:n,isPausing:i,isResuming:l}){if(s<1)return null;const d=i||l;return e.jsxs("div",{className:"flex items-center gap-3 p-2 bg-muted/50 rounded-lg border mt-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[s," selected"]}),e.jsx(I,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:n,disabled:d,children:"Clear"}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(I,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:t,disabled:d,children:[i?e.jsx(W,{className:"w-3 h-3 animate-spin"}):e.jsx(ze,{className:"w-3 h-3"}),"Pause Selected"]}),e.jsxs(I,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1",onClick:a,disabled:d,children:[l?e.jsx(W,{className:"w-3 h-3 animate-spin"}):e.jsx(qs,{className:"w-3 h-3"}),"Resume Selected"]})]})]})}function Ba({accounts:s,onAddAccount:t,onSetDefault:a,onRemoveAccount:n,onPauseToggle:i,onSoloMode:l,onBulkPause:d,onBulkResume:r,isRemovingAccount:o,isPausingAccount:u,isSoloingAccount:N,isBulkPausing:w,isBulkResuming:f,privacyMode:O,showQuota:j,isKiro:k,kiroNoIncognito:A,onKiroNoIncognitoChange:P,kiroSettingsLoading:g}){const[p,y]=c.useState(new Set),C=c.useMemo(()=>new Set(s.map(_=>_.id)),[s]),M=c.useMemo(()=>new Set([...p].filter(_=>C.has(_))),[p,C]),m=!!(d&&r),S=M.size,T=s.length>0&&M.size===s.length,U=M.size>0&&M.size<s.length,h=c.useCallback(_=>{y(K=>{const V=new Set(K);return V.has(_)?V.delete(_):V.add(_),V})},[]),v=c.useCallback(()=>{y(new Set(s.map(_=>_.id)))},[s]),b=c.useCallback(()=>{y(new Set)},[]),q=c.useCallback(()=>{T?b():v()},[T,v,b]),L=c.useCallback(()=>{d&&M.size>0&&(d(Array.from(M)),y(new Set))},[d,M]),E=c.useCallback(()=>{r&&M.size>0&&(r(Array.from(M)),y(new Set))},[r,M]);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[m&&s.length>0&&e.jsx(Te,{checked:T,onCheckedChange:q,"aria-label":"Select all accounts",className:U?"data-[state=checked]:bg-primary/50":"",...U?{"data-state":"indeterminate"}:{}}),e.jsx(pe,{className:"w-4 h-4"}),"Accounts",s.length>0&&e.jsx(G,{variant:"secondary",className:"text-xs",children:s.length})]}),e.jsxs(I,{variant:"default",size:"sm",className:"h-7 text-xs gap-1",onClick:t,children:[e.jsx(Us,{className:"w-3 h-3"}),"Add"]})]}),m&&S>0&&e.jsx(Va,{selectedCount:S,onPauseSelected:L,onResumeSelected:E,onClearSelection:b,isPausing:!!w,isResuming:!!f}),s.length>0?e.jsx("div",{className:"space-y-2",children:s.map(_=>e.jsx(Ga,{account:_,onSetDefault:()=>a(_.id),onRemove:()=>n(_.id),onPauseToggle:i?K=>i(_.id,K):void 0,onSoloMode:l?()=>l(_.id):void 0,isRemoving:o,isPausingAccount:u,isSoloingAccount:N,privacyMode:O,showQuota:j,selectable:m,selected:M.has(_.id),onSelectChange:()=>h(_.id)},_.id))}):e.jsxs("div",{className:"py-6 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed",children:[e.jsx(pe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No accounts connected"}),e.jsx("p",{className:"text-xs opacity-70",children:"Add an account to get started"})]}),k&&P&&e.jsx("div",{className:"mt-3 pt-3 border-t border-dashed",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Fs,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Use incognito"})]}),e.jsx(Gs,{checked:!A,onCheckedChange:_=>P(!_),disabled:g,className:"scale-90"})]})})]})}function $a({provider:s,catalog:t,savedPresets:a,currentModel:n,opusModel:i,sonnetModel:l,haikuModel:d,providerModels:r,extendedContextEnabled:o,onExtendedContextToggle:u,onApplyPreset:N,onUpdateEnvValue:w,onOpenCustomPreset:f,onDeletePreset:O,isDeletePending:j,accounts:k,onAddAccount:A,onSetDefault:P,onRemoveAccount:g,onPauseToggle:p,onSoloMode:y,onBulkPause:C,onBulkResume:M,isRemovingAccount:m,isPausingAccount:S,isSoloingAccount:T,isBulkPausing:U,isBulkResuming:h,privacyMode:v,isRemoteMode:b}){const q=s.toLowerCase(),L=(At.includes(q)||["anthropic","antigravity","gemini-cli","copilot","github-copilot"].includes(q))&&!b,E=s==="kiro",[_,K]=c.useState(!0),[V,te]=c.useState(!0),[X,ae]=c.useState(!1),Q=c.useCallback(async()=>{if(E)try{te(!0);const $=(await Me.config.get()).cliproxy;K($?.kiro_no_incognito??!0)}catch{K(!0)}finally{te(!1)}},[E]),x=c.useCallback(async R=>{K(R),ae(!0);try{const $=await Me.config.get(),ne=$.cliproxy??{};await Me.config.update({...$,cliproxy:{...ne,kiro_no_incognito:R}})}catch{K(!R)}finally{ae(!1)}},[]);return c.useEffect(()=>{Q()},[Q]),e.jsx(es,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsx(Ha,{catalog:t,savedPresets:a,currentModel:n,opusModel:i,sonnetModel:l,haikuModel:d,providerModels:r,provider:s,extendedContextEnabled:o,onExtendedContextToggle:u,onApplyPreset:N,onUpdateEnvValue:w,onOpenCustomPreset:f,onDeletePreset:O,isDeletePending:j}),e.jsx(is,{}),e.jsx(Ba,{accounts:k,onAddAccount:A,onSetDefault:P,onRemoveAccount:g,onPauseToggle:p,onSoloMode:y,onBulkPause:C,onBulkResume:M,isRemovingAccount:m,isPausingAccount:S,isSoloingAccount:T,isBulkPausing:U,isBulkResuming:h,privacyMode:v,showQuota:L,isKiro:E,kiroNoIncognito:_,onKiroNoIncognitoChange:x,kiroSettingsLoading:V||X})]})})}function Ns({provider:s,displayName:t,authStatus:a,catalog:n,logoProvider:i,baseProvider:l,isRemoteMode:d,port:r,defaultTarget:o,onAddAccount:u,onSetDefault:N,onRemoveAccount:w,onPauseToggle:f,onSoloMode:O,onBulkPause:j,onBulkResume:k,isRemovingAccount:A,isPausingAccount:P,isSoloingAccount:g,isBulkPausing:p,isBulkResuming:y}){const[C,M]=c.useState(!1),{privacyMode:m}=Ms(),{data:S}=Pt(),{data:T}=St(s),U=Mt(),h=Dt(),v=l||s,b=v.toLowerCase()==="agy",q=c.useMemo(()=>{const F=T?.presets||[];return b?F.filter(z=>!se(z.default)&&!se(z.opus)&&!se(z.sonnet)&&!se(z.haiku)):F},[b,T?.presets]),L=c.useMemo(()=>{if(!S?.models)return[];const z={gemini:["google"],agy:["antigravity"],codex:["openai"],qwen:["alibaba","qwen"],iflow:["iflow"],kiro:["kiro","aws"],ghcp:["github","copilot"],kimi:["kimi","moonshot"]}[v.toLowerCase()]||[v.toLowerCase()];return S.models.filter(ie=>z.some(Ue=>ie.owned_by.toLowerCase().includes(Ue))?b?!se(ie.id):!0:!1)},[b,S,v]),E=(l||s).toLowerCase(),{data:_,isLoading:K,refetch:V,rawJsonContent:te,rawJsonEdits:X,isRawJsonValid:ae,hasChanges:Q,currentModel:x,opusModel:R,sonnetModel:$,haikuModel:ne,extendedContextEnabled:he,toggleExtendedContext:ke,handleRawJsonChange:Ie,updateEnvValue:Le,updateEnvValues:Ae,saveMutation:Pe,conflictDialog:Fe,handleConflictResolve:J,missingRequiredFields:D}=Ta(s),Y=c.useMemo(()=>(a.accounts||[]).map(F=>({...F,provider:F.provider||l||s})),[a.accounts,l,s]),{data:ge}=ws({queryKey:["auth-tokens-raw"],queryFn:async()=>{const F=await fetch("/api/settings/auth/tokens/raw");return F.ok?F.json():{apiKey:{value:"ccs-internal-managed"}}},staleTime:6e4}),le=ge?.apiKey?.value??"ccs-internal-managed",Js=F=>{if(b&&[F.ANTHROPIC_MODEL,F.ANTHROPIC_DEFAULT_OPUS_MODEL,F.ANTHROPIC_DEFAULT_SONNET_MODEL,F.ANTHROPIC_DEFAULT_HAIKU_MODEL].some(ie=>typeof ie=="string"&&se(ie))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}Ae({ANTHROPIC_BASE_URL:`http://127.0.0.1:${r??$e}/api/provider/${E}`,ANTHROPIC_AUTH_TOKEN:le,...F}),H.success(`Applied "${F.ANTHROPIC_MODEL?.split("/").pop()||"preset"}" preset`)},Ws=(F,z)=>{if(b&&[F.default,F.opus,F.sonnet,F.haiku].some(Ue=>se(Ue))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}Ae({ANTHROPIC_BASE_URL:`http://127.0.0.1:${r??$e}/api/provider/${E}`,ANTHROPIC_AUTH_TOKEN:le,ANTHROPIC_MODEL:F.default,ANTHROPIC_DEFAULT_OPUS_MODEL:F.opus,ANTHROPIC_DEFAULT_SONNET_MODEL:F.sonnet,ANTHROPIC_DEFAULT_HAIKU_MODEL:F.haiku}),H.success(`Applied ${z?`"${z}"`:"custom"} preset`),M(!1)},Xs=(F,z)=>{if(!z){H.error(Ts.t("commonToast.enterPresetName"));return}if(b&&[F.default,F.opus,F.sonnet,F.haiku].some(ie=>se(ie))){H.error("Antigravity denylist: Claude Opus 4.5 and Claude Sonnet 4.5 are deprecated.");return}U.mutate({profile:s,data:{name:z,...F}}),M(!1)};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(Fa,{provider:s,displayName:t,logoProvider:i,data:_,isLoading:K,hasChanges:Q,isRawJsonValid:ae,isSaving:Pe.isPending,isRemoteMode:d,port:r,onRefetch:V,onSave:()=>Pe.mutate()}),K?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(W,{className:"w-8 h-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading settings..."})]}):e.jsxs("div",{className:"min-h-0 flex-1 grid grid-cols-[40%_60%] divide-x overflow-hidden",children:[e.jsx("div",{className:"flex min-h-0 min-w-0 flex-col overflow-hidden bg-muted/5",children:e.jsxs(Tt,{defaultValue:"config",className:"h-full flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(Et,{className:"w-full",children:[e.jsx(us,{value:"config",className:"flex-1",children:"Model Config"}),e.jsx(us,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[e.jsx(ms,{value:"config",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden",children:e.jsx($a,{provider:s,catalog:n,savedPresets:q,currentModel:x,opusModel:R,sonnetModel:$,haikuModel:ne,providerModels:L,extendedContextEnabled:he,onExtendedContextToggle:ke,onApplyPreset:Js,onUpdateEnvValue:Le,onOpenCustomPreset:()=>M(!0),onDeletePreset:F=>h.mutate({profile:s,name:F}),isDeletePending:h.isPending,accounts:Y,onAddAccount:u,onSetDefault:N,onRemoveAccount:w,onPauseToggle:f,onSoloMode:O,onBulkPause:j,onBulkResume:k,isRemovingAccount:A,isPausingAccount:P,isSoloingAccount:g,isBulkPausing:p,isBulkResuming:y,privacyMode:m,isRemoteMode:d})}),e.jsx(ms,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(La,{provider:s,displayName:t,defaultTarget:o,data:_,authStatus:a,supportsModelConfig:!!n})})]})]})}),e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-2 bg-muted/30 border-b flex items-center gap-2 shrink-0 h-[45px]",children:[e.jsx(aa,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Raw Configuration (JSON)"})]}),e.jsx(Rt,{rawJsonContent:te,isRawJsonValid:ae,rawJsonEdits:X,onRawJsonChange:Ie,profileEnv:_?.settings?.env,missingRequiredFields:D})]})]}),e.jsx(ra,{open:Fe,title:"File Modified Externally",description:"This settings file was modified by another process. Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>J(!0),onCancel:()=>J(!1)}),e.jsx(Ia,{open:C,onClose:()=>M(!1),currentValues:{default:x||"",opus:R||"",sonnet:$||"",haiku:ne||""},onApply:Ws,onSave:Xs,isSaving:U.isPending,catalog:n,allModels:L})]})}function za({status:s,isSelected:t,onSelect:a}){const{t:n}=ee(),i=s.accounts?.length||0;return e.jsxs("button",{className:B("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors cursor-pointer text-left",t?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:a,children:[e.jsx(ss,{provider:s.provider,size:"md"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:s.displayName}),i>0&&e.jsx(G,{variant:"secondary",className:"text-[10px] h-4 px-1",children:i})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:s.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-green-600",children:n("cliproxyPage.connected")})]}):e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:n("cliproxyPage.notConnected")})]})})]})]})}function Qa({variant:s,parentAuth:t,isSelected:a,onSelect:n,onDelete:i,isDeleting:l}){const{t:d}=ee(),r=()=>{n()};return e.jsxs("div",{role:"button",tabIndex:0,className:B("group w-full flex items-center gap-3 px-3 py-2 rounded-lg transition-colors cursor-pointer text-left pl-6",a?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:r,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r())},children:[e.jsxs("div",{className:"relative",children:[e.jsx(ss,{provider:s.provider,size:"sm"}),e.jsx(Ks,{className:"w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5 text-muted-foreground"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e.jsx(G,{variant:"outline",className:"text-[9px] h-4 px-1",children:d("cliproxyPage.variant")}),e.jsx(G,{variant:"outline",className:"text-[9px] h-4 px-1 uppercase",children:s.target||"claude"})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:t?.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:d("cliproxyPage.viaProvider",{provider:s.provider})})]}):e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:d("cliproxyPage.parentNotConnected")})]})})]}),e.jsx(I,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:o=>{o.stopPropagation(),i()},disabled:l,children:e.jsx(Hs,{className:"w-3 h-3"})})]})}function Ja({onSetup:s}){const{t}=ee();return e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20",children:e.jsxs("div",{className:"text-center max-w-md px-8",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mx-auto mb-6",children:e.jsx(Ce,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:t("cliproxyPage.emptyTitle")}),e.jsx("p",{className:"text-muted-foreground mb-4",children:t("cliproxyPage.emptyDesc")}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-6",children:[t("cliproxyPage.emptyControlPanelPrefix")," ",e.jsx("a",{href:"/cliproxy/control-panel",className:"text-primary hover:underline",children:t("cliproxyPage.controlPanel")}),"."]}),e.jsxs(I,{onClick:s,className:"gap-2",children:[e.jsx(ye,{className:"w-4 h-4"}),t("cliproxyPage.quickSetup")]})]})})}function hn(){const{t:s}=ee(),t=Je(),{data:a,isLoading:n}=Ss(),{data:i,isFetching:l}=_t(),{data:d}=Ot(),r=It(),o=Lt(),u=Ft(),N=Ut(),w=qt(),f=Ht(),O=Kt(),j=Gt(),[k,A]=c.useState(()=>{if(typeof window<"u"){const R=new URLSearchParams(window.location.search).get("provider")?.trim().toLowerCase();return R&&Ve(R)?R:localStorage.getItem("cliproxy-selected-provider")}return null}),[P,g]=c.useState(null),[p,y]=c.useState(!1),[C,M]=c.useState(()=>{if(typeof window>"u")return null;const x=new URLSearchParams(window.location.search),R=x.get("provider")?.trim().toLowerCase();return x.get("action")!=="auth"||!R||!Ve(R)?null:{provider:R,displayName:Vt(R),isFirstAccount:!1}}),m=c.useMemo(()=>a?.authStatus||[],[a?.authStatus]),S=a?.source==="remote",T=c.useMemo(()=>i?.variants||[],[i?.variants]),U=x=>{A(x),x&&localStorage.setItem("cliproxy-selected-provider",x)},h=c.useMemo(()=>P?null:k&&m.some(x=>x.provider===k)?k:m.length>0&&(m.find(R=>(R.accounts?.length||0)>0)?.provider||m[0]?.provider)||null,[k,P,m]),v=m.find(x=>x.provider===h),b=T.find(x=>x.name===P),q=b?m.find(x=>x.provider===b.provider):void 0,L=(b?.provider||v?.provider||"").toLowerCase().trim(),E=L==="gemini"||L==="agy",_=()=>{t.invalidateQueries({queryKey:["cliproxy"]}),t.invalidateQueries({queryKey:["cliproxy-auth"]})},K=(x,R,$)=>{u.isPending||N.isPending||($?u.mutate({provider:x,accountId:R}):N.mutate({provider:x,accountId:R}))},V=(x,R)=>{w.isPending||w.mutate({provider:x,accountId:R})},te=(x,R)=>{f.isPending||f.mutate({provider:x,accountIds:R})},X=(x,R)=>{O.isPending||O.mutate({provider:x,accountIds:R})},ae=x=>{U(x),g(null)},Q=x=>{g(x),U(null)};return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/30",children:[e.jsxs("div",{className:"p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:d?.backendLabel??"CLIProxy"})]}),e.jsx(I,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:_,disabled:l,children:e.jsx(as,{className:B("w-4 h-4",l&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:s("cliproxyPage.accountManagement")}),e.jsxs(I,{variant:"default",size:"sm",className:"w-full gap-2",onClick:()=>y(!0),children:[e.jsx(ye,{className:"w-4 h-4"}),s("cliproxyPage.quickSetup")]})]}),e.jsx(es,{className:"flex-1",children:e.jsxs("div",{className:"p-2",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2",children:s("cliproxyPage.providers")}),n?e.jsx("div",{className:"space-y-2 px-2",children:[1,2,3,4].map(x=>e.jsx(Bt,{className:"h-14 w-full rounded-lg"},x))}):e.jsx("div",{className:"space-y-1",children:m.map(x=>e.jsx(za,{status:x,isSelected:h===x.provider,onSelect:()=>ae(x.provider)},x.provider))}),T.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2 mt-4 flex items-center gap-1.5",children:[e.jsx(Ks,{className:"w-3 h-3"}),s("cliproxyPage.variants")]}),e.jsx("div",{className:"space-y-1",children:T.map(x=>e.jsx(Qa,{variant:x,parentAuth:m.find(R=>R.provider===x.provider),isSelected:P===x.name,onSelect:()=>Q(x.name),onDelete:()=>j.mutate(x.name),isDeleting:j.isPending},x.name))})]})]})}),e.jsx("div",{className:"p-3 border-t",children:e.jsx(la,{})}),e.jsx("div",{className:"p-3 border-t bg-background text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{children:s("cliproxyPage.providerCount",{count:m.length})}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ue,{className:"w-3 h-3 text-green-600"}),s("cliproxyPage.connectedCount",{count:m.filter(x=>x.authenticated).length})]})]})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background",children:[E&&e.jsx(Qs,{showProxySettingsLink:!0,className:"mx-4 mt-4"}),b&&q?e.jsx(e.Fragment,{children:e.jsx(Ns,{provider:b.name,displayName:s("cliproxyPage.variantDisplay",{name:b.name,provider:b.provider}),authStatus:q,catalog:xe[b.provider],logoProvider:b.provider,baseProvider:b.provider,defaultTarget:b.target,isRemoteMode:S,port:b.port,onAddAccount:()=>M({provider:b.provider,displayName:q.displayName,isFirstAccount:(q.accounts?.length||0)===0}),onSetDefault:x=>r.mutate({provider:b.provider,accountId:x}),onRemoveAccount:x=>o.mutate({provider:b.provider,accountId:x}),onPauseToggle:(x,R)=>K(b.provider,x,R),onSoloMode:x=>V(b.provider,x),onBulkPause:x=>te(b.provider,x),onBulkResume:x=>X(b.provider,x),isRemovingAccount:o.isPending,isPausingAccount:u.isPending||N.isPending,isSoloingAccount:w.isPending,isBulkPausing:f.isPending,isBulkResuming:O.isPending})}):v?e.jsx(e.Fragment,{children:e.jsx(Ns,{provider:v.provider,displayName:v.displayName,authStatus:v,catalog:xe[v.provider],isRemoteMode:S,onAddAccount:()=>M({provider:v.provider,displayName:v.displayName,isFirstAccount:(v.accounts?.length||0)===0}),onSetDefault:x=>r.mutate({provider:v.provider,accountId:x}),onRemoveAccount:x=>o.mutate({provider:v.provider,accountId:x}),onPauseToggle:(x,R)=>K(v.provider,x,R),onSoloMode:x=>V(v.provider,x),onBulkPause:x=>te(v.provider,x),onBulkResume:x=>X(v.provider,x),isRemovingAccount:o.isPending,isPausingAccount:u.isPending||N.isPending,isSoloingAccount:w.isPending,isBulkPausing:f.isPending,isBulkResuming:O.isPending})}):e.jsx(Ja,{onSetup:()=>y(!0)})]}),e.jsx(wa,{open:p,onClose:()=>y(!1)}),e.jsx(Sa,{open:C!==null,onClose:()=>M(null),provider:C?.provider||"",displayName:C?.displayName||"",isFirstAccount:C?.isFirstAccount||!1})]})}export{hn as CliproxyPage};
@@ -1 +0,0 @@
1
- import{j as e}from"./radix-ui-Dt3edmE5.js";import{r as s}from"./react-vendor-CNOkPC89.js";import{u as w}from"./tanstack-B8i0evp-.js";import{Y as U,b7 as A}from"./index-DAtuJuGe.js";import{C as P}from"./default-ports-1QQSffYX.js";import{G as M,R as k,x as q}from"./icons-EMBHZkGo.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function F({port:a=P}){const l=s.useRef(null),[L,g]=s.useState(null),[$,R]=s.useState(0),[y,c]=s.useState(null),[E,i]=s.useState(!1),{data:b,error:x}=w({queryKey:["cliproxy-server-config"],queryFn:()=>U.cliproxyServer.get(),staleTime:3e4}),{data:j}=w({queryKey:["auth-tokens-raw"],queryFn:async()=>{const t=await fetch(A("/settings/auth/tokens/raw"));if(!t.ok)throw new Error("Failed to fetch auth tokens");return t.json()},staleTime:3e4});s.useEffect(()=>{x&&console.warn("[ControlPanelEmbed] Config fetch failed, using local mode:",x)},[x]);const{managementUrl:n,checkUrl:m,authToken:h,isRemote:d,displayHost:u}=s.useMemo(()=>{const t=b?.remote;if(t?.enabled&&t?.host){const o=t.protocol||"http",r=t.port||(o==="https"?443:P),N=o==="https"&&r===443||o==="http"&&r===80?"":`:${r}`,v=`${o}://${t.host}${N}`;return{managementUrl:`${v}/management.html`,checkUrl:`${v}/`,authToken:t.auth_token||void 0,isRemote:!0,displayHost:`${t.host}${N}`}}const f=j?.managementSecret?.value||"ccs";return{managementUrl:`http://localhost:${a}/management.html`,checkUrl:`http://localhost:${a}/`,authToken:f,isRemote:!1,displayHost:`localhost:${a}`}},[b,j,a]),p=L===n,I=!p;s.useEffect(()=>{const t=new AbortController,f=async()=>{try{(await fetch(m,{signal:t.signal})).ok?(i(!0),c(null)):(i(!1),c(d?`Remote CLIProxy at ${u} returned an error`:"CLIProxy returned an error"))}catch(r){if(r instanceof Error&&r.name==="AbortError")return;i(!1),c(d?`Remote CLIProxy at ${u} is not reachable`:"CLIProxy is not running")}},o=setTimeout(()=>t.abort(),2e3);return f().finally(()=>clearTimeout(o)),()=>t.abort()},[m,d,u]);const C=s.useCallback(()=>{if(!(!p||!l.current?.contentWindow||!h))try{const t=m.replace(/\/$/,"");if(!l.current.src.startsWith(t)){console.warn("[ControlPanelEmbed] Iframe origin mismatch, skipping postMessage");return}l.current.contentWindow.postMessage({type:"ccs-auto-login",apiBase:t,managementKey:h},t)}catch(t){console.debug("[ControlPanelEmbed] postMessage failed - cross-origin:",t)}},[h,m,p]);s.useEffect(()=>{C()},[C]);const S=s.useCallback(()=>{g(n)},[n]),T=()=>{g(null),R(t=>t+1),c(null),i(!1)};return!E&&y?e.jsxs("div",{className:"flex-1 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(M,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"font-semibold",children:"CLIProxy Control Panel"})]}),e.jsxs("button",{className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm border rounded-md hover:bg-muted",onClick:T,children:[e.jsx(k,{className:"w-4 h-4"}),"Retry"]})]}),e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20",children:e.jsxs("div",{className:"text-center max-w-md px-8",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center mx-auto mb-6",children:e.jsx(q,{className:"w-8 h-8 text-destructive"})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"CLIProxy Not Available"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:y}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Start a CLIProxy session with"," ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"ccs gemini"})," or run"," ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"ccs config"})," which auto-starts it."]})]})})]}):e.jsx("div",{className:"flex-1 flex flex-col",children:e.jsxs("div",{className:"flex-1 flex flex-col relative",children:[I&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/80 z-10",children:e.jsxs("div",{className:"text-center",children:[e.jsx(k,{className:"w-8 h-8 animate-spin text-primary mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:d?`Loading Control Panel from ${u}...`:"Loading Control Panel..."})]})}),e.jsx("iframe",{ref:l,src:n,className:"flex-1 w-full border-0",title:"CLIProxy Management Panel",onLoad:S},`${n}:${$}`)]})})}function Q(){return e.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:e.jsx(F,{})})}export{Q as CliproxyControlPanelPage};
@@ -1,27 +0,0 @@
1
- import{j as e}from"./radix-ui-Dt3edmE5.js";import{r as b}from"./react-vendor-CNOkPC89.js";import{t as F}from"./notifications-B2HqRBj7.js";import{C as L,j as D,k as R,B as I,b as A,d as y,r as T,s as E,t as k,v as P,w as g,I as C,n as xe,b7 as J,b8 as Ne,c as Se,be as ze,bf as pe,bg as Ye,Q as Xe,R as Be,U as re,V as te,b9 as je}from"./index-DAtuJuGe.js";import{S as B}from"./switch-DmDIWykO.js";import{a4 as We,aK as He,aj as Z,L as $,m as Qe,aL as Ge,aM as Je,ao as Ze,aE as ce,aF as de,o as ge,Q as es,l as ss,n as rs,O as ts,S as ns,aN as as,v as ls,w as os,T as is,D as cs}from"./icons-EMBHZkGo.js";import{S as Q}from"./separator--ZH5ZM-3.js";import{a as ds,u as ve,b as be}from"./tanstack-B8i0evp-.js";import"./code-highlight-BRUf_pqB.js";import{T as us,a as ms,b as we,c as ne,d as xs,e as ae}from"./table-E5IxHhrW.js";import{R as hs}from"./raw-json-settings-editor-panel-DnUbq1__.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";function W({title:s,icon:r,badge:t,description:a,disabledReason:n,children:o}){return e.jsxs(L,{children:[e.jsxs(D,{className:"pb-2",children:[e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[r,s,t?e.jsx(I,{variant:"outline",className:"text-[10px] font-normal",children:t}):null]}),a?e.jsx("p",{className:"text-xs text-muted-foreground",children:a}):null]}),e.jsxs(A,{className:"space-y-3",children:[n?e.jsx("p",{className:"text-xs text-amber-600",children:n}):null,o]})]})}function fs({catalog:s,state:r,disabled:t=!1,disabledReason:a,onToggle:n}){const o=new Set(s.map(l=>l.name)),i=Object.entries(r).filter(([l])=>!o.has(l)).sort(([l],[d])=>l.localeCompare(d));return e.jsxs(W,{title:"Features",badge:"features",icon:e.jsx(We,{className:"h-4 w-4"}),description:"Toggle the supported Codex feature flags CCS can safely manage.",disabledReason:a,children:[e.jsx("div",{className:"space-y-2",children:s.map(l=>{const d=r[l.name]??null;return e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border px-3 py-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:l.label}),e.jsx(I,{variant:"outline",className:"font-mono text-[10px]",children:l.name})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l.description})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[d!==null?e.jsx(y,{variant:"outline",size:"sm",onClick:()=>n(l.name,null),disabled:t,children:"Use default"}):null,e.jsx(B,{checked:d===!0,onCheckedChange:c=>n(l.name,c),disabled:t})]})]},l.name)})}),i.length>0?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Existing config-only flags"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"These feature keys already exist in your `config.toml`, so CCS can surface them without claiming full catalog coverage."})]}),i.map(([l,d])=>e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-dashed px-3 py-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:l}),e.jsx(I,{variant:"secondary",className:"text-[10px]",children:"existing"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:d===null?"Stored in a non-boolean form. Use raw TOML if you need to edit it.":"Discovered from the current file instead of CCS's built-in catalog."})]}),d===null?e.jsx(I,{variant:"outline",children:"Raw only"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{variant:"outline",size:"sm",onClick:()=>n(l,null),disabled:t,children:"Use default"}),e.jsx(B,{checked:d===!0,onCheckedChange:c=>n(l,c),disabled:t})]})]},l))]}):null]})}const ps={name:"",transport:"stdio",command:null,args:[],url:null,enabled:!0,required:!1,startupTimeoutSec:null,toolTimeoutSec:null,enabledTools:[],disabledTools:[]};function le(s){return s.join(", ")}function oe(s){return s.split(",").map(r=>r.trim()).filter(Boolean)}function js({initialDraft:s,isNew:r,disabled:t,saving:a,canDelete:n,onSave:o,onDelete:i}){const[l,d]=b.useState(s);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(C,{value:l.name,onChange:c=>d(u=>({...u,name:c.target.value})),placeholder:"playwright",disabled:t||!r}),e.jsxs(T,{value:l.transport,onValueChange:c=>d(u=>({...u,transport:c})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{})}),e.jsxs(P,{children:[e.jsx(g,{value:"stdio",children:"stdio"}),e.jsx(g,{value:"streamable-http",children:"streamable-http"})]})]}),l.transport==="stdio"?e.jsxs(e.Fragment,{children:[e.jsx(C,{value:l.command??"",onChange:c=>d(u=>({...u,command:c.target.value||null})),placeholder:"npx",disabled:t}),e.jsx(C,{value:le(l.args),onChange:c=>d(u=>({...u,args:oe(c.target.value)})),placeholder:"@playwright/mcp@latest, --flag",disabled:t})]}):e.jsx(C,{className:"sm:col-span-2",value:l.url??"",onChange:c=>d(u=>({...u,url:c.target.value||null})),placeholder:"https://example.test/mcp",disabled:t}),e.jsx(C,{type:"number",min:1,value:l.startupTimeoutSec??"",onChange:c=>d(u=>({...u,startupTimeoutSec:c.target.value?Number(c.target.value):null})),placeholder:"Startup timeout (sec)",disabled:t}),e.jsx(C,{type:"number",min:1,value:l.toolTimeoutSec??"",onChange:c=>d(u=>({...u,toolTimeoutSec:c.target.value?Number(c.target.value):null})),placeholder:"Tool timeout (sec)",disabled:t}),e.jsx(C,{value:le(l.enabledTools),onChange:c=>d(u=>({...u,enabledTools:oe(c.target.value)})),placeholder:"enabled_tools",disabled:t}),e.jsx(C,{value:le(l.disabledTools),onChange:c=>d(u=>({...u,disabledTools:oe(c.target.value)})),placeholder:"disabled_tools",disabled:t})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("label",{className:"flex items-center justify-between rounded-md border px-3 py-2 text-sm",children:["Enabled",e.jsx(B,{checked:l.enabled,onCheckedChange:c=>d(u=>({...u,enabled:c})),disabled:t})]}),e.jsxs("label",{className:"flex items-center justify-between rounded-md border px-3 py-2 text-sm",children:["Required",e.jsx(B,{checked:l.required,onCheckedChange:c=>d(u=>({...u,required:c})),disabled:t})]})]}),e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsxs(y,{variant:"outline",onClick:i,disabled:t||a||!n,children:[e.jsx(Z,{className:"mr-2 h-4 w-4"}),"Delete"]}),e.jsxs(y,{onClick:()=>o(l.name,{transport:l.transport,command:l.command,args:l.args,url:l.url,enabled:l.enabled,required:l.required,startupTimeoutSec:l.startupTimeoutSec,toolTimeoutSec:l.toolTimeoutSec,enabledTools:l.enabledTools,disabledTools:l.disabledTools}),disabled:t||a||l.name.trim().length===0,children:[a?e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save MCP server"]})]})]})}function gs({entries:s,disabled:r=!1,disabledReason:t,saving:a=!1,onSave:n,onDelete:o}){const[i,l]=b.useState("new"),d=b.useMemo(()=>s.find(h=>h.name===i)??null,[s,i]),c=d??ps,u=JSON.stringify(c);return e.jsxs(W,{title:"MCP servers",badge:"mcp_servers",icon:e.jsx(He,{className:"h-4 w-4"}),description:"Manage the safe MCP transport fields. Keep auth headers and bearer tokens in raw TOML.",disabledReason:t,children:[e.jsxs(T,{value:i,onValueChange:l,disabled:r,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Select MCP server"})}),e.jsxs(P,{children:[e.jsx(g,{value:"new",children:"Create new MCP server"}),s.map(h=>e.jsx(g,{value:h.name,children:h.name},h.name))]})]}),e.jsx(js,{initialDraft:c,isNew:i==="new",disabled:r,saving:a,canDelete:d!==null,onDelete:async()=>{d&&(await o(d.name),l("new"))},onSave:async(h,p)=>{await n(h,p),l(h)}},u)]})}const vs={name:"",displayName:null,baseUrl:null,envKey:null,wireApi:"responses",requiresOpenaiAuth:!1,supportsWebsockets:!1},bs={name:"cliproxy",displayName:"CLIProxy Codex",baseUrl:"http://127.0.0.1:8317/api/provider/codex",envKey:"CLIPROXY_API_KEY",wireApi:"responses",requiresOpenaiAuth:!1,supportsWebsockets:!1};function ws({initialDraft:s,isNew:r,disabled:t,saving:a,canDelete:n,onSave:o,onDelete:i}){const[l,d]=b.useState(s);return e.jsxs(e.Fragment,{children:[r&&e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-md border border-dashed px-3 py-2 text-xs text-muted-foreground",children:[e.jsxs("p",{children:["Quick start: apply the CLIProxy Codex preset here, then set"," ",e.jsx("strong",{children:"Default provider"})," to ",e.jsx("code",{children:"cliproxy"})," in Top-level settings."]}),e.jsx(y,{variant:"outline",size:"sm",onClick:()=>d(bs),disabled:t,children:"Use CLIProxy Codex preset"})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(C,{value:l.name,onChange:c=>d(u=>({...u,name:c.target.value})),placeholder:"Provider id",disabled:t||!r}),e.jsx(C,{value:l.displayName??"",onChange:c=>d(u=>({...u,displayName:c.target.value||null})),placeholder:"Display name",disabled:t}),e.jsx(C,{value:l.baseUrl??"",onChange:c=>d(u=>({...u,baseUrl:c.target.value||null})),placeholder:"http://127.0.0.1:8317/api/provider/codex",disabled:t}),e.jsx(C,{value:l.envKey??"",onChange:c=>d(u=>({...u,envKey:c.target.value||null})),placeholder:"CLIPROXY_API_KEY",disabled:t})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[e.jsxs(T,{value:l.wireApi??"responses",onValueChange:c=>d(u=>({...u,wireApi:c})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{})}),e.jsx(P,{children:e.jsx(g,{value:"responses",children:"responses"})})]}),e.jsxs("label",{className:"flex items-center justify-between rounded-md border px-3 py-2 text-sm",children:["Requires OpenAI auth",e.jsx(B,{checked:l.requiresOpenaiAuth,onCheckedChange:c=>d(u=>({...u,requiresOpenaiAuth:c})),disabled:t})]}),e.jsxs("label",{className:"flex items-center justify-between rounded-md border px-3 py-2 text-sm",children:["Supports websockets",e.jsx(B,{checked:l.supportsWebsockets,onCheckedChange:c=>d(u=>({...u,supportsWebsockets:c})),disabled:t})]})]}),e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsxs(y,{variant:"outline",onClick:i,disabled:t||a||!n,children:[e.jsx(Z,{className:"mr-2 h-4 w-4"}),"Delete"]}),e.jsxs(y,{onClick:()=>o(l.name,{displayName:l.displayName,baseUrl:l.baseUrl,envKey:l.envKey,wireApi:l.wireApi,requiresOpenaiAuth:l.requiresOpenaiAuth,supportsWebsockets:l.supportsWebsockets}),disabled:t||a||l.name.trim().length===0,children:[a?e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save provider"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["If you want plain native ",e.jsx("code",{children:"codex"})," to default to CLIProxy, save a provider named"," ",e.jsx("code",{children:"cliproxy"})," with ",e.jsx("code",{children:"CLIPROXY_API_KEY"})," here, then pick"," ",e.jsx("code",{children:"cliproxy"})," in the ",e.jsx("strong",{children:"Default provider"})," control above."]})]})}function Cs({entries:s,disabled:r=!1,disabledReason:t,saving:a=!1,onSave:n,onDelete:o}){const[i,l]=b.useState("new"),d=b.useMemo(()=>s.find(h=>h.name===i)??null,[s,i]),c=d??vs,u=JSON.stringify(c);return e.jsxs(W,{title:"Model providers",badge:"model_providers",icon:e.jsx(Qe,{className:"h-4 w-4"}),description:"Edit the common provider fields CCS can support safely. Keep secret migration and inline bearer tokens in raw TOML.",disabledReason:t,children:[e.jsxs(T,{value:i,onValueChange:l,disabled:r,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Select provider"})}),e.jsxs(P,{children:[e.jsx(g,{value:"new",children:"Create new provider"}),s.map(h=>e.jsx(g,{value:h.name,children:h.name},h.name))]})]}),e.jsx(ws,{initialDraft:c,isNew:i==="new",disabled:r,saving:a,canDelete:d!==null,onDelete:async()=>{d&&(await o(d.name),l("new"))},onSave:async(h,p)=>{await n(h,p),l(h)}},u)]})}function ys({initialName:s,initialModel:r,initialProvider:t,initialEffort:a,providerNames:n,activeProfile:o,selectedEntryName:i,disabled:l,saving:d,onSave:c,onDelete:u,onSetActive:h}){const[p,x]=b.useState(s),[j,m]=b.useState(r),[v,H]=b.useState(t),[U,_]=b.useState(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(C,{value:p,onChange:w=>x(w.target.value),placeholder:"deep-review",disabled:l||i!==null}),e.jsx(C,{value:j??"",onChange:w=>m(w.target.value||null),placeholder:"gpt-5.4",disabled:l}),e.jsxs(T,{value:v??"__unset__",onValueChange:w=>H(w==="__unset__"?null:w),disabled:l,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use global provider"})}),e.jsxs(P,{children:[e.jsx(g,{value:"__unset__",children:"Use global provider"}),n.map(w=>e.jsx(g,{value:w,children:w},w))]})]}),e.jsxs(T,{value:U??"__unset__",onValueChange:w=>_(w==="__unset__"?null:w),disabled:l,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use global effort"})}),e.jsxs(P,{children:[e.jsx(g,{value:"__unset__",children:"Use global effort"}),["minimal","low","medium","high","xhigh"].map(w=>e.jsx(g,{value:w,children:w},w))]})]})]}),e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(y,{variant:"outline",onClick:u,disabled:l||d||!i,children:[e.jsx(Z,{className:"mr-2 h-4 w-4"}),"Delete"]}),e.jsx(y,{variant:"outline",onClick:h,disabled:l||d||!i||i===o,children:"Set active"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(y,{variant:"outline",onClick:()=>c(p,{model:j,modelProvider:v,modelReasoningEffort:U},!1),disabled:l||d||p.trim().length===0,children:[d?e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save profile"]}),e.jsxs(y,{onClick:()=>c(p,{model:j,modelProvider:v,modelReasoningEffort:U},!0),disabled:l||d||p.trim().length===0,children:[d?e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save + activate"]})]})]})]})}function Ns({activeProfile:s,entries:r,providerNames:t,disabled:a=!1,disabledReason:n,saving:o=!1,onSave:i,onDelete:l,onSetActive:d}){const[c,u]=b.useState("new"),h=b.useMemo(()=>r.find(x=>x.name===c)??null,[r,c]),p=JSON.stringify(h??{name:"",values:{}});return e.jsxs(W,{title:"Profiles",badge:"profiles",icon:e.jsx(Ge,{className:"h-4 w-4"}),description:"Create reusable Codex overlays and set the active default profile.",disabledReason:n,children:[e.jsxs(T,{value:c,onValueChange:u,disabled:a,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Select profile"})}),e.jsxs(P,{children:[e.jsx(g,{value:"new",children:"Create new profile"}),r.map(x=>e.jsxs(g,{value:x.name,children:[x.name,x.name===s?" (active)":""]},x.name))]})]}),e.jsx(ys,{initialName:h?.name??"",initialModel:h?.values.model??null,initialProvider:h?.values.modelProvider??null,initialEffort:h?.values.modelReasoningEffort??null,providerNames:t,activeProfile:s,selectedEntryName:h?.name??null,disabled:a,saving:o,onDelete:async()=>{h&&(await l(h.name),u("new"))},onSetActive:async()=>{h&&await d(h.name)},onSave:async(x,j,m)=>{await i(x,j,m),u(x)}},p)]})}function Ss({workspacePath:s,disabled:r,saving:t,onSave:a}){const[n,o]=b.useState(s),[i,l]=b.useState("trusted");return e.jsxs("div",{className:"grid gap-2 sm:grid-cols-[1fr_160px_auto]",children:[e.jsx(C,{value:n,onChange:d=>o(d.target.value),placeholder:"~/repo or /absolute/path",disabled:r}),e.jsxs(T,{value:i,onValueChange:l,disabled:r,children:[e.jsx(E,{children:e.jsx(k,{})}),e.jsxs(P,{children:[e.jsx(g,{value:"trusted",children:"trusted"}),e.jsx(g,{value:"untrusted",children:"untrusted"})]})]}),e.jsxs(y,{onClick:()=>a(n,i),disabled:r||t,children:[t?e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save trust"]})]})}function _s({workspacePath:s,entries:r,disabled:t=!1,disabledReason:a,saving:n=!1,onSave:o}){return e.jsxs(W,{title:"Project trust",badge:"projects",icon:e.jsx(Je,{className:"h-4 w-4"}),description:"Trust current workspaces or remove stale trust entries without opening raw TOML.",disabledReason:a,children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Paths must be absolute or start with ",e.jsx("code",{children:"~/"}),". Relative paths are rejected so CCS does not trust the wrong folder."]}),e.jsx(Ss,{workspacePath:s,disabled:t,saving:n,onSave:o},s),e.jsx(y,{variant:"outline",className:"w-full justify-start",onClick:()=>o(s,"trusted"),disabled:t||n,children:"Trust current workspace"}),e.jsx("div",{className:"space-y-2",children:r.length===0?e.jsx("p",{className:"text-xs text-muted-foreground",children:"No explicit project trust entries saved."}):r.map(i=>e.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border px-3 py-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:i.path}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["trust_level = ",i.trustLevel]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{variant:"ghost",size:"sm",onClick:()=>o(i.path,i.trustLevel==="trusted"?"untrusted":"trusted"),disabled:t||n,children:"Toggle"}),e.jsx(y,{variant:"ghost",size:"icon",onClick:()=>o(i.path,null),disabled:t||n,children:e.jsx(Z,{className:"h-4 w-4"})})]})]},i.path))})]})}const O="__unset__";function z(s){return s??O}function Y(s,r){return r&&!s.includes(r)?[r,...s]:s}function Ts(s,r){const t={};return r.model!==s.model&&(t.model=r.model),r.modelReasoningEffort!==s.modelReasoningEffort&&(t.modelReasoningEffort=r.modelReasoningEffort),r.modelProvider!==s.modelProvider&&(t.modelProvider=r.modelProvider),r.approvalPolicy!==s.approvalPolicy&&(t.approvalPolicy=r.approvalPolicy),r.sandboxMode!==s.sandboxMode&&(t.sandboxMode=r.sandboxMode),r.webSearch!==s.webSearch&&(t.webSearch=r.webSearch),r.toolOutputTokenLimit!==s.toolOutputTokenLimit&&(t.toolOutputTokenLimit=r.toolOutputTokenLimit),r.personality!==s.personality&&(t.personality=r.personality),t}function Es({initialValues:s,providerNames:r,disabled:t,saving:a,onSave:n}){const[o,i]=b.useState(s),l=Y(["minimal","low","medium","high","xhigh"],o.modelReasoningEffort),d=Y(r,o.modelProvider),c=Y(["on-request","never","untrusted"],o.approvalPolicy),u=Y(["read-only","workspace-write","danger-full-access"],o.sandboxMode),h=Y(["cached","live","disabled"],o.webSearch),p=Y(["none","friendly","pragmatic"],o.personality),x=Ts(s,o),j=Object.keys(x).length>0;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Model"}),e.jsx(C,{value:o.model??"",onChange:m=>i(v=>({...v,model:m.target.value||null})),placeholder:"gpt-5.4",disabled:t})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Reasoning effort"}),e.jsxs(T,{value:z(o.modelReasoningEffort),onValueChange:m=>i(v=>({...v,modelReasoningEffort:m===O?null:m})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use default"})}),e.jsxs(P,{children:[e.jsx(g,{value:O,children:"Use default"}),l.map(m=>e.jsx(g,{value:m,children:m},m))]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Default provider"}),e.jsxs(T,{value:z(o.modelProvider),onValueChange:m=>i(v=>({...v,modelProvider:m===O?null:m})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use Codex default"})}),e.jsxs(P,{children:[e.jsx(g,{value:O,children:"Use Codex default"}),d.map(m=>e.jsx(g,{value:m,children:m},m))]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Approval policy"}),e.jsxs(T,{value:z(o.approvalPolicy),onValueChange:m=>i(v=>({...v,approvalPolicy:m===O?null:m})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use default"})}),e.jsxs(P,{children:[e.jsx(g,{value:O,children:"Use default"}),c.map(m=>e.jsx(g,{value:m,children:m},m))]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Sandbox mode"}),e.jsxs(T,{value:z(o.sandboxMode),onValueChange:m=>i(v=>({...v,sandboxMode:m===O?null:m})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use default"})}),e.jsxs(P,{children:[e.jsx(g,{value:O,children:"Use default"}),u.map(m=>e.jsx(g,{value:m,children:m},m))]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Web search"}),e.jsxs(T,{value:z(o.webSearch),onValueChange:m=>i(v=>({...v,webSearch:m===O?null:m})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use default"})}),e.jsxs(P,{children:[e.jsx(g,{value:O,children:"Use default"}),h.map(m=>e.jsx(g,{value:m,children:m},m))]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Tool output token limit"}),e.jsx(C,{type:"number",min:1,value:o.toolOutputTokenLimit??"",onChange:m=>i(v=>({...v,toolOutputTokenLimit:m.target.value?Number(m.target.value):null})),placeholder:"25000",disabled:t})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium",children:"Personality"}),e.jsxs(T,{value:z(o.personality),onValueChange:m=>i(v=>({...v,personality:m===O?null:m})),disabled:t,children:[e.jsx(E,{children:e.jsx(k,{placeholder:"Use default"})}),e.jsxs(P,{children:[e.jsx(g,{value:O,children:"Use default"}),p.map(m=>e.jsx(g,{value:m,children:m},m))]})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(y,{onClick:()=>n(x),disabled:t||a||!j,children:[a?e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save top-level settings"]})})]})}function ks({values:s,providerNames:r,disabled:t=!1,disabledReason:a,saving:n=!1,onSave:o}){return e.jsx(W,{title:"Top-level controls",badge:"config.toml",icon:e.jsx(Ze,{className:"h-4 w-4"}),description:"Structured controls for the stable top-level Codex settings users touch most often. Unsupported upstream shapes stay untouched and should be edited in raw TOML.",disabledReason:a,children:e.jsx(Es,{initialValues:s,providerNames:r,disabled:t,saving:n,onSave:o},JSON.stringify(s))})}function Ps({workspacePath:s,activeProfile:r,topLevelSettings:t,projectTrustEntries:a,profileEntries:n,modelProviderEntries:o,mcpServerEntries:i,featureCatalog:l,featureState:d,disabled:c,disabledReason:u,saving:h,onPatch:p}){return e.jsx(xe,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 pr-1",children:[e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(ce,{className:"h-4 w-4"}),"Structured controls boundary"]})}),e.jsxs(A,{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsxs("p",{children:["Guided controls write only the user-layer ",e.jsx("code",{children:"config.toml"}),". They do not model the full effective Codex runtime once trusted repo layers and CCS transient"," ",e.jsx("code",{children:"-c"})," overrides are involved."]}),e.jsx("p",{children:"Structured saves normalize TOML formatting and strip comments. Use the raw editor on the right when exact layout matters."})]})]}),e.jsx(ks,{values:t,providerNames:o.map(x=>x.name),disabled:c,disabledReason:u,saving:h,onSave:x=>p({kind:"top-level",values:x},"Saved top-level Codex settings.")}),e.jsx(_s,{workspacePath:s,entries:a,disabled:c,disabledReason:u,saving:h,onSave:(x,j)=>p({kind:"project-trust",path:x,trustLevel:j},j?"Saved project trust entry.":"Removed project trust entry.")}),e.jsx(Ns,{activeProfile:r,entries:n,providerNames:o.map(x=>x.name),disabled:c,disabledReason:u,saving:h,onSave:(x,j,m)=>p({kind:"profile",action:"upsert",name:x,values:j,setAsActive:m},"Saved profile."),onDelete:x=>p({kind:"profile",action:"delete",name:x},"Deleted profile."),onSetActive:x=>p({kind:"profile",action:"set-active",name:x},"Set active profile.")}),e.jsx(Cs,{entries:o,disabled:c,disabledReason:u,saving:h,onSave:(x,j)=>p({kind:"model-provider",action:"upsert",name:x,values:j},"Saved model provider."),onDelete:x=>p({kind:"model-provider",action:"delete",name:x},"Deleted model provider.")}),e.jsx(gs,{entries:i,disabled:c,disabledReason:u,saving:h,onSave:(x,j)=>p({kind:"mcp-server",action:"upsert",name:x,values:j},"Saved MCP server."),onDelete:x=>p({kind:"mcp-server",action:"delete",name:x},"Deleted MCP server.")}),e.jsx(fs,{catalog:l,state:d,disabled:c,disabledReason:u,onToggle:(x,j)=>p({kind:"feature",feature:x,enabled:j},"Saved feature toggle.")})]})})}const _e=`model_provider = "cliproxy"
2
-
3
- [model_providers.cliproxy]
4
- base_url = "http://127.0.0.1:8317/api/provider/codex"
5
- env_key = "CLIPROXY_API_KEY"
6
- wire_api = "responses"`,Te=[{name:"multi_agent",label:"Multi-agent",description:"Enable subagent collaboration tools."},{name:"unified_exec",label:"Unified exec",description:"Use the PTY-backed unified exec tool."},{name:"shell_snapshot",label:"Shell snapshot",description:"Reuse shell environment snapshots."},{name:"apply_patch_freeform",label:"Apply patch",description:"Enable freeform apply_patch edits."},{name:"js_repl",label:"JS REPL",description:"Enable the Node-backed JavaScript REPL."},{name:"runtime_metrics",label:"Runtime metrics",description:"Collect Codex runtime metrics."},{name:"prevent_idle_sleep",label:"Prevent idle sleep",description:"Keep the machine awake while active."},{name:"fast_mode",label:"Fast mode",description:"Allow the fast service tier path."},{name:"apps",label:"Apps",description:"Enable ChatGPT Apps and connectors support."},{name:"smart_approvals",label:"Smart approvals",description:"Route eligible approvals through the guardian flow."}];function V(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)?s:null}function S(s){return typeof s=="string"&&s.trim().length>0?s.trim():null}function G(s){return typeof s=="number"&&Number.isFinite(s)?s:null}function ie(s){return Array.isArray(s)?s.filter(r=>typeof r=="string").map(r=>r.trim()):[]}function Ee(s){return{model:S(s?.model),modelReasoningEffort:S(s?.model_reasoning_effort),modelProvider:S(s?.model_provider),approvalPolicy:S(s?.approval_policy),sandboxMode:S(s?.sandbox_mode),webSearch:S(s?.web_search),toolOutputTokenLimit:G(s?.tool_output_token_limit),personality:S(s?.personality)}}function Os(s){const r=V(s?.projects);return r?Object.entries(r).map(([t,a])=>{const n=S(V(a)?.trust_level);return n?{path:t,trustLevel:n}:null}).filter(t=>t!==null).sort((t,a)=>t.path.localeCompare(a.path)):[]}function Ls(s){const r=V(s?.profiles);return r?Object.entries(r).map(([t,a])=>({name:t,values:Ee(V(a))})).sort((t,a)=>t.name.localeCompare(a.name)):[]}function Ds(s){const r=V(s?.model_providers);return r?Object.entries(r).map(([t,a])=>{const n=V(a);return n?{name:t,displayName:S(n.name),baseUrl:S(n.base_url),envKey:S(n.env_key),wireApi:S(n.wire_api),requiresOpenaiAuth:n.requires_openai_auth===!0,supportsWebsockets:n.supports_websockets===!0}:null}).filter(t=>t!==null).sort((t,a)=>t.name.localeCompare(a.name)):[]}function Rs(s){const r=V(s?.mcp_servers);return r?Object.entries(r).map(([t,a])=>{const n=V(a);if(!n)return null;const o=S(n.command)?"stdio":"streamable-http",i=G(n.startup_timeout_ms);return{name:t,transport:o,command:S(n.command),args:ie(n.args),url:S(n.url),enabled:n.enabled!==!1,required:n.required===!0,startupTimeoutSec:G(n.startup_timeout_sec)??(i!==null?i/1e3:null),toolTimeoutSec:G(n.tool_timeout_sec),enabledTools:ie(n.enabled_tools),disabledTools:ie(n.disabled_tools)}}).filter(t=>t!==null).sort((t,a)=>t.name.localeCompare(a.name)):[]}function As(s){const r=V(s?.features),t={};for(const a of Te){const n=r?.[a.name];t[a.name]=typeof n=="boolean"?n:null}if(r)for(const[a,n]of Object.entries(r))a in t||(t[a]=typeof n=="boolean"?n:null);return t}const Ms=[{id:"codex-config-basic",label:"Codex Config Basics",url:"https://developers.openai.com/codex/config-basic",description:"Official user-layer setup, config location, and baseline configuration behavior."},{id:"codex-config-advanced",label:"Codex Config Advanced",url:"https://developers.openai.com/codex/config-advanced",description:"Layering, trust, profiles, and advanced config behavior."},{id:"codex-config-reference",label:"Codex Config Reference",url:"https://developers.openai.com/codex/config-reference",description:"Canonical upstream config surface for providers, MCP, features, and trust."},{id:"codex-releases",label:"Codex GitHub Releases",url:"https://github.com/openai/codex/releases",description:"Track upstream release notes and fast-moving CLI changes."}],Is=[{provider:"openai",label:"OpenAI Responses API",apiFormat:"Responses API",url:"https://platform.openai.com/docs/api-reference/responses"}];function Us(s){const r=/https?:\/\/[^\s)]+/g,t=[];let a=0,n;for(;(n=r.exec(s))!==null;){const[o]=n,i=n.index;i>a&&t.push(s.slice(a,i)),t.push(e.jsx("a",{href:o,target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:o},`${o}-${i}`)),a=i+o.length}return a<s.length&&t.push(s.slice(a)),t.length>0?t:[s]}function Fs({diagnostics:s}){const r=s.docsReference??{notes:[],links:[],providerDocs:[],providerValues:[],settingsHierarchy:[]},t=r.links.length>0?r.links:Ms,a=r.providerDocs.length>0?r.providerDocs:Is;return e.jsx(xe,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 pr-1",children:[e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(de,{className:"h-4 w-4"}),"CCS bridge recipe"]})}),e.jsxs(A,{className:"space-y-3 text-sm text-muted-foreground",children:[e.jsxs("p",{children:["Use ",e.jsx("code",{children:"ccsxp"})," if you want the built-in CCS Codex provider shortcut on native Codex. Use the saved recipe below if you want plain ",e.jsx("code",{children:"codex"})," or a personal alias like ",e.jsx("code",{children:"cxp"})," to default to CLIProxy."]}),e.jsx("pre",{className:"overflow-x-auto rounded-md border bg-muted/20 p-3 text-xs text-foreground",children:_e}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{children:["1. Save the ",e.jsx("code",{children:"cliproxy"})," provider in your user config."]}),e.jsxs("p",{children:["2. Set top-level ",e.jsx("code",{children:"model_provider"})," to ",e.jsx("code",{children:"cliproxy"}),"."]}),e.jsxs("p",{children:["3. Export ",e.jsx("code",{children:"CLIPROXY_API_KEY"})," in your shell before launching native Codex."]})]})]})]}),e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(de,{className:"h-4 w-4"}),"Upstream notes"]})}),e.jsxs(A,{className:"space-y-2 text-sm",children:[r.notes.map((n,o)=>e.jsxs("p",{className:"text-muted-foreground",children:["- ",Us(n)]},`${o}-${n}`)),e.jsx(Q,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Codex docs"}),e.jsx("div",{className:"space-y-1.5",children:t.map(n=>e.jsxs("a",{href:n.url,target:"_blank",rel:"noreferrer",className:"block rounded-md border px-2.5 py-2 transition-colors hover:bg-muted/50",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium",children:n.label}),e.jsx(ge,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),e.jsx("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:n.description}),e.jsx("p",{className:"mt-1 break-all font-mono text-[11px] text-muted-foreground/90 underline underline-offset-2",children:n.url})]},n.id))})]}),e.jsx(Q,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Provider / bridge reference"}),e.jsx("div",{className:"space-y-1.5",children:a.map(n=>e.jsxs("a",{href:n.url,target:"_blank",rel:"noreferrer",className:"block rounded-md border px-2.5 py-2 transition-colors hover:bg-muted/50",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium",children:n.label}),e.jsx(ge,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),e.jsxs("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:["provider: ",n.provider," | format: ",n.apiFormat]}),e.jsx("p",{className:"mt-1 break-all font-mono text-[11px] text-muted-foreground/90 underline underline-offset-2",children:n.url})]},`${n.provider}-${n.url}`))})]}),r.providerValues.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(Q,{}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Provider values: ",r.providerValues.join(", ")]})]}),r.settingsHierarchy.length>0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Settings hierarchy: ",r.settingsHierarchy.join(" -> ")]})]})]})]})})}function Ks(s,r){let t=s.slice(0,r).split(/\r\n|\n|\r/g);return[t.length,t.pop().length+1]}function Vs(s,r,t){let a=s.split(/\r\n|\n|\r/g),n="",o=(Math.log10(r+1)|0)+1;for(let i=r-1;i<=r+1;i++){let l=a[i-1];l&&(n+=i.toString().padEnd(o," "),n+=": ",n+=l,n+=`
7
- `,i===r&&(n+=" ".repeat(o+t+2),n+=`^
8
- `))}return n}class f extends Error{line;column;codeblock;constructor(r,t){const[a,n]=Ks(t.toml,t.ptr),o=Vs(t.toml,a,n);super(`Invalid TOML document: ${r}
9
-
10
- ${o}`,t),this.line=a,this.column=n,this.codeblock=o}}function qs(s,r){let t=0;for(;s[r-++t]==="\\";);return--t&&t%2}function ue(s,r=0,t=s.length){let a=s.indexOf(`
11
- `,r);return s[a-1]==="\r"&&a--,a<=t?a:-1}function ee(s,r){for(let t=r;t<s.length;t++){let a=s[t];if(a===`
12
- `)return t;if(a==="\r"&&s[t+1]===`
13
- `)return t+1;if(a<" "&&a!==" "||a==="")throw new f("control characters are not allowed in comments",{toml:s,ptr:r})}return s.length}function K(s,r,t,a){let n;for(;;){for(;(n=s[r])===" "||n===" "||!t&&(n===`
14
- `||n==="\r"&&s[r+1]===`
15
- `);)r++;if(a||n!=="#")break;r=ee(s,r)}return r}function $s(s,r,t,a,n=!1){if(!a)return r=ue(s,r),r<0?s.length:r;for(let o=r;o<s.length;o++){let i=s[o];if(i==="#")o=ue(s,o);else{if(i===t)return o+1;if(i===a||n&&(i===`
16
- `||i==="\r"&&s[o+1]===`
17
- `))return o}}throw new f("cannot find end of structure",{toml:s,ptr:r})}function ke(s,r){let t=s[r],a=t===s[r+1]&&s[r+1]===s[r+2]?s.slice(r,r+3):t;r+=a.length-1;do r=s.indexOf(a,++r);while(r>-1&&t!=="'"&&qs(s,r));return r>-1&&(r+=a.length,a.length>1&&(s[r]===t&&r++,s[r]===t&&r++)),r}let zs=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;class X extends Date{#s=!1;#r=!1;#e=null;constructor(r){let t=!0,a=!0,n="Z";if(typeof r=="string"){let o=r.match(zs);o?(o[1]||(t=!1,r=`0000-01-01T${r}`),a=!!o[2],a&&r[10]===" "&&(r=r.replace(" ","T")),o[2]&&+o[2]>23?r="":(n=o[3]||null,r=r.toUpperCase(),!n&&a&&(r+="Z"))):r=""}super(r),isNaN(this.getTime())||(this.#s=t,this.#r=a,this.#e=n)}isDateTime(){return this.#s&&this.#r}isLocal(){return!this.#s||!this.#r||!this.#e}isDate(){return this.#s&&!this.#r}isTime(){return this.#r&&!this.#s}isValid(){return this.#s||this.#r}toISOString(){let r=super.toISOString();if(this.isDate())return r.slice(0,10);if(this.isTime())return r.slice(11,23);if(this.#e===null)return r.slice(0,-1);if(this.#e==="Z")return r;let t=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return t=this.#e[0]==="-"?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(r,t="Z"){let a=new X(r);return a.#e=t,a}static wrapAsLocalDateTime(r){let t=new X(r);return t.#e=null,t}static wrapAsLocalDate(r){let t=new X(r);return t.#r=!1,t.#e=null,t}static wrapAsLocalTime(r){let t=new X(r);return t.#s=!1,t.#e=null,t}}let Ys=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Xs=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Bs=/^[+-]?0[0-9_]/,Ws=/^[0-9a-f]{2,8}$/i,Ce={b:"\b",t:" ",n:`
18
- `,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function Pe(s,r=0,t=s.length){let a=s[r]==="'",n=s[r++]===s[r]&&s[r]===s[r+1];n&&(t-=2,s[r+=2]==="\r"&&r++,s[r]===`
19
- `&&r++);let o=0,i,l="",d=r;for(;r<t-1;){let c=s[r++];if(c===`
20
- `||c==="\r"&&s[r]===`
21
- `){if(!n)throw new f("newlines are not allowed in strings",{toml:s,ptr:r-1})}else if(c<" "&&c!==" "||c==="")throw new f("control characters are not allowed in strings",{toml:s,ptr:r-1});if(i){if(i=!1,c==="x"||c==="u"||c==="U"){let u=s.slice(r,r+=c==="x"?2:c==="u"?4:8);if(!Ws.test(u))throw new f("invalid unicode escape",{toml:s,ptr:o});try{l+=String.fromCodePoint(parseInt(u,16))}catch{throw new f("invalid unicode escape",{toml:s,ptr:o})}}else if(n&&(c===`
22
- `||c===" "||c===" "||c==="\r")){if(r=K(s,r-1,!0),s[r]!==`
23
- `&&s[r]!=="\r")throw new f("invalid escape: only line-ending whitespace may be escaped",{toml:s,ptr:o});r=K(s,r)}else if(c in Ce)l+=Ce[c];else throw new f("unrecognized escape sequence",{toml:s,ptr:o});d=r}else!a&&c==="\\"&&(o=r-1,i=!0,l+=s.slice(d,o))}return l+s.slice(d,t-1)}function Hs(s,r,t,a){if(s==="true")return!0;if(s==="false")return!1;if(s==="-inf")return-1/0;if(s==="inf"||s==="+inf")return 1/0;if(s==="nan"||s==="+nan"||s==="-nan")return NaN;if(s==="-0")return a?0n:0;let n=Ys.test(s);if(n||Xs.test(s)){if(Bs.test(s))throw new f("leading zeroes are not allowed",{toml:r,ptr:t});s=s.replace(/_/g,"");let i=+s;if(isNaN(i))throw new f("invalid number",{toml:r,ptr:t});if(n){if((n=!Number.isSafeInteger(i))&&!a)throw new f("integer value cannot be represented losslessly",{toml:r,ptr:t});(n||a===!0)&&(i=BigInt(s))}return i}const o=new X(s);if(!o.isValid())throw new f("invalid value",{toml:r,ptr:t});return o}function Qs(s,r,t){let a=s.slice(r,t),n=a.indexOf("#");return n>-1&&(ee(s,n),a=a.slice(0,n)),[a.trimEnd(),n]}function he(s,r,t,a,n){if(a===0)throw new f("document contains excessively nested structures. aborting.",{toml:s,ptr:r});let o=s[r];if(o==="["||o==="{"){let[d,c]=o==="["?Zs(s,r,a,n):Js(s,r,a,n);if(t){if(c=K(s,c),s[c]===",")c++;else if(s[c]!==t)throw new f("expected comma or end of structure",{toml:s,ptr:c})}return[d,c]}let i;if(o==='"'||o==="'"){i=ke(s,r);let d=Pe(s,r,i);if(t){if(i=K(s,i),s[i]&&s[i]!==","&&s[i]!==t&&s[i]!==`
24
- `&&s[i]!=="\r")throw new f("unexpected character encountered",{toml:s,ptr:i});i+=+(s[i]===",")}return[d,i]}i=$s(s,r,",",t);let l=Qs(s,r,i-+(s[i-1]===","));if(!l[0])throw new f("incomplete key-value declaration: no value specified",{toml:s,ptr:r});return t&&l[1]>-1&&(i=K(s,r+l[1]),i+=+(s[i]===",")),[Hs(l[0],s,r,n),i]}let Gs=/^[a-zA-Z0-9-_]+[ \t]*$/;function me(s,r,t="="){let a=r-1,n=[],o=s.indexOf(t,r);if(o<0)throw new f("incomplete key-value: cannot find end of key",{toml:s,ptr:r});do{let i=s[r=++a];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===s[r+1]&&i===s[r+2])throw new f("multiline strings are not allowed in keys",{toml:s,ptr:r});let l=ke(s,r);if(l<0)throw new f("unfinished string encountered",{toml:s,ptr:r});a=s.indexOf(".",l);let d=s.slice(l,a<0||a>o?o:a),c=ue(d);if(c>-1)throw new f("newlines are not allowed in keys",{toml:s,ptr:r+a+c});if(d.trimStart())throw new f("found extra tokens after the string part",{toml:s,ptr:l});if(o<l&&(o=s.indexOf(t,l),o<0))throw new f("incomplete key-value: cannot find end of key",{toml:s,ptr:r});n.push(Pe(s,r,l))}else{a=s.indexOf(".",r);let l=s.slice(r,a<0||a>o?o:a);if(!Gs.test(l))throw new f("only letter, numbers, dashes and underscores are allowed in keys",{toml:s,ptr:r});n.push(l.trimEnd())}}while(a+1&&a<o);return[n,K(s,o+1,!0,!0)]}function Js(s,r,t,a){let n={},o=new Set,i;for(r++;(i=s[r++])!=="}"&&i;){if(i===",")throw new f("expected value, found comma",{toml:s,ptr:r-1});if(i==="#")r=ee(s,r);else if(i!==" "&&i!==" "&&i!==`
25
- `&&i!=="\r"){let l,d=n,c=!1,[u,h]=me(s,r-1);for(let j=0;j<u.length;j++){if(j&&(d=c?d[l]:d[l]={}),l=u[j],(c=Object.hasOwn(d,l))&&(typeof d[l]!="object"||o.has(d[l])))throw new f("trying to redefine an already defined value",{toml:s,ptr:r});!c&&l==="__proto__"&&Object.defineProperty(d,l,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new f("trying to redefine an already defined value",{toml:s,ptr:r});let[p,x]=he(s,h,"}",t-1,a);o.add(p),d[l]=p,r=x}}if(!i)throw new f("unfinished table encountered",{toml:s,ptr:r});return[n,r]}function Zs(s,r,t,a){let n=[],o;for(r++;(o=s[r++])!=="]"&&o;){if(o===",")throw new f("expected value, found comma",{toml:s,ptr:r-1});if(o==="#")r=ee(s,r);else if(o!==" "&&o!==" "&&o!==`
26
- `&&o!=="\r"){let i=he(s,r-1,"]",t-1,a);n.push(i[0]),r=i[1]}}if(!o)throw new f("unfinished array encountered",{toml:s,ptr:r});return[n,r]}function ye(s,r,t,a){let n=r,o=t,i,l=!1,d;for(let c=0;c<s.length;c++){if(c){if(n=l?n[i]:n[i]={},o=(d=o[i]).c,a===0&&(d.t===1||d.t===2))return null;if(d.t===2){let u=n.length-1;n=n[u],o=o[u].c}}if(i=s[c],(l=Object.hasOwn(n,i))&&o[i]?.t===0&&o[i]?.d)return null;l||(i==="__proto__"&&(Object.defineProperty(n,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0})),o[i]={t:c<s.length-1&&a===2?3:a,d:!1,i:0,c:{}})}if(d=o[i],d.t!==a&&!(a===1&&d.t===3)||(a===2&&(d.d||(d.d=!0,n[i]=[]),n[i].push(n={}),d.c[d.i++]=d={t:1,d:!1,i:0,c:{}}),d.d))return null;if(d.d=!0,a===1)n=l?n[i]:n[i]={};else if(a===0&&l)return null;return[i,n,d.c]}function er(s,{maxDepth:r=1e3,integersAsBigInt:t}={}){let a={},n={},o=a,i=n;for(let l=K(s,0);l<s.length;){if(s[l]==="["){let d=s[++l]==="[",c=me(s,l+=+d,"]");if(d){if(s[c[1]-1]!=="]")throw new f("expected end of table declaration",{toml:s,ptr:c[1]-1});c[1]++}let u=ye(c[0],a,n,d?2:1);if(!u)throw new f("trying to redefine an already defined table or value",{toml:s,ptr:l});i=u[2],o=u[1],l=c[1]}else{let d=me(s,l),c=ye(d[0],o,i,0);if(!c)throw new f("trying to redefine an already defined table or value",{toml:s,ptr:l});let u=he(s,d[1],void 0,r,t);c[1][c[0]]=u[0],l=u[1]}if(l=K(s,l,!0),s[l]&&s[l]!==`
27
- `&&s[l]!=="\r")throw new f("each key-value declaration must be followed by an end-of-line",{toml:s,ptr:l});l=K(s,l)}return a}function sr(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)}function rr(s){if(!s.trim())return{};const t=er(s);if(!sr(t))throw new Error("TOML root must be a table.");return t}function Oe(s){try{return{config:rr(s),parseError:null}}catch(r){return{config:null,parseError:r.message}}}async function tr(){const s=await fetch(J("/codex/diagnostics"));if(!s.ok)throw new Error("Failed to fetch Codex diagnostics");return s.json()}async function nr(){const s=await fetch(J("/codex/config/raw"));if(!s.ok)throw new Error("Failed to fetch Codex raw config");return s.json()}async function ar(s){const r=await fetch(J("/codex/config/raw"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(r.status===409)throw new Ne("Codex raw config changed externally");if(!r.ok){const t=await r.json().catch(()=>null);throw new Error(t?.error||"Failed to save Codex raw config")}return r.json()}async function lr(s){const r=await fetch(J("/codex/config/patch"),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(r.status===409)throw new Ne("Codex config changed externally");if(!r.ok){const t=await r.json().catch(()=>null);throw new Error(t?.error||"Failed to patch Codex config")}return r.json()}function or(){const s=ds(),r=ve({queryKey:["codex-diagnostics"],queryFn:tr,refetchInterval:1e4}),t=ve({queryKey:["codex-raw-config"],queryFn:nr}),a=be({mutationFn:ar,onSuccess:(o,i)=>{s.setQueryData(["codex-raw-config"],l=>{const d=l?.path??"$CODEX_HOME/config.toml",c=l?.resolvedPath??d,u=Oe(i.rawText);return{path:d,resolvedPath:c,exists:!0,mtime:o.mtime,rawText:i.rawText,config:u.config,parseError:u.parseError,readError:null}}),s.invalidateQueries({queryKey:["codex-diagnostics"]})}}),n=be({mutationFn:lr,onSuccess:o=>{s.setQueryData(["codex-raw-config"],o),s.invalidateQueries({queryKey:["codex-diagnostics"]})}});return b.useMemo(()=>({diagnostics:r.data,diagnosticsLoading:r.isLoading,diagnosticsError:r.error,refetchDiagnostics:r.refetch,rawConfig:t.data,rawConfigLoading:t.isLoading,rawConfigError:t.error,refetchRawConfig:t.refetch,saveRawConfig:a.mutate,saveRawConfigAsync:a.mutateAsync,isSavingRawConfig:a.isPending,patchConfig:n.mutate,patchConfigAsync:n.mutateAsync,isPatchingConfig:n.isPending}),[r.data,r.isLoading,r.error,r.refetch,t.data,t.isLoading,t.error,t.refetch,a.mutate,a.mutateAsync,a.isPending,n.mutate,n.mutateAsync,n.isPending])}const ir=[{label:"Start Default",command:"ccs",description:"Launch Claude with default profile"},{label:"GLM Profile",command:"ccs glm",description:"Switch to GLM model"},{label:"Health Check",command:"ccs doctor",description:"Run system diagnostics"},{label:"Delegate Task",command:'ccs glm -p "your task"',description:"Delegate to GLM profile"}];function cr({snippets:s=ir}){const[r,t]=b.useState(null),a=async(n,o)=>{await navigator.clipboard.writeText(n),t(o),setTimeout(()=>t(null),2e3)};return e.jsxs(L,{children:[e.jsx(D,{className:"pb-3",children:e.jsxs(R,{className:"text-lg flex items-center gap-2",children:[e.jsx(es,{className:"w-5 h-5 text-muted-foreground"}),"Quick Commands"]})}),e.jsx(A,{children:e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:s.map((n,o)=>e.jsxs("div",{className:Se("group flex items-center justify-between gap-2 px-3 py-2","rounded-lg border bg-muted/30 hover:bg-muted/50 transition-colors"),children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:n.label}),e.jsx("code",{className:"text-sm font-mono font-medium truncate block",children:n.command})]}),e.jsx(y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>a(n.command,o),title:n.description,children:r===o?e.jsx(ss,{className:"h-4 w-4 text-green-600"}):e.jsx(rs,{className:"h-4 w-4"})})]},o))})})]})}function dr(s){return!s||!Number.isFinite(s)?"N/A":new Date(s).toLocaleString()}function ur(s){return!s||s<=0?"0 B":s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(2)} MB`}function N({label:s,value:r,mono:t=!1}){return e.jsxs("div",{className:"flex items-start justify-between gap-3 text-sm",children:[e.jsx("span",{className:"text-muted-foreground shrink-0",children:s}),e.jsx("span",{className:Se("text-right break-all",t&&"font-mono text-xs"),children:r})]})}function mr({diagnostics:s}){const r=s.config.activeProfile?`codex --profile ${s.config.activeProfile}`:"codex";return e.jsx(xe,{className:"h-full",children:e.jsxs("div",{className:"space-y-4 pr-1",children:[e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(ts,{className:"h-4 w-4"}),"How Codex works in CCS"]})}),e.jsxs(A,{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:"Codex is a first-class runtime target in CCS, but it stays runtime-only in v1."}),e.jsxs("p",{children:[e.jsx("code",{children:"ccs-codex"})," and ",e.jsx("code",{children:"ccsx"})," launch native Codex against your saved native config, while ",e.jsx("code",{children:"ccsxp"})," is the opinionated shortcut for"," ",e.jsx("code",{children:"ccs codex --target codex"}),"."]}),e.jsxs("p",{children:["Plain ",e.jsx("code",{children:"codex"})," or a personal alias like ",e.jsx("code",{children:"cxp"})," needs"," ",e.jsx("code",{children:'model_provider = "cliproxy"'})," plus a matching"," ",e.jsx("code",{children:"[model_providers.cliproxy]"})," entry if you want CLIProxy as the saved native default."]}),e.jsxs("p",{children:["Built-in ",e.jsx("code",{children:"openai"})," and ",e.jsx("code",{children:"oss"})," providers are also valid native defaults and do not need a custom ",e.jsx("code",{children:"[model_providers]"})," stanza."]}),e.jsx("p",{children:"Saved default targets for API profiles and variants still remain on Claude or Droid."}),e.jsxs("p",{children:["CCS-backed Codex launches can apply transient ",e.jsx("code",{children:"-c"})," overrides and inject",e.jsx("code",{children:" CCS_CODEX_API_KEY"}),", so effective runtime values may not match this file exactly."]})]})]}),e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(ns,{className:"h-4 w-4"}),"Runtime install"]})}),e.jsxs(A,{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Status"}),e.jsx(I,{variant:s.binary.installed?"default":"secondary",children:s.binary.installed?"Detected":"Not found"})]}),e.jsx(N,{label:"Detection source",value:s.binary.source,mono:!0}),e.jsx(N,{label:"Binary path",value:s.binary.path||"Not found",mono:!0}),e.jsx(N,{label:"Install directory",value:s.binary.installDir||"N/A",mono:!0}),e.jsx(N,{label:"Version",value:s.binary.version||"Unknown",mono:!0}),e.jsx(N,{label:"Native aliases",value:"ccs-codex, ccsx",mono:!0}),e.jsx(N,{label:"CCS provider shortcut",value:"ccsxp",mono:!0}),e.jsxs("div",{className:"flex items-center justify-between rounded-md border px-3 py-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"--config override support"}),e.jsx(I,{variant:s.binary.supportsConfigOverrides?"default":"secondary",children:s.binary.supportsConfigOverrides?"Available":"Missing"})]})]})]}),e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(ce,{className:"h-4 w-4"}),"CLIProxy-backed native Codex"]})}),e.jsxs(A,{className:"space-y-3 text-sm text-muted-foreground",children:[e.jsxs("p",{children:["There are two supported paths. Use ",e.jsx("code",{children:"ccsxp"})," if you want the built-in CCS Codex provider shortcut. Use the saved recipe below if you want plain"," ",e.jsx("code",{children:"codex"})," or a personal alias like ",e.jsx("code",{children:"cxp"})," to default to CLIProxy."]}),e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsx("p",{className:"font-medium text-foreground",children:"Saved native Codex recipe"}),e.jsx("pre",{className:"mt-2 overflow-x-auto rounded-md bg-background p-3 text-xs text-foreground",children:_e})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{children:["1. Save a provider named ",e.jsx("code",{children:"cliproxy"})," with the base URL and env key above."]}),e.jsxs("p",{children:["2. In ",e.jsx("strong",{children:"Top-level settings"}),", set ",e.jsx("strong",{children:"Default provider"})," to"," ",e.jsx("code",{children:"cliproxy"}),"."]}),e.jsxs("p",{children:["3. Export ",e.jsx("code",{children:"CLIPROXY_API_KEY"})," in your shell before launching native Codex."]})]})]})]}),e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(as,{className:"h-4 w-4"}),"Config file"]})}),e.jsx(A,{className:"space-y-3",children:e.jsxs("div",{className:"rounded-md border p-3 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-medium text-sm",children:"User config"}),s.file.exists?e.jsx(ls,{className:"h-4 w-4 text-green-600"}):e.jsx(os,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(N,{label:"Path",value:s.file.path,mono:!0}),e.jsx(N,{label:"Resolved",value:s.file.resolvedPath,mono:!0}),e.jsx(N,{label:"Size",value:ur(s.file.sizeBytes)}),e.jsx(N,{label:"Last modified",value:dr(s.file.mtimeMs)}),s.file.parseError&&e.jsxs("p",{className:"text-xs text-amber-600",children:["TOML warning: ",s.file.parseError]}),s.file.readError&&e.jsxs("p",{className:"text-xs text-destructive",children:["Read warning: ",s.file.readError]})]})})]}),e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(de,{className:"h-4 w-4"}),"Current user-layer summary"]})}),e.jsxs(A,{className:"space-y-3",children:[e.jsx(N,{label:"Model",value:s.config.model||"Not set",mono:!0}),e.jsx(N,{label:"Model provider",value:s.config.modelProvider||"Not set",mono:!0}),e.jsx(N,{label:"Active profile",value:s.config.activeProfile||"Not set",mono:!0}),e.jsx(N,{label:"Approval policy",value:s.config.approvalPolicy||"Not set",mono:!0}),e.jsx(N,{label:"Sandbox mode",value:s.config.sandboxMode||"Not set",mono:!0}),e.jsx(N,{label:"Web search",value:s.config.webSearch||"Not set",mono:!0}),e.jsx(Q,{}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs(I,{variant:"outline",className:"justify-center",children:["providers: ",s.config.modelProviderCount]}),e.jsxs(I,{variant:"outline",className:"justify-center",children:["profiles: ",s.config.profileCount]}),e.jsxs(I,{variant:"outline",className:"justify-center",children:["enabled features: ",s.config.enabledFeatures.length]}),e.jsxs(I,{variant:"outline",className:"justify-center",children:["MCP servers: ",s.config.mcpServerCount]})]}),s.config.topLevelKeys.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"User-layer keys present"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.config.topLevelKeys.map(t=>e.jsx(I,{variant:"secondary",className:"font-mono text-[10px]",children:t},t))})]})]})]}),e.jsx(cr,{snippets:[{label:"Native short alias",command:"ccsx",description:"Launch the short native Codex runtime alias."},{label:"CCS Codex shortcut",command:'ccsxp "your prompt"',description:"Run the built-in CCS Codex provider on native Codex."},{label:"Explicit provider route",command:'ccs codex --target codex "your prompt"',description:"Use the explicit built-in Codex provider route."},{label:s.config.activeProfile?"Inspect active profile":"Open native Codex",command:r,description:s.config.activeProfile?"Inspect the active named profile directly in native Codex.":"Open native Codex without forcing a named profile overlay."}]}),e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(ce,{className:"h-4 w-4"}),"Runtime vs provider"]})}),e.jsxs(A,{className:"grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border p-3 text-sm",children:[e.jsx("p",{className:"font-medium",children:"Native Codex runtime"}),e.jsxs("p",{className:"mt-1 text-muted-foreground",children:["Use ",e.jsx("code",{children:"ccs-codex"}),", ",e.jsx("code",{children:"ccsx"}),", or ",e.jsx("code",{children:"--target codex"})," when you want the local Codex CLI to honor your saved native user config."]})]}),e.jsxs("div",{className:"rounded-md border p-3 text-sm",children:[e.jsx("p",{className:"font-medium",children:"CCS Codex provider / bridge"}),e.jsxs("p",{className:"mt-1 text-muted-foreground",children:["Use ",e.jsx("code",{children:"ccsxp"})," or ",e.jsx("code",{children:"ccs codex --target codex"})," when you want the built-in CCS Codex provider on native Codex. That path uses transient CCS-managed overrides and is separate from the saved ",e.jsx("code",{children:"cliproxy"})," recipe above."]})]})]})]}),e.jsxs(L,{children:[e.jsx(D,{className:"pb-2",children:e.jsx(R,{className:"text-base",children:"Supported flows"})}),e.jsx(A,{children:e.jsxs(us,{children:[e.jsx(ms,{children:e.jsxs(we,{children:[e.jsx(ne,{children:"Flow"}),e.jsx(ne,{children:"Status"}),e.jsx(ne,{children:"Notes"})]})}),e.jsx(xs,{children:s.supportMatrix.map(t=>e.jsxs(we,{children:[e.jsx(ae,{className:"font-mono text-xs",children:t.label}),e.jsx(ae,{children:e.jsx(I,{variant:t.supported?"default":"secondary",children:t.supported?"Yes":"No"})}),e.jsx(ae,{className:"text-xs text-muted-foreground",children:t.notes})]},t.id))})]})})]}),s.warnings.length>0&&e.jsxs(L,{className:"border-amber-200 bg-amber-50/50 dark:bg-amber-950/20",children:[e.jsx(D,{className:"pb-2",children:e.jsxs(R,{className:"flex items-center gap-2 text-base",children:[e.jsx(is,{className:"h-4 w-4 text-amber-600"}),"Warnings"]})}),e.jsx(A,{className:"space-y-1.5",children:s.warnings.map(t=>e.jsxs("p",{className:"text-sm text-amber-800 dark:text-amber-300",children:["- ",t]},t))})]})]})})}function _r(){const{diagnostics:s,diagnosticsLoading:r,diagnosticsError:t,refetchDiagnostics:a,rawConfig:n,rawConfigLoading:o,rawConfigError:i,refetchRawConfig:l,saveRawConfigAsync:d,isSavingRawConfig:c,patchConfigAsync:u,isPatchingConfig:h}=or(),[p,x]=b.useState(null),j=n?.rawText??"",m=p??j,v=p!==null&&p!==j,H=Oe(m),U=H.parseError?{valid:!1,error:H.parseError}:{valid:!0},_=n?.config??null,w=o||!n||v||n?.parseError!==null||n?.readError!==null,Le=i?"Structured controls unavailable: failed to load the current config.toml.":n?.readError?`Structured controls unavailable: ${n.readError}`:v?U.valid?"Save or discard raw TOML edits before using structured controls.":"Fix or discard raw TOML edits before using structured controls.":n?.parseError?`Structured controls disabled: ${n.parseError}`:null,De=b.useMemo(()=>Ee(_),[_]),Re=b.useMemo(()=>Os(_),[_]),Ae=b.useMemo(()=>Ls(_),[_]),Me=b.useMemo(()=>Ds(_),[_]),Ie=b.useMemo(()=>Rs(_),[_]),Ue=b.useMemo(()=>As(_),[_]),Fe=M=>{if(M===j){x(null);return}x(M)},Ke=async()=>{try{if((await Promise.all([a(),l()])).some(q=>!q||q.status==="error"||q.isError||q.error)){F.error("Failed to refresh Codex snapshot. Raw edits were kept.");return}x(null)}catch(M){F.error(M.message||"Failed to refresh Codex snapshot.")}},Ve=async()=>{if(!U.valid){F.error("Fix TOML before saving.");return}try{await d({rawText:m,expectedMtime:n?.exists?n.mtime:void 0}),x(null),F.success("Saved Codex config.toml."),await a()}catch(M){je(M)?F.error("config.toml changed externally. Refresh and retry."):F.error(M.message||"Failed to save Codex config.toml.")}},qe=async(M,fe)=>{try{await u({...M,expectedMtime:n?.exists?n.mtime:void 0}),x(null),F.success(fe)}catch(q){je(q)?F.error("config.toml changed externally. Refresh and retry."):F.error(q.message||"Failed to update Codex config.")}},se="mt-0 h-full border-0 p-0 data-[state=inactive]:hidden",$e=()=>r?e.jsxs("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[e.jsx($,{className:"mr-2 h-5 w-5 animate-spin"}),"Loading Codex diagnostics..."]}):t||!s?e.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-destructive",children:"Failed to load Codex diagnostics."}):e.jsxs(Xe,{defaultValue:"overview",className:"flex h-full flex-col",children:[e.jsx("div",{className:"shrink-0 px-4 pt-4",children:e.jsxs(Be,{className:"grid w-full grid-cols-3",children:[e.jsx(re,{value:"overview",children:"Overview"}),e.jsx(re,{value:"controls",children:"Control Center"}),e.jsx(re,{value:"docs",children:"Docs"})]})}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden px-4 pb-4 pt-3",children:[e.jsx(te,{value:"overview",className:se,children:e.jsx(mr,{diagnostics:s})}),e.jsx(te,{value:"controls",className:se,children:e.jsx(Ps,{workspacePath:s.workspacePath,activeProfile:s.config.activeProfile,topLevelSettings:De,projectTrustEntries:Re,profileEntries:Ae,modelProviderEntries:Me,mcpServerEntries:Ie,featureCatalog:Te,featureState:Ue,disabled:w,disabledReason:Le,saving:h,onPatch:qe})}),e.jsx(te,{value:"docs",className:se,children:e.jsx(Fs,{diagnostics:s})})]})]});return e.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:e.jsxs(ze,{direction:"horizontal",className:"h-full",children:[e.jsx(pe,{defaultSize:45,minSize:35,children:e.jsx("div",{className:"h-full border-r bg-muted/20",children:$e()})}),e.jsx(Ye,{className:"group flex w-2 cursor-col-resize items-center justify-center bg-border transition-colors hover:bg-primary/20",children:e.jsx(cs,{className:"h-3 w-3 text-muted-foreground group-hover:text-primary"})}),e.jsx(pe,{defaultSize:55,minSize:35,children:e.jsx(hs,{title:"Codex config.toml",pathLabel:n?.path||s?.file.path||"$CODEX_HOME/config.toml",loading:o,parseWarning:U.valid?n?.parseError:U.error,readWarning:n?.readError,value:m,dirty:v,readOnly:!!n?.readError,saving:c,saveDisabled:!v||c||o||!U.valid||!!n?.readError,onChange:M=>{Fe(M)},onSave:Ve,onRefresh:Ke,onDiscard:()=>x(null),language:"toml",loadingLabel:"Loading config.toml...",parseWarningLabel:"TOML warning",ownershipNotice:e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50/60 px-3 py-2 text-sm text-amber-900 dark:bg-amber-950/20 dark:text-amber-300",children:[e.jsx("p",{className:"font-medium",children:"This file is upstream-owned by Codex CLI."}),e.jsxs("p",{children:["CCS does not keep ",e.jsx("code",{children:"~/.codex/config.toml"})," in sync for you."]}),e.jsxs("p",{children:["CCS-backed Codex launches may apply transient ",e.jsx("code",{children:"-c"})," overrides and",e.jsx("code",{children:" CCS_CODEX_API_KEY"}),"; those effective values may not appear here."]})]})})})]})})}export{_r as CodexPage};
@@ -1 +0,0 @@
1
- import{r as d}from"./react-vendor-CNOkPC89.js";const M=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,c,o)=>o?o.toUpperCase():c.toLowerCase()),s=t=>{const e=_(t);return e.charAt(0).toUpperCase()+e.slice(1)},k=(...t)=>t.filter((e,c,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===c).join(" ").trim(),v=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var m={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const x=d.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:y="",children:h,iconNode:p,...n},r)=>d.createElement("svg",{ref:r,...m,width:e,height:e,stroke:t,strokeWidth:o?Number(c)*24/Number(e):c,className:k("lucide",y),...!h&&!v(n)&&{"aria-hidden":"true"},...n},[...p.map(([i,l])=>d.createElement(i,l)),...Array.isArray(h)?h:[h]]));const a=(t,e)=>{const c=d.forwardRef(({className:o,...y},h)=>d.createElement(x,{ref:h,iconNode:e,className:k(`lucide-${M(s(t))}`,`lucide-${t}`,o),...y}));return c.displayName=s(t),c};const g=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],F2=a("activity",g);const f=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],U2=a("archive",f);const w=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],Z2=a("arrow-down-left",w);const N=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],D2=a("arrow-down-right",N);const $=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],E2=a("arrow-down",$);const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],W2=a("arrow-left",u);const z=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],O2=a("arrow-right-left",z);const b=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],G2=a("arrow-right",b);const q=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],T2=a("arrow-up-right",q);const C=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],I2=a("arrow-up",C);const A=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],K2=a("book-open",A);const j=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],X2=a("bot",j);const H=[["path",{d:"M21 8a2 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:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Q2=a("box",H);const V=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],J2=a("brain-circuit",V);const L=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Y2=a("brain",L);const S=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],a0=a("bug",S);const P=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],e0=a("calendar-clock",P);const R=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],t0=a("calendar",R);const B=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],c0=a("chart-column",B);const F=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],o0=a("chart-pie",F);const U=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],h0=a("check-check",U);const Z=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],d0=a("check",Z);const D=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],y0=a("chevron-down",D);const E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],n0=a("chevron-left",E);const W=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],s0=a("chevron-right",W);const O=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],k0=a("chevron-up",O);const G=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],p0=a("chevrons-up-down",G);const T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],r0=a("circle-alert",T);const I=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],i0=a("circle-check-big",I);const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],l0=a("circle-check",K);const X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],M0=a("circle-question-mark",X);const Q=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],_0=a("circle-x",Q);const J=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],v0=a("circle",J);const Y=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],m0=a("clock",Y);const a1=[["path",{d:"m10.852 19.772-.383.924",key:"r7sl7d"}],["path",{d:"m13.148 14.228.383-.923",key:"1d5zpm"}],["path",{d:"M13.148 19.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1ydik7"}],["path",{d:"m13.53 20.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1m1vsf"}],["path",{d:"m14.772 15.852.923-.383",key:"660p6e"}],["path",{d:"m14.772 18.148.923.383",key:"hrcpis"}],["path",{d:"M4.2 15.1a7 7 0 1 1 9.93-9.858A7 7 0 0 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.2",key:"j2q98n"}],["path",{d:"m9.228 15.852-.923-.383",key:"1p9ong"}],["path",{d:"m9.228 18.148-.923.383",key:"6558rz"}]],x0=a("cloud-cog",a1);const e1=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],g0=a("cloud",e1);const t1=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],f0=a("code-xml",t1);const c1=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],w0=a("code",c1);const o1=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],N0=a("coins",o1);const h1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],$0=a("copy",h1);const d1=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],u0=a("cpu",d1);const y1=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],z0=a("database",y1);const n1=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],b0=a("dollar-sign",n1);const s1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],q0=a("download",s1);const k1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],C0=a("ellipsis",k1);const p1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],A0=a("external-link",p1);const r1=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],j0=a("eye-off",r1);const i1=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],H0=a("eye",i1);const l1=[["path",{d:"M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6",key:"14cnrg"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1",key:"sr0ebq"}],["path",{d:"M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1",key:"w793db"}]],V0=a("file-braces-corner",l1);const M1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],L0=a("file-braces",M1);const _1=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],S0=a("file-code-corner",_1);const v1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],P0=a("file-code",v1);const m1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],R0=a("file-down",m1);const x1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],B0=a("file-exclamation-point",x1);const g1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],F0=a("file-text",g1);const f1=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]],U0=a("folder-check",f1);const w1=[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z",key:"1u1bxd"}]],Z0=a("folder-code",w1);const N1=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],D0=a("folder-open",N1);const $1=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],E0=a("folder",$1);const u1=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],W0=a("gauge",u1);const z1=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],O0=a("git-branch",z1);const b1=[["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"}]],G0=a("github",b1);const q1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],T0=a("globe",q1);const C1=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],I0=a("grip-horizontal",C1);const A1=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],K0=a("grip-vertical",A1);const j1=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],X0=a("heart",j1);const H1=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Q0=a("house",H1);const V1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],J0=a("info",V1);const L1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Y0=a("key-round",L1);const S1=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],aa=a("key",S1);const P1=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],ea=a("laptop",P1);const R1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],ta=a("layers",R1);const B1=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],ca=a("link-2",B1);const F1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],oa=a("list-filter",F1);const U1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ha=a("loader-circle",U1);const Z1=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],da=a("lock",Z1);const D1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],ya=a("log-out",D1);const E1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],na=a("megaphone",E1);const W1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],sa=a("message-square",W1);const O1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],ka=a("monitor",O1);const G1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],pa=a("moon",G1);const T1=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],ra=a("network",T1);const I1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ia=a("panel-left",I1);const K1=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],la=a("pause",K1);const X1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ma=a("pencil",X1);const Q1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],_a=a("play",Q1);const J1=[["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"}]],va=a("plug-zap",J1);const Y1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ma=a("plus",Y1);const a2=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],xa=a("power-off",a2);const e2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],ga=a("power",e2);const t2=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],fa=a("puzzle",t2);const c2=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],wa=a("radio",c2);const o2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Na=a("refresh-cw",o2);const h2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],$a=a("rotate-ccw",h2);const d2=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ua=a("rotate-cw",d2);const y2=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],za=a("route",y2);const n2=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],ba=a("save",n2);const s2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],qa=a("search",s2);const k2=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Ca=a("server",k2);const p2=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Aa=a("settings-2",p2);const r2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ja=a("settings",r2);const i2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Ha=a("shield-alert",i2);const l2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Va=a("shield-check",l2);const M2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],La=a("shield",M2);const _2=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],Sa=a("sliders-horizontal",_2);const v2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Pa=a("sparkles",v2);const m2=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Ra=a("square-terminal",m2);const x2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ba=a("square",x2);const g2=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Fa=a("star",g2);const f2=[["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"}]],Ua=a("sun",f2);const w2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Za=a("terminal",w2);const N2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Da=a("trash-2",N2);const $2=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Ea=a("trending-up",$2);const u2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Wa=a("triangle-alert",u2);const z2=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],Oa=a("unlink",z2);const b2=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Ga=a("upload",b2);const q2=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ta=a("user",q2);const C2=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ia=a("users",C2);const A2=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Ka=a("wand-sparkles",A2);const j2=[["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"}]],Xa=a("waves",j2);const H2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Qa=a("wifi-off",H2);const V2=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Ja=a("wifi",V2);const L2=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Ya=a("workflow",L2);const S2=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],ae=a("wrench",S2);const P2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ee=a("x",P2);const R2=[["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"}]],te=a("zap",R2);export{F0 as $,F2 as A,K2 as B,s0 as C,K0 as D,j0 as E,D0 as F,W0 as G,Q0 as H,$a as I,wa as J,aa as K,ha as L,pa as M,u0 as N,J0 as O,ia as P,Za as Q,Na as R,Ra as S,Wa as T,Ia as U,w0 as V,Qa as W,ee as X,T2 as Y,te as Z,Z2 as _,c0 as a,g0 as a$,B0 as a0,I0 as a1,Aa as a2,ma as a3,Pa as a4,sa as a5,Y2 as a6,Ca as a7,U2 as a8,P0 as a9,M0 as aA,O0 as aB,oa as aC,Ya as aD,za as aE,Va as aF,V0 as aG,ga as aH,xa as aI,p0 as aJ,va as aK,ta as aL,U0 as aM,E0 as aN,J2 as aO,S0 as aP,Ma as aQ,h0 as aR,Oa as aS,ca as aT,Xa as aU,O2 as aV,ae as aW,ka as aX,X2 as aY,e0 as aZ,na as a_,n0 as aa,da as ab,b0 as ac,z0 as ad,D2 as ae,t0 as af,N0 as ag,Ea as ah,o0 as ai,Da as aj,ba as ak,qa as al,Ka as am,f0 as an,Sa as ao,x0 as ap,G2 as aq,Ga as ar,L0 as as,q0 as at,W2 as au,Ha as av,Fa as aw,ra as ax,Z0 as ay,C0 as az,G0 as b,ea as b0,Q2 as b1,a0 as b2,R0 as b3,ua as b4,Ba as b5,E2 as b6,I2 as b7,fa as c,ja as d,Ua as e,H0 as f,Ja as g,La as h,X0 as i,i0 as j,v0 as k,d0 as l,Y0 as m,$0 as n,A0 as o,Ta as p,ya as q,y0 as r,k0 as s,T0 as t,m0 as u,l0 as v,_0 as w,r0 as x,_a as y,la as z};